light-service 0.10.3 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +6 -0
  4. data/.travis.yml +12 -11
  5. data/Appraisals +4 -4
  6. data/Gemfile +0 -2
  7. data/README.md +240 -34
  8. data/RELEASES.md +20 -1
  9. data/gemfiles/activesupport_4.gemfile +0 -1
  10. data/gemfiles/activesupport_5.gemfile +0 -1
  11. data/gemfiles/{activesupport_3.gemfile → activesupport_6.gemfile} +1 -2
  12. data/lib/generators/light_service/action_generator.rb +90 -0
  13. data/lib/generators/light_service/generator_utils.rb +45 -0
  14. data/lib/generators/light_service/organizer_generator.rb +66 -0
  15. data/lib/generators/light_service/templates/action_spec_template.erb +31 -0
  16. data/lib/generators/light_service/templates/action_template.erb +30 -0
  17. data/lib/generators/light_service/templates/organizer_spec_template.erb +20 -0
  18. data/lib/generators/light_service/templates/organizer_template.erb +22 -0
  19. data/lib/light-service.rb +1 -0
  20. data/lib/light-service/context.rb +6 -2
  21. data/lib/light-service/localization_adapter.rb +1 -1
  22. data/lib/light-service/organizer.rb +18 -0
  23. data/lib/light-service/organizer/with_reducer.rb +11 -6
  24. data/lib/light-service/organizer/with_reducer_factory.rb +11 -7
  25. data/lib/light-service/organizer/with_reducer_log_decorator.rb +5 -2
  26. data/lib/light-service/version.rb +1 -1
  27. data/light-service.gemspec +9 -4
  28. data/spec/acceptance/custom_log_from_organizer_spec.rb +60 -0
  29. data/spec/acceptance/fail_spec.rb +42 -16
  30. data/spec/acceptance/organizer/add_aliases_spec.rb +28 -0
  31. data/spec/acceptance/organizer/add_to_context_spec.rb +30 -0
  32. data/spec/acceptance/organizer/execute_spec.rb +1 -1
  33. data/spec/acceptance/organizer/iterate_spec.rb +7 -0
  34. data/spec/acceptance/organizer/reduce_if_spec.rb +38 -0
  35. data/spec/acceptance/organizer/reduce_until_spec.rb +6 -0
  36. data/spec/action_spec.rb +8 -0
  37. data/spec/lib/generators/action_generator_advanced_spec.rb +43 -0
  38. data/spec/lib/generators/action_generator_simple_spec.rb +37 -0
  39. data/spec/lib/generators/full_generator_test_blobs.rb +193 -0
  40. data/spec/lib/generators/organizer_generator_advanced_spec.rb +37 -0
  41. data/spec/lib/generators/organizer_generator_simple_spec.rb +37 -0
  42. data/spec/organizer_spec.rb +42 -14
  43. data/spec/sample/provides_free_shipping_action_spec.rb +1 -1
  44. data/spec/spec_helper.rb +7 -2
  45. data/spec/test_doubles.rb +77 -0
  46. metadata +104 -15
  47. data/gemfiles/activesupport_3.gemfile.lock +0 -76
  48. data/gemfiles/activesupport_4.gemfile.lock +0 -82
  49. data/gemfiles/activesupport_5.gemfile.lock +0 -82
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: light-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Attila Domokos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-03 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: generator_spec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.4
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.9.4
41
+ - !ruby/object:Gem::Dependency
42
+ name: test-unit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
25
53
  - !ruby/object:Gem::Version
26
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: appraisal
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.3'
27
69
  - !ruby/object:Gem::Dependency
28
70
  name: rspec
29
71
  requirement: !ruby/object:Gem::Requirement
@@ -44,42 +86,70 @@ dependencies:
44
86
  requirements:
45
87
  - - "~>"
46
88
  - !ruby/object:Gem::Version
47
- version: 0.16.1
89
+ version: '0.17'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.17'
97
+ - !ruby/object:Gem::Dependency
98
+ name: codecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.1'
48
104
  type: :development
49
105
  prerelease: false
50
106
  version_requirements: !ruby/object:Gem::Requirement
51
107
  requirements:
52
108
  - - "~>"
53
109
  - !ruby/object:Gem::Version
54
- version: 0.16.1
110
+ version: '0.1'
55
111
  - !ruby/object:Gem::Dependency
56
112
  name: rubocop
57
113
  requirement: !ruby/object:Gem::Requirement
58
114
  requirements:
59
115
  - - "~>"
60
116
  - !ruby/object:Gem::Version
61
- version: '0.53'
117
+ version: 0.68.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.68.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-performance
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 1.2.0
62
132
  type: :development
63
133
  prerelease: false
