spawngebob 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +5 -0
- data/README.md +4 -0
- data/lib/spawngebob/cli.rb +13 -0
- data/lib/spawngebob/runner.rb +0 -11
- data/lib/spawngebob/utils.rb +1 -1
- data/lib/spawngebob/version.rb +1 -1
- data/script/nginx +5 -4
- metadata +4 -3
data/CHANGELOG
CHANGED
data/README.md
ADDED
data/lib/spawngebob/cli.rb
CHANGED
@@ -2,6 +2,8 @@ require 'thor'
|
|
2
2
|
|
3
3
|
module Spawngebob
|
4
4
|
class CLI < Thor
|
5
|
+
include Constants
|
6
|
+
|
5
7
|
desc "start", "start nginx"
|
6
8
|
def start
|
7
9
|
Runner.boot(options)
|
@@ -29,6 +31,17 @@ module Spawngebob
|
|
29
31
|
|
30
32
|
desc "configure", "generate conf files"
|
31
33
|
def configure
|
34
|
+
# create necessary directories if not exist
|
35
|
+
NGINX_DIRS.each do |d|
|
36
|
+
full_path = File.join(NGINX_PATH, d)
|
37
|
+
|
38
|
+
if !File.exists? full_path
|
39
|
+
Utils.say_with_time "Directory #{full_path} does not exist, creating..." do
|
40
|
+
FileUtils.mkdir_p(full_path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
32
45
|
Runner.boot(options)
|
33
46
|
end
|
34
47
|
end
|
data/lib/spawngebob/runner.rb
CHANGED
@@ -12,17 +12,6 @@ module Spawngebob
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.has_requirements?
|
15
|
-
# create necessary directories if not exist
|
16
|
-
NGINX_DIRS.each do |d|
|
17
|
-
full_path = File.join(NGINX_PATH, d)
|
18
|
-
|
19
|
-
if !File.exists? full_path
|
20
|
-
Utils.say_with_time "Directory #{full_path} does not exist, creating..." do
|
21
|
-
FileUtils.mkdir_p(full_path)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
15
|
# check if nginx is installed
|
27
16
|
if !Constants.const_defined?("NGINX_BIN")
|
28
17
|
Utils.error "Nginx is not installed!"
|
data/lib/spawngebob/utils.rb
CHANGED
data/lib/spawngebob/version.rb
CHANGED
data/script/nginx
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
#!/usr/bin/env sh
|
2
|
+
|
2
3
|
nginx=`which nginx`
|
3
4
|
nginx_path=$HOME/.spawngebob/nginx/
|
4
5
|
pid_file="${nginx_path}run/nginx.pid"
|
5
6
|
prog=$(basename $nginx)
|
6
7
|
|
7
8
|
# colors
|
8
|
-
green
|
9
|
-
yellow
|
10
|
-
red
|
11
|
-
clear
|
9
|
+
green=$(tput setaf 2)
|
10
|
+
yellow=$(tput setaf 3)
|
11
|
+
red=$(tput setaf 1)
|
12
|
+
clear=$(tput setaf 7)
|
12
13
|
nginx_conf_file="$HOME/.spawngebob/nginx/conf/nginx.conf"
|
13
14
|
|
14
15
|
lockfile=$HOME/.spawngebob/nginx/tmp/nginx.lock
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spawngebob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-10 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70293146924520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70293146924520
|
25
25
|
description: ''
|
26
26
|
email:
|
27
27
|
- poymode@gmail.com
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- .gitignore
|
34
34
|
- CHANGELOG
|
35
35
|
- Gemfile
|
36
|
+
- README.md
|
36
37
|
- Rakefile
|
37
38
|
- bin/spawn
|
38
39
|
- lib/spawngebob.rb
|