Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #28 from pmatsinopoulos/patch-1
Browse files Browse the repository at this point in the history
Fix the example that deals with item wrapping
  • Loading branch information
Lewis Jones committed Apr 5, 2017
2 parents bca2357 + d5b4b6d commit f9a2473
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/STRATEGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ You can see that it does that, but building an Enumerator collection on top of t

``` ruby
class MigrationStrategy
PolicyItemWrapper = Struct.new(:policy)

class PolicyItemWrapper < Struct.new(:policy)
class PolicyItemWrapper
def to_log
policy["_id"]
end
Expand All @@ -142,7 +143,8 @@ class MigrationStrategy
end
end

def process(policy)
def process(policy_item_wrapper)
policy = policy_item_wrapper.policy
sleep 1
true
end
Expand Down
2 changes: 1 addition & 1 deletion lib/kitcat/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Kitcat
VERSION = '1.1.0'.freeze
VERSION = '1.2.0'.freeze
end
2 changes: 1 addition & 1 deletion spec/kitcat/framework_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def count
end

context 'when process is interrupted with SIGINT or SIGTERM' do
%w(INT TERM).each do |signal|
%w[INT TERM].each do |signal|
before do
allow(strategy).to receive(:process) do
Process.kill(signal, Process.pid)
Expand Down

0 comments on commit f9a2473

Please sign in to comment.