64
134
  version_requirements: !ruby/object:Gem::Requirement
65
135
  requirements:
66
136
  - - "~>"
67
137
  - !ruby/object:Gem::Version
68
- version: '0.53'
138
+ version: 1.2.0
69
139
  - !ruby/object:Gem::Dependency
70
140
  name: pry
71
141
  requirement: !ruby/object:Gem::Requirement
72
142
  requirements:
73
143
  - - "~>"
74
144
  - !ruby/object:Gem::Version
75
- version: '0.10'
145
+ version: 0.12.2
76
146
  type: :development
77
147
  prerelease: false
78
148
  version_requirements: !ruby/object:Gem::Requirement
79
149
  requirements:
80
150
  - - "~>"
81
151
  - !ruby/object:Gem::Version
82
- version: '0.10'
152
+ version: 0.12.2
83
153
  description: A service skeleton with an emphasis on simplicity
84
154
  email:
85
155
  - adomokos@gmail.com
@@ -98,12 +168,16 @@ files:
98
168
  - README.md
99
169
  - RELEASES.md
100
170
  - Rakefile
101
- - gemfiles/activesupport_3.gemfile
102
- - gemfiles/activesupport_3.gemfile.lock
103
171
  - gemfiles/activesupport_4.gemfile
104
- - gemfiles/activesupport_4.gemfile.lock
105
172
  - gemfiles/activesupport_5.gemfile
106
- - gemfiles/activesupport_5.gemfile.lock
173
+ - gemfiles/activesupport_6.gemfile
174
+ - lib/generators/light_service/action_generator.rb
175
+ - lib/generators/light_service/generator_utils.rb
176
+ - lib/generators/light_service/organizer_generator.rb
177
+ - lib/generators/light_service/templates/action_spec_template.erb
178
+ - lib/generators/light_service/templates/action_template.erb
179
+ - lib/generators/light_service/templates/organizer_spec_template.erb
180
+ - lib/generators/light_service/templates/organizer_template.erb
107
181
  - lib/light-service.rb
108
182
  - lib/light-service/action.rb
109
183
  - lib/light-service/configuration.rb
@@ -136,6 +210,7 @@ files:
136
210
  - spec/acceptance/after_actions_spec.rb
137
211
  - spec/acceptance/around_each_spec.rb
138
212
  - spec/acceptance/before_actions_spec.rb
213
+ - spec/acceptance/custom_log_from_organizer_spec.rb
139
214
  - spec/acceptance/fail_spec.rb
140
215
  - spec/acceptance/include_warning_spec.rb
141
216
  - spec/acceptance/log_from_organizer_spec.rb
@@ -148,6 +223,8 @@ files:
148
223
  - spec/acceptance/orchestrator/reduce_if_spec.rb
149
224
  - spec/acceptance/orchestrator/reduce_until_spec.rb
150
225
  - spec/acceptance/orchestrator/with_callback_spec.rb
226
+ - spec/acceptance/organizer/add_aliases_spec.rb
227
+ - spec/acceptance/organizer/add_to_context_spec.rb
151
228
  - spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
152
229
  - spec/acceptance/organizer/context_failure_and_skipping_spec.rb
153
230
  - spec/acceptance/organizer/execute_spec.rb
@@ -164,6 +241,11 @@ files:
164
241
  - spec/action_spec.rb
165
242
  - spec/context/inspect_spec.rb
166
243
  - spec/context_spec.rb
244
+ - spec/lib/generators/action_generator_advanced_spec.rb
245
+ - spec/lib/generators/action_generator_simple_spec.rb
246
+ - spec/lib/generators/full_generator_test_blobs.rb
247
+ - spec/lib/generators/organizer_generator_advanced_spec.rb
248
+ - spec/lib/generators/organizer_generator_simple_spec.rb
167
249
  - spec/localization_adapter_spec.rb
168
250
  - spec/organizer/with_reducer_spec.rb
169
251
  - spec/organizer_key_aliases_spec.rb
@@ -203,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
285
  - !ruby/object:Gem::Version
204
286
  version: '0'
205
287
  requirements: []
206
- rubyforge_project:
207
- rubygems_version: 2.6.13
288
+ rubygems_version: 3.1.2
208
289
  signing_key:
209
290
  specification_version: 4
210
291
  summary: A service skeleton with an emphasis on simplicity
@@ -213,6 +294,7 @@ test_files:
213
294
  - spec/acceptance/after_actions_spec.rb
214
295
  - spec/acceptance/around_each_spec.rb
215
296
  - spec/acceptance/before_actions_spec.rb
297
+ - spec/acceptance/custom_log_from_organizer_spec.rb
216
298
  - spec/acceptance/fail_spec.rb
