active_publisher 1.2.6-java → 1.3.0.pre0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +9 -0
- data/README.md +2 -0
- data/active_publisher.gemspec +1 -1
- data/lib/active_publisher/async/in_memory_adapter/async_queue.rb +29 -21
- data/lib/active_publisher/async/in_memory_adapter/consumer_thread.rb +54 -83
- data/lib/active_publisher/async/redis_adapter.rb +3 -5
- data/lib/active_publisher/configuration.rb +4 -13
- data/lib/active_publisher/connection.rb +0 -23
- data/lib/active_publisher/version.rb +1 -1
- data/lib/active_publisher.rb +3 -2
- metadata +22 -21
- data/.circleci/config.yml +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8ab5bdf4352d3913b934a0e54a0085effe6fcf69
|
4
|
+
data.tar.gz: 4baa705ae3174699cd4d55ecd51b907dd14ce621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c47d2ae4a05f959983fe022c6aa2face66684a86b8d9bc3e923f55dcdbdcb826b75c21d1c719ad4ace2e9c3cf2ea2b3aa7d4f43a5e9afd2216399fee7359e5b8
|
7
|
+
data.tar.gz: 7930ca08472a9370f6a39789a0d845b19553c0d4ebc98d31f28202182e34a5333a0fe2d5c62678e7972d25a5fc06e60ffffa64d4c2fb939362dba72ba430e89c
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -55,7 +55,9 @@ Defaults for the configuration are:
|
|
55
55
|
:network_recovery_interval => 1,
|
56
56
|
:password => "guest",
|
57
57
|
:port => 5672,
|
58
|
+
:publisher_threads => 1,
|
58
59
|
:publisher_confirms => false,
|
60
|
+
:publisher_confirms_timeout => 5_000,
|
59
61
|
:seconds_to_wait_for_graceful_shutdown => 30,
|
60
62
|
:timeout => 1,
|
61
63
|
:tls => false,
|
data/active_publisher.gemspec
CHANGED
@@ -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"
|
38
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
39
39
|
spec.add_development_dependency "rspec", "~> 3.2"
|
40
40
|
end
|
@@ -14,14 +14,15 @@ module ActivePublisher
|
|
14
14
|
:max_queue_size,
|
15
15
|
:supervisor_interval
|
16
16
|
|
17
|
-
attr_reader :
|
17
|
+
attr_reader :consumers, :queue, :supervisor
|
18
18
|
|
19
19
|
def initialize(back_pressure_strategy, max_queue_size, supervisor_interval)
|
20
20
|
self.back_pressure_strategy = back_pressure_strategy
|
21
21
|
@max_queue_size = max_queue_size
|
22
22
|
@supervisor_interval = supervisor_interval
|
23
23
|
@queue = ::MultiOpQueue::Queue.new
|
24
|
-
|
24
|
+
@consumers = {}
|
25
|
+
create_and_supervise_consumers!
|
25
26
|
end
|
26
27
|
|
27
28
|
def back_pressure_strategy=(strategy)
|
@@ -52,36 +53,43 @@ module ActivePublisher
|
|
52
53
|
def size
|
53
54
|
# Requests might be in flight (out of the queue, but not yet published), so taking the max should be
|
54
55
|
# good enough to make sure we're honest about the actual queue size.
|
55
|
-
return queue.size if
|
56
|
-
[queue.size,
|
56
|
+
return queue.size if consumers.empty?
|
57
|
+
[queue.size, consumer_sampled_queue_size].max
|
57
58
|
end
|
58
59
|
|
59
60
|
private
|
60
61
|
|
61
|
-
def
|
62
|
-
|
62
|
+
def create_and_supervise_consumers!
|
63
|
+
::ActivePublisher.configuration.publisher_threads.times do
|
64
|
+
consumer_id = ::SecureRandom.uuid
|
65
|
+
consumers[consumer_id] = ::ActivePublisher::Async::InMemoryAdapter::ConsumerThread.new(queue)
|
66
|
+
supervisor_task = ::Concurrent::TimerTask.new(:execution_interval => supervisor_interval) do
|
67
|
+
current_time = ::Time.now
|
68
|
+
consumer = consumers[consumer_id]
|
63
69
|
|
64
|
-
|
65
|
-
|
70
|
+
# Consumer is lagging if it does not "tick" at least once every 10 seconds.
|
71
|
+
seconds_since_last_tick = current_time - consumer.last_tick_at
|
72
|
+
consumer_is_lagging = seconds_since_last_tick > ::ActivePublisher.configuration.max_async_publisher_lag_time
|
73
|
+
logger.error "ActivePublisher consumer is lagging. Last consumer tick was #{seconds_since_last_tick} seconds ago." if consumer_is_lagging
|
66
74
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
75
|
+
# Check to see if we should restart the consumer.
|
76
|
+
if !consumer.alive? || consumer_is_lagging
|
77
|
+
consumer.kill rescue nil
|
78
|
+
consumers[consumer_id] = ::ActivePublisher::Async::InMemoryAdapter::ConsumerThread.new(queue)
|
79
|
+
end
|
71
80
|
|
72
|
-
|
73
|
-
|
74
|
-
consumer.kill rescue nil
|
75
|
-
@consumer = ::ActivePublisher::Async::InMemoryAdapter::ConsumerThread.new(queue)
|
81
|
+
# Notify the current queue size.
|
82
|
+
::ActiveSupport::Notifications.instrument "async_queue_size.active_publisher", queue.size
|
76
83
|
end
|
77
|
-
|
78
|
-
# Notify the current queue size.
|
79
|
-
::ActiveSupport::Notifications.instrument "async_queue_size.active_publisher", queue.size
|
84
|
+
supervisor_task.execute
|
80
85
|
end
|
81
|
-
supervisor_task.execute
|
82
86
|
end
|
83
|
-
end
|
84
87
|
|
88
|
+
def consumer_sampled_queue_size
|
89
|
+
consumers.values.map(&:sampled_queue_size).max
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
85
93
|
end
|
86
94
|
end
|
87
95
|
end
|
@@ -2,13 +2,7 @@ module ActivePublisher
|
|
2
2
|
module Async
|
3
3
|
module InMemoryAdapter
|
4
4
|
class ConsumerThread
|
5
|
-
attr_reader :
|
6
|
-
|
7
|
-
if ::RUBY_PLATFORM == "java"
|
8
|
-
CHANNEL_CLOSED_ERRORS = [::MarchHare::ChannelAlreadyClosed]
|
9
|
-
else
|
10
|
-
CHANNEL_CLOSED_ERRORS = [::Bunny::ChannelAlreadyClosed]
|
11
|
-
end
|
5
|
+
attr_reader :thread, :queue, :sampled_queue_size, :last_tick_at
|
12
6
|
|
13
7
|
if ::RUBY_PLATFORM == "java"
|
14
8
|
NETWORK_ERRORS = [::MarchHare::NetworkException, ::MarchHare::ConnectionRefused,
|
@@ -27,7 +21,6 @@ module ActivePublisher
|
|
27
21
|
def initialize(listen_queue)
|
28
22
|
@queue = listen_queue
|
29
23
|
@sampled_queue_size = queue.size
|
30
|
-
@flush_max = ::ActivePublisher.configuration.messages_per_batch
|
31
24
|
|
32
25
|
update_last_tick_at
|
33
26
|
start_thread
|
@@ -52,32 +45,6 @@ module ActivePublisher
|
|
52
45
|
end
|
53
46
|
end
|
54
47
|
|
55
|
-
def cleanup_up_channel
|
56
|
-
return if channel.nil?
|
57
|
-
channel.close
|
58
|
-
rescue => error
|
59
|
-
::ActivePublisher.configuration.error_handler.call(error, {:status => "Cleaning up the channel"})
|
60
|
-
end
|
61
|
-
|
62
|
-
def handle_current_messages_on_unknown_error(current_messages)
|
63
|
-
current_messages.each do |message|
|
64
|
-
# Degrade to single message publish ... or at least attempt to
|
65
|
-
begin
|
66
|
-
::ActivePublisher.publish(message.route, message.payload, message.exchange_name, message.options)
|
67
|
-
current_messages.delete(message)
|
68
|
-
rescue *CHANNEL_CLOSED_ERRORS
|
69
|
-
# If the channel is bad, raise!
|
70
|
-
raise
|
71
|
-
rescue *PRECONDITION_ERRORS => error
|
72
|
-
# Delete messages if rabbitmq cannot declare the exchange (or somet other precondition failed).
|
73
|
-
::ActivePublisher.configuration.error_handler.call(error, {:reason => "precondition failed", :message => message})
|
74
|
-
current_messages.delete(message)
|
75
|
-
rescue => other_error
|
76
|
-
::ActivePublisher.configuration.error_handler.call(other_error, {:route => message.route, :payload => message.payload, :exchange_name => message.exchange_name, :options => message.options})
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
48
|
def make_channel
|
82
49
|
channel = ::ActivePublisher::Async::InMemoryAdapter::Channel.new
|
83
50
|
channel.confirm_select if ::ActivePublisher.configuration.publisher_confirms
|
@@ -90,66 +57,70 @@ module ActivePublisher
|
|
90
57
|
|
91
58
|
def start_thread
|
92
59
|
return if alive?
|
93
|
-
@thread = ::Thread.new
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
60
|
+
@thread = ::Thread.new do
|
61
|
+
loop do
|
62
|
+
# Sample the queue size so we don't shutdown when messages are in flight.
|
63
|
+
@sampled_queue_size = queue.size
|
64
|
+
current_messages = queue.pop_up_to(50, :timeout => 0.1)
|
65
|
+
update_last_tick_at
|
66
|
+
# If the queue is empty, we should continue to update to "last_tick_at" time.
|
67
|
+
next if current_messages.nil?
|
68
|
+
|
69
|
+
# We only look at active publisher messages. Everything else is dropped.
|
70
|
+
current_messages.select! { |message| message.is_a?(::ActivePublisher::Message) }
|
71
|
+
|
72
|
+
begin
|
73
|
+
@channel ||= make_channel
|
74
|
+
|
75
|
+
# Only open a single connection for each group of messages to an exchange
|
76
|
+
current_messages.group_by(&:exchange_name).each do |exchange_name, messages|
|
77
|
+
publish_all(@channel, exchange_name, messages)
|
78
|
+
current_messages -= messages
|
79
|
+
end
|
80
|
+
rescue *NETWORK_ERRORS
|
81
|
+
# Sleep because connection is down
|
82
|
+
await_network_reconnect
|
83
|
+
rescue => unknown_error
|
84
|
+
::ActivePublisher.configuration.error_handler.call(unknown_error, {:number_of_messages => current_messages.size})
|
85
|
+
current_messages.each do |message|
|
86
|
+
# Degrade to single message publish ... or at least attempt to
|
87
|
+
begin
|
88
|
+
::ActivePublisher.publish(message.route, message.payload, message.exchange_name, message.options)
|
89
|
+
current_messages.delete(message)
|
90
|
+
rescue *PRECONDITION_ERRORS => error
|
91
|
+
# Delete messages if rabbitmq cannot declare the exchange (or somet other precondition failed).
|
92
|
+
::ActivePublisher.configuration.error_handler.call(error, {:reason => "precondition failed", :message => message})
|
93
|
+
current_messages.delete(message)
|
94
|
+
rescue => individual_error
|
95
|
+
::ActivePublisher.configuration.error_handler.call(individual_error, {:route => message.route, :payload => message.payload, :exchange_name => message.exchange_name, :options => message.options})
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# TODO: Find a way to bubble this out of the thread for logging purposes.
|
100
|
+
# Reraise the error out of the publisher loop. The Supervisor will restart the consumer.
|
101
|
+
raise unknown_error
|
102
|
+
ensure
|
103
|
+
# Always requeue anything that gets stuck.
|
104
|
+
queue.concat(current_messages) if current_messages && !current_messages.empty?
|
115
105
|
end
|
116
|
-
rescue *CHANNEL_CLOSED_ERRORS
|
117
|
-
# If the channel is bad, raise without sending one-by-one!
|
118
|
-
raise
|
119
|
-
rescue *NETWORK_ERRORS
|
120
|
-
# Sleep because connection is down
|
121
|
-
await_network_reconnect
|
122
|
-
rescue => unknown_error
|
123
|
-
::ActivePublisher.configuration.error_handler.call(unknown_error, {:number_of_messages => current_messages.size})
|
124
|
-
|
125
|
-
# Attempt to deliver a message one-by-one. Raise if a closed channel error appears.
|
126
|
-
handle_current_messages_on_unknown_error(current_messages)
|
127
|
-
|
128
|
-
# TODO: Find a way to bubble this out of the thread for logging purposes.
|
129
|
-
# Reraise the error out of the publisher loop. The Supervisor will restart the consumer.
|
130
|
-
raise unknown_error
|
131
|
-
ensure
|
132
|
-
# Always requeue anything that gets stuck.
|
133
|
-
queue.concat(current_messages) if current_messages && !current_messages.empty?
|
134
106
|
end
|
135
107
|
end
|
136
|
-
ensure
|
137
|
-
cleanup_up_channel
|
138
108
|
end
|
139
109
|
|
140
|
-
def publish_all(exchange_name, messages)
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
110
|
+
def publish_all(channel, exchange_name, messages)
|
111
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :message_count => messages.size do
|
112
|
+
exchange = channel.topic(exchange_name)
|
113
|
+
messages.each do |message|
|
114
|
+
fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
|
115
|
+
|
145
116
|
options = ::ActivePublisher.publishing_options(message.route, message.options || {})
|
146
117
|
exchange.publish(message.payload, options)
|
147
118
|
end
|
119
|
+
wait_for_confirms(channel)
|
148
120
|
end
|
149
|
-
wait_for_confirms
|
150
121
|
end
|
151
122
|
|
152
|
-
def wait_for_confirms
|
123
|
+
def wait_for_confirms(channel)
|
153
124
|
return true unless channel.using_publisher_confirms?
|
154
125
|
channel.wait_for_confirms(::ActivePublisher.configuration.publisher_confirms_timeout)
|
155
126
|
end
|
@@ -19,7 +19,7 @@ module ActivePublisher
|
|
19
19
|
}
|
20
20
|
include ::ActivePublisher::Logging
|
21
21
|
|
22
|
-
attr_reader :async_queue, :
|
22
|
+
attr_reader :async_queue, :redis_pool, :queue
|
23
23
|
|
24
24
|
def initialize(new_redis_pool)
|
25
25
|
logger.info "Starting redis publisher adapter"
|
@@ -27,8 +27,6 @@ module ActivePublisher
|
|
27
27
|
@redis_pool = new_redis_pool
|
28
28
|
@async_queue = ::ActivePublisher::Async::RedisAdapter::Consumer.new(redis_pool)
|
29
29
|
@queue = ::MultiOpQueue::Queue.new
|
30
|
-
@flush_max = ::ActivePublisher.configuration.messages_per_batch
|
31
|
-
@flush_min = @flush_max / 2
|
32
30
|
|
33
31
|
supervisor_task = ::Concurrent::TimerTask.new(SUPERVISOR_INTERVAL) do
|
34
32
|
queue_size = queue.size
|
@@ -43,7 +41,7 @@ module ActivePublisher
|
|
43
41
|
def publish(route, payload, exchange_name, options = {})
|
44
42
|
message = ::ActivePublisher::Message.new(route, payload, exchange_name, options)
|
45
43
|
queue << ::Marshal.dump(message)
|
46
|
-
flush_queue! if queue.size >=
|
44
|
+
flush_queue! if queue.size >= 20 || options[:flush_queue]
|
47
45
|
|
48
46
|
nil
|
49
47
|
end
|
@@ -60,7 +58,7 @@ module ActivePublisher
|
|
60
58
|
|
61
59
|
def flush_queue!
|
62
60
|
return if queue.empty?
|
63
|
-
encoded_messages = queue.pop_up_to(
|
61
|
+
encoded_messages = queue.pop_up_to(25, :timeout => 0.001)
|
64
62
|
|
65
63
|
return if encoded_messages.nil?
|
66
64
|
return unless encoded_messages.respond_to?(:each)
|
@@ -8,10 +8,10 @@ module ActivePublisher
|
|
8
8
|
:host,
|
9
9
|
:hosts,
|
10
10
|
:max_async_publisher_lag_time,
|
11
|
-
:messages_per_batch,
|
12
11
|
:network_recovery_interval,
|
13
12
|
:password,
|
14
13
|
:port,
|
14
|
+
:publisher_threads,
|
15
15
|
:publisher_confirms,
|
16
16
|
:publisher_confirms_timeout,
|
17
17
|
:seconds_to_wait_for_graceful_shutdown,
|
@@ -37,10 +37,10 @@ module ActivePublisher
|
|
37
37
|
:host => "localhost",
|
38
38
|
:hosts => [],
|
39
39
|
:password => "guest",
|
40
|
-
:messages_per_batch => 25,
|
41
40
|
:max_async_publisher_lag_time => 10,
|
42
41
|
:network_recovery_interval => NETWORK_RECOVERY_INTERVAL,
|
43
42
|
:port => 5672,
|
43
|
+
:publisher_threads => 1,
|
44
44
|
:publisher_confirms => false,
|
45
45
|
:publisher_confirms_timeout => 5_000, #specified as a number of milliseconds
|
46
46
|
:seconds_to_wait_for_graceful_shutdown => 30,
|
@@ -65,8 +65,8 @@ module ActivePublisher
|
|
65
65
|
|
66
66
|
yaml_config = attempt_to_load_yaml_file(env)
|
67
67
|
DEFAULTS.each_pair do |key, value|
|
68
|
-
|
69
|
-
::ActivePublisher.configuration.public_send("#{key}=", setting) if
|
68
|
+
setting = cli_options[key] || cli_options[key.to_s] || yaml_config[key] || yaml_config[key.to_s]
|
69
|
+
::ActivePublisher.configuration.public_send("#{key}=", setting) if setting
|
70
70
|
end
|
71
71
|
|
72
72
|
true
|
@@ -90,15 +90,6 @@ module ActivePublisher
|
|
90
90
|
end
|
91
91
|
private_class_method :attempt_to_load_yaml_file
|
92
92
|
|
93
|
-
def self.fetch_config_value(key, cli_options, yaml_config)
|
94
|
-
return [true, cli_options[key]] if cli_options.key?(key)
|
95
|
-
return [true, cli_options[key.to_s]] if cli_options.key?(key.to_s)
|
96
|
-
return [true, yaml_config[key]] if yaml_config.key?(key)
|
97
|
-
return [true, yaml_config[key.to_s]] if yaml_config.key?(key.to_s)
|
98
|
-
[false, nil]
|
99
|
-
end
|
100
|
-
private_class_method :fetch_config_value
|
101
|
-
|
102
93
|
##
|
103
94
|
# Instance Methods
|
104
95
|
#
|
@@ -31,22 +31,9 @@ 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
|
41
34
|
else
|
42
35
|
connection = ::Bunny.new(connection_options)
|
43
36
|
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
|
50
37
|
connection
|
51
38
|
end
|
52
39
|
end
|
@@ -71,15 +58,5 @@ module ActivePublisher
|
|
71
58
|
}
|
72
59
|
end
|
73
60
|
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
|
84
61
|
end
|
85
62
|
end
|
data/lib/active_publisher.rb
CHANGED
@@ -4,6 +4,7 @@ else
|
|
4
4
|
require "bunny"
|
5
5
|
end
|
6
6
|
require "active_support"
|
7
|
+
require "securerandom"
|
7
8
|
require "thread"
|
8
9
|
|
9
10
|
require "active_publisher/logging"
|
@@ -35,7 +36,7 @@ module ActivePublisher
|
|
35
36
|
# @param [Hash] options hash to set message parameters (e.g. headers)
|
36
37
|
def self.publish(route, payload, exchange_name, options = {})
|
37
38
|
with_exchange(exchange_name) do |exchange|
|
38
|
-
::ActiveSupport::Notifications.instrument "message_published.active_publisher"
|
39
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher" do
|
39
40
|
exchange.publish(payload, publishing_options(route, options))
|
40
41
|
end
|
41
42
|
end
|
@@ -51,7 +52,7 @@ module ActivePublisher
|
|
51
52
|
fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
|
52
53
|
|
53
54
|
begin
|
54
|
-
::ActiveSupport::Notifications.instrument "message_published.active_publisher"
|
55
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher" do
|
55
56
|
exchange.publish(message.payload, publishing_options(message.route, message.options || {}))
|
56
57
|
end
|
57
58
|
rescue
|
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.
|
4
|
+
version: 1.3.0.pre0
|
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:
|
15
|
+
date: 2018-03-13 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -21,8 +21,8 @@ dependencies:
|
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2.7'
|
23
23
|
name: march_hare
|
24
|
-
type: :runtime
|
25
24
|
prerelease: false
|
25
|
+
type: :runtime
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
@@ -35,8 +35,8 @@ dependencies:
|
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '3.2'
|
37
37
|
name: activesupport
|
38
|
-
type: :runtime
|
39
38
|
prerelease: false
|
39
|
+
type: :runtime
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
@@ -49,8 +49,8 @@ dependencies:
|
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '0'
|
51
51
|
name: concurrent-ruby
|
52
|
-
type: :runtime
|
53
52
|
prerelease: false
|
53
|
+
type: :runtime
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
56
|
- - ">="
|
@@ -63,8 +63,8 @@ dependencies:
|
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: 0.2.0
|
65
65
|
name: multi_op_queue
|
66
|
-
type: :runtime
|
67
66
|
prerelease: false
|
67
|
+
type: :runtime
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
70
|
- - ">="
|
@@ -77,8 +77,8 @@ dependencies:
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
name: benchmark-ips
|
80
|
-
type: :development
|
81
80
|
prerelease: false
|
81
|
+
type: :development
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
84
|
- - ">="
|
@@ -91,8 +91,8 @@ dependencies:
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
name: bundler
|
94
|
-
type: :development
|
95
94
|
prerelease: false
|
95
|
+
type: :development
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - ">="
|
@@ -105,8 +105,8 @@ dependencies:
|
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
name: connection_pool
|
108
|
-
type: :development
|
109
108
|
prerelease: false
|
109
|
+
type: :development
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - ">="
|
@@ -119,8 +119,8 @@ dependencies:
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
name: fakeredis
|
122
|
-
type: :development
|
123
122
|
prerelease: false
|
123
|
+
type: :development
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
126
|
- - ">="
|
@@ -133,8 +133,8 @@ dependencies:
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
name: pry
|
136
|
-
type: :development
|
137
136
|
prerelease: false
|
137
|
+
type: :development
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
140
|
- - ">="
|
@@ -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: '0'
|
148
|
+
version: '10.0'
|
149
149
|
name: rake
|
150
|
-
type: :development
|
151
150
|
prerelease: false
|
151
|
+
type: :development
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- - "
|
154
|
+
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: '0'
|
156
|
+
version: '10.0'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
@@ -161,8 +161,8 @@ dependencies:
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '3.2'
|
163
163
|
name: rspec
|
164
|
-
type: :development
|
165
164
|
prerelease: false
|
165
|
+
type: :development
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - "~>"
|
@@ -179,9 +179,9 @@ executables: []
|
|
179
179
|
extensions: []
|
180
180
|
extra_rdoc_files: []
|
181
181
|
files:
|
182
|
-
- ".circleci/config.yml"
|
183
182
|
- ".gitignore"
|
184
183
|
- ".rspec"
|
184
|
+
- ".travis.yml"
|
185
185
|
- CODE_OF_CONDUCT.md
|
186
186
|
- Gemfile
|
187
187
|
- LICENSE.txt
|
@@ -219,11 +219,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
219
219
|
version: '0'
|
220
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
|
-
- - "
|
222
|
+
- - ">"
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
version:
|
224
|
+
version: 1.3.1
|
225
225
|
requirements: []
|
226
|
-
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 2.6.13
|
227
228
|
signing_key:
|
228
229
|
specification_version: 4
|
229
230
|
summary: Aims to make publishing work across MRI and jRuby painless and add some nice
|
data/.circleci/config.yml
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# Inspired by: http://mikebian.co/running-tests-against-multiple-ruby-versions-using-circleci/
|
2
|
-
|
3
|
-
version: 2.1
|
4
|
-
|
5
|
-
orbs:
|
6
|
-
ruby: circleci/ruby@1.1
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
test:
|
10
|
-
parallelism: 1
|
11
|
-
parameters:
|
12
|
-
ruby-image:
|
13
|
-
type: string
|
14
|
-
docker:
|
15
|
-
- image: << parameters.ruby-image >>
|
16
|
-
- image: rabbitmq
|
17
|
-
|
18
|
-
steps:
|
19
|
-
- checkout
|
20
|
-
- run:
|
21
|
-
name: install dockerize
|
22
|
-
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
|
23
|
-
environment:
|
24
|
-
DOCKERIZE_VERSION: v0.3.0
|
25
|
-
- run:
|
26
|
-
name: Wait for rabbitmq
|
27
|
-
command: dockerize -wait tcp://localhost:5672 -timeout 1m
|
28
|
-
- run:
|
29
|
-
name: Install bundler
|
30
|
-
command: gem install bundler
|
31
|
-
- run:
|
32
|
-
name: Which bundler?
|
33
|
-
command: bundle -v
|
34
|
-
- run:
|
35
|
-
name: bundle install
|
36
|
-
command: bundle install
|
37
|
-
- run:
|
38
|
-
name: rspec
|
39
|
-
command: bundle exec rspec
|
40
|
-
|
41
|
-
# strangely, there seems to be very little documentation about exactly how martix builds work.
|
42
|
-
# By defining a param inside your job definition, Circle CI will automatically spawn a job for
|
43
|
-
# unique param value passed via `matrix`. Neat!
|
44
|
-
# https://circleci.com/blog/circleci-matrix-jobs/
|
45
|
-
workflows:
|
46
|
-
build_and_test:
|
47
|
-
jobs:
|
48
|
-
- test:
|
49
|
-
matrix:
|
50
|
-
parameters:
|
51
|
-
ruby-image:
|
52
|
-
- circleci/ruby:2.5
|
53
|
-
- circleci/ruby:2.6
|
54
|
-
- circleci/ruby:2.7
|
55
|
-
- circleci/jruby:9.1
|
56
|
-
- circleci/jruby:9.2
|