business_pipeline 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fffa062373cea0a470d7c9f8c35843f95448c3c9c31fdbdf5be11c57f8c937e0
4
- data.tar.gz: 720225822fa786111bdd11e3abf54fdcc1388a1baca3dd8c8c94e45db11230a4
3
+ metadata.gz: 7273b0377aaea159de3b5e5671d713a0450787880b4855c8b6c5014de031feeb
4
+ data.tar.gz: a29ab9c61dc0b39d4f4c47a3768f71b6da32746f950932bf003ce41c194446f9
5
5
  SHA512:
6
- metadata.gz: f1d1e38de02437aff15fedf896e8f3020b74ae95f9ddbe6d2abec26efc35158ace21841348dc3f504a799e22d5ca4158a64d14b755d19226e4b4c39b4a2631ac
7
- data.tar.gz: c41e391563e1d73dbb7a4fc54e5f3b143d1c388caee4c51f3dae09b9e6500bdae4633914e8a5cc25944834f3ae5c978ce6838075289a3bdba2e0f97fb5eb64ff
6
+ metadata.gz: 96aa3f173d2dc07252bee8f7344440492b7cc12083d2d34191d23dd648daeaa98cfdd36661551f96bc9cf60b68e5eddb5b4e149231ea885d11e744c5060ee4aa
7
+ data.tar.gz: fdc6c7e502e2df46a7d8ae38061c030f24d354b45d6a27173f0e839f429c0fdcf0e5990a268dac2168cf528038f94da829256edb71ddc1df50977733e24d82c8
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1
4
+
5
+ * Fixing the README to document `Process#perform` instead of `Process#call`
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- business_pipeline (0.1.0)
4
+ business_pipeline (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -128,7 +128,7 @@ In our `SortUsers` and `PaginateUsers` Steps we used values from our _context_ t
128
128
  When calling a Process, you can provide an initial _context_ by passing a Hash as argument:
129
129
 
130
130
  ```ruby
131
- UsersIndex.new.call(page: 1, sort: { created_at: :desc })
131
+ UsersIndex.new.perform(page: 1, sort: { created_at: :desc })
132
132
  ```
133
133
 
134
134
  You can then use this initial _context_ in all your Steps.
@@ -136,7 +136,7 @@ You can then use this initial _context_ in all your Steps.
136
136
  A Process returns the modified _context_ at the end of its execution. You can interrogate this _context_ to know if everything went according to plan:
137
137
 
138
138
  ```ruby
139
- result = UsersIndex.new.call(page: 1, sort: { created_at: :desc })
139
+ result = UsersIndex.new.perform(page: 1, sort: { created_at: :desc })
140
140
 
141
141
  result.success? # => true
142
142
  result.failure? # => false
@@ -153,7 +153,7 @@ Before we get started we need to first take a look at a Process' initialization.
153
153
 
154
154
  ```ruby
155
155
  process = IndexProcess.new(collection_name: 'users', model_class: User)
156
- process.call(page: 1, sort: { created_at: :desc })
156
+ process.perform(page: 1, sort: { created_at: :desc })
157
157
  ```
158
158
 
159
159
  ### Generic Steps
@@ -225,7 +225,7 @@ class IndexProcess
225
225
 
226
226
  puts "Context before call is: #{context.inspect}"
227
227
 
228
- process.call
228
+ process.perform
229
229
 
230
230
  puts "Context after call is: #{context.inspect}"
231
231
  end
@@ -250,7 +250,7 @@ class IndexProcess
250
250
 
251
251
  around do |process|
252
252
  puts 'AROUND 1 START'
253
- process.call
253
+ process.perform
254
254
  puts 'AROUND 1 END'
255
255
  end
256
256
 
@@ -259,7 +259,7 @@ class IndexProcess
259
259
 
260
260
  around do |process|
261
261
  puts 'AROUND 2 START'
262
- process.call
262
+ process.perform
263
263
  puts 'AROUND 2 END'
264
264
  end
265
265
 
@@ -290,7 +290,7 @@ If for instance you wanted to wrap every Process in a transaction (which would b
290
290
  ```ruby
291
291
  class TransactionWrapping
292
292
  def call(process, context, config)
293
- ActiveRecord::Base.transaction { process.call }
293
+ ActiveRecord::Base.transaction { process.perform }
294
294
  end
295
295
  end
296
296
 
@@ -394,7 +394,7 @@ end
394
394
  Calling `context.fail!` will stop the execution and merge the information you give it to the _context_.
395
395
 
396
396
  ```ruby
397
- result = CheckingProcess.new.call(continue: 'no')
397
+ result = CheckingProcess.new.perform(continue: 'no')
398
398
 
399
399
  result.success? # => false
400
400
  result.failure? # => true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BusinessPipeline
4
- VERSION = -'0.1.0'
4
+ VERSION = -'0.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: business_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Courtois
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-27 00:00:00.000000000 Z
11
+ date: 2019-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,6 +104,7 @@ files:
104
104
  - ".gitignore"
105
105
  - ".rspec"
106
106
  - ".rubocop.yml"
107
+ - CHANGELOG.md
107
108
  - CODE_OF_CONDUCT.md
108
109
  - Gemfile
109
110
  - Gemfile.lock