MuranoCLI 3.0.2 → 3.0.4

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +30 -59
  3. data/Gemfile +9 -3
  4. data/MuranoCLI.gemspec +11 -4
  5. data/bin/murano +2 -90
  6. data/lib/MrMurano.rb +5 -1
  7. data/lib/MrMurano/{spec_commander.rb → Commander-Entry.rb} +1 -2
  8. data/lib/MrMurano/Solution.rb +12 -15
  9. data/lib/MrMurano/SolutionId.rb +1 -5
  10. data/lib/MrMurano/SyncAllowed.rb +2 -2
  11. data/lib/MrMurano/SyncUpDown.rb +6 -3
  12. data/lib/MrMurano/progress.rb +11 -2
  13. data/lib/MrMurano/verbosing.rb +3 -2
  14. data/lib/MrMurano/version.rb +2 -2
  15. data/spec/Account-Passwords_spec.rb +34 -48
  16. data/spec/Account_spec.rb +58 -63
  17. data/spec/Business_spec.rb +151 -139
  18. data/spec/ConfigFile_spec.rb +15 -11
  19. data/spec/ConfigMigrate_spec.rb +23 -12
  20. data/spec/Config_spec.rb +57 -54
  21. data/spec/Content_spec.rb +233 -201
  22. data/spec/GatewayBase_spec.rb +35 -27
  23. data/spec/GatewayDevice_spec.rb +149 -149
  24. data/spec/GatewayResource_spec.rb +115 -102
  25. data/spec/GatewaySettings_spec.rb +69 -62
  26. data/spec/Http_spec.rb +66 -56
  27. data/spec/MakePretties_spec.rb +82 -73
  28. data/spec/Mock_spec.rb +38 -29
  29. data/spec/ProjectFile_spec.rb +118 -106
  30. data/spec/Setting_spec.rb +24 -15
  31. data/spec/Solution-ServiceConfig_spec.rb +168 -140
  32. data/spec/Solution-ServiceEventHandler_spec.rb +186 -188
  33. data/spec/Solution-ServiceModules_spec.rb +314 -232
  34. data/spec/Solution-UsersRoles_spec.rb +136 -86
  35. data/spec/Solution_spec.rb +78 -50
  36. data/spec/SyncRoot_spec.rb +26 -24
  37. data/spec/SyncUpDown_spec.rb +268 -249
  38. data/spec/Verbosing_spec.rb +95 -93
  39. data/spec/Webservice-Cors_spec.rb +141 -95
  40. data/spec/Webservice-Endpoint_spec.rb +382 -346
  41. data/spec/Webservice-File_spec.rb +148 -109
  42. data/spec/Webservice-Setting_spec.rb +47 -41
  43. data/spec/cmd_business_spec.rb +17 -17
  44. data/spec/cmd_common.rb +27 -7
  45. data/spec/cmd_config_spec.rb +31 -20
  46. data/spec/cmd_content_spec.rb +80 -68
  47. data/spec/cmd_cors_spec.rb +11 -5
  48. data/spec/cmd_device_spec.rb +16 -14
  49. data/spec/cmd_domain_spec.rb +10 -8
  50. data/spec/cmd_exchange_spec.rb +3 -3
  51. data/spec/cmd_init_spec.rb +100 -101
  52. data/spec/cmd_keystore_spec.rb +17 -12
  53. data/spec/cmd_link_spec.rb +22 -37
  54. data/spec/cmd_password_spec.rb +11 -7
  55. data/spec/cmd_setting_application_spec.rb +47 -33
  56. data/spec/cmd_setting_product_spec.rb +32 -27
  57. data/spec/cmd_status_spec.rb +125 -114
  58. data/spec/cmd_syncdown_spec.rb +70 -65
  59. data/spec/cmd_syncup_spec.rb +19 -15
  60. data/spec/cmd_usage_spec.rb +14 -10
  61. metadata +29 -15
@@ -1,10 +1,17 @@
1
+ # Last Modified: 2017.09.12 /coding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ # Copyright © 2016-2017 Exosite LLC.
5
+ # License: MIT. See LICENSE.txt.
6
+ # vim:tw=0:ts=2:sw=2:et:ai
7
+
1
8
  require 'tempfile'
2
9
  require 'MrMurano/Config'
3
10
  require 'MrMurano/Mock'
4
11
  require '_workspace'
