fastly_nsq 1.16.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.env +2 -2
  3. data/.git-blame-ignore-revs +6 -0
  4. data/.ruby-version +1 -1
  5. data/.travis.yml +4 -3
  6. data/ChangeLog.md +31 -1
  7. data/Gemfile +8 -8
  8. data/README.md +84 -6
  9. data/Rakefile +10 -11
  10. data/fastly_nsq.gemspec +26 -26
  11. data/lib/fastly_nsq/cli.rb +43 -50
  12. data/lib/fastly_nsq/consumer.rb +27 -14
  13. data/lib/fastly_nsq/feeder.rb +5 -7
  14. data/lib/fastly_nsq/http/nsqd.rb +28 -28
  15. data/lib/fastly_nsq/http/nsqlookupd.rb +11 -11
  16. data/lib/fastly_nsq/http.rb +4 -4
  17. data/lib/fastly_nsq/launcher.rb +16 -16
  18. data/lib/fastly_nsq/listener.rb +16 -16
  19. data/lib/fastly_nsq/manager.rb +13 -12
  20. data/lib/fastly_nsq/message.rb +4 -4
  21. data/lib/fastly_nsq/messenger.rb +25 -15
  22. data/lib/fastly_nsq/new_relic.rb +8 -8
  23. data/lib/fastly_nsq/priority_queue.rb +2 -2
  24. data/lib/fastly_nsq/priority_thread_pool.rb +3 -3
  25. data/lib/fastly_nsq/producer.rb +23 -14
  26. data/lib/fastly_nsq/safe_thread.rb +1 -1
  27. data/lib/fastly_nsq/testing.rb +4 -3
  28. data/lib/fastly_nsq/tls_options.rb +6 -6
  29. data/lib/fastly_nsq/version.rb +1 -1
  30. data/lib/fastly_nsq.rb +64 -29
  31. data/spec/cli_spec.rb +2 -2
  32. data/spec/consumer_spec.rb +53 -12
  33. data/spec/fastly_nsq_spec.rb +108 -32
  34. data/spec/feeder_spec.rb +4 -4
  35. data/spec/http/nsqd_spec.rb +23 -23
  36. data/spec/http/nsqlookupd_spec.rb +19 -19
  37. data/spec/http_spec.rb +22 -22
  38. data/spec/integration_spec.rb +10 -10
  39. data/spec/launcher_spec.rb +21 -21
  40. data/spec/listener_spec.rb +50 -50
  41. data/spec/manager_spec.rb +27 -27
  42. data/spec/matchers/delegate.rb +4 -4
  43. data/spec/message_spec.rb +19 -19
  44. data/spec/messenger_spec.rb +71 -59
  45. data/spec/new_relic.rb +27 -27
  46. data/spec/priority_thread_pool_spec.rb +2 -2
  47. data/spec/producer_spec.rb +70 -31
  48. data/spec/spec_helper.rb +12 -12
  49. data/spec/support/http.rb +2 -2
  50. data/spec/support/webmock.rb +1 -1
  51. data/spec/testing_spec.rb +12 -12
  52. data/spec/tls_options_spec.rb +47 -47
  53. metadata +10 -11
  54. data/.rubocop.yml +0 -68
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spec_helper'
3
+ require "spec_helper"
4
+ RSpec::Matchers.define_negated_matcher :excluding, :include
4
5
 
5
6
  RSpec.describe FastlyNsq::Producer do
6
- let!(:topic) { 'fnsq' }
7
+ let!(:topic) { "fnsq" }
7
8
  subject { FastlyNsq::Producer.new(topic: topic) }
8
9
 
9
10
  before { reset_topic(topic) }
@@ -12,86 +13,124 @@ RSpec.describe FastlyNsq::Producer do
12
13
 
13
14
  it { should be_connected }
14
15
 
15
- it 'writes a message' do
16
- subject.write 'foo'
16
+ it "writes a message" do
17
+ subject.write "foo"
17
18
  expect { message_count(topic) }.to eventually(eq(1)).within(5)
