shoryuken 7.0.0.alpha1 → 7.0.0.alpha2

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.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/push.yml +3 -3
  3. data/.github/workflows/specs.yml +6 -9
  4. data/.github/workflows/verify-action-pins.yml +1 -1
  5. data/.rspec +2 -1
  6. data/.ruby-version +1 -1
  7. data/Appraisals +0 -6
  8. data/CHANGELOG.md +186 -142
  9. data/Gemfile +1 -0
  10. data/README.md +12 -13
  11. data/bin/cli/base.rb +1 -2
  12. data/bin/cli/sqs.rb +5 -4
  13. data/bin/shoryuken +2 -1
  14. data/gemfiles/rails_7_0.gemfile +10 -10
  15. data/gemfiles/rails_7_1.gemfile +10 -9
  16. data/gemfiles/rails_7_2.gemfile +10 -9
  17. data/gemfiles/rails_8_0.gemfile +10 -9
  18. data/lib/shoryuken/body_parser.rb +3 -1
  19. data/lib/shoryuken/client.rb +2 -0
  20. data/lib/shoryuken/default_exception_handler.rb +2 -0
  21. data/lib/shoryuken/default_worker_registry.rb +11 -11
  22. data/lib/shoryuken/environment_loader.rb +6 -6
  23. data/lib/shoryuken/extensions/active_job_adapter.rb +8 -6
  24. data/lib/shoryuken/extensions/active_job_concurrent_send_adapter.rb +5 -5
  25. data/lib/shoryuken/extensions/active_job_extensions.rb +2 -0
  26. data/lib/shoryuken/fetcher.rb +4 -2
  27. data/lib/shoryuken/helpers/atomic_boolean.rb +44 -0
  28. data/lib/shoryuken/helpers/atomic_counter.rb +104 -0
  29. data/lib/shoryuken/helpers/atomic_hash.rb +182 -0
  30. data/lib/shoryuken/helpers/hash_utils.rb +56 -0
  31. data/lib/shoryuken/helpers/string_utils.rb +65 -0
  32. data/lib/shoryuken/inline_message.rb +22 -0
  33. data/lib/shoryuken/launcher.rb +2 -0
  34. data/lib/shoryuken/logging.rb +19 -5
  35. data/lib/shoryuken/manager.rb +6 -4
  36. data/lib/shoryuken/message.rb +2 -0
  37. data/lib/shoryuken/middleware/chain.rb +2 -0
  38. data/lib/shoryuken/middleware/server/active_record.rb +2 -0
  39. data/lib/shoryuken/middleware/server/auto_delete.rb +2 -0
  40. data/lib/shoryuken/middleware/server/auto_extend_visibility.rb +10 -10
  41. data/lib/shoryuken/middleware/server/exponential_backoff_retry.rb +5 -3
  42. data/lib/shoryuken/middleware/server/timing.rb +2 -0
  43. data/lib/shoryuken/options.rb +9 -5
  44. data/lib/shoryuken/polling/base_strategy.rb +126 -0
  45. data/lib/shoryuken/polling/queue_configuration.rb +103 -0
  46. data/lib/shoryuken/polling/strict_priority.rb +2 -0
  47. data/lib/shoryuken/polling/weighted_round_robin.rb +2 -0
  48. data/lib/shoryuken/processor.rb +5 -2
  49. data/lib/shoryuken/queue.rb +6 -4
  50. data/lib/shoryuken/runner.rb +9 -12
  51. data/lib/shoryuken/util.rb +6 -6
  52. data/lib/shoryuken/version.rb +3 -1
  53. data/lib/shoryuken/worker/default_executor.rb +2 -0
  54. data/lib/shoryuken/worker/inline_executor.rb +3 -1
  55. data/lib/shoryuken/worker.rb +2 -0
  56. data/lib/shoryuken/worker_registry.rb +2 -0
  57. data/lib/shoryuken.rb +8 -28
  58. data/shoryuken.gemspec +6 -6
  59. data/spec/integration/launcher_spec.rb +2 -3
  60. data/spec/shared_examples_for_active_job.rb +13 -8
  61. data/spec/shoryuken/body_parser_spec.rb +1 -2
  62. data/spec/shoryuken/client_spec.rb +1 -1
  63. data/spec/shoryuken/default_exception_handler_spec.rb +9 -10
  64. data/spec/shoryuken/default_worker_registry_spec.rb +1 -2
  65. data/spec/shoryuken/environment_loader_spec.rb +9 -8
  66. data/spec/shoryuken/extensions/active_job_adapter_spec.rb +2 -1
  67. data/spec/shoryuken/extensions/active_job_base_spec.rb +2 -1
  68. data/spec/shoryuken/extensions/active_job_concurrent_send_adapter_spec.rb +2 -1
  69. data/spec/shoryuken/extensions/active_job_wrapper_spec.rb +2 -1
  70. data/spec/shoryuken/fetcher_spec.rb +23 -26
  71. data/spec/shoryuken/helpers/atomic_boolean_spec.rb +196 -0
  72. data/spec/shoryuken/helpers/atomic_counter_spec.rb +177 -0
  73. data/spec/shoryuken/helpers/atomic_hash_spec.rb +307 -0
  74. data/spec/shoryuken/helpers/hash_utils_spec.rb +145 -0
  75. data/spec/shoryuken/helpers/string_utils_spec.rb +124 -0
  76. data/spec/shoryuken/helpers_integration_spec.rb +96 -0
  77. data/spec/shoryuken/inline_message_spec.rb +196 -0
  78. data/spec/shoryuken/launcher_spec.rb +1 -2
  79. data/spec/shoryuken/manager_spec.rb +1 -2
  80. data/spec/shoryuken/middleware/chain_spec.rb +1 -1
  81. data/spec/shoryuken/middleware/server/auto_delete_spec.rb +1 -1
  82. data/spec/shoryuken/middleware/server/auto_extend_visibility_spec.rb +1 -1
  83. data/spec/shoryuken/middleware/server/exponential_backoff_retry_spec.rb +1 -1
  84. data/spec/shoryuken/middleware/server/timing_spec.rb +1 -1
  85. data/spec/shoryuken/options_spec.rb +4 -4
  86. data/spec/shoryuken/polling/base_strategy_spec.rb +280 -0
  87. data/spec/shoryuken/polling/queue_configuration_spec.rb +195 -0
  88. data/spec/shoryuken/polling/strict_priority_spec.rb +1 -1
  89. data/spec/shoryuken/polling/weighted_round_robin_spec.rb +1 -1
  90. data/spec/shoryuken/processor_spec.rb +1 -1
  91. data/spec/shoryuken/queue_spec.rb +2 -3
  92. data/spec/shoryuken/runner_spec.rb +1 -3
  93. data/spec/shoryuken/util_spec.rb +1 -1
  94. data/spec/shoryuken/worker/default_executor_spec.rb +1 -1
  95. data/spec/shoryuken/worker/inline_executor_spec.rb +1 -1
  96. data/spec/shoryuken/worker_spec.rb +15 -11
  97. data/spec/shoryuken_spec.rb +1 -1
  98. data/spec/spec_helper.rb +16 -0
  99. metadata +60 -27
  100. data/.github/FUNDING.yml +0 -12
  101. data/gemfiles/rails_6_1.gemfile +0 -18
  102. data/lib/shoryuken/core_ext.rb +0 -69
  103. data/lib/shoryuken/polling/base.rb +0 -67
  104. data/shoryuken.jpg +0 -0
  105. data/spec/shoryuken/core_ext_spec.rb +0 -40