217
299
  - spec/acceptance/include_warning_spec.rb
218
300
  - spec/acceptance/log_from_organizer_spec.rb
@@ -225,6 +307,8 @@ test_files:
225
307
  - spec/acceptance/orchestrator/reduce_if_spec.rb
226
308
  - spec/acceptance/orchestrator/reduce_until_spec.rb
227
309
  - spec/acceptance/orchestrator/with_callback_spec.rb
310
+ - spec/acceptance/organizer/add_aliases_spec.rb
311
+ - spec/acceptance/organizer/add_to_context_spec.rb
228
312
  - spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
229
313
  - spec/acceptance/organizer/context_failure_and_skipping_spec.rb
230
314
  - spec/acceptance/organizer/execute_spec.rb
@@ -241,6 +325,11 @@ test_files:
241
325
  - spec/action_spec.rb
242
326
  - spec/context/inspect_spec.rb
243
327
  - spec/context_spec.rb
328
+ - spec/lib/generators/action_generator_advanced_spec.rb
329
+ - spec/lib/generators/action_generator_simple_spec.rb
330
+ - spec/lib/generators/full_generator_test_blobs.rb
331
+ - spec/lib/generators/organizer_generator_advanced_spec.rb
332
+ - spec/lib/generators/organizer_generator_simple_spec.rb
244
333
  - spec/localization_adapter_spec.rb
245
334
  - spec/organizer/with_reducer_spec.rb
246
335
  - spec/organizer_key_aliases_spec.rb