18
19
  end
19
20
 
20
- it 'writes multiple messages' do
21
+ it "writes multiple messages" do
21
22
  subject.write %w[foo bar]
22
23
  expect { message_count(topic) }.to eventually(eq(2)).within(5)
23
24
  end
24
25
 
25
- it 'should terminate' do
26
+ it "should terminate" do
26
27
  expect { subject.terminate }.to change(subject, :connected?).to(false)
27
28
  expect(subject.connection).to eq(nil)
28
29
  end
29
30
 
30
- it 'does not write after termination' do
31
+ it "does not write after termination" do
31
32
  subject.terminate
32
- expect { subject.write 'foo' }.to raise_error(FastlyNsq::NotConnectedError)
33
+ expect { subject.write "foo" }.to raise_error(FastlyNsq::NotConnectedError)
33
34
  end
34
35
 
35
- it 'can connect after termination' do
36
+ it "can connect after termination" do
36
37
  subject.terminate
37
38
  expect { subject.connect }.to change(subject, :connected?).to(true)
38
39
  end
39
40
 
40
- it 'raises when connection fails within the specified timeframe' do
41
+ it "raises when connection fails within the specified timeframe" do
41
42
  allow_any_instance_of(Nsq::Producer).to receive(:connected?).and_return(false)
42
- logger = spy('logger')
43
+ logger = spy("logger")
43
44
  expect(logger).to receive(:error).and_return("Producer for #{topic} failed to connect!")
44
45
 
45
- if RUBY_VERSION > '2.4.0'
46
- expect { FastlyNsq::Producer.new(topic: topic, logger: logger, connect_timeout: 0.2) }.
47
- to raise_error(FastlyNsq::ConnectionFailed, match(FastlyNsq.lookupd_http_addresses.inspect))
48
- else
49
- expect { FastlyNsq::Producer.new(topic: topic, logger: logger, connect_timeout: 0.2) }.
50
- to raise_error(FastlyNsq::ConnectionFailed)
46
+ expect { FastlyNsq::Producer.new(topic: topic, logger: logger, connect_timeout: 0.2) }
47
+ .to raise_error(FastlyNsq::ConnectionFailed, match(FastlyNsq.lookupd_http_addresses.inspect))
48
+ end
49
+
50
+ describe "connection priority" do
51
+ after do
52
+ FastlyNsq.lookupd_http_addresses = nil
53
+ FastlyNsq.producer_nsqds = nil
54
+ end
55
+
56
+ it "connects to producer_nsqds if provided" do
57
+ connection = double "FastlyNsq::Producer", connected?: true
58
+ allow(Nsq::Producer).to receive(:new).and_return(connection)
59
+
60
+ expect(FastlyNsq.lookupd_http_addresses).not_to be_empty
61
+ expect(FastlyNsq.producer_nsqds).not_to be_empty
62
+
63
+ FastlyNsq::Producer.new(topic: topic)
64
+ expect(Nsq::Producer).to have_received(:new).with a_hash_including(nsqd: FastlyNsq.producer_nsqds).and(excluding(:nsqlookupd))
65
+ end
66
+
67
+ it "connects to lookupd_http_addresses if producer_nsqds is empty" do
68
+ FastlyNsq.producer_nsqds = []
69
+ connection = double "FastlyNsq::Producer", connected?: true
70
+ allow(Nsq::Producer).to receive(:new).and_return(connection)
71
+
72
+ expect(FastlyNsq.lookupd_http_addresses).not_to be_empty
73
+ expect(FastlyNsq.producer_nsqds).to be_empty
74
+
75
+ FastlyNsq::Producer.new(topic: topic)
76
+ expect(Nsq::Producer).to have_received(:new).with a_hash_including(nsqlookupd: FastlyNsq.lookupd_http_addresses).and(excluding(:nsqd))
77
+ end
78
+
79
+ it "raises when neither producer_nsqds or lookupd_http_addresses are available" do
80
+ FastlyNsq.producer_nsqds = []
81
+ FastlyNsq.lookupd_http_addresses = []
82
+ allow(Nsq::Producer).to receive(:new)
83
+
84
+ expect(FastlyNsq.lookupd_http_addresses).to be_empty
85
+ expect(FastlyNsq.producer_nsqds).to be_empty
86
+
87
+ expect { FastlyNsq::Producer.new(topic: topic) }
88
+ .to raise_error(FastlyNsq::ConnectionFailed, "One of FastlyNsq.producer_nsqds or FastlyNsq.lookupd_http_addresses must be present")
89
+ expect(Nsq::Producer).not_to have_received(:new)
51
90
  end
