cony 2.2.2 → 2.2.3

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: e0689ecf4281f1be8148e55cfcd4dd538972d2e2
4
- data.tar.gz: 34f6caa4cb81263ef2fbaa8eb73f16b8a184898f
3
+ metadata.gz: aff69eb110fb36a9da6b2aa0167e4de8518b150d
4
+ data.tar.gz: 2773936eeb01b87e7e6022f16896e074c18ad43c
5
5
  SHA512:
6
- metadata.gz: 72dbe92b519aae17ae6f1ccc15cb78b98200a9b0a334db9fbf115f68cdb9f5c31df98fd64cf09a455cd3be232b82e046497152679e1ccb8fdb1c1b24831d9727
7
- data.tar.gz: d310c158668336cf28c555af649f46d77eaac83b2a6f5281954da7a786bd3a60ecfab19b38b8dd01cce5ec08af3dbc915a28fd0362bd5cbe28d086e4b18e1ae9
6
+ metadata.gz: cf5593107053e35a49e8ce965392ba8e9f0171d902f6c669adcc6e92851c5a3769f648d5bdca95f3a3e446840c3584829b7d3ef62bb9cb50e396f5b03f00f4c0
7
+ data.tar.gz: f6d5e740560db5ad88e46f0b8742bda305a903a673ff91ba6ab00bed5d08820bea843d7da15774d6c781be0f7a3c112cf538b8ab942e739ebdf77d6a8e3d76ab
@@ -1,14 +1,17 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1.1
5
- - 2.3.1
6
-
3
+ - 2.0.0
4
+ - 2.1.1
5
+ - 2.3.1
7
6
  gemfile:
8
- - gemfiles/activesupport-3.2.gemfile
9
- - gemfiles/activesupport-4.0.gemfile
10
- - gemfiles/activesupport-4.1.gemfile
11
- - gemfiles/activesupport-4.2.gemfile
12
-
7
+ - gemfiles/activesupport-3.2.gemfile
8
+ - gemfiles/activesupport-4.0.gemfile
9
+ - gemfiles/activesupport-4.1.gemfile
10
+ - gemfiles/activesupport-4.2.gemfile
13
11
  before_install:
14
- - gem install bundler
12
+ - gem install bundler
13
+ notifications:
14
+ email:
15
+ on_success: never
16
+ slack:
17
+ secure: albCNzaNaP6ixh4Wcb+m5JTxVaROyO89AK7iN4EU11nbV1k33dbr4e6Csd16AI+PBqEm5wKVaU58DjYTtDR30led2WhZFJXda6Y1fzxLM/QdNUmtcSzgEh0vjmj83GN6LXSMcY5vR572LwLH8Zf/nT3rJ36K3nt6oQNnEAoXfJM=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cony (2.2.1)
4
+ cony (2.2.2)
5
5
  activesupport (>= 3)
6
6
  bunny (~> 2.6)
7
7
 
@@ -14,12 +14,12 @@ GEM
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
16
  amq-protocol (2.0.1)
17
- bunny (2.6.0)
17
+ bunny (2.6.1)
18
18
  amq-protocol (>= 2.0.1)
19
19
  concurrent-ruby (1.0.2)
20
20
  diff-lcs (1.2.5)
21
21
  i18n (0.7.0)
22
- minitest (5.9.1)
22
+ minitest (5.10.1)
23
23
  rake (11.3.0)
24
24
  rspec (3.5.0)
25
25
  rspec-core (~> 3.5.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.2.3
@@ -38,6 +38,7 @@ module Cony
38
38
 
39
39
  def cony_publish
40
40
  return if Cony.config.test_mode
41
+ return if @cony_notify.nil?
41
42
  cony_amqp_connection.publish(cony_notify_hash, cony_notify_routing_key)
42
43
  end
43
44
 
@@ -68,7 +69,7 @@ module Cony
68
69
  end
69
70
 
70
71
  def cony_notify_hash
71
- { id: self.id, changes: @cony_notify[:changes], model: self.class.name, event: @cony_notify[:event] }
72
+ { id: id, changes: @cony_notify[:changes], model: self.class.name, event: @cony_notify[:event] }
72
73
  end
73
74
 
74
75
  def cony_notify_routing_key
@@ -68,6 +68,14 @@ describe Cony::ActiveRecord do
68
68
  end
69
69
  end
70
70
 
71
+ describe '#cony_publish' do
72
+ let(:event) { :updated }
73
+ it 'calls cony_publish without @cony_notify' do
74
+ expect(amqp_connection).not_to receive(:publish).with(expected_payload, 'anonymaus/klass.mutation.updated')
75
+ subject.cony_publish
76
+ end
77
+ end
78
+
71
79
  context 'test mode enabled' do
72
80
  before do
73
81
  allow(Cony.config).to receive(:test_mode).and_return(true)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nine.ch Development-Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-21 00:00:00.000000000 Z
11
+ date: 2016-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.5.1
120
+ rubygems_version: 2.5.2
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Automatically sends notifications via AMQP when a model has been changed.