@@ -0,0 +1,195 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Shoryuken::Polling::QueueConfiguration do
4
+ describe '#initialize' do
5
+ it 'creates configuration with name and options' do
6
+ config = described_class.new('test_queue', { priority: :high })
7
+
8
+ expect(config.name).to eq('test_queue')
9
+ expect(config.options).to eq({ priority: :high })
10
+ end
11
+
12
+ it 'creates configuration with empty options' do
13
+ config = described_class.new('simple_queue', {})
14
+
15
+ expect(config.name).to eq('simple_queue')
16
+ expect(config.options).to eq({})
17
+ end
18
+
19
+ it 'accepts nil options' do
20
+ config = described_class.new('queue', nil)
21
+
22
+ expect(config.name).to eq('queue')
23
+ expect(config.options).to be_nil
24
+ end
25
+ end
26
+
27
+ describe '#hash' do
28
+ it 'returns hash based on queue name' do
29
+ config1 = described_class.new('queue', {})
30
+ config2 = described_class.new('queue', { weight: 5 })
31
+
32
+ expect(config1.hash).to eq(config2.hash)
33
+ expect(config1.hash).to eq('queue'.hash)
34
+ end
35
+
36
+ it 'returns different hash for different queue names' do
37
+ config1 = described_class.new('queue1', {})
38
+ config2 = described_class.new('queue2', {})
39
+
40
+ expect(config1.hash).not_to eq(config2.hash)
41
+ end
42
+ end
43
+
44
+ describe '#==' do
45
+ context 'when comparing with another QueueConfiguration' do
46
+ it 'returns true for same name and options' do
47
+ config1 = described_class.new('queue', { weight: 5 })
48
+ config2 = described_class.new('queue', { weight: 5 })
49
+
50
+ expect(config1).to eq(config2)
51
+ end
52
+
53
+ it 'returns false for same name but different options' do
54
+ config1 = described_class.new('queue', { weight: 5 })
55
+ config2 = described_class.new('queue', { weight: 10 })
56
+
57
+ expect(config1).not_to eq(config2)
58
+ end
59
+
60
+ it 'returns false for different names' do
61
+ config1 = described_class.new('queue1', {})
62
+ config2 = described_class.new('queue2', {})
63
+
64
+ expect(config1).not_to eq(config2)
65
+ end
66
+ end
67
+
68
+ context 'when comparing with a string' do
69
+ it 'returns true when options are empty and names match' do
70
+ config = described_class.new('test_queue', {})
71
+
72
+ expect(config).to eq('test_queue')
73
+ end
74
+
75
+ it 'returns false when options are not empty' do
76
+ config = described_class.new('test_queue', { weight: 5 })
77
+
78
+ expect(config).not_to eq('test_queue')
79
+ end
80
+
81
+ it 'returns false when names do not match' do
82
+ config = described_class.new('queue1', {})
83
+
84
+ expect(config).not_to eq('queue2')
85
+ end
86
+ end
87
+
88
+ context 'when comparing with other objects' do
89
+ it 'returns false for non-string, non-QueueConfiguration objects' do
90
+ config = described_class.new('queue', {})
91
+
92
+ expect(config).not_to eq(123)
93
+ expect(config).not_to eq([])
94
+ expect(config).not_to eq({ name: 'queue' })
95
+ end
96
+ end
97
+ end
98
+
99
+ describe '#eql?' do
100
+ it 'behaves the same as ==' do
101
+ config1 = described_class.new('queue', {})
102
+ config2 = described_class.new('queue', {})
103
+
104
+ expect(config1.eql?(config2)).to eq(config1 == config2)
105
+ expect(config1.eql?('queue')).to eq(config1 == 'queue')
106
+ end
107
+ end
108
+
109
+ describe '#to_s' do
110
+ context 'when options are empty' do
111
+ it 'returns just the queue name' do
112
+ config = described_class.new('simple_queue', {})
113
+
114
+ expect(config.to_s).to eq('simple_queue')
115
+ end
116
+ end
117
+
118
+ context 'when options are present' do
119
+ it 'returns detailed representation with options' do
120
+ config = described_class.new('complex_queue', { priority: :high, weight: 5 })
121
+
122
+ expect(config.to_s).to include('#<QueueConfiguration complex_queue options={')
123
+ end
124
+
125
+ it 'handles single option' do
126
+ config = described_class.new('weighted_queue', { weight: 10 })
127
+
128
+ expect(config.to_s).to include('#<QueueConfiguration weighted_queue options={')
129
+ end
130
+ end
131
+
132
+ context 'when options are nil' do
133
+ it 'returns detailed representation' do
134
+ config = described_class.new('nil_options_queue', nil)
135
+
136
+ expect(config.to_s).to eq('#<QueueConfiguration nil_options_queue options=nil>')
137
+ end
138
+ end
139
+ end
140
+
141
+ describe 'struct behavior' do
142
+ it 'provides attribute accessors' do
143
+ config = described_class.new('queue', { weight: 5 })
144
+
145
+ expect(config.name).to eq('queue')
146
+ expect(config.options).to eq({ weight: 5 })
147
+ end
148
+
149
+ it 'allows attribute modification' do
150
+ config = described_class.new('queue', {})
151
+
152
+ config.name = 'new_queue'
153
+ config.options = { priority: :low }
154
+
155
+ expect(config.name).to eq('new_queue')
156
+ expect(config.options).to eq({ priority: :low })
157
+ end
158
+
159
+ it 'supports array-like access' do
160
+ config = described_class.new('queue', { weight: 5 })
161
+
162
+ expect(config[0]).to eq('queue')
163
+ expect(config[1]).to eq({ weight: 5 })
164
+ end
165
+ end
166
+
167
+ describe 'usage as hash key' do
168
+ it 'can be used as hash keys' do
169
+ config1 = described_class.new('queue', {})
170
+ config2 = described_class.new('queue', {}) # Same config
171
+
172
+ hash = {}
173
+ hash[config1] = 'value1'
174
+ hash[config2] = 'value2'
175
+
176
+ # Same queue name and options should use same hash key
177
+ expect(hash[config1]).to eq('value2')
178
+ expect(hash[config2]).to eq('value2')
179
+ expect(hash.size).to eq(1)
180
+ end
181
+
182
+ it 'different queue names create different keys' do
183
+ config1 = described_class.new('queue1', {})
184
+ config2 = described_class.new('queue2', {})
185
+
186
+ hash = {}
187
+ hash[config1] = 'value1'
188
+ hash[config2] = 'value2'
189
+
190
+ expect(hash[config1]).to eq('value1')
191
+ expect(hash[config2]).to eq('value2')
192
+ expect(hash.size).to eq(2)
193
+ end
194
+ end
195
+ end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken::Polling::StrictPriority do
4
4
  let(:queue1) { 'shoryuken' }
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken::Polling::WeightedRoundRobin do
4
4
  let(:queue1) { 'shoryuken' }
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken::Processor do
4
4
  let(:manager) { double Shoryuken::Manager }