52
91
  end
53
92
 
54
- describe 'faking', :fake do
93
+ describe "faking", :fake do
55
94
  it { should be_connected }
56
95
 
57
- it 'should terminate' do
96
+ it "should terminate" do
58
97
  expect { subject.terminate }.to change(subject, :connected?).to(false)
59
98
  expect(subject.connection).to eq(nil)
60
99
  end
61
100
 
62
- it 'writes a message' do
63
- expect { subject.write 'foo' }.to change { subject.messages.size }.by(1)
101
+ it "writes a message" do
102
+ expect { subject.write "foo" }.to change { subject.messages.size }.by(1)
64
103
  end
65
104
 
66
- it 'does not write after termination' do
105
+ it "does not write after termination" do
67
106
  subject.terminate
68
- expect { subject.write 'foo' }.to raise_error(FastlyNsq::NotConnectedError)
107
+ expect { subject.write "foo" }.to raise_error(FastlyNsq::NotConnectedError)
69
108
  end
70
109
 
71
- it 'can connect after termination' do
110
+ it "can connect after termination" do
72
111
  subject.terminate
73
112
  expect { subject.connect }.to change(subject, :connected?).to(true)
74
113
  end
75
114
  end
76
115
 
77
- describe 'inline', :inline do
116
+ describe "inline", :inline do
78
117
  it { should be_connected }
79
118
 
80
- it 'should terminate' do
119
+ it "should terminate" do
81
120
  expect { subject.terminate }.to change(subject, :connected?).to(false)
82
121
  expect(subject.connection).to eq(nil)
83
122
  end
84
123
 
85
- it 'writes a message' do
86
- expect { subject.write 'foo' }.to change { subject.messages.size }.by(1)
124
+ it "writes a message" do
125
+ expect { subject.write "foo" }.to change { subject.messages.size }.by(1)
87
126
  end
88
127
 
89
- it 'does not write after termination' do
128
+ it "does not write after termination" do
90
129
  subject.terminate
91
- expect { subject.write 'foo' }.to raise_error(FastlyNsq::NotConnectedError)
130
+ expect { subject.write "foo" }.to raise_error(FastlyNsq::NotConnectedError)
92
131
  end
93
132
 
94
- it 'can connect after termination' do
133
+ it "can connect after termination" do
95
134
  subject.terminate
96
135
  expect { subject.connect }.to change(subject, :connected?).to(true)
97
136
  end
data/spec/spec_helper.rb CHANGED
@@ -1,26 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dotenv'
3
+ require "dotenv"
4
4
  Dotenv.load
5
5
 
6
- require 'bundler/setup'
6
+ require "bundler/setup"
7
7
 
8
8
  Bundler.require(:development)
9
9
 
10
- require 'fastly_nsq'
11
- require 'fastly_nsq/http'
12
- require 'fastly_nsq/testing'
10
+ require "fastly_nsq"
11
+ require "fastly_nsq/http"
12
+ require "fastly_nsq/testing"
13
13
 
14
- Dir[File.expand_path('../{support,shared,matchers}/**/*.rb', __FILE__)].each { |f| require(f) }
14
+ Dir[File.expand_path("../{support,shared,matchers}/**/*.rb", __FILE__)].sort.each { |f| require(f) }
15
15
 
16
16
  FastlyNsq::Testing.disable!
