sunzi-rails 0.2.11 → 0.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/lib/sunzi/cli.rb +8 -0
- data/lib/sunzi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 935d6dcf19b2d56f74469bfcaba57a49263a6c3f
|
4
|
+
data.tar.gz: 38fb57c30f82279de72203fbe1a11bb6d3922c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad9b0425c11f0de6d32887be01709524514f7653fb2d799ef8f77c79a6d738112530c7c41bd3a05287a2f4e9351695a0efedc00bcc29ae6701ce6fb40d415f2d
|
7
|
+
data.tar.gz: c7c027053f4d26b3e4ed25b5171c5e5b59b3e5109956621e3be8e7b1fd256a6f59ee38ae73716342ea97cc98d286eaf5c2339b1d119dae83770bc70f1a558f66
|
data/README.md
CHANGED
@@ -60,6 +60,17 @@ Finally, add `/compiled` to your `.gitignore` file.
|
|
60
60
|
|
61
61
|
All those settings can be overriden in your `sunzi.yml` file within `attributes`.
|
62
62
|
|
63
|
+
Also, contextual attributes are available through `@attributes`:
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
@attributes.env_stage
|
67
|
+
@attributes.env_role
|
68
|
+
@attributes.env_sudo
|
69
|
+
@attributes.env_user
|
70
|
+
@attributes.env_host
|
71
|
+
@attributes.env_port
|
72
|
+
```
|
73
|
+
|
63
74
|
Go into the project directory, then run `sunzi-cap deploy`:
|
64
75
|
|
65
76
|
```bash
|
data/lib/sunzi/cli.rb
CHANGED
@@ -106,6 +106,14 @@ module Sunzi
|
|
106
106
|
@attributes = Database.load_env(@stage)
|
107
107
|
.merge(cap.slice(:ruby_version, :deployer_name))
|
108
108
|
.merge(Secrets.load_env(@stage).slice(:deployer_password, :deployer_public_key))
|
109
|
+
.merge(
|
110
|
+
env_stage: @stage,
|
111
|
+
env_role: @role,
|
112
|
+
env_sudo: options.sudo?,
|
113
|
+
env_user: @user,
|
114
|
+
env_host: @host,
|
115
|
+
env_port: @port
|
116
|
+
)
|
109
117
|
.merge(@config['attributes'] || {})
|
110
118
|
end
|
111
119
|
|
data/lib/sunzi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunzi-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenn Ejima
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|