@@ -1,6 +1,5 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Metrics/BlockLength
4
3
  RSpec.describe Shoryuken::Queue do
5
4
  let(:credentials) { Aws::Credentials.new('access_key_id', 'secret_access_key') }
6
5
  let(:sqs) { Aws::SQS::Client.new(stub_responses: true, credentials: credentials) }
@@ -30,7 +29,7 @@ RSpec.describe Shoryuken::Queue do
30
29
  let(:queue_url) { "http://localhost:4576/queue/#{queue_name}" }
31
30
 
32
31
  it 'instantiates by URL and validate the URL' do
33
- # See https://github.com/phstc/shoryuken/pull/551
32
+ # See https://github.com/ruby-shoryuken/shoryuken/pull/551
34
33
  expect_any_instance_of(described_class).to receive(:fifo?).and_return(false)
35
34
 
36
35
  subject = described_class.new(sqs, queue_url)
@@ -1,7 +1,5 @@
1
- require 'spec_helper'
2
- require 'shoryuken/runner'
1
+ # frozen_string_literal: true
3
2
 
4
- # rubocop:disable Metrics/BlockLength
5
3
  RSpec.describe Shoryuken::Runner do
6
4
  let(:cli) { Shoryuken::Runner.instance }
7
5
 
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  describe 'Shoryuken::Util' do
4
4
  subject do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken::Worker::DefaultExecutor do