17
17
 
18
- if ENV['DEBUG']
18
+ if ENV["DEBUG"]
19
19
  Concurrent.use_stdlib_logger(Logger::DEBUG)
20
- FastlyNsq.logger = Logger.new(STDOUT)
20
+ FastlyNsq.logger = Logger.new($stdout)
21
21
  else
22
22
  Concurrent.use_stdlib_logger(Logger::ERROR)
23
- FastlyNsq.logger = Logger.new('/dev/null').tap { |l| l.level = Logger::DEBUG }
23
+ FastlyNsq.logger = Logger.new("/dev/null").tap { |l| l.level = Logger::DEBUG }
24
24
  end
25
25
 
26
26
  RSpec.configure do |config|
@@ -32,15 +32,15 @@ RSpec.configure do |config|
32
32
  mocks.verify_partial_doubles = true
33
33
  end
34
34
 
35
- config.default_formatter = 'progress'
35
+ config.default_formatter = "progress"
36
36
  config.disable_monkey_patching!
37
- config.example_status_persistence_file_path = 'spec/examples.txt'
37
+ config.example_status_persistence_file_path = "spec/examples.txt"
38
38
  config.filter_run :focus
39
39
  config.order = :random
40
40
  config.profile_examples = 1
41
41
  config.run_all_when_everything_filtered = true
42
42
  Kernel.srand config.seed
43
- config.default_formatter = 'doc' if config.files_to_run.one?
43
+ config.default_formatter = "doc" if config.files_to_run.one?
44
44
 
45
45
  config.around(:each, fake: true) do |example|
46
46
  RSpec::Mocks.with_temporary_scope do
data/spec/support/http.rb CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  module SupportHttp
4
4
  def message_count(topic)
5
- topic_stats = JSON.parse(FastlyNsq::Http::Nsqd.stats(topic: topic).body)['topics'].first || {}
6
- topic_stats['message_count']
5
+ topic_stats = JSON.parse(FastlyNsq::Http::Nsqd.stats(topic: topic).body)["topics"].first || {}
6
+ topic_stats["message_count"]
7
7
  end
8
8
 
9
9
  def create_topic(topic)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'webmock/rspec/matchers'
3
+ require "webmock/rspec/matchers"
4
4
 
5
5
  RSpec.configure do |config|
6
6
  config.include WebMock::API, :webmock
data/spec/testing_spec.rb CHANGED
@@ -1,29 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spec_helper'
3
+ require "spec_helper"
4
4
 
5
5
  RSpec.describe FastlyNsq::Testing do
6
- describe '.message' do
7
- it 'returns a FastlyNsq::Message' do
8
- data = { 'foo' => 'bar' }
6
+ describe ".message" do
7
+ it "returns a FastlyNsq::Message" do
8
+ data = {"foo" => "bar"}
9
9
  message = FastlyNsq::Testing.message(data: data)
10
10
 
11
- expect(message.body).to eq('data' => data, 'meta' => nil)
11
+ expect(message.body).to eq("data" => data, "meta" => nil)
12
12
  end
13
13
 
14
- it 'returns a FastlyNsq::Message with meta' do
15
- data = { 'foo' => 'bar' }
16
- meta = 'foo'
14
+ it "returns a FastlyNsq::Message with meta" do
15
+ data = {"foo" => "bar"}
16
+ meta = "foo"
17
17
  message = FastlyNsq::Testing.message(data: data, meta: meta)
18
18
 
19
- expect(message.body).to eq('data' => data, 'meta' => meta)
19
+ expect(message.body).to eq("data" => data, "meta" => meta)
20
20
  end
21
21
 
22
- it 'wraps a FastlyNsq::TestMessage' do
23
- data = 'bar'
22
+ it "wraps a FastlyNsq::TestMessage" do
23
+ data = "bar"
24
24
  message = FastlyNsq::Testing.message(data: data)
25
25
  expect(message.nsq_message).to be_a(FastlyNsq::TestMessage)
