Skip to content

Commit de6743c

Browse files
author
gau1991
committed
Merge branch 'master' into stable
2 parents de4d5e5 + 8ae3dc2 commit de6743c

File tree

18 files changed

+710
-419
lines changed

18 files changed

+710
-419
lines changed

.travis.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ script:
2525
- sudo echo -e "[user]\n\tname = abc\n\temail = [email protected]" > ~/.gitconfig
2626
- sudo echo "Travis Banch = $TRAVIS_BRANCH"
2727
- sudo apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt
28-
- sudo python3 setup.py install
28+
- sudo bash install $TRAVIS_BRANCH
2929
- sudo ee --help
3030
- sudo ee stack install
3131
- sudo ee stack install --web
@@ -64,10 +64,10 @@ script:
6464
- sudo ee site create site12.in --wpfc --wpsubdomain
6565
- sudo ee site create site12.net --wpfc --wpsubdomain
6666

67-
- sudo ee debug
68-
- sudo ee debug --stop
67+
- sudo ee debug --all
68+
- sudo ee debug --all=off
6969
- sudo ee debug site12.net
70-
- sudo ee debug site12.net --stop
70+
- sudo ee debug site12.net --all=off
7171
- sudo ee site create 1.com --html
7272
- sudo ee site create 2.com --php
7373
- sudo ee site create 3.com --mysql
@@ -88,6 +88,11 @@ script:
8888
- sudo ee site update site9.com --wpsubdomain --w3tc
8989
- sudo ee site update site9.com --wpsubdomain --wpsc
9090

91+
- sudo ee site create www.site-1.com --wp
92+
- sudo ee site create www.subsite.site-1.com --wpfc
93+
- sudo ee site update www.subsite.site-1.com --wp
94+
- sudo ee site delete www.subsite.site-1.com --all --no-prompt
95+
9196
- sudo ee site delete site12.in --all --no-prompt
9297
- sudo ee site delete site12.net --no-prompt
9398
- sudo ee site delete site12.org --no-prompt

CONTRIBUTING.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
1-
# Contribute to EasyEngine (ee)
1+
# Community Guidelines
22

3-
This guide details how to use issues and pull requests to improve EasyEngine (ee).
3+
This guide details how to get involve in EasyEngine commmunity. Please read this carefully.
44

5-
## How to report issue:
65

7-
Github issue-tracker is used **only** for report bugs and feature request.
86

9-
Please attach the output of following command when open a new issue/bug
7+
## How to get help?
8+
9+
Please attach the output of following command when open a new support request.
10+
1011
```bash
1112
lsb_release -a
1213
ee -v
1314
ee info
1415
wp --allow-root --info
1516
```
1617

17-
### EasyEngine chat:
18-
Developer & contributor discussion: https://gitter.im/rtCamp/easyengine
18+
### Where to create issue?
19+
20+
For free support, please use - http://community.rtcamp.com/c/easyengine
21+
22+
For premium support, please check - https://rtcamp.com/products/easyengine-premium-support/
1923

24+
Please do NOT clutter github issue tracker here with support requests. It hampers development speed of this project.
2025

21-
### EasyEngine support request:
22-
For support-request please use - http://community.rtcamp.com/c/easyengine
2326

27+
### Pull Requests
2428

