rna 0.3.5 → 0.3.6
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/README.md +41 -16
 - data/lib/files/rna.rb +5 -3
 - data/lib/node.rb +7 -11
 - data/lib/rna/dsl.rb +7 -10
 - data/lib/rna/version.rb +1 -1
 - data/spec/lib/rna_spec.rb +1 -1
 - data/spec/project/config/rna/api.rb +4 -4
 - data/spec/project/config/rna.rb +3 -3
 - metadata +2 -2
 
    
        data/README.md
    CHANGED
    
    | 
         @@ -45,9 +45,7 @@ pre_rule do 
     | 
|
| 
       45 
45 
     | 
    
         
             
              node[:chef_branch] = 'master' if role =~ /^stag/
         
     | 
| 
       46 
46 
     | 
    
         
             
            end
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
     | 
    
         
            -
            settings  
     | 
| 
       49 
     | 
    
         
            -
              node[:sendgrid][:relayhost] = "smtp.sendgrid.net"
         
     | 
| 
       50 
     | 
    
         
            -
            end
         
     | 
| 
      
 48 
     | 
    
         
            +
            settings[:sendgrid][:relayhost] = "smtp.sendgrid.net"
         
     | 
| 
       51 
49 
     | 
    
         | 
| 
       52 
50 
     | 
    
         
             
            # Roles
         
     | 
| 
       53 
51 
     | 
    
         
             
            role 'base' do
         
     | 
| 
         @@ -62,6 +60,10 @@ role 'prod-api-app', 'stag-api-app' do 
     | 
|
| 
       62 
60 
     | 
    
         
             
              run_list ['base','api_app']
         
     | 
| 
       63 
61 
     | 
    
         
             
              node[:application] = 'api'
         
     | 
| 
       64 
62 
     | 
    
         
             
              node[:deploy_code] = true
         
     | 
| 
      
 63 
     | 
    
         
            +
              node[:database][:adapter] = "mysql"
         
     | 
| 
      
 64 
     | 
    
         
            +
              node[:database][:host] = "127.0.0.1"
         
     | 
| 
      
 65 
     | 
    
         
            +
              node[:database][:user] = "user"
         
     | 
| 
      
 66 
     | 
    
         
            +
              node[:database][:pass] = "pass"
         
     | 
| 
       65 
67 
     | 
    
         
             
              node[:repository] = 'git@github.com:owner/repo.git/api.git'
         
     | 
| 
       66 
68 
     | 
    
         
             
            end
         
     | 
| 
       67 
69 
     | 
    
         
             
            role 'prod-api-resque', 'stag-api-resque' do
         
     | 
| 
         @@ -91,24 +93,23 @@ end 
     | 
|
| 
       91 
93 
     | 
    
         
             
            You might want a shared settings hash that you can use in only some of your roles.
         
     | 
| 
       92 
94 
     | 
    
         | 
| 
       93 
95 
     | 
    
         
             
            ```ruby
         
     | 
| 
       94 
     | 
    
         
            -
            settings  
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
            end
         
     | 
| 
      
 96 
     | 
    
         
            +
            settings[:foo][:bar] = 1
         
     | 
| 
      
 97 
     | 
    
         
            +
            settings[:foo][:baz] = 2
         
     | 
| 
       97 
98 
     | 
    
         
             
            ```
         
     | 
| 
       98 
99 
     | 
    
         | 
| 
       99 
100 
     | 
    
         
             
            You can use this any where in your roles.
         
     | 
| 
       100 
101 
     | 
    
         | 
| 
       101 
