active_publisher 1.2.1-java → 1.2.2-java

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
- SHA1:
3
- metadata.gz: c19b632c04f16f568be2eeeeaf800ee8e1f721a7
4
- data.tar.gz: b3b5d8d76bb8ef95ba311a7ef6e425dbbf0ba94c
2
+ SHA256:
3
+ metadata.gz: 8b9c83ffe7b068d340c60ce3487b409eff93776ef7e1a431f7493aede45c7098
4
+ data.tar.gz: 9a5019a2d7be9a60ca2afa5e1b60b2dd122c599da029f5908c0933116801dd0f
5
5
  SHA512:
6
- metadata.gz: 6b5fdb514823e21dc486f7ad9d21a673b799fdceb8c5ec67decb6a875dae4bdd96da1121c7608e0927c440739440ac02eea750fb3db8c39047ef35bb621823bf
7
- data.tar.gz: 04d7c3b2fbd44f160512e9990c63b27a2724cd1dd429941475e7904475215473ae5983402ab0e02c5fb0c8394a1e9f852025394ce601e33768899dca3c919476
6
+ metadata.gz: 586bca9328785ab472ce142fa2224dd20c16a3d2ddc1105b5dc8a98f67ed5d6fe23751074991a16ec6162327512373220bf11a84577eed62bc0027e8aa62c460
7
+ data.tar.gz: 7d4bfc3de040b8d27232f01c89794976667f3e607a30f01f6c99a747de6f42477168d775fdd749d797b15af9ad6814a6338ed3f98a299ba0c6b8a137773a8490
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3
4
- - 2.4
3
+ - 2.3.8
4
+ - 2.5.7
5
5
  - jruby-9.1.12.0
6
+ - jruby-9.2.7.0
6
7
  addons:
7
8
  apt:
8
9
  packages:
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "connection_pool"
36
36
  spec.add_development_dependency "fakeredis"
37
37
  spec.add_development_dependency "pry"
38
- spec.add_development_dependency "rake", "~> 10.0"
38
+ spec.add_development_dependency "rake"
39
39
  spec.add_development_dependency "rspec", "~> 3.2"
40
40
  end
@@ -31,9 +31,22 @@ module ActivePublisher
31
31
  def self.create_connection
32
32
  if ::RUBY_PLATFORM == "java"
33
33
  connection = ::MarchHare.connect(connection_options)
34
+ connection.on_blocked do |reason|
35
+ on_blocked(reason)
36
+ end
37
+ connection.on_unblocked do
38
+ on_unblocked
39
+ end
40
+ connection
34
41
  else
35
42
  connection = ::Bunny.new(connection_options)
36
43
  connection.start
44
+ connection.on_blocked do |blocked_message|
45
+ on_blocked(blocked_message.reason)
46
+ end
47
+ connection.on_unblocked do
48
+ on_unblocked
49
+ end
37
50
  connection
38
51
  end
39
52
  end
@@ -58,5 +71,15 @@ module ActivePublisher
58
71
  }
59
72
  end
60
73
  private_class_method :connection_options
74
+
75
+ def self.on_blocked(reason)
76
+ ::ActiveSupport::Notifications.instrument("connection_blocked.active_publisher", :reason => reason)
77
+ end
78
+ private_class_method :on_blocked
79
+
80
+ def self.on_unblocked
81
+ ::ActiveSupport::Notifications.instrument("connection_unblocked.active_publisher")
82
+ end
83
+ private_class_method :on_unblocked
61
84
  end
62
85
  end
@@ -1,3 +1,3 @@
1
1
  module ActivePublisher
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: java
6
6
  authors:
7
7
  - Brian Stien
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2020-04-17 00:00:00.000000000 Z
15
+ date: 2020-05-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement
@@ -143,17 +143,17 @@ dependencies:
143
143
  - !ruby/object:Gem::Dependency
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
- - - "~>"
146
+ - - ">="
147
147
  - !ruby/object:Gem::Version
148
- version: '10.0'
148
+ version: '0'
149
149
  name: rake
150
150
  prerelease: false
151
151
  type: :development
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  requirements:
154
- - - "~>"
154
+ - - ">="
155
155
  - !ruby/object:Gem::Version
156
- version: '10.0'
156
+ version: '0'
157
157
  - !ruby/object:Gem::Dependency
158
158
  requirement: !ruby/object:Gem::Requirement
159
159
  requirements:
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  version: '0'
225
225
  requirements: []
226
226
  rubyforge_project:
227
- rubygems_version: 2.6.14.1
227
+ rubygems_version: 2.7.9
228
228
  signing_key:
229
229
  specification_version: 4
230
230
  summary: Aims to make publishing work across MRI and jRuby painless and add some nice