reactor 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e8f19c123e774ea333ae286291f488e39aba8d0
4
- data.tar.gz: d4d2f9c5bebefb6437d2e8d5f7ad4ee5e328a8d2
3
+ metadata.gz: 2b965439701c41ed1d1ba367bc4c1a0f18f9d4d9
4
+ data.tar.gz: d1654ef710639d414076627bbff33a208588d2d0
5
5
  SHA512:
6
- metadata.gz: 56f87abf1b60898fe5f7145758cf8545ba1d81aa61456986ab526ebcfa390e44bc2f7f0d4253440b813c074df273c48e505d21c3b160ba6240530d4c415e88e7
7
- data.tar.gz: e3841ee4fd129af86a4c35652724c5cca93272ca1c4a6dca461db98ec5a2e1818282c50a77bc103188ef1f7afe765ff7a3a3e035851c6f46409a129a249d0dae
6
+ metadata.gz: e349860c325be148172e68000d86a52bceb348d1d9b2a33a7edd16b81e27fc8a0099fc947297e389ffb1eae84d0cd9e4ccfcd4b8e689a5347991a7c8eed3d0ac
7
+ data.tar.gz: 79cf05ba098a81706ec143970f44b9f2887a51512a1eb387f1236d4c59f81fbc75231ab18bade5ef6b795774f5d00f94d8ea52999fed5ba33129a17350327f82
@@ -28,7 +28,9 @@ module Reactor::Subscribable
28
28
  return :__perform_aborted__ if dont_perform && !Reactor::TEST_MODE_SUBSCRIBERS.include?(source)
29
29
  event = Reactor::Event.new(data)
30
30
  if method.is_a?(Symbol)
31
- source.delay_for(delay).send(method, event)
31
+ ActiveSupport::Deprecation.silence do
32
+ source.delay_for(delay).send(method, event)
33
+ end
32
34
  else
33
35
  method.call(event)
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module Reactor
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
data/lib/reactor.rb CHANGED
@@ -46,5 +46,10 @@ module Reactor
46
46
  end
47
47
  end
48
48
 
49
+ # Temporarily avoid Rails 4.2.0 deprecation warning
50
+ if ActiveRecord::VERSION::STRING > '4.2'
51
+ ActiveRecord::Base.raise_in_transactional_callbacks = true
52
+ end
53
+
49
54
  ActiveRecord::Base.send(:include, Reactor::Publishable)
50
55
  ActiveRecord::Base.send(:include, Reactor::Subscribable)
data/reactor.gemspec CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "sidekiq", "< 4.0"
22
- spec.add_dependency 'activerecord', '< 4.2'
21
+ spec.add_dependency "sidekiq", '< 4.0'
22
+ spec.add_dependency 'activerecord', '< 5.0'
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "bundler"
25
25
  spec.add_development_dependency "rake"
26
26
  spec.add_development_dependency "rspec", "~> 3.0.0"
27
27
  spec.add_development_dependency "rspec-its"
@@ -35,7 +35,7 @@ describe Reactor::Subscribable do
35
35
  describe 'on_event' do
36
36
  it 'binds block of code statically to event being fired' do
37
37
  expect_any_instance_of(Auction).to receive(:update_column).with(:status, 'first_bid_made')
38
- Reactor::Event.publish(:bid_made, target: Auction.create)
38
+ Reactor::Event.publish(:bid_made, target: Auction.create!(start_at: 10.minutes.from_now))
39
39
  end
40
40
 
41
41
  describe 'building uniquely named subscriber handler classes' do
@@ -65,7 +65,7 @@ describe Reactor::Subscribable do
65
65
 
66
66
  it 'accepts wildcard event name' do
67
67
  expect_any_instance_of(Auction).to receive(:more_puppies!)
68
- Reactor::Event.publish(:another_event, actor: Auction.create)
68
+ Reactor::Event.publish(:another_event, actor: Auction.create!(start_at: 5.minutes.from_now))
69
69
  end
70
70
 
71
71
  describe 'in_memory flag' do
@@ -11,14 +11,14 @@ ActiveRecord::Migration.create_table :auctions do |t|
11
11
  t.boolean :we_want_it
12
12
  t.integer :pet_id
13
13
 
14
- t.timestamps
14
+ t.timestamps null: false
15
15
  end
16
16
 
17
17
  ActiveRecord::Migration.create_table :subscribers do |t|
18
18
  t.string :event_name
19
19
  t.string :type
20
20
 
21
- t.timestamps
21
+ t.timestamps null: false
22
22
  end
23
23
 
24
24
  ActiveRecord::Migration.create_table :pets do |t|
@@ -26,13 +26,13 @@ ActiveRecord::Migration.create_table :pets do |t|
26
26
  t.string :type
27
27
 
28
28
 
29
- t.timestamps
29
+ t.timestamps null: false
30
30
  end
31
31
 
32
32
  ActiveRecord::Migration.create_table :arbitrary_models do |t|
33
33
  t.integer :awesomeness
34
34
 
35
- t.timestamps
35
+ t.timestamps null: false
36
36
  end
37
37
 
38
38
  class Pet < ActiveRecord::Base
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - winfred
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-01-10 00:00:00.000000000 Z
14
+ date: 2015-03-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sidekiq
@@ -33,28 +33,28 @@ dependencies:
33
33
  requirements:
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '4.2'
36
+ version: '5.0'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '4.2'
43
+ version: '5.0'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: bundler
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - "~>"
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: '1.3'
50
+ version: '0'
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - "~>"
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: '1.3'
57
+ version: '0'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
- rubygems_version: 2.2.2
219
+ rubygems_version: 2.4.6
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: Sidekiq/ActiveRecord pubsub lib