4
4
  let(:sqs_queue) { double 'SQS Queue' }
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken::Worker::InlineExecutor do
4
4
  before do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken::Worker do
4
4
  let(:sqs_queue) { double 'SQS Queue' }
@@ -108,14 +108,16 @@ RSpec.describe Shoryuken::Worker do
108
108
  end
109
109
 
110
110
  describe '.server_middleware' do
111
- before do
112
- class FakeMiddleware
111
+ let(:fake_middleware_class) do
112
+ Class.new do
113
113
  def call(*_args)
114
114
  yield
115
115
  end
116
116
  end
117
117
  end
118
118
 
119
+ before { fake_middleware_class }
120
+
119
121
  context 'no middleware is defined in the worker' do
120
122
  it 'returns the list of global middlewares' do
121
123
  expect(TestWorker.server_middleware).to satisfy do |chain|
@@ -147,27 +149,29 @@ RSpec.describe Shoryuken::Worker do
147
149
  end
148
150
 
149
151
  context 'the worker modifies the chain' do
150
- before do
151
- class NewTestWorker3
152
+ let(:new_test_worker3_class) do
153
+ ref = fake_middleware_class
154
+
155
+ Class.new do
152
156
  include Shoryuken::Worker
153
157
 
154
158
  server_middleware do |chain|
