rna 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/lib/rna/version.rb +1 -1
- data/spec/lib/rna_spec.rb +8 -8
- data/spec/project/nodejson/base.json +6 -0
- data/spec/project/nodejson/prod-api-app.json +17 -0
- data/spec/project/nodejson/prod-api-redis.json +10 -0
- data/spec/project/nodejson/prod-api-resque.json +18 -0
- data/spec/project/nodejson/prod-masta-android.json +10 -0
- data/spec/project/nodejson/prod-masta-redis.json +10 -0
- data/spec/project/nodejson/stag-api-app.json +17 -0
- data/spec/project/nodejson/stag-api-redis.json +10 -0
- data/spec/project/nodejson/stag-api-resque.json +18 -0
- data/spec/project/nodejson/stag-masta-android.json +10 -0
- data/spec/project/nodejson/stag-masta-redis.json +10 -0
- data/spec/project2/Guardfile +3 -0
- metadata +27 -3
data/lib/rna/version.rb
CHANGED
data/spec/lib/rna_spec.rb
CHANGED
@@ -11,7 +11,7 @@ describe Rna do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
after(:each) do
|
14
|
-
FileUtils.rm_rf("#{@project_root}/
|
14
|
+
FileUtils.rm_rf("#{@project_root}/output")
|
15
15
|
end
|
16
16
|
|
17
17
|
it "evaluate global attributes data to be used later to merge the nodejson structures together" do
|
@@ -93,14 +93,14 @@ describe Rna do
|
|
93
93
|
|
94
94
|
it "should write json files to outputs folder" do
|
95
95
|
@dsl.build
|
96
|
-
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/
|
96
|
+
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/output")
|
97
97
|
Dir.glob("#{@project_root}/output/*").size.should > 0
|
98
98
|
end
|
99
99
|
|
100
100
|
# complete end to end tests
|
101
101
|
it "base.json should contain correct attributes" do
|
102
102
|
@dsl.build
|
103
|
-
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/
|
103
|
+
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/output")
|
104
104
|
base = JSON.load(IO.read("#{@project_root}/output/base.json"))
|
105
105
|
base['role'].should == 'base'
|
106
106
|
base['run_list'].should == ["role[base]"]
|
@@ -108,7 +108,7 @@ describe Rna do
|
|
108
108
|
|
109
109
|
it "base.json should not contain global attributes" do
|
110
110
|
@dsl.build
|
111
|
-
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/
|
111
|
+
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/output")
|
112
112
|
base = JSON.load(IO.read("#{@project_root}/output/base.json"))
|
113
113
|
base['framework_env'].should be_nil
|
114
114
|
base['deploy_code'].should be_nil
|
@@ -116,7 +116,7 @@ describe Rna do
|
|
116
116
|
|
117
117
|
it "prod-api-redis.json should contain base and global attributes" do
|
118
118
|
@dsl.build
|
119
|
-
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/
|
119
|
+
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/output")
|
120
120
|
json = JSON.load(IO.read("#{@project_root}/output/prod-api-redis.json"))
|
121
121
|
json['role'].should == 'prod-api-redis'
|
122
122
|
json['run_list'].should == ["role[base]"]
|
@@ -126,7 +126,7 @@ describe Rna do
|
|
126
126
|
|
127
127
|
it "stag-api-redis.json should contain base and global attributes and apply rules" do
|
128
128
|
@dsl.build
|
129
|
-
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/
|
129
|
+
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/output")
|
130
130
|
json = JSON.load(IO.read("#{@project_root}/output/stag-api-redis.json"))
|
131
131
|
json['role'].should == 'stag-api-redis'
|
132
132
|
json['run_list'].should == ["role[base]"]
|
@@ -136,7 +136,7 @@ describe Rna do
|
|
136
136
|
|
137
137
|
it "prod-api-app.json should contain base and global attributes" do
|
138
138
|
@dsl.build
|
139
|
-
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/
|
139
|
+
@dsl.output(:output => 'filesystem', :output_path => "#{@project_root}/output")
|
140
140
|
json = JSON.load(IO.read("#{@project_root}/output/prod-api-app.json"))
|
141
141
|
json['role'].should == 'prod-api-app'
|
142
142
|
json['run_list'].should == ["role[base]","role[api_app]"]
|
@@ -180,7 +180,7 @@ describe Rna do
|
|
180
180
|
it "task build should generate node.json files" do
|
181
181
|
Rna::Tasks.build(
|
182
182
|
:config_path => "#{@project_root}/config/rna.rb",
|
183
|
-
:output_path => "#{@project_root}/
|
183
|
+
:output_path => "#{@project_root}/output"
|
184
184
|
)
|
185
185
|
json = JSON.load(IO.read("#{@project_root}/output/prod-api-app.json"))
|
186
186
|
json['role'].should == 'prod-api-app'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"application": "api",
|
3
|
+
"deploy_code": true,
|
4
|
+
"framework_env": "production",
|
5
|
+
"repository": "git@github.com:br/api.git",
|
6
|
+
"role": "prod-api-app",
|
7
|
+
"run_list": [
|
8
|
+
"role[base]",
|
9
|
+
"role[api_app]"
|
10
|
+
],
|
11
|
+
"scout": {
|
12
|
+
"key": "abc",
|
13
|
+
"gems": {
|
14
|
+
"redis": null
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"application": "api",
|
3
|
+
"deploy_code": true,
|
4
|
+
"framework_env": "production",
|
5
|
+
"repository": "git@github.com:br/api.git",
|
6
|
+
"role": "prod-api-resque",
|
7
|
+
"run_list": [
|
8
|
+
"role[base]",
|
9
|
+
"role[api_app]"
|
10
|
+
],
|
11
|
+
"scout": {
|
12
|
+
"key": "abc",
|
13
|
+
"gems": {
|
14
|
+
"redis": null
|
15
|
+
}
|
16
|
+
},
|
17
|
+
"workers": 8
|
18
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"application": "api",
|
3
|
+
"deploy_code": true,
|
4
|
+
"framework_env": "staging",
|
5
|
+
"repository": "git@github.com:br/api.git",
|
6
|
+
"role": "stag-api-app",
|
7
|
+
"run_list": [
|
8
|
+
"role[base]",
|
9
|
+
"role[api_app]"
|
10
|
+
],
|
11
|
+
"scout": {
|
12
|
+
"key": "abc",
|
13
|
+
"gems": {
|
14
|
+
"redis": null
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"application": "api",
|
3
|
+
"deploy_code": true,
|
4
|
+
"framework_env": "staging",
|
5
|
+
"repository": "git@github.com:br/api.git",
|
6
|
+
"role": "stag-api-resque",
|
7
|
+
"run_list": [
|
8
|
+
"role[base]",
|
9
|
+
"role[api_app]"
|
10
|
+
],
|
11
|
+
"scout": {
|
12
|
+
"key": "abc",
|
13
|
+
"gems": {
|
14
|
+
"redis": null
|
15
|
+
}
|
16
|
+
},
|
17
|
+
"workers": 8
|
18
|
+
}
|
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.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -189,7 +189,19 @@ files:
|
|
189
189
|
- spec/lib/rna_spec.rb
|
190
190
|
- spec/project/config/rna.rb
|
191
191
|
- spec/project/config/s3.example.yml
|
192
|
+
- spec/project/nodejson/base.json
|
193
|
+
- spec/project/nodejson/prod-api-app.json
|
194
|
+
- spec/project/nodejson/prod-api-redis.json
|
195
|
+
- spec/project/nodejson/prod-api-resque.json
|
196
|
+
- spec/project/nodejson/prod-masta-android.json
|
197
|
+
- spec/project/nodejson/prod-masta-redis.json
|
198
|
+
- spec/project/nodejson/stag-api-app.json
|
199
|
+
- spec/project/nodejson/stag-api-redis.json
|
200
|
+
- spec/project/nodejson/stag-api-resque.json
|
201
|
+
- spec/project/nodejson/stag-masta-android.json
|
202
|
+
- spec/project/nodejson/stag-masta-redis.json
|
192
203
|
- spec/project2/.gitkeep
|
204
|
+
- spec/project2/Guardfile
|
193
205
|
homepage: ''
|
194
206
|
licenses: []
|
195
207
|
post_install_message:
|
@@ -204,7 +216,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
216
|
version: '0'
|
205
217
|
segments:
|
206
218
|
- 0
|
207
|
-
hash:
|
219
|
+
hash: -1633920987429702810
|
208
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
221
|
none: false
|
210
222
|
requirements:
|
@@ -213,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
225
|
version: '0'
|
214
226
|
segments:
|
215
227
|
- 0
|
216
|
-
hash:
|
228
|
+
hash: -1633920987429702810
|
217
229
|
requirements: []
|
218
230
|
rubyforge_project:
|
219
231
|
rubygems_version: 1.8.24
|
@@ -225,4 +237,16 @@ test_files:
|
|
225
237
|
- spec/lib/rna_spec.rb
|
226
238
|
- spec/project/config/rna.rb
|
227
239
|
- spec/project/config/s3.example.yml
|
240
|
+
- spec/project/nodejson/base.json
|
241
|
+
- spec/project/nodejson/prod-api-app.json
|
242
|
+
- spec/project/nodejson/prod-api-redis.json
|
243
|
+
- spec/project/nodejson/prod-api-resque.json
|
244
|
+
- spec/project/nodejson/prod-masta-android.json
|
245
|
+
- spec/project/nodejson/prod-masta-redis.json
|
246
|
+
- spec/project/nodejson/stag-api-app.json
|
247
|
+
- spec/project/nodejson/stag-api-redis.json
|
248
|
+
- spec/project/nodejson/stag-api-resque.json
|
249
|
+
- spec/project/nodejson/stag-masta-android.json
|
250
|
+
- spec/project/nodejson/stag-masta-redis.json
|
228
251
|
- spec/project2/.gitkeep
|
252
|
+
- spec/project2/Guardfile
|