26
- expect(message.nsq_message.body).to eq(JSON.dump('data' => data, 'meta' => nil))
26
+ expect(message.nsq_message.body).to eq(JSON.dump("data" => data, "meta" => nil))
27
27
  end
28
28
  end
29
29
  end
@@ -1,39 +1,39 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spec_helper'
3
+ require "spec_helper"
4
4
 
5
5
  RSpec.describe FastlyNsq::TlsOptions do
6
- describe 'when SSL ENV variables are not set' do
7
- describe '.to_h' do
8
- it 'returns nil when initialized without parameters' do
6
+ describe "when SSL ENV variables are not set" do
7
+ describe ".to_h" do
8
+ it "returns nil when initialized without parameters" do
9
9
  context = FastlyNsq::TlsOptions.new
10
10
 
11
11
  expect(context.to_h).to eq({})
12
12
  end
13
13
 
14
- it 'returns an equivalent hash when all variables are defined' do
14
+ it "returns an equivalent hash when all variables are defined" do
15
15
  tls_options_hash = {
16
- key: 'key',
17
- certificate: 'certificate',
18
- ca_certificate: 'ca_certificate',
16
+ key: "key",
17
+ certificate: "certificate",
18
+ ca_certificate: "ca_certificate"
19
19
  }
20
20
  context = FastlyNsq::TlsOptions.new(tls_options_hash)
21
21
 
22
22
  expected_output = {
23
23
  tls_v1: true,
24
24
  tls_options: {
25
- key: 'key',
26
- certificate: 'certificate',
27
- ca_certificate: 'ca_certificate',
28
- },
25
+ key: "key",
26
+ certificate: "certificate",
27
+ ca_certificate: "ca_certificate"
28
+ }
29
29
  }
30
30
  expect(context.to_h).to eq(expected_output)
31
31
  end
32
32
 
33
- it 'does not add keys with nil values' do
33
+ it "does not add keys with nil values" do
34
34
  tls_options_hash = {
35
- key: 'key',
36
- certificate: 'certificate',
35
+ key: "key",
36
+ certificate: "certificate"
37
37
  }
38
38
  context = FastlyNsq::TlsOptions.new(tls_options_hash)
39
39
  ca_certificate = context.to_h[:ca_certificate]
@@ -43,60 +43,60 @@ RSpec.describe FastlyNsq::TlsOptions do
43
43
  end
44
44
  end
45
45
 
46
- describe 'when SSL ENV variables are set' do
46
+ describe "when SSL ENV variables are set" do
47
47
  before do
48
- ENV['NSQ_SSL_KEY'] = '/some/key'
49
- ENV['NSQ_SSL_CERTIFICATE'] = '/some/certificate'
50
- ENV['NSQ_SSL_CA_CERTIFICATE'] = '/some/ca_certificate'
51
- ENV['NSQ_SSL_VERIFY_MODE'] = 'value'
48
+ ENV["NSQ_SSL_KEY"] = "/some/key"
49
+ ENV["NSQ_SSL_CERTIFICATE"] = "/some/certificate"
50
+ ENV["NSQ_SSL_CA_CERTIFICATE"] = "/some/ca_certificate"
51
+ ENV["NSQ_SSL_VERIFY_MODE"] = "value"
52
52
  end
53
53
 
54
54
  after do
55
- ENV['NSQ_SSL_KEY'] = nil
56
- ENV['NSQ_SSL_CERTIFICATE'] = nil
57
- ENV['NSQ_SSL_CA_CERTIFICATE'] = nil
58
- ENV['NSQ_SSL_VERIFY_MODE'] = nil
55
+ ENV["NSQ_SSL_KEY"] = nil
56
+ ENV["NSQ_SSL_CERTIFICATE"] = nil
57
+ ENV["NSQ_SSL_CA_CERTIFICATE"] = nil
58
+ ENV["NSQ_SSL_VERIFY_MODE"] = nil
59
59
  end
60
60
 