155
159
  chain.remove Shoryuken::Middleware::Server::Timing
156
- chain.insert_before Shoryuken::Middleware::Server::AutoDelete, FakeMiddleware
160
+ chain.insert_before Shoryuken::Middleware::Server::AutoDelete, ref
157
161
  end
158
162
  end
159
163
  end
160
164
 
161
165
  it 'returns the combined global and worker middlewares' do
162
- expect(NewTestWorker3.server_middleware).not_to satisfy do |chain|
166
+ expect(new_test_worker3_class.server_middleware).not_to satisfy do |chain|
163
167
  chain.exists?(Shoryuken::Middleware::Server::Timing)
164
168
  end
165
169
 
166
- expect(NewTestWorker3.server_middleware).to satisfy do |chain|
167
- chain.exists?(FakeMiddleware)
170
+ expect(new_test_worker3_class.server_middleware).to satisfy do |chain|
171
+ chain.exists?(fake_middleware_class)
168
172
  end
169
173
 
170
- expect(NewTestWorker3.server_middleware).to satisfy do |chain|
174
+ expect(new_test_worker3_class.server_middleware).to satisfy do |chain|
171
175
  chain.exists?(Shoryuken::Middleware::Server::AutoDelete)
172
176
  end
173
177
  end
@@ -182,7 +186,7 @@ RSpec.describe Shoryuken::Worker do
182
186
  end
183
187
 
184
188
  expect(Shoryuken.server_middleware).not_to satisfy do |chain|
185
- chain.exists?(FakeMiddleware)
189
+ chain.exists?(fake_middleware_class)
186
190
  end
187
191
  end
188
192
  end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  RSpec.describe Shoryuken do
4
4
  describe '.healthy?' do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ Warning[:performance] = true if RUBY_VERSION >= '3.3'