5
12
 
6
- RSpec.describe MrMurano::Mock, "#mock" do
7
- include_context "WORKSPACE"
13
+ RSpec.describe MrMurano::Mock, '#mock' do
14
+ include_context 'WORKSPACE'
8
15
  before(:example) do
9
16
  FileUtils.mkpath(@project_dir + '/routes')
10
17
  $cfg = MrMurano::Config.new
@@ -13,41 +20,43 @@ RSpec.describe MrMurano::Mock, "#mock" do
13
20
  @mock = MrMurano::Mock.new
14
21
  end
15
22
 
16
- it "can create the testpoint file" do
17
- uuid = @mock.create_testpoint()
18
- expect(uuid.length).to be("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX".length)
19
- path = @mock.testpoint_path()
20
- testpoint = File.read(path)
21
- expect(testpoint.include? uuid).to be(true)
23
+ it 'can create the testpoint file' do
24
+ uuid = @mock.create_testpoint
25
+ # rubocop:disable Performance/FixedSize
26
+ # "Do not compute the size of statically sized objects."
27
+ expect(uuid.length).to be('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.length)
28
+ path = @mock.testpoint_path
29
+ testpoint = File.read(path)
30
+ expect(testpoint.include?(uuid)).to be(true)
22
31
  end
23
32
 
24
- it "can show the UUID from the testpoint file" do
25
- uuid = @mock.create_testpoint()
26
- retrieved_uuid = @mock.show()
27
- expect(uuid).to eq(retrieved_uuid)
33
+ it 'can show the UUID from the testpoint file' do
34
+ uuid = @mock.create_testpoint
35
+ retrieved_uuid = @mock.show
36
+ expect(uuid).to eq(retrieved_uuid)
28
37
  end
29
38
 
30
- it "can remove the testpoint file" do
31
- @mock.create_testpoint()
32
- path = @mock.testpoint_path()
33
- removed = @mock.remove_testpoint()
34
- expect(removed).to be(true)
35
- expect(File.exist?(path)).to be(false)
39
+ it 'can remove the testpoint file' do
40
+ @mock.create_testpoint
41
+ path = @mock.testpoint_path
42
+ removed = @mock.remove_testpoint
43
+ expect(removed).to be(true)
44
+ expect(File.exist?(path)).to be(false)
36
45
  end
37
46
 
38
- it "can remove the missing testpoint file" do
39
- path = @mock.testpoint_path()
40
- removed = @mock.remove_testpoint()
41
- expect(removed).to be(false)
42
- expect(File.exist?(path)).to be(false)
47
+ it 'can remove the missing testpoint file' do
48
+ path = @mock.testpoint_path
49
+ removed = @mock.remove_testpoint
50
+ expect(removed).to be(false)
51
+ expect(File.exist?(path)).to be(false)
43
52
  end
44
53
 
45
54
  it "cannot show the UUID if there's no testpoint file" do
46
- @mock.create_testpoint()
47
- @mock.show()
48
- @mock.remove_testpoint()
49
- retrieved_uuid = @mock.show()
50
- expect(retrieved_uuid).to be(false)
55
+ @mock.create_testpoint
56
+ @mock.show
57
+ @mock.remove_testpoint
58
+ retrieved_uuid = @mock.show
59
+ expect(retrieved_uuid).to be(false)
51
60
  end
52
61
  end
53
- # vim: set ai et sw=2 ts=2 :
62
+
@@ -1,3 +1,10 @@
1
+ # Last Modified: 2017.09.12 /coding: utf-8
2
+ # frozen_string_literal: true
3
+
4
+ # Copyright © 2016-2017 Exosite LLC.
5
+ # License: MIT. See LICENSE.txt.
6
+ # vim:tw=0:ts=2:sw=2:et:ai
7
+
1
8
  #require 'erb'
2
9
  require 'fileutils'
3
10
  #require 'tempfile'
@@ -7,9 +14,8 @@ require 'MrMurano/ProjectFile'
7
14
  require '_workspace'
8
15
 
9
16
  RSpec.describe MrMurano::ProjectFile do
10
-
11
- context "Basics " do
12
- include_context "WORKSPACE"
17
+ context 'Basics ' do
18
+ include_context 'WORKSPACE'
13
19
  before(:example) do
14
20
  $cfg = MrMurano::Config.new
15
21
  $cfg.load
@@ -17,13 +23,13 @@ RSpec.describe MrMurano::ProjectFile do
17
23
  $project = nil
18
24
  end
19
25
 
20
- context "No files to load" do
21
- context "Defaults" do
26
+ context 'No files to load' do
27
+ context 'Defaults' do
22
28
  before(:example) do
23
29
  @pjf = MrMurano::ProjectFile.new
24
30
  #@pjf.load
25
31
  end
26
- it "Info" do
32
+ it 'Info' do
27
33
  expect(@pjf.get('info.name')).to eq('project')
28
34
  expect(@pjf.get('info.summary')).to eq('One line summary of project')
29
35
  expect(@pjf.get('info.description')).to eq("In depth description of project\n\nWith lots of details.")
@@ -31,7 +37,7 @@ RSpec.describe MrMurano::ProjectFile do
31
37
  expect(@pjf.get('info.version')).to eq('1.0.0')
32
38
  end
33
39
 
34
- it "Assets" do
40
+ it 'Assets' do
35
41
  # Because defaults before load() are all nil, the default_value_for method
36
42
  # is called.
37
43
  expect(@pjf).to receive(:default_value_for).with('assets.location').and_return('here')
@@ -47,7 +53,7 @@ RSpec.describe MrMurano::ProjectFile do
47
53
  expect(@pjf.get('assets.default_page')).to eq('here')
48
54
  end
49
55
 
50
- it "Modules" do
56
+ it 'Modules' do
51
57
  # Because defaults before load() are all nil, the default_value_for method
52
58
  # is called.
53
59
  expect(@pjf).to receive(:default_value_for).with('modules.location').and_return('here')
@@ -60,7 +66,7 @@ RSpec.describe MrMurano::ProjectFile do
60
66
  expect(@pjf.get('modules.exclude')).to eq(['here'])
61
67
  end
62
68
 
63
- it "Routes" do
69
+ it 'Routes' do
64
70
  # Because defaults before load() are all nil, the default_value_for method
65
71
  # is called.
66
72
  expect(@pjf).to receive(:default_value_for).with('routes.location').and_return('here')
@@ -73,7 +79,7 @@ RSpec.describe MrMurano::ProjectFile do
73
79
  expect(@pjf.get('routes.exclude')).to eq(['here'])
74
80
  end
75
81
 
76
- it "Services" do
82
+ it 'Services' do
77
83
  # Because defaults before load() are all nil, the default_value_for method
78
84
  # is called.
79
85
  expect(@pjf).to receive(:default_value_for).with('services.location').and_return('here')
@@ -87,99 +93,99 @@ RSpec.describe MrMurano::ProjectFile do
87
93
  end
88
94
  end
89
95
 
90
- context "Bad Keys" do
96
+ context 'Bad Keys' do
91
97
  before(:example) do
92
98
  @pjf = MrMurano::ProjectFile.new
93
99
  end
94
- it "Empty" do
95
- expect{@pjf.get('')}.to raise_error("Empty key")
100
+ it 'Empty' do
101
+ expect { @pjf.get('') }.to raise_error('Empty key')
96
102
  end
97
- it "No dot" do
98
- expect{@pjf.get('info')}.to raise_error("Missing dot")
103
+ it 'No dot' do
104
+ expect { @pjf.get('info') }.to raise_error('Missing dot')
99
105
  end
100
- it "Undefined key" do
101
- expect{@pjf.get('info.bob')}.to raise_error("no member 'bob' in struct")
106
+ it 'Undefined key' do
107
+ expect { @pjf.get('info.bob') }.to raise_error("no member 'bob' in struct")
102
108
  end
103
- it "Undefined section" do
104
- expect{@pjf.get('sob.include')}.to raise_error(NameError)
109
+ it 'Undefined section' do
110
+ expect { @pjf.get('sob.include') }.to raise_error(NameError)
105
111
  end
106
- it "Missing key" do
107
- expect{@pjf.get('info.')}.to raise_error("Missing key")
112
+ it 'Missing key' do
113
+ expect { @pjf.get('info.') }.to raise_error('Missing key')
108
114
  end
109
- it "Missing section" do
110
- expect{@pjf.get('.include')}.to raise_error("no member '' in struct")
115
+ it 'Missing section' do
116
+ expect { @pjf.get('.include') }.to raise_error("no member '' in struct")
111
117
  end
112
118
  end
113
119
 
114
- context "default_value_for mapping" do
120
+ context 'default_value_for mapping' do
115
121
  before(:example) do
116
122
  @pjf = MrMurano::ProjectFile.new
117
123
  end
118
124
 
119
- it "returns nil for unmapped key." do
125
+ it 'returns nil for unmapped key.' do
120
126
  expect(@pjf.default_value_for('foooood')).to be_nil
121
127
  end
122
128
 
123
- it "hits $cfg if mapped key" do
129
+ it 'hits $cfg if mapped key' do
124
130
  expect($cfg).to receive(:get).with('location.endpoints').and_return('beef')
125
131
  expect(@pjf.default_value_for('routes.location')).to eq('beef')
126
132
  end
127
133
 
128
- it "returns array for split values" do
134
+ it 'returns array for split values' do
129
135
  expect($cfg).to receive(:get).with('endpoints.searchFor').and_return('beef')
130
136
  expect(@pjf.default_value_for('routes.include')).to eq(['beef'])
131
137
 
132
138
  expect($cfg).to receive(:get).with('endpoints.searchFor').and_return('beef and potatoes')
133
- expect(@pjf.default_value_for('routes.include')).to eq(['beef','and','potatoes'])
139
+ expect(@pjf.default_value_for('routes.include')).to eq(%w[beef and potatoes])
134
140
  end
135
141
  end
136
142
  end
137
143
 
138
- context "Calling load" do
144
+ context 'Calling load' do
139
145
  before(:example) do
140
146
  @pjf = MrMurano::ProjectFile.new
141
147
  end
142
148
 
143
- context "load just meta" do
149
+ context 'load just meta' do
144
150
  before(:example) do
145
151
  src = File.join(@testdir, 'spec/fixtures/ProjectFiles/only_meta.yaml')
146
152
  dst = File.join(@project_dir, 'meta.murano')
147
153
  FileUtils.copy(src, dst)
148
154
  @pjf.load
149
155
  end
150
- it "has the name" do
156
+ it 'has the name' do
151
157
  expect(@pjf.get('info.name')).to eq('tested')
152
158
  end
153
- it "has version" do
159
+ it 'has version' do
154
160
  expect(@pjf.get('info.version')).to eq('1.56.12')
155
161
  end
156
162
 
157
- it "fails back to $cfg" do
163
+ it 'fails back to $cfg' do
158
164
  expect(@pjf).to receive(:default_value_for).with('routes.include').and_return(['here'])
159
165
  expect(@pjf.get('routes.include')).to eq(['here'])
160
166
  end
161
167
  end
162
168
 
163
- context "load custom routes" do
169
+ context 'load custom routes' do
164
170
  before(:example) do
165
171
  src = File.join(@testdir, 'spec/fixtures/ProjectFiles/with_routes.yaml')
166
172
  dst = File.join(@project_dir, 'meta.murano')
167
173
  FileUtils.copy(src, dst)
168
174
  @pjf.load
169
175
  end
170
- it "has the name" do
176
+ it 'has the name' do
171
177
  expect(@pjf.get('info.name')).to eq('tested')
172
178
  end
173
- it "has version" do
179
+ it 'has version' do
174
180
  expect(@pjf.get('info.version')).to eq('1.56.12')
175
181
  end
176
- it "does not fail back to $cfg" do
182
+ it 'does not fail back to $cfg' do
177
183
  expect(@pjf).to_not receive(:default_value_for)
178
184
  expect(@pjf.get('routes.include')).to eq(['custom_api.lua'])
179
185
  end
180
186
  end
181
187
 
182
- it "reports validation errors" do
188
+ it 'reports validation errors' do
183
189
  src = File.join(@testdir, 'spec/fixtures/ProjectFiles/invalid.yaml')
184
190
  dst = File.join(@project_dir, 'meta.murano')
185
191
  FileUtils.copy(src, dst)
@@ -187,15 +193,16 @@ RSpec.describe MrMurano::ProjectFile do
187
193
  saved = $stderr
188
194
  $stderr = StringIO.new
189
195
  expect(@pjf.load).to eq(-5)
190
- expect($stderr.string).to match(%r{The property '#/info' did not contain a required property of 'description'})
196
+ expect($stderr.string).to match(
197
+ %r{The property '#/info' did not contain a required property of 'description'}
198
+ )
191
199
  $stderr = saved
192
200
  end
193
-
194
201
  end
195
202
  end
196
203
 
197
- context "Solutionfile 0.2.0" do
198
- include_context "WORKSPACE"
204
+ context 'Solutionfile 0.2.0' do
205
+ include_context 'WORKSPACE'
199
206
  before(:example) do
200
207
  $cfg = MrMurano::Config.new
201
208
  $cfg.load
@@ -204,61 +211,66 @@ RSpec.describe MrMurano::ProjectFile do
204
211
  @pjf = MrMurano::ProjectFile.new
205
212
  end
206
213
 
207
- it "Reports validation errors" do
208
- src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.2.0_invalid.json')
209
- dst = File.join(@project_dir, 'Solutionfile.json')
210
- FileUtils.copy(src, dst)
211
- saved = $stderr
212
- $stderr = StringIO.new
213
- @pjf.load
214
- expect($stderr.string).to match(%r{The property '#/' did not contain a required property of 'custom_api'})
215
- $stderr = saved
214
+ it 'Reports validation errors' do
215
+ src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.2.0_invalid.json')
216
+ dst = File.join(@project_dir, 'Solutionfile.json')
217
+ FileUtils.copy(src, dst)
218
+ saved = $stderr
219
+ $stderr = StringIO.new
220
+ @pjf.load
221
+ expect($stderr.string).to match(
222
+ %r{The property '#/' did not contain a required property of 'custom_api'}
223
+ )
224
+ $stderr = saved
216
225
  end
217
226
 
218
- it "loads with truncated version" do
219
- src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.2.json')
220
- dst = File.join(@project_dir, 'Solutionfile.json')
221
- FileUtils.copy(src, dst)
222
- saved = $stderr
223
- $stderr = StringIO.new
224
- @pjf.load
225
- expect($stderr.string).to eq('')
226
- $stderr = saved
227
+ it 'loads with truncated version' do
228
+ src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.2.json')
229
+ dst = File.join(@project_dir, 'Solutionfile.json')
230
+ FileUtils.copy(src, dst)
231
+ saved = $stderr
232
+ $stderr = StringIO.new
233
+ @pjf.load
234
+ expect($stderr.string).to eq('')
235
+ $stderr = saved
227
236
  end
228
237
 
229
- context "loads" do
238
+ context 'loads' do
230
239
  before(:example) do
231
240
  src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.2.0.json')
232
241
  dst = File.join(@project_dir, 'Solutionfile.json')
233
242
  FileUtils.copy(src, dst)
234
243
  @pjf.load
235
244
  end
236
- it "defines assets" do
245
+ it 'defines assets' do
237
246
  expect(@pjf.get('assets.default_page')).to eq('index.html')
238
247
  expect(@pjf.get('assets.location')).to eq('public')
239
248
  expect(@pjf.get('assets.include')).to eq(['**/*'])
240
249
  end
241
250
 
242
- it "defines routes" do
243
- expect(@pjf['routes.location']).to eq ('.')
251
+ it 'defines routes' do
252
+ expect(@pjf['routes.location']).to eq('.')
244
253
  expect(@pjf.get('routes.include')).to eq(['sample_api.lua'])
245
254
  end
246
255
 
247
- it "defines modules" do
248
- expect(@pjf['modules.location']).to eq ('.')
249
- expect(@pjf['modules.include']).to match_array(["modules/debug.lua", "modules/listen.lua", "modules/util.lua"])
256
+ it 'defines modules' do
257
+ expect(@pjf['modules.location']).to eq('.')
258
+ expect(@pjf['modules.include']).to match_array(
259
+ ['modules/debug.lua', 'modules/listen.lua', 'modules/util.lua']
260
+ )
250
261
  end
251
262
 
252
- it "defines services" do
253
- expect(@pjf['services.location']).to eq ('.')
254
- expect(@pjf['services.include']).to match_array(["event_handler/product.lua", "event_handler/timer.lua"])
263
+ it 'defines services' do
264
+ expect(@pjf['services.location']).to eq('.')
265
+ expect(@pjf['services.include']).to match_array(
266
+ ['event_handler/product.lua', 'event_handler/timer.lua']
267
+ )
255
268
  end
256
-
257
269
  end
258
270
  end
259
271
 
260
- context "Solutionfile 0.3.0" do
261
- include_context "WORKSPACE"
272
+ context 'Solutionfile 0.3.0' do
273
+ include_context 'WORKSPACE'
262
274
  before(:example) do
263
275
  $cfg = MrMurano::Config.new
264
276
  $cfg.load
@@ -267,69 +279,69 @@ RSpec.describe MrMurano::ProjectFile do
267
279
  @pjf = MrMurano::ProjectFile.new
268
280
  end
269
281
 
270
- it "Reports validation errors" do
271
- src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.3.0_invalid.json')
272
- dst = File.join(@project_dir, 'Solutionfile.json')
273
- FileUtils.copy(src, dst)
274
- saved = $stderr
275
- $stderr = StringIO.new
276
- @pjf.load
277
- expect($stderr.string).to match(%r{The property '#/' did not contain a required property of 'routes'})
278
- $stderr = saved
282
+ it 'Reports validation errors' do
283
+ src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.3.0_invalid.json')
284
+ dst = File.join(@project_dir, 'Solutionfile.json')
285
+ FileUtils.copy(src, dst)
286
+ saved = $stderr
287
+ $stderr = StringIO.new
288
+ @pjf.load
289
+ expect($stderr.string).to match(
290
+ %r{The property '#/' did not contain a required property of 'routes'}
291
+ )
292
+ $stderr = saved
279
293
  end
280
294
 
281
- it "loads with truncated version" do
282
- src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.3.json')
283
- dst = File.join(@project_dir, 'Solutionfile.json')
284
- FileUtils.copy(src, dst)
285
- saved = $stderr
286
- $stderr = StringIO.new
287
- @pjf.load
288
- expect($stderr.string).to eq('')
289
- $stderr = saved
295
+ it 'loads with truncated version' do
296
+ src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.3.json')
297
+ dst = File.join(@project_dir, 'Solutionfile.json')
298
+ FileUtils.copy(src, dst)
299
+ saved = $stderr
300
+ $stderr = StringIO.new
301
+ @pjf.load
302
+ expect($stderr.string).to eq('')
303
+ $stderr = saved
290
304
  end
291
305
 
292
- context "loads" do
306
+ context 'loads' do
293
307
  before(:example) do
294
308
  src = File.join(@testdir, 'spec/fixtures/SolutionFiles/0.3.0.json')
295
309
  dst = File.join(@project_dir, 'Solutionfile.json')
296
310
  FileUtils.copy(src, dst)
297
311
  @pjf.load
298
312
  end
299
- it "defines assets" do
313
+ it 'defines assets' do
300
314
  expect(@pjf.get('assets.default_page')).to eq('index.html')
301
315
  expect(@pjf.get('assets.location')).to eq('public')
302
316
  expect(@pjf.get('assets.include')).to eq(['**/*'])
303
317
  end
304
318
 
305
- it "defines routes" do
306
- expect(@pjf['routes.location']).to eq ('.')
319
+ it 'defines routes' do
320
+ expect(@pjf['routes.location']).to eq('.')
307
321
  expect(@pjf.get('routes.include')).to eq(['sample_api.lua'])
308
322
  end
309
323
 
310
- it "defines modules" do
311
- expect(@pjf['modules.location']).to eq ('.')
324
+ it 'defines modules' do
325
+ expect(@pjf['modules.location']).to eq('.')
312
326
  expect(@pjf['modules.include']).to match_array(
313
327
  [
314
- "modules/debug.lua",
315
- "modules/listen.lua",
316
- "modules/util.lua",
328
+ 'modules/debug.lua',
329
+ 'modules/listen.lua',
330
+ 'modules/util.lua',
317
331
  ]
318
332
  )
319
333
  end
320
334
 
321
- it "defines services" do
322
- expect(@pjf['services.location']).to eq ('.')
335
+ it 'defines services' do
336
+ expect(@pjf['services.location']).to eq('.')
323
337
  expect(@pjf['services.include']).to match_array(
324
338
  [
325
- "event_handler/product.lua",
326
- "event_handler/timer.lua",
339
+ 'event_handler/product.lua',
340
+ 'event_handler/timer.lua',
327
341
  ]
328
342
  )
329
343
  end
330
-
331
344
  end
332
345
  end
333
346
  end
334
347
 
335
- # vim: set ai et sw=2 ts=2 :