61
- describe '.to_h' do
62
- it 'returns a hash of the env variables when no parameters are passed' do
61
+ describe ".to_h" do
62
+ it "returns a hash of the env variables when no parameters are passed" do
63
63
  expected_hash = {
64
64
  tls_v1: true,
65
65
  tls_options: {
66
- key: ENV['NSQ_SSL_KEY'],
67
- certificate: ENV['NSQ_SSL_CERTIFICATE'],
68
- ca_certificate: ENV['NSQ_SSL_CA_CERTIFICATE'],
69
- verify_mode: ENV['NSQ_SSL_VERIFY_MODE'],
70
- },
66
+ key: ENV["NSQ_SSL_KEY"],
67
+ certificate: ENV["NSQ_SSL_CERTIFICATE"],
68
+ ca_certificate: ENV["NSQ_SSL_CA_CERTIFICATE"],
69
+ verify_mode: ENV["NSQ_SSL_VERIFY_MODE"]
70
+ }
71
71
  }
72
72
  context = FastlyNsq::TlsOptions.new
73
73
 
74
74
  expect(context.to_h).to eq(expected_hash)
75
75
  end
76
76
 
77
- it 'merges passed parameters and env variables' do
78
- passed_certificate = '/passed/certificate'
77
+ it "merges passed parameters and env variables" do
78
+ passed_certificate = "/passed/certificate"
79
79
  expected_hash = {
80
80
  tls_v1: true,
81
81
  tls_options: {
82
- key: ENV['NSQ_SSL_KEY'],
82
+ key: ENV["NSQ_SSL_KEY"],
83
83
  certificate: passed_certificate,
84
- ca_certificate: ENV['NSQ_SSL_CA_CERTIFICATE'],
85
- verify_mode: ENV['NSQ_SSL_VERIFY_MODE'],
86
- },
84
+ ca_certificate: ENV["NSQ_SSL_CA_CERTIFICATE"],
85
+ verify_mode: ENV["NSQ_SSL_VERIFY_MODE"]
86
+ }
87
87
  }
88
88
  context = FastlyNsq::TlsOptions.new(certificate: passed_certificate)
89
89
 
90
90
  expect(context.to_h).to eq(expected_hash)
91
91
  end
92
92
 
93
- it 'removes keys that are nil' do
93
+ it "removes keys that are nil" do
94
94
  expected_hash = {
95
95
  tls_v1: true,
96
96
  tls_options: {
97
- ca_certificate: ENV['NSQ_SSL_CA_CERTIFICATE'],
98
- verify_mode: ENV['NSQ_SSL_VERIFY_MODE'],
99
- },
97
+ ca_certificate: ENV["NSQ_SSL_CA_CERTIFICATE"],
98
+ verify_mode: ENV["NSQ_SSL_VERIFY_MODE"]
99
+ }
100
100
  }
101
101
  context = FastlyNsq::TlsOptions.new(key: nil, certificate: nil)
102
102
 
@@ -105,16 +105,16 @@ RSpec.describe FastlyNsq::TlsOptions do
105
105
  end
106
106
  end
107
107
 
108
- describe 'as_hash' do
109
- it 'returns an tls_options hash' do
108
+ describe "as_hash" do
109
+ it "returns an tls_options hash" do
110
110
  expected_hash = {
111
111
  tls_v1: true,
112
112
  tls_options: {
113
- key: 'joe',
114
- certificate: 'biden',
115
- },
113
+ key: "joe",
114
+ certificate: "biden"
115
+ }
116
116
  }
117
- output_hash = FastlyNsq::TlsOptions.as_hash(key: 'joe', certificate: 'biden')
117
+ output_hash = FastlyNsq::TlsOptions.as_hash(key: "joe", certificate: "biden")
118
118
  expect(output_hash).to eq(expected_hash)
119
119
  end
120
120
  end
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: 1.16.0
4
+ version: 1.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommy O'Neil
@@ -10,10 +10,10 @@ authors:
10
10
  - Lukas Eklund
11
11
  - Josh Lane
