rna 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/.ruby-version +1 -0
  2. data/README.md +42 -42
  3. data/lib/rna/version.rb +1 -1
  4. data/rna.gemspec +3 -5
  5. metadata +6 -9
@@ -0,0 +1 @@
1
+ 1.9.3@rna
data/README.md CHANGED
@@ -21,7 +21,7 @@ $ cd rna_project
21
21
  $ rna init
22
22
  </pre>
23
23
 
24
- This will sets starter config/rna.rb and config/s3.yml files.
24
+ This will create starter config/rna.rb and config/s3.yml files.
25
25
 
26
26
  ### Example:
27
27
 
@@ -45,11 +45,9 @@ pre_rule do
45
45
  node[:chef_branch] = 'master' if role =~ /^stag/
46
46
  end
47
47
 
48
- settings(
49
- :sendgrid => {
50
- :relayhost => "smtp.sendgrid.net"
51
- }
52
- )
48
+ settings do
49
+ node[:sendgrid][:relayhost] = "smtp.sendgrid.net"
50
+ end
53
51
 
54
52
  # Roles
55
53
  role 'base' do
@@ -69,7 +67,7 @@ end
69
67
  role 'prod-api-resque', 'stag-api-resque' do
70
68
  includes 'prod-api-app'
71
69
  run_list ['base','api_resque']
72
- node[:workers], 8
70
+ node[:workers] = 8
73
71
  end
74
72
 
75
73
 
@@ -88,6 +86,43 @@ post_rule do
88
86
  end
89
87
  ```
90
88
 
89
+ #### Shared Settings
90
+
91
+ You might want a shared settings hash that you can use in only some of your roles.
92
+
93
+ ```ruby
94
+ settings do
95
+ node[:foo] = 1
96
+ end
97
+ ```
98
+
99
+ You can use this any where in your roles.
100
+
101
+ ```ruby
102
+ role 'role1' do
103
+ node[:foo] = settings[:foo]
104
+ end
105
+
106
+ role 'role2' do
107
+ node[:foo] = settings[:foo]
108
+ end
109
+
110
+ role 'role3' do
111
+ # dont set foo here
112
+ end
113
+ ```
114
+
115
+ #### Breaking up config/rna.rb
116
+
117
+ If you have a lot of roles, the config/rna.rb file can get unwieldy long. You can break up the rna.rb file and put role defintions in the config/rna directory. Any file in this directory will be automatically loaded.
118
+
119
+ An example is in the spec/project folder:
120
+
121
+ * config/rna/api.rb
122
+ * config/rna/masta.rb
123
+
124
+ #### Generating the json files
125
+
91
126
  <pre>
92
127
  $ rna generate
93
128
  </pre>
@@ -226,39 +261,4 @@ access_key_id: hocuspocus
226
261
  secret_access_key: opensesame
227
262
  bucket: my-bucket
228
263
  folder: chef/rna
229
- ```
230
-
231
- #### Breaking up config/rna.rb
232
-
233
- If you have a lot of roles, the config/rna.rb file can get unwieldy long. You can break up the rna.rb file and put role defintions in the config/rna directory. Any file in this directory will be automatically loaded.
234
-
235
- An example is in the spec/project folder:
236
-
237
- * config/rna/api.rb
238
- * config/rna/masta.rb
239
-
240
- #### Shared Settings
241
-
242
- You might want a shared settings hash that you can use in only some of your roles.
243
-
244
- ```ruby
245
- settings do
246
- node[:foo] = 1
247
- end
248
- ```
249
-
250
- You can use this any where in your roles.
251
-
252
- ```ruby
253
- role 'role1' do
254
- node[:foo] = settings[:foo]
255
- end
256
-
257
- role 'role2' do
258
- node[:foo] = settings[:foo]
259
- end
260
-
261
- role 'role3' do
262
- # dont set foo here
263
- end
264
264
  ```
@@ -1,3 +1,3 @@
1
1
  module Rna
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
@@ -4,11 +4,9 @@ require File.expand_path('../lib/rna/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Tung Nguyen"]
6
6
  gem.email = ["tongueroo@gmail.com"]
7
- gem.description = %q{Rna is a ruby gem that provides simple DSL for generating node.json files required by chef-solo.
8
- .}
9
- gem.summary = %q{Rna is a ruby gem that provides simple DSL for generating node.json files required by chef-solo.
10
- .}
11
- gem.homepage = ""
7
+ gem.description = %q{Rna is a simple DSL for generating node.json files required by chef-solo.}
8
+ gem.summary = %q{Rna is a simple DSL for generating node.json files required by chef-solo.}
9
+ gem.homepage = "http://github.com/tongueroo/rna"
12
10
 
13
11
  gem.files = `git ls-files`.split($\)
14
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-27 00:00:00.000000000 Z
12
+ date: 2012-12-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -171,10 +171,7 @@ dependencies:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
- description: ! 'Rna is a ruby gem that provides simple DSL for generating node.json
175
- files required by chef-solo.
176
-
177
- .'
174
+ description: Rna is a simple DSL for generating node.json files required by chef-solo.
178
175
  email:
179
176
  - tongueroo@gmail.com
180
177
  executables:
@@ -184,6 +181,7 @@ extra_rdoc_files: []
184
181
  files:
185
182
  - .gitignore
186
183
  - .rspec
184
+ - .ruby-version
187
185
  - .travis.yml
188
186
  - CHANGELOG
189
187
  - Gemfile
@@ -211,7 +209,7 @@ files:
211
209
  - spec/project/config/s3.example.yml
212
210
  - spec/project2/.gitkeep
213
211
  - spec/project2/Guardfile
214
- homepage: ''
212
+ homepage: http://github.com/tongueroo/rna
215
213
  licenses: []
216
214
  post_install_message:
217
215
  rdoc_options: []
@@ -234,8 +232,7 @@ rubyforge_project:
234
232
  rubygems_version: 1.8.24
235
233
  signing_key:
236
234
  specification_version: 3
237
- summary: Rna is a ruby gem that provides simple DSL for generating node.json files
238
- required by chef-solo. .
235
+ summary: Rna is a simple DSL for generating node.json files required by chef-solo.
239
236
  test_files:
240
237
  - spec/lib/rna_spec.rb
241
238
  - spec/project/config/rna.rb