102 
     | 
    
         
             
            ```ruby
         
     | 
| 
       102 
103 
     | 
    
         
             
            role 'role1' do
         
     | 
| 
       103 
     | 
    
         
            -
              node[:foo] = settings[:foo]
         
     | 
| 
      
 104 
     | 
    
         
            +
              node[:foo][:bar] = settings[:foo][:bar]
         
     | 
| 
       104 
105 
     | 
    
         
             
            end
         
     | 
| 
       105 
106 
     | 
    
         | 
| 
       106 
107 
     | 
    
         
             
            role 'role2' do
         
     | 
| 
       107 
     | 
    
         
            -
              node[:foo] = settings[:foo]
         
     | 
| 
      
 108 
     | 
    
         
            +
              node[:foo][:bar] = settings[:foo][:bar]
         
     | 
| 
       108 
109 
     | 
    
         
             
            end
         
     | 
| 
       109 
110 
     | 
    
         | 
| 
       110 
111 
     | 
    
         
             
            role 'role3' do
         
     | 
| 
       111 
     | 
    
         
            -
               
     | 
| 
      
 112 
     | 
    
         
            +
              node[:foo][:baz] = settings[:foo][:baz]
         
     | 
| 
       112 
113 
     | 
    
         
             
            end
         
     | 
| 
       113 
114 
     | 
    
         
             
            ```
         
     | 
| 
       114 
115 
     | 
    
         | 
| 
         @@ -129,7 +130,7 @@ $ rna generate 
     | 
|
| 
       129 
130 
     | 
    
         | 
| 
       130 
131 
     | 
    
         
             
            Here is the example of the output looks like:
         
     | 
| 
       131 
132 
     | 
    
         | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
      
 133 
     | 
    
         
            +
            base.json:
         
     | 
| 
       133 
134 
     | 
    
         | 
| 
       134 
135 
     | 
    
         
             
            ```json
         
     | 
| 
       135 
136 
     | 
    
         
             
            {
         
     | 
| 
         @@ -142,7 +143,7 @@ output/base.json: 
     | 
|
| 
       142 
143 
     | 
    
         
             
            }
         
     | 
| 
       143 
144 
     | 
    
         
             
            ```
         
     | 
| 
       144 
145 
     | 
    
         | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
      
 146 
     | 
    
         
            +
            prod-api-app.json:
         
     | 
| 
       146 
147 
     | 
    
         | 
| 
       147 
148 
     | 
    
         
             
            ```json
         
     | 
| 
       148 
149 
     | 
    
         
             
            {
         
     | 
| 
         @@ -154,13 +155,19 @@ output/prod-api-app.json: 
     | 
|
| 
       154 
155 
     | 
    
         
             
              ],
         
     | 
| 
       155 
156 
     | 
    
         
             
              "application": "api",
         
     | 
| 
       156 
157 
     | 
    
         
             
              "deploy_code": true,
         
     | 
| 
      
 158 
     | 
    
         
            +
              "database": {
         
     | 
| 
      
 159 
     | 
    
         
            +
                "adapter": "mysql",
         
     | 
| 
      
 160 
     | 
    
         
            +
                "host": "127.0.0.1",
         
     | 
| 
      
 161 
     | 
    
         
            +
                "user": "user",
         
     | 
| 
      
 162 
     | 
    
         
            +
                "pass": "pass"
         
     | 
| 
      
 163 
     | 
    
         
            +
              },
         
     | 
| 
       157 
164 
     | 
    
         
             
              "repository": "git@github.com:owner/repo.git/api.git",
         
     | 
| 
       158 
165 
     | 
    
         
             
              "post_rule": 2,
         
     | 
| 
       159 
166 
     | 
    
         
             
              "framework_env": "production"
         
     | 
| 
       160 
167 
     | 
    
         
             
            }
         
     | 
| 
       161 
168 
     | 
    
         
             
            ```
         
     | 
| 
       162 
169 
     | 
    
         | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
      
 170 
     | 
    
         
            +
            prod-api-redis.json:
         
     | 
| 
       164 
171 
     | 
    
         | 
| 
       165 
172 
     | 
    
         
             
            ```json
         
     | 
| 
       166 
173 
     | 
    
         
             
            {
         
     | 
| 
         @@ -176,7 +183,7 @@ output/prod-api-redis.json: 
     | 
|
| 
       176 
183 
     | 
    
         
             
            }
         
     | 
| 
       177 
184 
     | 
    
         
             
            ```
         
     | 
| 
       178 
185 
     | 
    
         | 
| 
       179 
     | 
    
         
            -
             
     | 
| 
      
 186 
     | 
    
         
            +
            prod-api-resque.json:
         
     | 
| 
       180 
187 
     | 
    
         | 
| 
       181 
