fastly_nsq 0.13.2 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.env +4 -0
- data/.overcommit.yml +3 -3
- data/.rubocop.yml +11 -1
- data/.travis.yml +8 -1
- data/Gemfile +9 -0
- data/README.md +52 -82
- data/Rakefile +2 -0
- data/bin/fastly_nsq +1 -0
- data/docker-compose.yml +23 -0
- data/examples/.sample.env +0 -3
- data/fastly_nsq.gemspec +7 -8
- data/lib/fastly_nsq.rb +44 -50
- data/lib/fastly_nsq/cli.rb +20 -14
- data/lib/fastly_nsq/consumer.rb +26 -30
- data/lib/fastly_nsq/feeder.rb +16 -0
- data/lib/fastly_nsq/http/nsqd.rb +7 -1
- data/lib/fastly_nsq/http/nsqlookupd.rb +1 -1
- data/lib/fastly_nsq/launcher.rb +31 -23
- data/lib/fastly_nsq/listener.rb +34 -103
- data/lib/fastly_nsq/manager.rb +48 -72
- data/lib/fastly_nsq/message.rb +2 -0
- data/lib/fastly_nsq/messenger.rb +5 -5
- data/lib/fastly_nsq/priority_queue.rb +12 -0
- data/lib/fastly_nsq/priority_thread_pool.rb +32 -0
- data/lib/fastly_nsq/producer.rb +52 -32
- data/lib/fastly_nsq/testing.rb +239 -0
- data/lib/fastly_nsq/tls_options.rb +2 -0
- data/lib/fastly_nsq/version.rb +3 -1
- data/spec/{lib/fastly_nsq/cli_spec.rb → cli_spec.rb} +2 -0
- data/spec/consumer_spec.rb +59 -0
- data/spec/fastly_nsq_spec.rb +72 -0
- data/spec/feeder_spec.rb +22 -0
- data/spec/{lib/fastly_nsq/http → http}/nsqd_spec.rb +1 -1
- data/spec/{lib/fastly_nsq/http → http}/nsqlookupd_spec.rb +1 -1
- data/spec/{lib/fastly_nsq/http_spec.rb → http_spec.rb} +3 -1
- data/spec/integration_spec.rb +48 -0
- data/spec/launcher_spec.rb +50 -0
- data/spec/listener_spec.rb +184 -0
- data/spec/manager_spec.rb +111 -0
- data/spec/matchers/delegate.rb +32 -0
- data/spec/{lib/fastly_nsq/message_spec.rb → message_spec.rb} +2 -0
- data/spec/{lib/fastly_nsq/messenger_spec.rb → messenger_spec.rb} +7 -5
- data/spec/priority_thread_pool_spec.rb +19 -0
- data/spec/producer_spec.rb +94 -0
- data/spec/spec_helper.rb +32 -28
- data/spec/support/http.rb +37 -0
- data/spec/support/webmock.rb +22 -0
- data/spec/{lib/fastly_nsq/tls_options_spec.rb → tls_options_spec.rb} +2 -0
- metadata +54 -96
- data/env_configuration_for_local_gem_tests.yml +0 -5
- data/example_config_class.rb +0 -20
- data/examples/Rakefile +0 -41
- data/lib/fastly_nsq/fake_backend.rb +0 -114
- data/lib/fastly_nsq/listener/config.rb +0 -35
- data/lib/fastly_nsq/rake_task.rb +0 -78
- data/lib/fastly_nsq/strategy.rb +0 -36
- data/spec/lib/fastly_nsq/consumer_spec.rb +0 -72
- data/spec/lib/fastly_nsq/fake_backend_spec.rb +0 -135
- data/spec/lib/fastly_nsq/fastly_nsq_spec.rb +0 -10
- data/spec/lib/fastly_nsq/launcher_spec.rb +0 -56
- data/spec/lib/fastly_nsq/listener_spec.rb +0 -213
- data/spec/lib/fastly_nsq/manager_spec.rb +0 -127
- data/spec/lib/fastly_nsq/producer_spec.rb +0 -60
- data/spec/lib/fastly_nsq/rake_task_spec.rb +0 -142
- data/spec/lib/fastly_nsq/strategy_spec.rb +0 -36
- data/spec/lib/fastly_nsq_spec.rb +0 -18
- data/spec/support/env_helpers.rb +0 -15
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec::Matchers.define :delegate do |method|
|
4
|
+
match do |delegator|
|
5
|
+
@method = @prefix ? :"#{@to}_#{method}" : method
|
6
|
+
@delegator = delegator
|
7
|
+
begin
|
8
|
+
@delegator.send(@to)
|
9
|
+
rescue NoMethodError
|
10
|
+
raise "#{@delegator} does not respond to #{@to}!"
|
11
|
+
end
|
12
|
+
allow(@delegator).to receive(@to).and_return(double('receiver', method => :called))
|
13
|
+
actual = (@delegator.send(@method) == :called)
|
14
|
+
allow(@delegator).to receive(@to).and_call_original # unstub
|
15
|
+
actual
|
16
|
+
end
|
17
|
+
|
18
|
+
description do
|
19
|
+
"delegate :#{@method} to its #{@to}#{@prefix ? ' with prefix' : ''}"
|
20
|
+
end
|
21
|
+
|
22
|
+
failure_message do |_text|
|
23
|
+
"expected #{@delegator} to delegate :#{@method} to its #{@to}#{@prefix ? ' with prefix' : ''}"
|
24
|
+
end
|
25
|
+
|
26
|
+
failure_message_when_negated do |_text|
|
27
|
+
"expected #{@delegator} not to delegate :#{@method} to its #{@to}#{@prefix ? ' with prefix' : ''}"
|
28
|
+
end
|
29
|
+
|
30
|
+
chain(:to) { |receiver| @to = receiver }
|
31
|
+
chain(:with_prefix) { @prefix = true }
|
32
|
+
end
|
@@ -1,4 +1,6 @@
|
|
1
1
|
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
2
4
|
require 'spec_helper'
|
3
5
|
require 'json'
|
4
6
|
|
@@ -26,7 +28,7 @@ RSpec.describe FastlyNsq::Messenger do
|
|
26
28
|
it 'writes a single message on a producer' do
|
27
29
|
subject.producers['topic'] = producer
|
28
30
|
|
29
|
-
subject.deliver message: message,
|
31
|
+
subject.deliver message: message, topic: 'topic', originating_service: origin
|
30
32
|
|
31
33
|
expect(producer).to have_received(:write).with(expected_attributes.to_json)
|
32
34
|
end
|
@@ -35,7 +37,7 @@ RSpec.describe FastlyNsq::Messenger do
|
|
35
37
|
subject.producers['topic'] = producer
|
36
38
|
expected_attributes[:meta][:originating_service] = 'Unknown'
|
37
39
|
|
38
|
-
subject.deliver message: message,
|
40
|
+
subject.deliver message: message, topic: 'topic'
|
39
41
|
|
40
42
|
expect(producer).to have_received(:write).with(expected_attributes.to_json)
|
41
43
|
end
|
@@ -47,7 +49,7 @@ RSpec.describe FastlyNsq::Messenger do
|
|
47
49
|
|
48
50
|
subject.producers['topic'] = producer
|
49
51
|
|
50
|
-
subject.deliver message: message,
|
52
|
+
subject.deliver message: message, topic: 'topic', meta: meta, originating_service: origin
|
51
53
|
|
52
54
|
expect(producer).to have_received(:write).with(expected_attributes.to_json)
|
53
55
|
end
|
@@ -61,7 +63,7 @@ RSpec.describe FastlyNsq::Messenger do
|
|
61
63
|
|
62
64
|
subject.producers['topic'] = producer
|
63
65
|
|
64
|
-
subject.deliver message: message,
|
66
|
+
subject.deliver message: message, topic: 'topic', meta: meta, originating_service: origin
|
65
67
|
|
66
68
|
expect(producer).to have_received(:write).with(expected_attributes.to_json)
|
67
69
|
end
|
@@ -74,7 +76,7 @@ RSpec.describe FastlyNsq::Messenger do
|
|
74
76
|
subject.originating_service = service
|
75
77
|
expected_attributes[:meta][:originating_service] = service
|
76
78
|
|
77
|
-
subject.deliver message: message,
|
79
|
+
subject.deliver message: message, topic: 'nanotopic'
|
78
80
|
|
79
81
|
expect(producer).to have_received(:write).with(expected_attributes.to_json)
|
80
82
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe FastlyNsq::PriorityThreadPool do
|
6
|
+
let!(:pool) { described_class.new(max_threads: 1) }
|
7
|
+
|
8
|
+
after { pool.shutdown || pool.wait_for_termination }
|
9
|
+
|
10
|
+
it 'executes work based on supplied priority' do
|
11
|
+
actual = []
|
12
|
+
count = 10
|
13
|
+
count.times { |i| pool.post(i) { actual << i } }
|
14
|
+
expect { pool.completed_task_count }.to eventually(eq(count)).within(30)
|
15
|
+
|
16
|
+
# weak but stable assertion that the last element was not the last processed
|
17
|
+
expect(actual.last).not_to eq(count - 1)
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe FastlyNsq::Producer do
|
6
|
+
let!(:topic) { 'fnsq' }
|
7
|
+
subject { FastlyNsq::Producer.new(topic: topic) }
|
8
|
+
|
9
|
+
before { reset_topic(topic) }
|
10
|
+
before { expect { subject }.to eventually(be_connected).within(5) }
|
11
|
+
after { subject.terminate if subject.connected? }
|
12
|
+
|
13
|
+
it { should be_connected }
|
14
|
+
|
15
|
+
it 'writes a message' do
|
16
|
+
subject.write 'foo'
|
17
|
+
expect { message_count(topic) }.to eventually(eq(1)).within(5)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should terminate' do
|
21
|
+
expect { subject.terminate }.to change(subject, :connected?).to(false)
|
22
|
+
expect(subject.connection).to eq(nil)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'does not write after termination' do
|
26
|
+
subject.terminate
|
27
|
+
expect { subject.write 'foo' }.to raise_error(FastlyNsq::NotConnectedError)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'can connect after termination' do
|
31
|
+
subject.terminate
|
32
|
+
expect { subject.connect }.to change(subject, :connected?).to(true)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'raises when connection fails within the specified timeframe' do
|
36
|
+
allow_any_instance_of(Nsq::Producer).to receive(:connected?).and_return(false)
|
37
|
+
logger = spy('logger')
|
38
|
+
expect(logger).to receive(:error).and_return("Producer for #{topic} failed to connect!")
|
39
|
+
|
40
|
+
if RUBY_VERSION > '2.4.0'
|
41
|
+
expect { FastlyNsq::Producer.new(topic: topic, logger: logger, connect_timeout: 0.2) }.
|
42
|
+
to raise_error(FastlyNsq::ConnectionFailed, match(FastlyNsq.lookupd_http_addresses.inspect))
|
43
|
+
else
|
44
|
+
expect { FastlyNsq::Producer.new(topic: topic, logger: logger, connect_timeout: 0.2) }.
|
45
|
+
to raise_error(FastlyNsq::ConnectionFailed)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'faking', :fake do
|
50
|
+
it { should be_connected }
|
51
|
+
|
52
|
+
it 'should terminate' do
|
53
|
+
expect { subject.terminate }.to change(subject, :connected?).to(false)
|
54
|
+
expect(subject.connection).to eq(nil)
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'writes a message' do
|
58
|
+
expect { subject.write 'foo' }.to change { subject.messages.size }.by(1)
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'does not write after termination' do
|
62
|
+
subject.terminate
|
63
|
+
expect { subject.write 'foo' }.to raise_error(FastlyNsq::NotConnectedError)
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'can connect after termination' do
|
67
|
+
subject.terminate
|
68
|
+
expect { subject.connect }.to change(subject, :connected?).to(true)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe 'inline', :inline do
|
73
|
+
it { should be_connected }
|
74
|
+
|
75
|
+
it 'should terminate' do
|
76
|
+
expect { subject.terminate }.to change(subject, :connected?).to(false)
|
77
|
+
expect(subject.connection).to eq(nil)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'writes a message' do
|
81
|
+
expect { subject.write 'foo' }.to change { subject.messages.size }.by(1)
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'does not write after termination' do
|
85
|
+
subject.terminate
|
86
|
+
expect { subject.write 'foo' }.to raise_error(FastlyNsq::NotConnectedError)
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'can connect after termination' do
|
90
|
+
subject.terminate
|
91
|
+
expect { subject.connect }.to change(subject, :connected?).to(true)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dotenv'
|
4
|
+
Dotenv.load
|
5
|
+
|
6
|
+
require 'bundler/setup'
|
7
|
+
|
8
|
+
Bundler.require(:development)
|
9
|
+
|
1
10
|
require 'fastly_nsq'
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require 'webmock/rspec'
|
11
|
+
require 'fastly_nsq/http'
|
12
|
+
require 'fastly_nsq/testing'
|
5
13
|
|
6
|
-
|
14
|
+
Dir[File.expand_path('../{support,shared,matchers}/**/*.rb', __FILE__)].each { |f| require(f) }
|
15
|
+
|
16
|
+
FastlyNsq::Testing.disable!
|
17
|
+
|
18
|
+
if ENV['DEBUG']
|
19
|
+
Concurrent.use_stdlib_logger(Logger::DEBUG)
|
20
|
+
FastlyNsq.logger = Logger.new(STDOUT)
|
21
|
+
else
|
22
|
+
Concurrent.use_stdlib_logger(Logger::ERROR)
|
23
|
+
FastlyNsq.logger = Logger.new(STDOUT).tap { |l| l.level = Logger::ERROR }
|
24
|
+
end
|
7
25
|
|
8
26
|
RSpec.configure do |config|
|
9
27
|
config.expect_with :rspec do |expectations|
|
@@ -22,38 +40,24 @@ RSpec.configure do |config|
|
|
22
40
|
config.profile_examples = 1
|
23
41
|
config.run_all_when_everything_filtered = true
|
24
42
|
Kernel.srand config.seed
|
43
|
+
config.default_formatter = 'doc' if config.files_to_run.one?
|
25
44
|
|
26
|
-
|
27
|
-
config.default_formatter = 'doc'
|
28
|
-
end
|
29
|
-
|
30
|
-
config.before(:each) do
|
31
|
-
load_sample_environment_variables
|
32
|
-
FastlyNsq::FakeBackend.reset!
|
33
|
-
WebMock.reset!
|
34
|
-
end
|
35
|
-
|
36
|
-
config.around(:each, fake_queue: true) do |example|
|
45
|
+
config.around(:each, fake: true) do |example|
|
37
46
|
RSpec::Mocks.with_temporary_scope do
|
38
|
-
|
39
|
-
|
40
|
-
end
|
47
|
+
FastlyNsq::Messages.messages.clear
|
48
|
+
FastlyNsq::Testing.fake! { example.run }
|
41
49
|
end
|
42
50
|
end
|
43
51
|
|
44
|
-
config.around(:each,
|
52
|
+
config.around(:each, inline: true) do |example|
|
45
53
|
RSpec::Mocks.with_temporary_scope do
|
46
|
-
|
47
|
-
example.run
|
48
|
-
end
|
54
|
+
FastlyNsq::Testing.inline! { example.run }
|
49
55
|
end
|
50
56
|
end
|
51
57
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
ENV[key.to_s] = value
|
57
|
-
end
|
58
|
+
config.before(:each) do
|
59
|
+
FastlyNsq.manager.terminate(1)
|
60
|
+
FastlyNsq.manager = FastlyNsq::Manager.new
|
61
|
+
FastlyNsq::Testing.reset!
|
58
62
|
end
|
59
63
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SupportHttp
|
4
|
+
def message_count(topic)
|
5
|
+
topic_stats = JSON.parse(FastlyNsq::Http::Nsqd.stats(topic: topic).body)['topics'].first || {}
|
6
|
+
topic_stats['message_count']
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_topic(topic)
|
10
|
+
FastlyNsq::Http::Nsqd.topic_create(topic: topic).code == 200
|
11
|
+
end
|
12
|
+
|
13
|
+
def empty_topic(topic)
|
14
|
+
FastlyNsq::Http::Nsqd.topic_empty(topic: topic).code == 200
|
15
|
+
end
|
16
|
+
|
17
|
+
def delete_topic(topic)
|
18
|
+
FastlyNsq::Http::Nsqd.topic_delete(topic: topic).code == 200
|
19
|
+
end
|
20
|
+
|
21
|
+
def delete_channel(topic, channel)
|
22
|
+
FastlyNsq::Http::Nsqd.channel_delete(topic: topic, channel: channel).code == 200
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_channel(topic, channel)
|
26
|
+
FastlyNsq::Http::Nsqd.channel_create(topic: topic, channel: channel).code == 200
|
27
|
+
end
|
28
|
+
|
29
|
+
def reset_topic(topic, channel: nil)
|
30
|
+
delete_channel(topic, channel) if channel
|
31
|
+
delete_topic(topic)
|
32
|
+
create_topic(topic)
|
33
|
+
create_channel(topic, channel) if channel
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
RSpec.configure { |config| config.include(SupportHttp) }
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'webmock/rspec/matchers'
|
4
|
+
|
5
|
+
RSpec.configure do |config|
|
6
|
+
config.include WebMock::API, :webmock
|
7
|
+
config.include WebMock::Matchers, :webmock
|
8
|
+
|
9
|
+
config.before(:each, :webmock) do
|
10
|
+
WebMock.enable!
|
11
|
+
end
|
12
|
+
|
13
|
+
config.after(:each, :webmock) do
|
14
|
+
WebMock.disable!
|
15
|
+
end
|
16
|
+
|
17
|
+
config.after(:each) do
|
18
|
+
WebMock.reset!
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
WebMock::AssertionFailure.error_class = RSpec::Expectations::ExpectationNotMetError
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly_nsq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommy O'Neil
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2018-01-05 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: awesome_print
|
@@ -43,20 +43,6 @@ dependencies:
|
|
43
43
|
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '1.12'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: bundler-audit
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
requirements:
|
50
|
-
- - "~>"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 0.5.0
|
53
|
-
type: :development
|
54
|
-
prerelease: false
|
55
|
-
version_requirements: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: 0.5.0
|
60
46
|
- !ruby/object:Gem::Dependency
|
61
47
|
name: dotenv
|
62
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,20 +57,6 @@ dependencies:
|
|
71
57
|
- - ">="
|
72
58
|
- !ruby/object:Gem::Version
|
73
59
|
version: '0'
|
74
|
-
- !ruby/object:Gem::Dependency
|
75
|
-
name: overcommit
|
76
|
-
requirement: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.32.0
|
81
|
-
type: :development
|
82
|
-
prerelease: false
|
83
|
-
version_requirements: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: 0.32.0
|
88
60
|
- !ruby/object:Gem::Dependency
|
89
61
|
name: pry-byebug
|
90
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,109 +72,95 @@ dependencies:
|
|
100
72
|
- !ruby/object:Gem::Version
|
101
73
|
version: '3.3'
|
102
74
|
- !ruby/object:Gem::Dependency
|
103
|
-
name:
|
75
|
+
name: rspec
|
104
76
|
requirement: !ruby/object:Gem::Requirement
|
105
77
|
requirements:
|
106
78
|
- - "~>"
|
107
79
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
80
|
+
version: '3.4'
|
109
81
|
type: :development
|
110
82
|
prerelease: false
|
111
83
|
version_requirements: !ruby/object:Gem::Requirement
|
112
84
|
requirements:
|
113
85
|
- - "~>"
|
114
86
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
87
|
+
version: '3.4'
|
116
88
|
- !ruby/object:Gem::Dependency
|
117
|
-
name:
|
89
|
+
name: rspec-eventually
|
118
90
|
requirement: !ruby/object:Gem::Requirement
|
119
91
|
requirements:
|
120
|
-
- -
|
92
|
+
- - '='
|
121
93
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
94
|
+
version: '0.2'
|
123
95
|
type: :development
|
124
96
|
prerelease: false
|
125
97
|
version_requirements: !ruby/object:Gem::Requirement
|
126
98
|
requirements:
|
127
|
-
- -
|
99
|
+
- - '='
|
128
100
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
101
|
+
version: '0.2'
|
130
102
|
- !ruby/object:Gem::Dependency
|
131
|
-
name:
|
103
|
+
name: webmock
|
132
104
|
requirement: !ruby/object:Gem::Requirement
|
133
105
|
requirements:
|
134
106
|
- - "~>"
|
135
107
|
- !ruby/object:Gem::Version
|
136
|
-
version: 3.
|
108
|
+
version: '3.0'
|
137
109
|
type: :development
|
138
110
|
prerelease: false
|
139
111
|
version_requirements: !ruby/object:Gem::Requirement
|
140
112
|
requirements:
|
141
113
|
- - "~>"
|
142
114
|
- !ruby/object:Gem::Version
|
143
|
-
version: 3.
|
115
|
+
version: '3.0'
|
144
116
|
- !ruby/object:Gem::Dependency
|
145
|
-
name:
|
117
|
+
name: concurrent-ruby
|
146
118
|
requirement: !ruby/object:Gem::Requirement
|
147
119
|
requirements:
|
148
120
|
- - "~>"
|
149
121
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
151
|
-
type: :
|
122
|
+
version: '1.0'
|
123
|
+
type: :runtime
|
152
124
|
prerelease: false
|
153
125
|
version_requirements: !ruby/object:Gem::Requirement
|
154
126
|
requirements:
|
155
127
|
- - "~>"
|
156
128
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
129
|
+
version: '1.0'
|
158
130
|
- !ruby/object:Gem::Dependency
|
159
|
-
name:
|
131
|
+
name: nsq-ruby
|
160
132
|
requirement: !ruby/object:Gem::Requirement
|
161
133
|
requirements:
|
162
134
|
- - "~>"
|
163
135
|
- !ruby/object:Gem::Version
|
164
|
-
version: '0
|
165
|
-
type: :development
|
166
|
-
prerelease: false
|
167
|
-
version_requirements: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - "~>"
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: '0.2'
|
172
|
-
- !ruby/object:Gem::Dependency
|
173
|
-
name: webmock
|
174
|
-
requirement: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
136
|
+
version: '2.0'
|
176
137
|
- - ">="
|
177
138
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
179
|
-
type: :
|
139
|
+
version: 2.0.5
|
140
|
+
type: :runtime
|
180
141
|
prerelease: false
|
181
142
|
version_requirements: !ruby/object:Gem::Requirement
|
182
143
|
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '2.0'
|
183
147
|
- - ">="
|
184
148
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
149
|
+
version: 2.0.5
|
186
150
|
- !ruby/object:Gem::Dependency
|
187
|
-
name:
|
151
|
+
name: priority_queue_cxx
|
188
152
|
requirement: !ruby/object:Gem::Requirement
|
189
153
|
requirements:
|
190
154
|
- - "~>"
|
191
155
|
- !ruby/object:Gem::Version
|
192
|
-
version: '
|
193
|
-
- - ">="
|
194
|
-
- !ruby/object:Gem::Version
|
195
|
-
version: 2.0.5
|
156
|
+
version: '0.3'
|
196
157
|
type: :runtime
|
197
158
|
prerelease: false
|
198
159
|
version_requirements: !ruby/object:Gem::Requirement
|
199
160
|
requirements:
|
200
161
|
- - "~>"
|
201
162
|
- !ruby/object:Gem::Version
|
202
|
-
version: '
|
203
|
-
- - ">="
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: 2.0.5
|
163
|
+
version: '0.3'
|
206
164
|
description: Helper classes for Fastly's NSQ Services
|
207
165
|
email: tommy@fastly.com
|
208
166
|
executables:
|
@@ -211,6 +169,7 @@ extensions: []
|
|
211
169
|
extra_rdoc_files: []
|
212
170
|
files:
|
213
171
|
- ".document"
|
172
|
+
- ".env"
|
214
173
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
215
174
|
- ".gitignore"
|
216
175
|
- ".overcommit.yml"
|
@@ -224,49 +183,48 @@ files:
|
|
224
183
|
- README.md
|
225
184
|
- Rakefile
|
226
185
|
- bin/fastly_nsq
|
227
|
-
-
|
228
|
-
- example_config_class.rb
|
186
|
+
- docker-compose.yml
|
229
187
|
- examples/.sample.env
|
230
|
-
- examples/Rakefile
|
231
188
|
- fastly_nsq.gemspec
|
232
189
|
- lib/fastly_nsq.rb
|
233
190
|
- lib/fastly_nsq/cli.rb
|
234
191
|
- lib/fastly_nsq/consumer.rb
|
235
|
-
- lib/fastly_nsq/
|
192
|
+
- lib/fastly_nsq/feeder.rb
|
236
193
|
- lib/fastly_nsq/http.rb
|
237
194
|
- lib/fastly_nsq/http/nsqd.rb
|
238
195
|
- lib/fastly_nsq/http/nsqlookupd.rb
|
239
196
|
- lib/fastly_nsq/launcher.rb
|
240
197
|
- lib/fastly_nsq/listener.rb
|
241
|
-
- lib/fastly_nsq/listener/config.rb
|
242
198
|
- lib/fastly_nsq/manager.rb
|
243
199
|
- lib/fastly_nsq/message.rb
|
244
200
|
- lib/fastly_nsq/messenger.rb
|
201
|
+
- lib/fastly_nsq/priority_queue.rb
|
202
|
+
- lib/fastly_nsq/priority_thread_pool.rb
|
245
203
|
- lib/fastly_nsq/producer.rb
|
246
|
-
- lib/fastly_nsq/rake_task.rb
|
247
204
|
- lib/fastly_nsq/safe_thread.rb
|
248
|
-
- lib/fastly_nsq/
|
205
|
+
- lib/fastly_nsq/testing.rb
|
249
206
|
- lib/fastly_nsq/tls_options.rb
|
250
207
|
- lib/fastly_nsq/version.rb
|
251
|
-
- spec/
|
252
|
-
- spec/
|
253
|
-
- spec/
|
254
|
-
- spec/
|
255
|
-
- spec/
|
256
|
-
- spec/
|
257
|
-
- spec/
|
258
|
-
- spec/
|
259
|
-
- spec/
|
260
|
-
- spec/
|
261
|
-
- spec/
|
262
|
-
- spec/
|
263
|
-
- spec/
|
264
|
-
- spec/
|
265
|
-
- spec/
|
266
|
-
- spec/
|
267
|
-
- spec/lib/fastly_nsq_spec.rb
|
208
|
+
- spec/cli_spec.rb
|
209
|
+
- spec/consumer_spec.rb
|
210
|
+
- spec/fastly_nsq_spec.rb
|
211
|
+
- spec/feeder_spec.rb
|
212
|
+
- spec/http/nsqd_spec.rb
|
213
|
+
- spec/http/nsqlookupd_spec.rb
|
214
|
+
- spec/http_spec.rb
|
215
|
+
- spec/integration_spec.rb
|
216
|
+
- spec/launcher_spec.rb
|
217
|
+
- spec/listener_spec.rb
|
218
|
+
- spec/manager_spec.rb
|
219
|
+
- spec/matchers/delegate.rb
|
220
|
+
- spec/message_spec.rb
|
221
|
+
- spec/messenger_spec.rb
|
222
|
+
- spec/priority_thread_pool_spec.rb
|
223
|
+
- spec/producer_spec.rb
|
268
224
|
- spec/spec_helper.rb
|
269
|
-
- spec/support/
|
225
|
+
- spec/support/http.rb
|
226
|
+
- spec/support/webmock.rb
|
227
|
+
- spec/tls_options_spec.rb
|
270
228
|
homepage: https://github.com/fastly/fastly_nsq
|
271
229
|
licenses:
|
272
230
|
- MIT
|
@@ -287,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
245
|
version: '0'
|
288
246
|
requirements: []
|
289
247
|
rubyforge_project:
|
290
|
-
rubygems_version: 2.
|
248
|
+
rubygems_version: 2.7.3
|
291
249
|
signing_key:
|
292
250
|
specification_version: 4
|
293
251
|
summary: Fastly NSQ Adapter
|