business_pipeline 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -4
- data/lib/business_pipeline/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e306807f9ca2fb16a2061b7167d060efd5f9bd4a1fc931fda8a42ccb012f4069
|
4
|
+
data.tar.gz: 7ef8bd744d77b0f0a3449ceda3933e764cfab86b0b8f118e9c7c1ae2c516f68c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72087eedeaa7645d53e38ac69d621859765a5b2ec4324d8708362571d35abef9deaaf0dbc7dc1771b05c761637f1b88f18570c7f9831b20229d14469203bc79d
|
7
|
+
data.tar.gz: e7154135992eb87060034a57d435d4bfd3ad550a12f5f5e1318187778d2e8a4c8759c1183a7b4b1fa253498fd3dc1f915da2d1676bbd38a34cf2eea8d321b331
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -225,7 +225,7 @@ class IndexProcess
|
|
225
225
|
|
226
226
|
puts "Context before call is: #{context.inspect}"
|
227
227
|
|
228
|
-
process.
|
228
|
+
process.call
|
229
229
|
|
230
230
|
puts "Context after call is: #{context.inspect}"
|
231
231
|
end
|
@@ -240,6 +240,8 @@ class IndexProcess
|
|
240
240
|
end
|
241
241
|
```
|
242
242
|
|
243
|
+
**Important:** don’t call `process.perform` inside a Hook, it would trigger the hooks and create an infinite loop.
|
244
|
+
|
243
245
|
### Hooks execution order
|
244
246
|
|
245
247
|
Execution of _around_ hooks will always be the first one. Then the _before_ hooks and to finish the _after_ ones. So writing the following Process
|
@@ -250,7 +252,7 @@ class IndexProcess
|
|
250
252
|
|
251
253
|
around do |process|
|
252
254
|
puts 'AROUND 1 START'
|
253
|
-
process.
|
255
|
+
process.call
|
254
256
|
puts 'AROUND 1 END'
|
255
257
|
end
|
256
258
|
|
@@ -259,7 +261,7 @@ class IndexProcess
|
|
259
261
|
|
260
262
|
around do |process|
|
261
263
|
puts 'AROUND 2 START'
|
262
|
-
process.
|
264
|
+
process.call
|
263
265
|
puts 'AROUND 2 END'
|
264
266
|
end
|
265
267
|
|
@@ -290,7 +292,7 @@ If for instance you wanted to wrap every Process in a transaction (which would b
|
|
290
292
|
```ruby
|
291
293
|
class TransactionWrapping
|
292
294
|
def call(process, context, config)
|
293
|
-
ActiveRecord::Base.transaction { process.
|
295
|
+
ActiveRecord::Base.transaction { process.call }
|
294
296
|
end
|
295
297
|
end
|
296
298
|
|