188 
     | 
    
         
             
            ```json
         
     | 
| 
       182 
189 
     | 
    
         
             
            {
         
     | 
| 
         @@ -188,6 +195,12 @@ output/prod-api-resque.json: 
     | 
|
| 
       188 
195 
     | 
    
         
             
              ],
         
     | 
| 
       189 
196 
     | 
    
         
             
              "application": "api",
         
     | 
| 
       190 
197 
     | 
    
         
             
              "deploy_code": true,
         
     | 
| 
      
 198 
     | 
    
         
            +
              "database": {
         
     | 
| 
      
 199 
     | 
    
         
            +
                "adapter": "mysql",
         
     | 
| 
      
 200 
     | 
    
         
            +
                "host": "127.0.0.1",
         
     | 
| 
      
 201 
     | 
    
         
            +
                "user": "user",
         
     | 
| 
      
 202 
     | 
    
         
            +
                "pass": "pass"
         
     | 
| 
      
 203 
     | 
    
         
            +
              },
         
     | 
| 
       191 
204 
     | 
    
         
             
              "repository": "git@github.com:owner/repo.git/api.git",
         
     | 
| 
       192 
205 
     | 
    
         
             
              "workers": 8,
         
     | 
| 
       193 
206 
     | 
    
         
             
              "post_rule": 2,
         
     | 
| 
         @@ -195,7 +208,7 @@ output/prod-api-resque.json: 
     | 
|
| 
       195 
208 
     | 
    
         
             
            }
         
     | 
| 
       196 
209 
     | 
    
         
             
            ```
         
     | 
| 
       197 
210 
     | 
    
         | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
      
 211 
     | 
    
         
            +
            stag-api-app.json:
         
     | 
| 
       199 
212 
     | 
    
         | 
| 
       200 
213 
     | 
    
         
             
            ```json
         
     | 
| 
       201 
214 
     | 
    
         
             
            {
         
     | 
| 
         @@ -207,13 +220,19 @@ output/stag-api-app.json: 
     | 
|
| 
       207 
220 
     | 
    
         
             
              ],
         
     | 
| 
       208 
221 
     | 
    
         
             
              "application": "api",
         
     | 
| 
       209 
222 
     | 
    
         
             
              "deploy_code": true,
         
     | 
| 
      
 223 
     | 
    
         
            +
              "database": {
         
     | 
| 
      
 224 
     | 
    
         
            +
                "adapter": "mysql",
         
     | 
| 
      
 225 
     | 
    
         
            +
                "host": "127.0.0.1",
         
     | 
| 
      
 226 
     | 
    
         
            +
                "user": "user",
         
     | 
| 
      
 227 
     | 
    
         
            +
                "pass": "pass"
         
     | 
| 
      
 228 
     | 
    
         
            +
              },
         
     | 
| 
       210 
229 
     | 
    
         
             
              "repository": "git@github.com:owner/repo.git/api.git",
         
     | 
| 
       211 
230 
     | 
    
         
             
              "post_rule": 2,
         
     | 
| 
       212 
231 
     | 
    
         
             
              "framework_env": "staging"
         
     | 
| 
       213 
232 
     | 
    
         
             
            }
         
     | 
| 
       214 
233 
     | 
    
         
             
            ```
         
     | 
| 
       215 
234 
     | 
    
         | 
| 
       216 
     | 
    
         
            -
             
     | 
| 
      
 235 
     | 
    
         
            +
            stag-api-redis.json:
         
     | 
| 
       217 
236 
     | 
    
         | 
| 
       218 
237 
     | 
    
         
             
            ```json
         
     | 
| 
       219 
238 
     | 
    
         
             
            {
         
     | 
| 
         @@ -229,7 +248,7 @@ output/stag-api-redis.json: 
     | 
|
| 
       229 
248 
     | 
    
         
             
            }
         
     | 
| 
       230 
249 
     | 
    
         
             
            ```
         
     | 
| 
       231 
250 
     | 
    
         | 
| 
       232 
     | 
    
         
            -
             
     | 
| 
      
 251 
     | 
    
         
            +
            stag-api-resque.json:
         
     | 
| 
       233 