25-
### Pull Requests:
2629
When submitting your code please follow this coding standerds - http://docs.rtcamp.com/easyengine/dev/python/
30+
31+
32+
### EasyEngine Chat
33+
34+
Developer & contributor discussion: https://gitter.im/rtCamp/easyengine
35+
36+
Please do NOT use chat for technical support. Chat is limited to developer & contributor disucssion related to EasyEngine future.

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
IMPORTANT
2-
============================================
3-
4-
#### We are looking for [Python Developers] (https://rtcamp.com/careers/python-developer/) to join our team. We offer work from home, so you can join EasyEngine team anywhere! _[Why Python?] (https://rtcamp.com/blog/easyengine-3-roadmap/#whypython)_
5-
6-
---
7-
8-
[![Stories in Ready](https://badge.waffle.io/rtcamp/easyengine.png?label=ready&title=Ready)](https://waffle.io/rtcamp/easyengine)
9-
[![Stories in Progress](https://badge.waffle.io/rtcamp/easyengine.png?label=in%20progress&title=In%20Progress)](https://waffle.io/rtcamp/easyengine)
10-
11-
<img src="https://d3qt5vpr7p9rgn.cloudfront.net/wp-content/uploads/2013/08/easy-engine-logo-2-RS1.png" alt="EasyEngine Logo" align="right" />
12-
131
[![Travis Build Status](https://travis-ci.org/rtCamp/easyengine.svg "Travis Build Status")] (https://travis-ci.org/rtCamp/easyengine)
2+
[![Join the chat at https://gitter.im/rtCamp/easyengine](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rtCamp/easyengine?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3+
4+
<img src="https://d3qt5vpr7p9rgn.cloudfront.net/wp-content/uploads/2013/08/easy-engine-logo-2-RS1-240x184.png" alt="EasyEngine Logo" align="right" />
145

156
EasyEngine (ee) is a python tool, which makes it easy to manage your wordpress sites running on nginx web-server.
167

@@ -92,5 +83,13 @@ ee site create example.com --mysql # create example.com with php & mysql supp
9283

9384
[![Donate](https://cloud.githubusercontent.com/assets/4115/5297691/c7b50292-7bd7-11e4-987b-2dc21069e756.png)] (https://rtcamp.com/donate/?project=easyengine)
9485

86+
## Careers
87+
88+
We are looking for [Python Developers] (https://rtcamp.com/careers/python-developer/) to join our team.
89+
90+
We offer work from home, so you can join EasyEngine team anywhere! _[Why Python?] (https://rtcamp.com/blog/easyengine-3-roadmap/#whypython)_
91+
92+
---
93+
9594
## License
9695
[MIT] (http://opensource.org/licenses/MIT)

config/bash_completion.d/ee_auto.rc

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ _ee_complete()
2929
# IF YOU HAD ANOTHER CONTROLLER, YOU'D HANDLE THAT HERE
3030
"debug")
3131
COMPREPLY=( $(compgen \
32-
-W "$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2> /dev/null) --start --nginx --php --fpm --mysql -i --interactive --stop " \
32+
-W "$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2> /dev/null) --nginx --php --fpm --mysql -i --interactive --all --nginx=off --php=off --fpm=off --mysql=off --all=off " \
3333
-- $cur) )
3434
;;
3535

3636
"stack")
3737
COMPREPLY=( $(compgen \
38-
-W "install purge reload remove restart start status stop" \
38+
-W "install purge reload remove restart start status stop migrate" \
3939
-- $cur) )
4040
;;
4141

@@ -59,7 +59,7 @@ _ee_complete()
5959

6060
"log")
6161
COMPREPLY=( $(compgen \
62-
-W "--mysql --php --nginx --all" \
62+
-W "$(command find /etc/nginx/sites-enabled/ -type l -printf "%P " 2> /dev/null) --mysql --php --nginx --all" \
6363
-- $cur) )
6464
;;
6565

@@ -74,15 +74,19 @@ _ee_complete()
7474
# HANDLE EVERYTHING AFTER THE THIRD LEVEL NAMESPACE
7575
"install" | "purge" | "remove" )
7676
COMPREPLY=( $(compgen \
77-
-W "--web --admin --mail --nginx --php --mysql --postfix --wpcli --phpmyadmin --adminer --utils --memcache --dovecot" \
77+
-W "--web --admin --mail --nginx --php --mysql --postfix --wpcli --phpmyadmin --adminer --utils --memcache --dovecot --all" \
7878
-- $cur) )
7979
;;
8080
"start" | "stop" | "reload" | "restart" | "status")
8181
COMPREPLY=( $(compgen \
8282
-W "--nginx --php --mysql --postfix --memcache --dovecot" \
8383
-- $cur) )
8484
;;
85-
85+
"migrate")
86+
COMPREPLY=( $(compgen \
87+
-W "--mariadb" \
88+
-- $cur) )
89+
;;
8690
"list")
8791
COMPREPLY=( $(compgen \
8892
-W "--enabled --disabled" \
@@ -106,13 +110,22 @@ _ee_complete()
106110
esac
107111

108112
if [ ${COMP_WORDS[1]} == "debug" ] && ([ "$prev" != "--start" ] || [ "$prev" != "--nginx" ] || [ "$prev" != "--php" ] || [ "$prev" != "--fpm" ] || [ "$prev" != "--mysql" ] || [ "$prev" != "-i" ] || ["$prev" != "--interactive" ] || ["$prev" != "--stop" ]); then
109-
retlist="--start --stop --wp --rewrite -i"
113+
retlist="--all --wp --rewrite -i --all=off --wp=off --rewrite=off"
114+
ret="${retlist[@]/$prev}"
115+
COMPREPLY=( $(compgen \
116+
-W "$(echo $ret)" \
117+
-- $cur) )
118+
fi
119+
120+
if [ ${COMP_WORDS[1]} == "log" ] && ([ "$prev" != "--access" ] || [ "$prev" != "--nginx" ] || [ "$prev" != "--php" ] || [ "$prev" != "--fpm" ] || [ "$prev" != "--mysql" ] || [ "$prev" != "-i" ] || ["$prev" != "--interactive" ] || ["$prev" != "--stop" ]); then
121+
retlist="--all --wp --rewrite -i --all=off --wp=off --rewrite=off"
110122
ret="${retlist[@]/$prev}"
111123
COMPREPLY=( $(compgen \
112124
-W "$(echo $ret)" \
113125
-- $cur) )
114126
fi
115127

128+
116129
elif [ $COMP_CWORD -eq 4 ]; then
117130
case "$mprev" in
118131
# HANDLE EVERYTHING AFTER THE THIRD LEVEL NAMESPACE
@@ -141,9 +154,16 @@ _ee_complete()
141154

142155
case "$prev" in
143156
"--wp" | "--wpsubdir" | "--wpsubdomain")
144-
COMPREPLY=( $(compgen \
145-
-W "--w3tc --wpfc --wpsc" \
146-
-- $cur) )
157+
if [ ${COMP_WORDS[1]} != "debug" ]; then
158+
retlist="--w3tc --wpfc --wpsc"
159+
else
160+
retlist="--wp=off --rewrite --rewrite=off -i --interactive"
161+
fi
162+
163+
ret="${retlist[@]/$prev}"
164+
COMPREPLY=( $(compgen \
165+
-W "$(echo $ret)" \
166+
-- $cur) )
147167
;;
148168

149169
"--web" | "--admin" | "--mail" | "--nginx" | "--php" | "--mysql" | "--postfix" | "--wpcli" | "--phpmyadmin" | "--adminer" | "--utils" | "--memcache" | "--dovecot")

ee/cli/ext/ee_outputhandler.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Based on https://github.com/datafolklabs/cement/issues/295
2+
# To avoid encoding releated error,we defined our custom output handler
3+
# I hope we will remove this when we upgarde to Cement 2.6 (Not released yet)
4+
import os
5+
from cement.utils import fs
6+
from cement.ext.ext_mustache import MustacheOutputHandler
7+
8+
9+
class EEOutputHandler(MustacheOutputHandler):
10+
class Meta:
11+
label = 'ee_output_handler'
12+
13+
def _load_template_from_file(self, path):
14+
for templ_dir in self.app._meta.template_dirs:
15+
full_path = fs.abspath(os.path.join(templ_dir, path))
16+
if os.path.exists(full_path):
17+
self.app.log.debug('loading template file %s' % full_path)
18+
return open(full_path, encoding='utf-8', mode='r').read()
19+
else:
20+
continue

ee/cli/main.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
from cement.core import foundation
1414
from cement.utils.misc import init_defaults
1515
from cement.core.exc import FrameworkError, CaughtSignal
16-
from cement.utils import fs
17-
from cement.ext.ext_mustache import MustacheOutputHandler
16+
from cement.ext.ext_argparse import ArgParseArgumentHandler
1817
from ee.core import exc
19-
18+
from ee.cli.ext.ee_outputhandler import EEOutputHandler
2019

2120
# Application default. Should update config/ee.conf to reflect any
2221
# changes, or additions here.
@@ -31,22 +30,12 @@
3130
# External templates (generally, do not ship with application code)
3231
defaults['ee']['template_dir'] = '/var/lib/ee/templates'
3332

34-
35-
# Based on https://github.com/datafolklabs/cement/issues/295
36-
# To avoid encoding releated error,we defined our custom output handler
37-
# I hope we will remove this when we upgarde to Cement 2.6 (Not released yet)
38-
class EEOutputHandler(MustacheOutputHandler):
33+
class EEArgHandler(ArgParseArgumentHandler):
3934
class Meta:
40-
label = 'ee_output_handler'
35+
label = 'ee_args_handler'
4136

42-
def _load_template_from_file(self, path):
43-
for templ_dir in self.app._meta.template_dirs:
44-
full_path = fs.abspath(os.path.join(templ_dir, path))
45-
if os.path.exists(full_path):
46-
self.app.log.debug('loading template file %s' % full_path)
47-
return open(full_path, encoding='utf-8', mode='r').read()
48-
else:
49-
continue
37+
def error(self, message):
38+
super(EEArgHandler, self).error("unknown args")
5039

5140

5241
class EEApp(foundation.CementApp):
@@ -72,6 +61,8 @@ class Meta:
7261
# default output handler
7362
output_handler = EEOutputHandler
7463

64+
arg_handler = EEArgHandler
65+
7566
debug = TOGGLE_DEBUG
7667

7768

0 commit comments

Comments
 (0)