Skip to content

Commit

Permalink
Merge pull request #39 from devilbox/release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
cytopia authored Jan 23, 2020
2 parents 2242f29 + 2c36804 commit bc9090f
Show file tree
Hide file tree
Showing 19 changed files with 1,398 additions and 1,138 deletions.
20 changes: 10 additions & 10 deletions .ci/fuzzy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ function fuzzy() {
###
### 1 Argument
###
cmd="${MY_PATH}/../bin/vhost_gen.py -${arg1} ${val1}"
cmd="${MY_PATH}/../bin/vhost-gen -${arg1} ${val1}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
echo "${out}"
exit 1
fi
cmd="${MY_PATH}/../bin/vhost_gen.py -p ${val1}"
cmd="${MY_PATH}/../bin/vhost-gen -p ${val1}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
Expand All @@ -61,14 +61,14 @@ function fuzzy() {
###
### 2 Arguments
###
cmd="${MY_PATH}/../bin/vhost_gen.py -${arg1} ${val1} -${arg2} ${val2}"
cmd="${MY_PATH}/../bin/vhost-gen -${arg1} ${val1} -${arg2} ${val2}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
echo "${out}"
exit 1
fi
cmd="${MY_PATH}/../bin/vhost_gen.py -p ${val1} -n NAME"
cmd="${MY_PATH}/../bin/vhost-gen -p ${val1} -n NAME"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
Expand All @@ -79,14 +79,14 @@ function fuzzy() {
###
### 3 Arguments
###
cmd="${MY_PATH}/../bin/vhost_gen.py -${arg1} ${val1} -${arg2} ${val2} -${arg3} ${val3}"
cmd="${MY_PATH}/../bin/vhost-gen -${arg1} ${val1} -${arg2} ${val2} -${arg3} ${val3}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
echo "${out}"
exit 1
fi
cmd="${MY_PATH}/../bin/vhost_gen.py -p ${val1} -n NAME -${arg3} ${val3}"
cmd="${MY_PATH}/../bin/vhost-gen -p ${val1} -n NAME -${arg3} ${val3}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
Expand All @@ -97,14 +97,14 @@ function fuzzy() {
###
### 4 Arguments
###
cmd="${MY_PATH}/../bin/vhost_gen.py -${arg1} ${val1} -${arg2} ${val2} -${arg3} ${val3} -${arg4} ${val4}"
cmd="${MY_PATH}/../bin/vhost-gen -${arg1} ${val1} -${arg2} ${val2} -${arg3} ${val3} -${arg4} ${val4}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
echo "${out}"
exit 1
fi
cmd="${MY_PATH}/../bin/vhost_gen.py -p ${val1} -n NAME -${arg3} ${val3} -${arg4} ${val4}"
cmd="${MY_PATH}/../bin/vhost-gen -p ${val1} -n NAME -${arg3} ${val3} -${arg4} ${val4}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
Expand All @@ -115,14 +115,14 @@ function fuzzy() {
###
### 5 Arguments
###
cmd="${MY_PATH}/../bin/vhost_gen.py -${arg1} ${val1} -${arg2} ${val2} -${arg3} ${val3} -${arg4} ${val4} -${arg5} ${val5}"
cmd="${MY_PATH}/../bin/vhost-gen -${arg1} ${val1} -${arg2} ${val2} -${arg3} ${val3} -${arg4} ${val4} -${arg5} ${val5}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
echo "${out}"
exit 1
fi
cmd="${MY_PATH}/../bin/vhost_gen.py -p ${val1} -n NAME -${arg3} ${val3} -${arg4} ${val4} -${arg5} ${val5}"
cmd="${MY_PATH}/../bin/vhost-gen -p ${val1} -n NAME -${arg3} ${val3} -${arg4} ${val4} -${arg5} ${val5}"
out="$( eval "${cmd}" 2>&1 || true )"
if errored "${out}"; then
printf "[%04d] %s\n" "${count}" "${cmd}"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---

###
### Lints all generic and json files in the whole git repository
###

name: linting
on:
pull_request:
push:
branches:
- master
tags:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
target:
- pycodestyle
- pydocstyle
- black

name: "[ ${{ matrix.target }} ]"
steps:
- name: Checkout repository
uses: actions/checkout@master

- name: Lint
run: |
make ${target}
env:
target: ${{ matrix.target }}
39 changes: 39 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---

###
### Lints all generic and json files in the whole git repository
###

name: testing
on:
pull_request:
push:
branches:
- master
tags:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
version:
- '2.7'
- '3.6'
- '3.7'
- '3.8'
target:
- test

name: "[ ${{ matrix.target }} ${{ matrix.version}} ]"
steps:
- name: Checkout repository
uses: actions/checkout@master

- name: Lint
run: |
make ${target} VERSION=${version}
env:
target: ${{ matrix.target }}
version: ${{ matrix.version }}
91 changes: 5 additions & 86 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,86 +1,5 @@
# Note:
# To effectively apply the changes you will have
# to re-index the git index (if there are already
# commited files)
#
# $ git rm -r --cached .
# $ git add .
# $ git commit -m ".gitignore index rebuild"
#


######################################
# CUSTOM
######################################
*.pyc


######################################
# GENERIC
######################################

###### std ######
.lock
*.log

###### patches/diffs ######
*.patch
*.diff
*.orig
*.rej


######################################
# Operating Systems
######################################

###### OSX ######
._*
.DS*
.Spotlight-V100
.Trashes

###### Windows ######
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.lnk
*.shortcut

######################################
# Editors
######################################

###### Sublime ######
*.sublime-workspace
*.sublime-project

###### Eclipse ######
.classpath
.buildpath
.project
.settings/

###### Netbeans ######
/nbproject/

###### Intellij IDE ######
.idea/
.idea_modules/

###### vim ######
*.swp
*.swo
*.swn
*.swm
*~

###### TextMate ######
.tm_properties
*.tmproj

###### BBEdit ######
*.bbprojectd
*.bbproject

vhost_gen.egg-info/
build/
dist/
.*pyc
__pycache__/
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ install:
###
before_script:
# Show versions
- ./bin/vhost_gen.py --help
- ./bin/vhost_gen.py --version
- ./bin/vhost-gen --help
- ./bin/vhost-gen --version


###
Expand All @@ -85,19 +85,19 @@ script:
- make test

# Saving (nginx)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c etc/conf.yml -s
- ./bin/vhost-gen -p ./ -n name -t etc/templates/ -c etc/conf.yml -s
- cat /etc/nginx/conf.d/name.conf

# Saving (nginx example)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c examples/conf.nginx.yml -s
- ./bin/vhost-gen -p ./ -n name -t etc/templates/ -c examples/conf.nginx.yml -s
- cat /etc/nginx/conf.d/name.conf

# Saving (apache22 example)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c examples/conf.apache22.yml -s
- ./bin/vhost-gen -p ./ -n name -t etc/templates/ -c examples/conf.apache22.yml -s
- cat /etc//httpd/conf.d/name.conf

# Saving (apache24 example)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c examples/conf.apache24.yml -s
- ./bin/vhost-gen -p ./ -n name -t etc/templates/ -c examples/conf.apache24.yml -s
- cat /etc/apache2/conf.d/name.conf

# Find flaws via fuzzying (before installing config files)
Expand Down
Loading

0 comments on commit bc9090f

Please sign in to comment.