252 
     | 
    
         | 
| 
       234 
253 
     | 
    
         
             
            ```json
         
     | 
| 
       235 
254 
     | 
    
         
             
            {
         
     | 
| 
         @@ -241,6 +260,12 @@ output/stag-api-resque.json: 
     | 
|
| 
       241 
260 
     | 
    
         
             
              ],
         
     | 
| 
       242 
261 
     | 
    
         
             
              "application": "api",
         
     | 
| 
       243 
262 
     | 
    
         
             
              "deploy_code": true,
         
     | 
| 
      
 263 
     | 
    
         
            +
              "database": {
         
     | 
| 
      
 264 
     | 
    
         
            +
                "adapter": "mysql",
         
     | 
| 
      
 265 
     | 
    
         
            +
                "host": "127.0.0.1",
         
     | 
| 
      
 266 
     | 
    
         
            +
                "user": "user",
         
     | 
| 
      
 267 
     | 
    
         
            +
                "pass": "pass"
         
     | 
| 
      
 268 
     | 
    
         
            +
              },
         
     | 
| 
       244 
269 
     | 
    
         
             
              "repository": "git@github.com:owner/repo.git/api.git",
         
     | 
| 
       245 
270 
     | 
    
         
             
              "workers": 8,
         
     | 
| 
       246 
271 
     | 
    
         
             
              "post_rule": 2,
         
     | 
    
        data/lib/files/rna.rb
    CHANGED
    
    | 
         @@ -15,9 +15,7 @@ pre_rule do 
     | 
|
| 
       15 
15 
     | 
    
         
             
              node[:chef_branch] = 'master' if role =~ /^stag/
         
     | 
| 
       16 
16 
     | 
    
         
             
            end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            settings  
     | 
| 
       19 
     | 
    
         
            -
              node[:sendgrid][:relayhost] = "smtp.sendgrid.net"
         
     | 
| 
       20 
     | 
    
         
            -
            end
         
     | 
| 
      
 18 
     | 
    
         
            +
            settings[:sendgrid][:relayhost] = "smtp.sendgrid.net"
         
     | 
| 
       21 
19 
     | 
    
         | 
| 
       22 
20 
     | 
    
         
             
            # Roles
         
     | 
| 
       23 
21 
     | 
    
         
             
            role 'base' do
         
     | 
| 
         @@ -32,6 +30,10 @@ role 'prod-api-app', 'stag-api-app' do 
     | 
|
| 
       32 
30 
     | 
    
         
             
              run_list ['base','api_app']
         
     | 
| 
       33 
31 
     | 
    
         
             
              node[:application] = 'api'
         
     | 
| 
       34 
32 
     | 
    
         
             
              node[:deploy_code] = true
         
     | 
| 
      
 33 
     | 
    
         
            +
              node[:database][:adapter] = "mysql"
         
     | 
| 
      
 34 
     | 
    
         
            +
              node[:database][:host] = "127.0.0.1"
         
     | 
| 
      
 35 
     | 
    
         
            +
              node[:database][:user] = "user"
         
     | 
| 
      
 36 
     | 
    
         
            +
              node[:database][:pass] = "pass"
         
     | 
| 
       35 
37 
     | 
    
         
             
              node[:repository] = 'git@github.com:owner/repo.git/api.git'
         
     | 
| 
       36 
38 
     | 
    
         
             
            end
         
     | 
| 
       37 
39 
     | 
    
         
             
            role 'prod-api-resque', 'stag-api-resque' do
         
     | 
    
        data/lib/node.rb
    CHANGED
    
    | 
         @@ -6,10 +6,6 @@ class Node < Hash 
     | 
|
| 
       6 
6 
     | 
    
         
             
                def initialize(value)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  @value = value
         
     | 
| 
       8 
8 
     | 
    
         
             
                end
         
     | 
| 
       9 
     | 
    
         
            -
                def [](key)
         
     | 
| 
       10 
     | 
    
         
            -
                  puts "Node::Attribute key #{key}"
         
     | 
| 
       11 
     | 
    
         
            -
                  nil
         
     | 
| 
       12 
     | 
    
         
            -
                end
         
     | 
| 
       13 
9 
     | 
    
         
             
              end
         
     | 
| 
       14 
10 
     | 
    
         | 
| 
       15 
11 
     | 
    
         
             
              def initialize
         
     | 
| 
         @@ -26,16 +22,16 @@ class Node < Hash 
     | 
|
| 
       26 
22 
     | 
    
         | 
| 
       27 
23 
     | 
    
         
             
              def [](key)
         
     | 
| 
       28 
24 
     | 
    
         
             
                key = convert_key(key)
         
     | 
| 
       29 
     | 
    
         
            -
                 
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
      
 25 
     | 
    
         
            +
                case @data[key]
         
     | 
| 
      
 26 
     | 
    
         
            +
                when nil
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @data[key] = Node.new
         
     | 
| 
      
 28 
     | 
    
         
            +
                when Node::Attribute
         
     | 
| 
      
 29 
     | 
    
         
            +
                  @data[key].value
         
     | 
| 
      
 30 
     | 
    
         
            +
                when Node
         
     | 
| 
      
 31 
     | 
    
         
            +
                  @data[key]
         
     | 
| 
       35 
32 
     | 
    
         
             
                else
         
     | 
| 
       36 
33 
     | 
    
         
             
                  raise "should never happen"
         
     | 
| 
       37 
34 
     | 
    
         
             
                end
         
     | 
| 
       38 
     | 
    
         
            -
                result
         
     | 
| 
       39 
35 
     | 
    
         
             
              end
         
     | 
| 
       40 
36 
     | 
    
         | 
| 
       41 
37 
     | 
    
         
             
              def to_hash
         
     | 
    
        data/lib/rna/dsl.rb
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Rna
         
     | 
| 
       2 
2 
     | 
    
         
             
              class DSL
         
     | 
| 
       3 
     | 
    
         
            -
                attr_reader :data, :jsons 
     | 
| 
      
 3 
     | 
    
         
            +
                attr_reader :data, :jsons
         
     | 
| 
       4 
4 
     | 
    
         
             
                def initialize(options={})
         
     | 
| 
       5 
5 
     | 
    
         
             
                  @options = options
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
         @@ -22,15 +22,12 @@ module Rna 
     | 
|
| 
       22 
22 
     | 
    
         
             
                  end
         
     | 
| 
       23 
23 
     | 
    
         
             
                end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
     | 
    
         
            -
                def  
     | 
| 
       26 
     | 
    
         
            -
                  @ 
     | 
| 
       27 
     | 
    
         
            -
                end
         
     | 
| 
       28 
     | 
    
         
            -
                alias_method :set, :settings_node
         
     | 
| 
       29 
     | 
    
         
            -
                alias_method :node, :settings_node
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                def settings(&block)
         
     | 
| 
       32 
     | 
    
         
            -
                  instance_eval(&block)
         
     | 
| 
      
 25 
     | 
    
         
            +
                def settings
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @settings ||= Node.new
         
     | 
| 
       33 
27 
     | 
    
         
             
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
                alias_method :set, :settings
         
     | 
| 
      
 29 
     | 
    
         
            +
                alias_method :node, :settings
         
     | 
| 
      
 30 
     | 
    
         
            +
                alias_method :default, :settings
         
     | 
| 
       34 
31 
     | 
    
         | 
| 
       35 
32 
     | 
    
         
             
                def default_includes(role)
         
     | 
| 
       36 
33 
     | 
    
         
             
                  Role.default_includes = role
         
     | 
| 
         @@ -131,7 +128,7 @@ module Rna 
     | 
|
| 
       131 
128 
     | 
    
         | 
| 
       132 
129 
     | 
    
         
             
                  # http://www.dan-manges.com/blog/ruby-dsls-instance-eval-with-delegation
         
     | 
| 
       133 
130 
     | 
    
         
             
                  def settings
         
     | 
| 
       134 
     | 
    
         
            -
                    @dsl. 
     | 
| 
      
 131 
     | 
    
         
            +
                    @dsl.settings.to_mash
         
     | 
| 
       135 
132 
     | 
    
         
             
                  end
         
     | 
| 
       136 
133 
     | 
    
         | 
| 
       137 
134 
     | 
    
         
             
                  def node
         
     | 
    
        data/lib/rna/version.rb
    CHANGED
    
    
    
        data/spec/lib/rna_spec.rb
    CHANGED
    
    | 
         @@ -78,7 +78,7 @@ describe Rna do 
     | 
|
| 
       78 
78 
     | 
    
         
             
                json = JSON.load(IO.read("#{@project_root}/output/prod-api-app.json"))
         
     | 
| 
       79 
79 
     | 
    
         
             
                json['database']['user'].should == 'user'
         
     | 
| 
       80 
80 
     | 
    
         
             
                json['database']['pass'].should == 'pass'
         
     | 
| 
       81 
     | 
    
         
            -
                json['database']['host'].should == ' 
     | 
| 
      
 81 
     | 
    
         
            +
                json['database']['host'].should == '127.0.0.1'
         
     | 
| 
       82 
82 
     | 
    
         
             
              end
         
     | 
| 
       83 
83 
     | 
    
         | 
| 
       84 
84 
     | 
    
         
             
              it "prod-api-app.json should contain pre and post rules" do
         
     | 
| 
         @@ -9,11 +9,11 @@ role 'prod-api-app', 'stag-api-app' do 
     | 
|
| 
       9 
9 
     | 
    
         
             
              node[:application] = 'api'
         
     | 
| 
       10 
10 
     | 
    
         
             
              node[:deploy_code] = true
         
     | 
| 
       11 
11 
     | 
    
         
             
              node[:repository] = 'git@github.com:owner/repo.git/api.git'
         
     | 
| 
      
 12 
     | 
    
         
            +
              node[:database][:adapter] = "mysql"
         
     | 
| 
      
 13 
     | 
    
         
            +
              node[:database][:host] = "127.0.0.1"
         
     | 
| 
      
 14 
     | 
    
         
            +
              node[:database][:user] = "user"
         
     | 
| 
      
 15 
     | 
    
         
            +
              node[:database][:pass] = "pass"
         
     | 
| 
       12 
16 
     | 
    
         
             
              node[:scout][:key] = 'abc'
         
     | 
| 
       13 
17 
     | 
    
         
             
              node[:scout][:gems] = {'redis' => nil}
         
     | 
| 
       14 
18 
     | 
    
         
             
              node[:relayhost] = settings[:sendgrid][:relayhost]
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              node[:database][:user] = 'user'
         
     | 
| 
       17 
     | 
    
         
            -
              node[:database][:pass] = 'pass'
         
     | 
| 
       18 
     | 
    
         
            -
              node[:database][:host] = 'host'
         
     | 
| 
       19 
19 
     | 
    
         
             
            end
         
     | 
    
        data/spec/project/config/rna.rb
    CHANGED
    
    | 
         @@ -1,3 +1,5 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # This is starter example rna template.
         
     | 
| 
      
 2 
     | 
    
         
            +
            # This is meant be be modified to your needs.
         
     | 
| 
       1 
3 
     | 
    
         
             
            default_includes 'base'
         
     | 
| 
       2 
4 
     | 
    
         
             
            # Pre processing rules that run at the beginning
         
     | 
| 
       3 
5 
     | 
    
         
             
            pre_rule do
         
     | 
| 
         @@ -13,9 +15,7 @@ pre_rule do 
     | 
|
| 
       13 
15 
     | 
    
         
             
              node[:chef_branch] = 'master' if role =~ /^stag/
         
     | 
| 
       14 
16 
     | 
    
         
             
            end
         
     | 
| 
       15 
17 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
            settings  
     | 
| 
       17 
     | 
    
         
            -
              node[:sendgrid][:relayhost] = "smtp.sendgrid.net"
         
     | 
| 
       18 
     | 
    
         
            -
            end
         
     | 
| 
      
 18 
     | 
    
         
            +
            settings[:sendgrid][:relayhost] = "smtp.sendgrid.net"
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
            # Roles
         
     | 
| 
       21 
21 
     | 
    
         
             
            role 'base' do
         
     | 
    
        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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.6
         
     | 
| 
       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- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-12-30 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rake
         
     |