sunzi-rails 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/sunzi-cap +1 -1
- data/lib/sunzi/cli.rb +4 -10
- data/sunzi.gemspec +1 -1
- data/test/test_cli.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7f44f28aa95282d1a88cde6e22885945640a974
|
4
|
+
data.tar.gz: b6b2087b17921902334080ac14a2b0fea88a94b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d81a1e47fc978b8ab651e65e1a803b92c24ad37131744a2e3d71a139a1ba5029747fed5082832cd4be8c7eb91b9e5a26e63fd1fbe217d661f233d4e2f644051
|
7
|
+
data.tar.gz: 9a24f3995e7fc00ce1803e7aca0eecca6c0f24d38484c040a76dc64232247b336c80e8b27b9795b018ff3a6d1a6889ebd045f2a68a7067d4d1c62b18b006d89d
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ It generates a `config/sunzi` folder along with subdirectories and templates. In
|
|
36
36
|
Go into your `config/deploy.rb` and make sure to have these set:
|
37
37
|
|
38
38
|
```ruby
|
39
|
-
set :ruby_version, IO.read("#{File.dirname(__FILE__)}
|
39
|
+
set :ruby_version, IO.read("#{File.dirname(__FILE__)}/../.ruby-version").strip
|
40
40
|
set :admin_name, 'admin'
|
41
41
|
set :deployer_name, 'deployer'
|
42
42
|
```
|
data/bin/sunzi-cap
CHANGED
data/lib/sunzi/cli.rb
CHANGED
@@ -7,8 +7,8 @@ module Sunzi
|
|
7
7
|
include Thor::Actions
|
8
8
|
|
9
9
|
desc 'create', 'Create sunzi project'
|
10
|
-
def create
|
11
|
-
do_create
|
10
|
+
def create
|
11
|
+
do_create
|
12
12
|
end
|
13
13
|
|
14
14
|
desc 'deploy [stage] [role] [--sudo]', 'Deploy sunzi project'
|
@@ -34,14 +34,8 @@ module Sunzi
|
|
34
34
|
File.expand_path('../../',__FILE__)
|
35
35
|
end
|
36
36
|
|
37
|
-
def do_create
|
38
|
-
|
39
|
-
copy_file 'templates/create/sunzi.yml', "#{project}/sunzi.yml"
|
40
|
-
copy_file 'templates/create/install.sh', "#{project}/install.sh"
|
41
|
-
copy_file 'templates/create/recipes/sunzi.sh', "#{project}/recipes/sunzi.sh"
|
42
|
-
copy_file 'templates/create/roles/db.sh', "#{project}/roles/db.sh"
|
43
|
-
copy_file 'templates/create/roles/web.sh', "#{project}/roles/web.sh"
|
44
|
-
copy_file 'templates/create/files/.gitkeep', "#{project}/files/.gitkeep"
|
37
|
+
def do_create
|
38
|
+
directory 'templates/create', 'config/sunzi'
|
45
39
|
end
|
46
40
|
|
47
41
|
def do_deploy(first, *args)
|
data/sunzi.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'sunzi-rails'
|
5
|
-
spec.version = '0.
|
5
|
+
spec.version = '0.2.0' # retrieve this value by: Gem.loaded_specs['sunzi'].version.to_s
|
6
6
|
spec.authors = ['Kenn Ejima', 'Patrice Lebel']
|
7
7
|
spec.email = ['kenn.ejima@gmail.com']
|
8
8
|
spec.homepage = 'http://github.com/o2web/sunzi-rails'
|
data/test/test_cli.rb
CHANGED
@@ -33,9 +33,9 @@ class TestCli < Minitest::Test
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_create
|
36
|
-
@cli.create
|
37
|
-
assert File.exist?('
|
38
|
-
FileUtils.rm_rf '
|
36
|
+
@cli.create
|
37
|
+
assert File.exist?('config/sunzi/sunzi.yml')
|
38
|
+
FileUtils.rm_rf 'config/sunzi'
|
39
39
|
end
|
40
40
|
|
41
41
|
def test_copy_local_files
|