light-service 0.8.4 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -2
  3. data/README.md +149 -52
  4. data/RELEASES.md +6 -0
  5. data/gemfiles/activesupport_3.gemfile +1 -1
  6. data/gemfiles/activesupport_4.gemfile +1 -1
  7. data/gemfiles/activesupport_5.gemfile +1 -1
  8. data/lib/light-service.rb +7 -0
  9. data/lib/light-service/action.rb +22 -2
  10. data/lib/light-service/orchestrator.rb +21 -3
  11. data/lib/light-service/organizer.rb +42 -20
  12. data/lib/light-service/organizer/execute.rb +14 -0
  13. data/lib/light-service/organizer/iterate.rb +22 -0
  14. data/lib/light-service/organizer/reduce_if.rb +17 -0
  15. data/lib/light-service/organizer/reduce_until.rb +20 -0
  16. data/lib/light-service/organizer/scoped_reducable.rb +13 -0
  17. data/lib/light-service/organizer/verify_call_method_exists.rb +28 -0
  18. data/lib/light-service/organizer/with_callback.rb +26 -0
  19. data/lib/light-service/organizer/with_reducer.rb +14 -4
  20. data/lib/light-service/organizer/with_reducer_factory.rb +2 -0
  21. data/lib/light-service/version.rb +1 -1
  22. data/light-service.gemspec +2 -2
  23. data/resources/orchestrators_deprecated.svg +10 -0
  24. data/spec/acceptance/add_numbers_spec.rb +3 -3
  25. data/spec/acceptance/after_actions_spec.rb +67 -0
  26. data/spec/acceptance/before_actions_spec.rb +109 -0
  27. data/spec/acceptance/orchestrator/context_failure_and_skipping_spec.rb +12 -10
  28. data/spec/acceptance/orchestrator/execute_spec.rb +8 -6
  29. data/spec/acceptance/orchestrator/iterate_spec.rb +9 -7
  30. data/spec/acceptance/orchestrator/organizer_action_combination_spec.rb +13 -11
  31. data/spec/acceptance/orchestrator/reduce_if_spec.rb +9 -7
  32. data/spec/acceptance/orchestrator/reduce_until_spec.rb +7 -5
  33. data/spec/acceptance/orchestrator/with_callback_spec.rb +8 -6
  34. data/spec/acceptance/organizer/around_each_with_reduce_if_spec.rb +42 -0
  35. data/spec/acceptance/organizer/context_failure_and_skipping_spec.rb +65 -0
  36. data/spec/acceptance/organizer/execute_spec.rb +46 -0
  37. data/spec/acceptance/organizer/iterate_spec.rb +37 -0
  38. data/spec/acceptance/organizer/reduce_if_spec.rb +51 -0
  39. data/spec/acceptance/organizer/reduce_until_spec.rb +43 -0
  40. data/spec/acceptance/organizer/with_callback_spec.rb +110 -0
  41. data/spec/organizer/with_reducer_spec.rb +2 -7
  42. data/spec/sample/calculates_tax_spec.rb +1 -4
  43. data/spec/spec_helper.rb +12 -0
  44. data/spec/support.rb +9 -0
  45. data/spec/test_doubles.rb +84 -17
  46. metadata +34 -6
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.8.4
4
+ version: 0.10.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: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2018-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.14.1
47
+ version: 0.16.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.14.1
54
+ version: 0.16.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.51'
61
+ version: '0.53'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.51'
68
+ version: '0.53'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -113,6 +113,13 @@ files:
113
113
  - lib/light-service/localization_adapter.rb
114
114
  - lib/light-service/orchestrator.rb
115
115
  - lib/light-service/organizer.rb
116
+ - lib/light-service/organizer/execute.rb
117
+ - lib/light-service/organizer/iterate.rb
118
+ - lib/light-service/organizer/reduce_if.rb
119
+ - lib/light-service/organizer/reduce_until.rb
120
+ - lib/light-service/organizer/scoped_reducable.rb
121
+ - lib/light-service/organizer/verify_call_method_exists.rb
122
+ - lib/light-service/organizer/with_callback.rb
116
123
  - lib/light-service/organizer/with_reducer.rb
117
124
  - lib/light-service/organizer/with_reducer_factory.rb
