active_publisher 1.3.1-java → 1.4.1.pre-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
2
  SHA256:
3
- metadata.gz: cced47ad4316952a89dd9f5a4c62a899de6f4b470dc63ac47c4066f2345747b3
4
- data.tar.gz: 6e549c23815bc4c825fb102d637d8bd12d05624ed12cba567515b752e2698f4f
3
+ metadata.gz: 2c69306151dcfdd24e4cb0281329df7f1ed7dba6ebe8e6da6de1a2d20754fed4
4
+ data.tar.gz: 5e7dca629b90ded137e335bf4a8eb306e39a2511a1899c33f7ca1960281b0ea7
5
5
  SHA512:
6
- metadata.gz: 61a92219a8cdf29c33fa8ec0bc7453903858cc566858cd8cfb32b0e67c54f0e825f8e7bd25a6b0d5daf00a56bace80b3837ab5be60920ed4802eadbe4a68608d
7
- data.tar.gz: 20f1cd2a23581682bf3a466405f246b465486ce4f9fc63a9bb1eed6bd1b66e1e5c70922712d481ddc7ac69ab4081f87a37305719f9e026c437b152e1e548743d
6
+ metadata.gz: 7cdc8bb2a34d0d420623017b51253c2660ed63d145dbdbd63772b85f77345b42dd8bc159f9c48328ea5be2f0f69e659c5a1a8e28fcc4ec47e30d9d88a627ee33
7
+ data.tar.gz: ad0dadc1aa2bfbcbb415fe335d9db053340c94ae528b725c39c9cc4f66b84395d9a766466541862c1498d80849344f6a1694c83749c3a9d2ad229f631e2993ea
data/.circleci/config.yml CHANGED
@@ -49,8 +49,9 @@ workflows:
49
49
  matrix:
50
50
  parameters:
51
51
  ruby-image:
52
- - circleci/ruby:2.5
53
52
  - circleci/ruby:2.6
54
53
  - circleci/ruby:2.7
55
- - circleci/jruby:9.1
54
+ - cimg/ruby:3.0
55
+ - cimg/ruby:3.1
56
56
  - circleci/jruby:9.2
57
+ - circleci/jruby:9.3
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  if ENV['PLATFORM'] == "java" || ::RUBY_PLATFORM == 'java'
23
23
  spec.platform = "java"
24
- spec.add_dependency 'march_hare', '~> 2.7'
24
+ spec.add_dependency 'march_hare', '~> 4.4'
25
25
  else
26
26
  spec.add_dependency 'bunny', '~> 2.1'
27
27
  end
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'activesupport', '>= 3.2'
30
30
  spec.add_dependency 'concurrent-ruby'
31
31
  spec.add_dependency 'multi_op_queue', '>= 0.2.0'
32
+ spec.add_dependency 'psych', '>= 3.3.2'
32
33
 
33
34
  spec.add_development_dependency "benchmark-ips"
34
35
  spec.add_development_dependency "bundler"
@@ -77,9 +77,9 @@ module ActivePublisher
77
77
  messages = []
78
78
  multi_response = []
79
79
  redis_pool.with do |redis|
80
- multi_response = redis.multi do
81
- redis.lrange(list_key, 0, number - 1)
82
- redis.ltrim(list_key, number, -1)
80
+ multi_response = redis.multi do |pipeline|
81
+ pipeline.lrange(list_key, 0, number - 1)
82
+ pipeline.ltrim(list_key, number, -1)
83
83
  end
84
84
  end
85
85
 
@@ -83,11 +83,13 @@ module ActivePublisher
83
83
  yaml_config = {}
84
84
  absolute_config_path = ::File.expand_path(::File.join("config", "active_publisher.yml"))
85
85
  action_subscriber_config_file = ::File.expand_path(::File.join("config", "action_subscriber.yml"))
86
+
86
87
  if ::File.exists?(absolute_config_path)
87
- yaml_config = ::YAML.load(::ERB.new(::File.read(absolute_config_path)).result)[env]
88
+ yaml_config = load_yaml_config_from_file(absolute_config_path)[env]
88
89
  elsif ::File.exists?(action_subscriber_config_file)
89
- yaml_config = ::YAML.load(::ERB.new(::File.read(action_subscriber_config_file)).result)[env]
90
+ yaml_config = load_yaml_config_from_file(action_subscriber_config_file)[env]
90
91
  end
92
+
91
93
  yaml_config
92
94
  end
93
95
  private_class_method :attempt_to_load_yaml_file
@@ -101,6 +103,14 @@ module ActivePublisher
101
103
  end
102
104
  private_class_method :fetch_config_value
103
105
 
106
+ def self.load_yaml_config_from_file(file_path)
107
+ erb_yaml = ::ERB.new(::File.read(file_path)).result
108
+ # Defined in Psych 3.2+ and the new canonical way to load trusted documents:
109
+ # https://github.com/ruby/psych/issues/533#issuecomment-1019363688
110
+ ::YAML.unsafe_load(erb_yaml)
111
+ end
112
+ private_class_method :load_yaml_config_from_file
113
+
104
114
  ##
105
115
  # Instance Methods
106
116
  #
@@ -1,3 +1,3 @@
1
1
  module ActivePublisher
2
- VERSION = "1.3.1"
2
+ VERSION = "1.4.1.pre"
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.3.1
4
+ version: 1.4.1.pre
5
5
  platform: java
6
6
  authors:
7
7
  - Brian Stien
@@ -12,14 +12,14 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2021-12-02 00:00:00.000000000 Z
15
+ date: 2022-04-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: '2.7'
22
+ version: '4.4'
23
23
  name: march_hare
24
24
  prerelease: false
25
25
  type: :runtime
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - "~>"
29
29
  - !ruby/object:Gem::Version
30
- version: '2.7'
30
+ version: '4.4'
31
31
  - !ruby/object:Gem::Dependency
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
@@ -70,6 +70,20 @@ dependencies:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: 0.2.0
73
+ - !ruby/object:Gem::Dependency
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 3.3.2
79
+ name: psych
80
+ prerelease: false
81
+ type: :runtime
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 3.3.2
73
87
  - !ruby/object:Gem::Dependency
74
88
  requirement: !ruby/object:Gem::Requirement
75
89
  requirements:
@@ -219,11 +233,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
233
  version: '0'
220
234
  required_rubygems_version: !ruby/object:Gem::Requirement
221
235
  requirements:
222
- - - ">="
236
+ - - ">"
223
237
  - !ruby/object:Gem::Version
224
- version: '0'
238
+ version: 1.3.1
225
239
  requirements: []
226
- rubygems_version: 3.2.15
240
+ rubygems_version: 3.3.11
227
241
  signing_key:
228
242
  specification_version: 4
229
243
  summary: Aims to make publishing work across MRI and jRuby painless and add some nice