12
12
  - Hassan Shahid
13
- autorequire:
13
+ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-08-16 00:00:00.000000000 Z
16
+ date: 2022-03-04 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: awesome_print
@@ -156,19 +156,19 @@ dependencies:
156
156
  - !ruby/object:Gem::Version
157
157
  version: '1.0'
158
158
  - !ruby/object:Gem::Dependency
159
- name: nsq-ruby
159
+ name: nsq-ruby-fastly
160
160
  requirement: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: '2.3'
164
+ version: '2.4'
165
165
  type: :runtime
166
166
  prerelease: false
167
167
  version_requirements: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: '2.3'
171
+ version: '2.4'
172
172
  - !ruby/object:Gem::Dependency
173
173
  name: priority_queue_cxx
174
174
  requirement: !ruby/object:Gem::Requirement
@@ -192,11 +192,11 @@ extra_rdoc_files: []
192
192
  files:
193
193
  - ".document"
194
194
  - ".env"
195
+ - ".git-blame-ignore-revs"
195
196
  - ".github/PULL_REQUEST_TEMPLATE.md"
196
197
  - ".gitignore"
197
198
  - ".overcommit.yml"
198
199
  - ".rdoc_options"
199
- - ".rubocop.yml"
200
200
  - ".ruby-version"
201
201
  - ".travis.yml"
202
202
  - ChangeLog.md
@@ -254,7 +254,7 @@ homepage: https://github.com/fastly/fastly_nsq
254
254
  licenses:
255
255
  - MIT
256
256
  metadata: {}
257
- post_install_message:
257
+ post_install_message:
258
258
  rdoc_options: []
259
259
  require_paths:
260
260
  - lib
@@ -269,9 +269,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0'
271
271
  requirements: []
272
- rubyforge_project:
273
- rubygems_version: 2.7.9
274
- signing_key:
272
+ rubygems_version: 3.2.32
273
+ signing_key:
275
274
  specification_version: 4
276
275
  summary: Fastly NSQ Adapter
277
276
  test_files: []
data/.rubocop.yml DELETED
@@ -1,68 +0,0 @@
1
- AllCops:
2
- Include:
3
- - '**/Rakefile'
4
- Exclude:
5
- - 'db/schema.rb'
6
- - 'vendor/**/*'
7
- - 'Gemfile'
8
- TargetRubyVersion: 2.4
9
-
10
- Layout/DotPosition:
11
- Enabled: true
12
- EnforcedStyle: trailing
13
- SupportedStyles:
14
- - leading
15
- - trailing
16
-
17
- Lint/AmbiguousBlockAssociation:
18
- Exclude:
19
- - 'spec/**/*'
20
-
21
- Lint/RescueWithoutErrorClass:
22
- Enabled: false
23
-
24
- Metrics/MethodLength:
25
- Enabled: false
26
-
27
- Metrics/AbcSize:
28
- Enabled: false
29
-
30
- Metrics/LineLength:
31
- Enabled: false
32
-
33
- Metrics/ParameterLists:
34
- Enabled: false
35
-
36
- Metrics/BlockLength:
37
- ExcludedMethods: [describe, context, configure]
38
-
39
- Style/ClassAndModuleChildren:
40
- Enabled: false
41
-
42
- Style/ClassVars:
43
- Description: 'Avoid the use of class variables.'
44
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
45
- Enabled: false
46
-
47
- Style/Documentation:
48
- Enabled: false
49
-
50
- Style/GuardClause:
51
- Enabled: false
52
-
53
- Style/IfUnlessModifier:
54
- Enabled: false
55
-
56
- Style/RegexpLiteral:
57
- Enabled: false
58
-
59
- Style/SignalException:
60
- EnforcedStyle: only_raise
61
-
62
- Style/TrailingCommaInArguments:
63
- EnforcedStyleForMultiline: comma
64
- Enabled: true
65
-
66
- Style/TrailingCommaInLiteral:
67
- EnforcedStyleForMultiline: comma
68
- Enabled: true