118
125
  - lib/light-service/organizer/with_reducer_log_decorator.rb
@@ -122,10 +129,13 @@ files:
122
129
  - light-service.gemspec
123
130
  - resources/fail_actions.png
124
131
  - resources/light-service.png
132
+ - resources/orchestrators_deprecated.svg
125
133
  - resources/organizer_and_actions.png
126
134
  - resources/skip_actions.png
127
135
  - spec/acceptance/add_numbers_spec.rb
136
+ - spec/acceptance/after_actions_spec.rb
128
137
  - spec/acceptance/around_each_spec.rb
138
+ - spec/acceptance/before_actions_spec.rb
129
139
  - spec/acceptance/fail_spec.rb
130
140
  - spec/acceptance/include_warning_spec.rb
131
141
  - spec/acceptance/log_from_organizer_spec.rb
@@ -138,6 +148,13 @@ files:
138
148
  - spec/acceptance/orchestrator/reduce_if_spec.rb
139
149
  - spec/acceptance/orchestrator/reduce_until_spec.rb
140
150
  - spec/acceptance/orchestrator/with_callback_spec.rb
151
+ - spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
152
+ - spec/acceptance/organizer/context_failure_and_skipping_spec.rb
153
+ - spec/acceptance/organizer/execute_spec.rb
154
+ - spec/acceptance/organizer/iterate_spec.rb
155
+ - spec/acceptance/organizer/reduce_if_spec.rb
156
+ - spec/acceptance/organizer/reduce_until_spec.rb
157
+ - spec/acceptance/organizer/with_callback_spec.rb
141
158
  - spec/acceptance/rollback_spec.rb
142
159
  - spec/acceptance/skip_all_warning_spec.rb
143
160
  - spec/acceptance/testing/context_factory_spec.rb
@@ -160,6 +177,7 @@ files:
160
177
  - spec/sample/tax/looks_up_tax_percentage_action.rb
161
178
  - spec/sample/tax/provides_free_shipping_action.rb
162
179
  - spec/spec_helper.rb
180
+ - spec/support.rb
163
181
  - spec/test_doubles.rb
164
182
  - spec/testing/context_factory_spec.rb
165
183
  homepage: https://github.com/adomokos/light-service
@@ -188,7 +206,9 @@ specification_version: 4
188
206
  summary: A service skeleton with an emphasis on simplicity
189
207
  test_files:
190
208
  - spec/acceptance/add_numbers_spec.rb
209
+ - spec/acceptance/after_actions_spec.rb
191
210
  - spec/acceptance/around_each_spec.rb
211
+ - spec/acceptance/before_actions_spec.rb
192
212
  - spec/acceptance/fail_spec.rb
193
213
  - spec/acceptance/include_warning_spec.rb
194
214
  - spec/acceptance/log_from_organizer_spec.rb
@@ -201,6 +221,13 @@ test_files:
201
221
  - spec/acceptance/orchestrator/reduce_if_spec.rb
202
222
  - spec/acceptance/orchestrator/reduce_until_spec.rb
203
223
  - spec/acceptance/orchestrator/with_callback_spec.rb
224
+ - spec/acceptance/organizer/around_each_with_reduce_if_spec.rb
225
+ - spec/acceptance/organizer/context_failure_and_skipping_spec.rb
226
+ - spec/acceptance/organizer/execute_spec.rb
227
+ - spec/acceptance/organizer/iterate_spec.rb
228
+ - spec/acceptance/organizer/reduce_if_spec.rb
229
+ - spec/acceptance/organizer/reduce_until_spec.rb
230
+ - spec/acceptance/organizer/with_callback_spec.rb
204
231
  - spec/acceptance/rollback_spec.rb
205
232
  - spec/acceptance/skip_all_warning_spec.rb
206
233
  - spec/acceptance/testing/context_factory_spec.rb
@@ -223,5 +250,6 @@ test_files:
223
250
  - spec/sample/tax/looks_up_tax_percentage_action.rb
224
251
  - spec/sample/tax/provides_free_shipping_action.rb
225
252
  - spec/spec_helper.rb
253
+ - spec/support.rb
226
254
  - spec/test_doubles.rb
227
255
  - spec/testing/context_factory_spec.rb