4
+ Warning[:deprecated] = true
5
+ $VERBOSE = true
6
+
7
+ require 'warning'
8
+
9
+ Warning.process do |warning|
10
+ next unless warning.include?(Dir.pwd)
11
+ next if warning.include?('useless use of a variable in void context') && warning.include?('core_ext')
12
+ next if warning.include?('vendor/')
13
+
14
+ raise "Warning in your code: #{warning}"
15
+ end
16
+
1
17
  require 'bundler/setup'
2
18
  Bundler.setup
3
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoryuken
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0.alpha1
4
+ version: 7.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Cantero
@@ -10,27 +10,27 @@ cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: dotenv
13
+ name: aws-sdk-sqs
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '0'
19
- type: :development
18
+ version: 1.66.0
19
+ type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '0'
25
+ version: 1.66.0
26
26
  - !ruby/object:Gem::Dependency
27
- name: ostruct
27
+ name: concurrent-ruby
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
- type: :development
33
+ type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
@@ -38,13 +38,13 @@ dependencies:
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  - !ruby/object:Gem::Dependency
41
- name: rake
41
+ name: thor
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
- type: :development
47
+ type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
@@ -52,7 +52,21 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  - !ruby/object:Gem::Dependency
55
- name: rspec
55
+ name: zeitwerk
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.6'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '2.6'
68
+ - !ruby/object:Gem::Dependency
69
+ name: dotenv
56
70
  requirement: !ruby/object:Gem::Requirement
57
71
  requirements:
58
72
  - - ">="
@@ -66,27 +80,27 @@ dependencies:
66
80
  - !ruby/object:Gem::Version
67
81
  version: '0'
68
82
  - !ruby/object:Gem::Dependency
69
- name: aws-sdk-sqs
83
+ name: ostruct
70
84
  requirement: !ruby/object:Gem::Requirement
71
85
  requirements:
72
86
  - - ">="
73
87
  - !ruby/object:Gem::Version
74
- version: 1.66.0
75
- type: :runtime
88
+ version: '0'
89
+ type: :development
76
90
  prerelease: false
77
91
  version_requirements: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - ">="
80
94
  - !ruby/object:Gem::Version
81
- version: 1.66.0
95
+ version: '0'
82
96
  - !ruby/object:Gem::Dependency
83
- name: concurrent-ruby
97
+ name: rake
84
98
  requirement: !ruby/object:Gem::Requirement
85
99
  requirements:
86
100
  - - ">="
87
101
  - !ruby/object:Gem::Version
88
102
  version: '0'
89
- type: :runtime
103
+ type: :development
90
104
  prerelease: false
91
105
  version_requirements: !ruby/object:Gem::Requirement
92
106
  requirements:
@@ -94,13 +108,13 @@ dependencies:
94
108
  - !ruby/object:Gem::Version
95
109
  version: '0'
96
110
  - !ruby/object:Gem::Dependency
97
- name: thor
111
+ name: rspec
98
112
  requirement: !ruby/object:Gem::Requirement
99
113
  requirements:
100
114
  - - ">="
101
115
  - !ruby/object:Gem::Version
102
116
  version: '0'
103
- type: :runtime
117
+ type: :development
104
118
  prerelease: false
105
119
  version_requirements: !ruby/object:Gem::Requirement
106
120
  requirements:
@@ -118,7 +132,6 @@ files:
118
132
  - ".devcontainer/Dockerfile"
119
133
  - ".devcontainer/base.Dockerfile"
120
134
  - ".devcontainer/devcontainer.json"
121
- - ".github/FUNDING.yml"
122
135
  - ".github/workflows/push.yml"
123
136
  - ".github/workflows/specs.yml"
124
137
  - ".github/workflows/verify-action-pins.yml"
@@ -139,7 +152,6 @@ files:
139
152
  - examples/bootstrap_queues.rb
140
153
  - examples/default_worker.rb
141
154
  - gemfiles/.gitignore
142
- - gemfiles/rails_6_1.gemfile
143
155
  - gemfiles/rails_7_0.gemfile
144
156
  - gemfiles/rails_7_1.gemfile