@@ -1,76 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- light-service (0.6.1)
5
- activesupport (>= 3.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (3.2.22)
11
- i18n (~> 0.6, >= 0.6.4)
12
- multi_json (~> 1.0)
13
- appraisal (2.0.2)
14
- bundler
15
- rake
16
- thor (>= 0.14.0)
17
- ast (2.3.0)
18
- coderay (1.1.1)
19
- diff-lcs (1.2.5)
20
- docile (1.1.5)
21
- i18n (0.7.0)
22
- json (2.0.2)
23
- method_source (0.8.2)
24
- multi_json (1.11.2)
25
- parser (2.3.1.2)
26
- ast (~> 2.2)
27
- powerpack (0.1.1)
28
- pry (0.10.4)
29
- coderay (~> 1.1.0)
30
- method_source (~> 0.8.1)
31
- slop (~> 3.4)
32
- rainbow (2.1.0)
33
- rake (10.4.2)
34
- rspec (3.3.0)
35
- rspec-core (~> 3.3.0)
36
- rspec-expectations (~> 3.3.0)
37
- rspec-mocks (~> 3.3.0)
38
- rspec-core (3.3.2)
39
- rspec-support (~> 3.3.0)
40
- rspec-expectations (3.3.1)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.3.0)
43
- rspec-mocks (3.3.2)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.3.0)
46
- rspec-support (3.3.0)
47
- rubocop (0.42.0)
48
- parser (>= 2.3.1.1, < 3.0)
49
- powerpack (~> 0.1)
50
- rainbow (>= 1.99.1, < 3.0)
51
- ruby-progressbar (~> 1.7)
52
- unicode-display_width (~> 1.0, >= 1.0.1)
53
- ruby-progressbar (1.8.1)
54
- simplecov (0.12.0)
55
- docile (~> 1.1.0)
56
- json (>= 1.8, < 3)
57
- simplecov-html (~> 0.10.0)
58
- simplecov-html (0.10.0)
59
- slop (3.6.0)
60
- thor (0.19.1)
61
- unicode-display_width (1.1.1)
62
-
63
- PLATFORMS
64
- ruby
65
-
66
- DEPENDENCIES
67
- activesupport (~> 3.0)
68
- appraisal (~> 2.0)
69
- light-service!
70
- pry (~> 0.10)
71
- rspec (~> 3.0)
72
- rubocop (~> 0.36)
73
- simplecov (~> 0.11)
74
-
75
- BUNDLED WITH
76
- 1.12.5
@@ -1,82 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- light-service (0.6.1)
5
- activesupport (>= 3.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (4.2.3)
11
- i18n (~> 0.7)
12
- json (~> 1.7, >= 1.7.7)
13
- minitest (~> 5.1)
14
- thread_safe (~> 0.3, >= 0.3.4)
15
- tzinfo (~> 1.1)
16
- appraisal (2.0.2)
17
- bundler
18
- rake
19
- thor (>= 0.14.0)
20
- ast (2.3.0)
21
- coderay (1.1.1)
22
- diff-lcs (1.2.5)
23
- docile (1.1.5)
24
- i18n (0.7.0)
25
- json (1.8.3)
26
- method_source (0.8.2)
27
- minitest (5.7.0)
28
- parser (2.3.1.2)
29
- ast (~> 2.2)
30
- powerpack (0.1.1)
31
- pry (0.10.4)
32
- coderay (~> 1.1.0)
33
- method_source (~> 0.8.1)
34
- slop (~> 3.4)
35
- rainbow (2.1.0)
36
- rake (10.4.2)
37
- rspec (3.3.0)
38
- rspec-core (~> 3.3.0)
39
- rspec-expectations (~> 3.3.0)
40
- rspec-mocks (~> 3.3.0)
41
- rspec-core (3.3.2)
42
- rspec-support (~> 3.3.0)
43
- rspec-expectations (3.3.1)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.3.0)
46
- rspec-mocks (3.3.2)
47
- diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.3.0)
49
- rspec-support (3.3.0)
50
- rubocop (0.42.0)
51
- parser (>= 2.3.1.1, < 3.0)
52
- powerpack (~> 0.1)
53
- rainbow (>= 1.99.1, < 3.0)
54
- ruby-progressbar (~> 1.7)
55
- unicode-display_width (~> 1.0, >= 1.0.1)
56
- ruby-progressbar (1.8.1)
57
- simplecov (0.12.0)
58
- docile (~> 1.1.0)
59
- json (>= 1.8, < 3)
60
- simplecov-html (~> 0.10.0)
61
- simplecov-html (0.10.0)
62
- slop (3.6.0)
63
- thor (0.19.1)
64
- thread_safe (0.3.5)
65
- tzinfo (1.2.2)
66
- thread_safe (~> 0.1)
67
- unicode-display_width (1.1.1)
68
-
69
- PLATFORMS
70
- ruby
71
-
72
- DEPENDENCIES
73
- activesupport (~> 4.0)
74
- appraisal (~> 2.0)
75
- light-service!
76
- pry (~> 0.10)
77
- rspec (~> 3.0)
78
- rubocop (~> 0.36)
79
- simplecov (~> 0.11)
80
-
81
- BUNDLED WITH
82
- 1.12.5
@@ -1,82 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- light-service (0.6.1)
5
- activesupport (>= 3.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activesupport (5.0.0.1)
11
- concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (~> 0.7)
13
- minitest (~> 5.1)
14
- tzinfo (~> 1.1)
15
- appraisal (2.1.0)
16
- bundler
17
- rake
18
- thor (>= 0.14.0)
19
- ast (2.3.0)
20
- coderay (1.1.1)
21
- concurrent-ruby (1.0.2)
22
- diff-lcs (1.2.5)
23
- docile (1.1.5)
24
- i18n (0.7.0)
25
- json (2.0.2)
26
- method_source (0.8.2)
27
- minitest (5.9.0)
28
- parser (2.3.1.2)
29
- ast (~> 2.2)
30
- powerpack (0.1.1)
31
- pry (0.10.4)
32
- coderay (~> 1.1.0)
33
- method_source (~> 0.8.1)
34
- slop (~> 3.4)
35
- rainbow (2.1.0)
36
- rake (11.2.2)
37
- rspec (3.5.0)
38
- rspec-core (~> 3.5.0)
39
- rspec-expectations (~> 3.5.0)
40
- rspec-mocks (~> 3.5.0)
41
- rspec-core (3.5.2)
42
- rspec-support (~> 3.5.0)
43
- rspec-expectations (3.5.0)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.5.0)
46
- rspec-mocks (3.5.0)
47
- diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.5.0)
49
- rspec-support (3.5.0)
50
- rubocop (0.42.0)
51
- parser (>= 2.3.1.1, < 3.0)
52
- powerpack (~> 0.1)
53
- rainbow (>= 1.99.1, < 3.0)
54
- ruby-progressbar (~> 1.7)
55
- unicode-display_width (~> 1.0, >= 1.0.1)
56
- ruby-progressbar (1.8.1)
57
- simplecov (0.12.0)
58
- docile (~> 1.1.0)
59
- json (>= 1.8, < 3)
60
- simplecov-html (~> 0.10.0)
61
- simplecov-html (0.10.0)
62
- slop (3.6.0)
63
- thor (0.19.1)
64
- thread_safe (0.3.5)
65
- tzinfo (1.2.2)
66
- thread_safe (~> 0.1)
67
- unicode-display_width (1.1.1)
68
-
69
- PLATFORMS
70
- ruby
71
-
72
- DEPENDENCIES
73
- activesupport (~> 5.0)
74
- appraisal (~> 2.0)
75
- light-service!
76
- pry (~> 0.10)
77
- rspec (~> 3.0)
78
- rubocop (~> 0.36)
79
- simplecov (~> 0.11)
80
-
81
- BUNDLED WITH
82
- 1.12.5