145
157
  - gemfiles/rails_7_2.gemfile
@@ -147,7 +159,6 @@ files:
147
159
  - lib/shoryuken.rb
148
160
  - lib/shoryuken/body_parser.rb
149
161
  - lib/shoryuken/client.rb
150
- - lib/shoryuken/core_ext.rb
151
162
  - lib/shoryuken/default_exception_handler.rb
152
163
  - lib/shoryuken/default_worker_registry.rb
153
164
  - lib/shoryuken/environment_loader.rb
@@ -155,6 +166,12 @@ files:
155
166
  - lib/shoryuken/extensions/active_job_concurrent_send_adapter.rb
156
167
  - lib/shoryuken/extensions/active_job_extensions.rb
157
168
  - lib/shoryuken/fetcher.rb
169
+ - lib/shoryuken/helpers/atomic_boolean.rb
170
+ - lib/shoryuken/helpers/atomic_counter.rb
171
+ - lib/shoryuken/helpers/atomic_hash.rb
172
+ - lib/shoryuken/helpers/hash_utils.rb
173
+ - lib/shoryuken/helpers/string_utils.rb
174
+ - lib/shoryuken/inline_message.rb
158
175
  - lib/shoryuken/launcher.rb
159
176
  - lib/shoryuken/logging.rb
160
177
  - lib/shoryuken/manager.rb
@@ -166,7 +183,8 @@ files:
166
183
  - lib/shoryuken/middleware/server/exponential_backoff_retry.rb
167
184
  - lib/shoryuken/middleware/server/timing.rb
168
185
  - lib/shoryuken/options.rb
169
- - lib/shoryuken/polling/base.rb
186
+ - lib/shoryuken/polling/base_strategy.rb
187
+ - lib/shoryuken/polling/queue_configuration.rb
170
188
  - lib/shoryuken/polling/strict_priority.rb
171
189
  - lib/shoryuken/polling/weighted_round_robin.rb
172
190
  - lib/shoryuken/processor.rb
@@ -180,13 +198,11 @@ files:
180
198
  - lib/shoryuken/worker_registry.rb
181
199
  - renovate.json
182
200
  - shoryuken.gemspec
183
- - shoryuken.jpg
184
201
  - spec/integration/launcher_spec.rb
185
202
  - spec/shared_examples_for_active_job.rb
186
203
  - spec/shoryuken.yml
187
204
  - spec/shoryuken/body_parser_spec.rb
188
205
  - spec/shoryuken/client_spec.rb
189
- - spec/shoryuken/core_ext_spec.rb
190
206
  - spec/shoryuken/default_exception_handler_spec.rb
191
207
  - spec/shoryuken/default_worker_registry_spec.rb
192
208
  - spec/shoryuken/environment_loader_spec.rb
@@ -195,6 +211,13 @@ files:
195
211
  - spec/shoryuken/extensions/active_job_concurrent_send_adapter_spec.rb
196
212
  - spec/shoryuken/extensions/active_job_wrapper_spec.rb
197
213
  - spec/shoryuken/fetcher_spec.rb
214
+ - spec/shoryuken/helpers/atomic_boolean_spec.rb
215
+ - spec/shoryuken/helpers/atomic_counter_spec.rb
216
+ - spec/shoryuken/helpers/atomic_hash_spec.rb
217
+ - spec/shoryuken/helpers/hash_utils_spec.rb
218
+ - spec/shoryuken/helpers/string_utils_spec.rb
219
+ - spec/shoryuken/helpers_integration_spec.rb
220
+ - spec/shoryuken/inline_message_spec.rb
198
221
  - spec/shoryuken/launcher_spec.rb
199
222
  - spec/shoryuken/manager_spec.rb
200
223
  - spec/shoryuken/middleware/chain_spec.rb
@@ -203,6 +226,8 @@ files:
203
226
  - spec/shoryuken/middleware/server/exponential_backoff_retry_spec.rb
204
227
  - spec/shoryuken/middleware/server/timing_spec.rb
205
228
  - spec/shoryuken/options_spec.rb
229
+ - spec/shoryuken/polling/base_strategy_spec.rb
230
+ - spec/shoryuken/polling/queue_configuration_spec.rb
206
231
  - spec/shoryuken/polling/strict_priority_spec.rb
207
232
  - spec/shoryuken/polling/weighted_round_robin_spec.rb
208
233
  - spec/shoryuken/processor_spec.rb
@@ -227,14 +252,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
227
252
  requirements:
228
253
  - - ">="
229
254
  - !ruby/object:Gem::Version
230
- version: 3.0.0
255
+ version: 3.1.0
231
256
  required_rubygems_version: !ruby/object:Gem::Requirement
232
257
  requirements:
233
258
  - - ">="
234
259
  - !ruby/object:Gem::Version
235
260
  version: '0'
236
261
  requirements: []
237
- rubygems_version: 3.6.7
262
+ rubygems_version: 3.6.9
238
263
  specification_version: 4
239
264
  summary: Shoryuken is a super efficient AWS SQS thread based message processor
240
265
  test_files:
@@ -243,7 +268,6 @@ test_files:
243
268
  - spec/shoryuken.yml
244
269
  - spec/shoryuken/body_parser_spec.rb
245
270
  - spec/shoryuken/client_spec.rb
246
- - spec/shoryuken/core_ext_spec.rb
247
271
  - spec/shoryuken/default_exception_handler_spec.rb
248
272
  - spec/shoryuken/default_worker_registry_spec.rb
249
273
  - spec/shoryuken/environment_loader_spec.rb
@@ -252,6 +276,13 @@ test_files:
252
276
  - spec/shoryuken/extensions/active_job_concurrent_send_adapter_spec.rb
253
277
  - spec/shoryuken/extensions/active_job_wrapper_spec.rb
254
278
  - spec/shoryuken/fetcher_spec.rb
279
+ - spec/shoryuken/helpers/atomic_boolean_spec.rb
280
+ - spec/shoryuken/helpers/atomic_counter_spec.rb
281
+ - spec/shoryuken/helpers/atomic_hash_spec.rb
282
+ - spec/shoryuken/helpers/hash_utils_spec.rb
283
+ - spec/shoryuken/helpers/string_utils_spec.rb
284
+ - spec/shoryuken/helpers_integration_spec.rb
285
+ - spec/shoryuken/inline_message_spec.rb
255
286
  - spec/shoryuken/launcher_spec.rb
256
287
  - spec/shoryuken/manager_spec.rb
257
288
  - spec/shoryuken/middleware/chain_spec.rb
@@ -260,6 +291,8 @@ test_files:
260
291
  - spec/shoryuken/middleware/server/exponential_backoff_retry_spec.rb
261
292
  - spec/shoryuken/middleware/server/timing_spec.rb
262
293
  - spec/shoryuken/options_spec.rb
294
+ - spec/shoryuken/polling/base_strategy_spec.rb
295
+ - spec/shoryuken/polling/queue_configuration_spec.rb
263
296
  - spec/shoryuken/polling/strict_priority_spec.rb
264
297
  - spec/shoryuken/polling/weighted_round_robin_spec.rb
265
298
  - spec/shoryuken/processor_spec.rb
data/.github/FUNDING.yml DELETED
@@ -1,12 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: phstc
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: # Replace with a single Ko-fi username
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- otechie: # Replace with a single Otechie username
12
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -1,18 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- group :test do
6
- gem "activejob", "~> 6.1"
7
- gem "httparty"
8
- gem "multi_xml"
9
- gem "simplecov"
10
- end
11
-
12
- group :development do
13
- gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
14
- gem "pry-byebug", "3.9.0"
15
- gem "rubocop"
16
- end
17
-
18
- gemspec path: "../"