sidekiq-throttled 0.18.0 → 1.0.0.alpha
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 +4 -4
- data/{README.md → README.adoc} +95 -114
- data/lib/sidekiq/throttled/basic_fetch.rb +55 -0
- data/lib/sidekiq/throttled/fetch.rb +3 -87
- data/lib/sidekiq/throttled/job.rb +1 -1
- data/lib/sidekiq/throttled/middleware.rb +3 -1
- data/lib/sidekiq/throttled/registry.rb +2 -5
- data/lib/sidekiq/throttled/strategy/concurrency.rb +2 -4
- data/lib/sidekiq/throttled/strategy/threshold.rb +2 -4
- data/lib/sidekiq/throttled/strategy.rb +10 -10
- data/lib/sidekiq/throttled/strategy_collection.rb +1 -1
- data/lib/sidekiq/throttled/version.rb +1 -1
- data/lib/sidekiq/throttled/web.rb +2 -45
- data/lib/sidekiq/throttled/worker.rb +1 -1
- data/lib/sidekiq/throttled.rb +16 -50
- metadata +17 -77
- data/.coveralls.yml +0 -1
- data/.github/dependabot.yml +0 -12
- data/.github/workflows/ci.yml +0 -52
- data/.gitignore +0 -12
- data/.rspec +0 -5
- data/.rubocop.yml +0 -20
- data/.rubocop_todo.yml +0 -68
- data/.travis.yml +0 -37
- data/.yardopts +0 -1
- data/Appraisals +0 -9
- data/CHANGES.md +0 -318
- data/Gemfile +0 -34
- data/Guardfile +0 -25
- data/Rakefile +0 -27
- data/gemfiles/sidekiq_6.4.gemfile +0 -33
- data/gemfiles/sidekiq_6.5.gemfile +0 -33
- data/lib/sidekiq/throttled/communicator/callbacks.rb +0 -72
- data/lib/sidekiq/throttled/communicator/exception_handler.rb +0 -25
- data/lib/sidekiq/throttled/communicator/listener.rb +0 -109
- data/lib/sidekiq/throttled/communicator.rb +0 -116
- data/lib/sidekiq/throttled/expirable_list.rb +0 -70
- data/lib/sidekiq/throttled/fetch/unit_of_work.rb +0 -83
- data/lib/sidekiq/throttled/patches/queue.rb +0 -18
- data/lib/sidekiq/throttled/queue_name.rb +0 -46
- data/lib/sidekiq/throttled/queues_pauser.rb +0 -152
- data/lib/sidekiq/throttled/testing.rb +0 -12
- data/lib/sidekiq/throttled/utils.rb +0 -19
- data/lib/sidekiq/throttled/web/queues.html.erb +0 -49
- data/lib/sidekiq/throttled/web/summary_fix.js +0 -10
- data/lib/sidekiq/throttled/web/summary_fix.rb +0 -35
- data/rubocop/layout.yml +0 -24
- data/rubocop/lint.yml +0 -41
- data/rubocop/metrics.yml +0 -4
- data/rubocop/performance.yml +0 -25
- data/rubocop/rspec.yml +0 -3
- data/rubocop/style.yml +0 -84
- data/sidekiq-throttled.gemspec +0 -36
- /data/{LICENSE.md → LICENSE} +0 -0
@@ -8,9 +8,8 @@ require "sidekiq"
|
|
8
8
|
require "sidekiq/web"
|
9
9
|
|
10
10
|
# internal
|
11
|
-
|
12
|
-
|
13
|
-
require "sidekiq/throttled/web/summary_fix"
|
11
|
+
require_relative "./registry"
|
12
|
+
require_relative "./web/stats"
|
14
13
|
|
15
14
|
module Sidekiq
|
16
15
|
module Throttled
|
@@ -18,31 +17,11 @@ module Sidekiq
|
|
18
17
|
module Web
|
19
18
|
VIEWS = Pathname.new(__dir__).join("web")
|
20
19
|
THROTTLED_TPL = VIEWS.join("throttled.html.erb").read.freeze
|
21
|
-
QUEUES_TPL = VIEWS.join("queues.html.erb").read.freeze
|
22
20
|
|
23
21
|
class << self
|
24
|
-
# Replace default Queues tab with enhanced one.
|
25
|
-
def enhance_queues_tab!
|
26
|
-
SummaryFix.enabled = true
|
27
|
-
Sidekiq::Web::DEFAULT_TABS["Queues"] = "enhanced-queues"
|
28
|
-
Sidekiq::Web.tabs.delete("Enhanced Queues")
|
29
|
-
end
|
30
|
-
|
31
|
-
# Restore original Queues tab.
|
32
|
-
#
|
33
|
-
# @api There's next to absolutely no value in this method for real
|
34
|
-
# users. The only it's purpose is to restore virgin state in specs.
|
35
|
-
def restore_queues_tab!
|
36
|
-
SummaryFix.enabled = false
|
37
|
-
Sidekiq::Web::DEFAULT_TABS["Queues"] = "queues"
|
38
|
-
Sidekiq::Web.tabs["Enhanced Queues"] = "enhanced-queues"
|
39
|
-
end
|
40
|
-
|
41
22
|
# @api private
|
42
23
|
def registered(app)
|
43
|
-
SummaryFix.apply! app
|
44
24
|
register_throttled_tab app
|
45
|
-
register_enhanced_queues_tab app
|
46
25
|
end
|
47
26
|
|
48
27
|
private
|
@@ -55,27 +34,6 @@ module Sidekiq
|
|
55
34
|
redirect "#{root_path}throttled"
|
56
35
|
end
|
57
36
|
end
|
58
|
-
|
59
|
-
# rubocop:disable Metrics/AbcSize
|
60
|
-
def register_enhanced_queues_tab(app) # rubocop:disable Metrics/MethodLength
|
61
|
-
pauser = QueuesPauser.instance
|
62
|
-
|
63
|
-
app.get("/enhanced-queues") do
|
64
|
-
@queues = Sidekiq::Queue.all
|
65
|
-
erb QUEUES_TPL.dup
|
66
|
-
end
|
67
|
-
|
68
|
-
app.post("/enhanced-queues/:name") do
|
69
|
-
case params[:action]
|
70
|
-
when "delete" then Sidekiq::Queue.new(params[:name]).clear
|
71
|
-
when "pause" then pauser.pause!(params[:name])
|
72
|
-
else pauser.resume!(params[:name])
|
73
|
-
end
|
74
|
-
|
75
|
-
redirect "#{root_path}enhanced-queues"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
# rubocop:enable Metrics/AbcSize
|
79
37
|
end
|
80
38
|
end
|
81
39
|
end
|
@@ -83,4 +41,3 @@ end
|
|
83
41
|
|
84
42
|
Sidekiq::Web.register Sidekiq::Throttled::Web
|
85
43
|
Sidekiq::Web.tabs["Throttled"] = "throttled"
|
86
|
-
Sidekiq::Web.tabs["Enhanced Queues"] = "enhanced-queues"
|
data/lib/sidekiq/throttled.rb
CHANGED
@@ -4,14 +4,13 @@
|
|
4
4
|
require "sidekiq"
|
5
5
|
|
6
6
|
# internal
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
require "sidekiq/throttled/utils"
|
7
|
+
require_relative "./throttled/version"
|
8
|
+
require_relative "./throttled/configuration"
|
9
|
+
require_relative "./throttled/fetch"
|
10
|
+
require_relative "./throttled/registry"
|
11
|
+
require_relative "./throttled/job"
|
12
|
+
require_relative "./throttled/middleware"
|
13
|
+
require_relative "./throttled/worker"
|
15
14
|
|
16
15
|
# @see https://github.com/mperham/sidekiq/
|
17
16
|
module Sidekiq
|
@@ -43,12 +42,7 @@ module Sidekiq
|
|
43
42
|
# end
|
44
43
|
# end
|
45
44
|
module Throttled
|
46
|
-
MUTEX = Mutex.new
|
47
|
-
private_constant :MUTEX
|
48
|
-
|
49
45
|
class << self
|
50
|
-
include Utils
|
51
|
-
|
52
46
|
# @return [Configuration]
|
53
47
|
def configuration
|
54
48
|
@configuration ||= Configuration.new
|
@@ -58,15 +52,11 @@ module Sidekiq
|
|
58
52
|
#
|
59
53
|
# @return [void]
|
60
54
|
def setup!
|
61
|
-
Communicator.instance.setup!
|
62
|
-
QueuesPauser.instance.setup!
|
63
|
-
|
64
55
|
Sidekiq.configure_server do |config|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
chain.add Sidekiq::Throttled::Middleware
|
56
|
+
if Gem::Version.new("7.0.0") <= Gem::Version.new(Sidekiq::VERSION)
|
57
|
+
config[:fetch_class] = Sidekiq::Throttled::Fetch
|
58
|
+
else
|
59
|
+
config[:fetch] = Sidekiq::Throttled::Fetch.new(config)
|
70
60
|
end
|
71
61
|
end
|
72
62
|
end
|
@@ -80,8 +70,6 @@ module Sidekiq
|
|
80
70
|
job = message.fetch("wrapped") { message.fetch("class") { return false } }
|
81
71
|
jid = message.fetch("jid") { return false }
|
82
72
|
|
83
|
-
preload_constant! job
|
84
|
-
|
85
73
|
Registry.get job do |strategy|
|
86
74
|
return strategy.throttled?(jid, *message["args"])
|
87
75
|
end
|
@@ -90,34 +78,12 @@ module Sidekiq
|
|
90
78
|
rescue
|
91
79
|
false
|
92
80
|
end
|
81
|
+
end
|
82
|
+
end
|
93
83
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
def setup_strategy!(sidekiq_config)
|
98
|
-
require "sidekiq/throttled/fetch"
|
99
|
-
|
100
|
-
# https://github.com/mperham/sidekiq/commit/67daa7a408b214d593100f782271ed108686c147
|
101
|
-
sidekiq_config = sidekiq_config.options if Gem::Version.new(Sidekiq::VERSION) < Gem::Version.new("6.5.0")
|
102
|
-
|
103
|
-
sidekiq_config[:fetch] = Sidekiq::Throttled::Fetch.new(sidekiq_config)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Tries to preload constant by it's name once.
|
107
|
-
#
|
108
|
-
# Somehow, sometimes, some classes are not eager loaded upon Rails init,
|
109
|
-
# leading to throttling config not being registered prior job perform.
|
110
|
-
# And that leaves us with concurrency limit + 1 situation upon Sidekiq
|
111
|
-
# server restart (becomes normal after all Sidekiq processes handled
|
112
|
-
# at leas onr job of that class).
|
113
|
-
#
|
114
|
-
# @return [void]
|
115
|
-
def preload_constant!(job)
|
116
|
-
MUTEX.synchronize do
|
117
|
-
@preloaded ||= {}
|
118
|
-
@preloaded[job] ||= constantize(job) || true
|
119
|
-
end
|
120
|
-
end
|
84
|
+
configure_server do |config|
|
85
|
+
config.server_middleware do |chain|
|
86
|
+
chain.add Sidekiq::Throttled::Middleware
|
121
87
|
end
|
122
88
|
end
|
123
89
|
end
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-throttled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Zapparov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: concurrent-ruby
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: redis-prescription
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,72 +26,34 @@ dependencies:
|
|
40
26
|
version: '2.2'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: sidekiq
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '6.4'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '6.4'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
58
30
|
requirements:
|
59
31
|
- - ">="
|
60
32
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
type: :
|
33
|
+
version: '6.5'
|
34
|
+
type: :runtime
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
38
|
- - ">="
|
67
39
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description:
|
40
|
+
version: '6.5'
|
41
|
+
description:
|
70
42
|
email:
|
71
43
|
- alexey@zapparov.com
|
72
44
|
executables: []
|
73
45
|
extensions: []
|
74
46
|
extra_rdoc_files: []
|
75
47
|
files:
|
76
|
-
-
|
77
|
-
-
|
78
|
-
- ".github/workflows/ci.yml"
|
79
|
-
- ".gitignore"
|
80
|
-
- ".rspec"
|
81
|
-
- ".rubocop.yml"
|
82
|
-
- ".rubocop_todo.yml"
|
83
|
-
- ".travis.yml"
|
84
|
-
- ".yardopts"
|
85
|
-
- Appraisals
|
86
|
-
- CHANGES.md
|
87
|
-
- Gemfile
|
88
|
-
- Guardfile
|
89
|
-
- LICENSE.md
|
90
|
-
- README.md
|
91
|
-
- Rakefile
|
92
|
-
- gemfiles/sidekiq_6.4.gemfile
|
93
|
-
- gemfiles/sidekiq_6.5.gemfile
|
48
|
+
- LICENSE
|
49
|
+
- README.adoc
|
94
50
|
- lib/sidekiq/throttled.rb
|
95
|
-
- lib/sidekiq/throttled/
|
96
|
-
- lib/sidekiq/throttled/communicator/callbacks.rb
|
97
|
-
- lib/sidekiq/throttled/communicator/exception_handler.rb
|
98
|
-
- lib/sidekiq/throttled/communicator/listener.rb
|
51
|
+
- lib/sidekiq/throttled/basic_fetch.rb
|
99
52
|
- lib/sidekiq/throttled/configuration.rb
|
100
53
|
- lib/sidekiq/throttled/errors.rb
|
101
|
-
- lib/sidekiq/throttled/expirable_list.rb
|
102
54
|
- lib/sidekiq/throttled/fetch.rb
|
103
|
-
- lib/sidekiq/throttled/fetch/unit_of_work.rb
|
104
55
|
- lib/sidekiq/throttled/job.rb
|
105
56
|
- lib/sidekiq/throttled/middleware.rb
|
106
|
-
- lib/sidekiq/throttled/patches/queue.rb
|
107
|
-
- lib/sidekiq/throttled/queue_name.rb
|
108
|
-
- lib/sidekiq/throttled/queues_pauser.rb
|
109
57
|
- lib/sidekiq/throttled/registry.rb
|
110
58
|
- lib/sidekiq/throttled/strategy.rb
|
111
59
|
- lib/sidekiq/throttled/strategy/base.rb
|
@@ -114,27 +62,19 @@ files:
|
|
114
62
|
- lib/sidekiq/throttled/strategy/threshold.lua
|
115
63
|
- lib/sidekiq/throttled/strategy/threshold.rb
|
116
64
|
- lib/sidekiq/throttled/strategy_collection.rb
|
117
|
-
- lib/sidekiq/throttled/testing.rb
|
118
|
-
- lib/sidekiq/throttled/utils.rb
|
119
65
|
- lib/sidekiq/throttled/version.rb
|
120
66
|
- lib/sidekiq/throttled/web.rb
|
121
|
-
- lib/sidekiq/throttled/web/queues.html.erb
|
122
67
|
- lib/sidekiq/throttled/web/stats.rb
|
123
|
-
- lib/sidekiq/throttled/web/summary_fix.js
|
124
|
-
- lib/sidekiq/throttled/web/summary_fix.rb
|
125
68
|
- lib/sidekiq/throttled/web/throttled.html.erb
|
126
69
|
- lib/sidekiq/throttled/worker.rb
|
127
|
-
- rubocop/layout.yml
|
128
|
-
- rubocop/lint.yml
|
129
|
-
- rubocop/metrics.yml
|
130
|
-
- rubocop/performance.yml
|
131
|
-
- rubocop/rspec.yml
|
132
|
-
- rubocop/style.yml
|
133
|
-
- sidekiq-throttled.gemspec
|
134
70
|
homepage: https://github.com/ixti/sidekiq-throttled
|
135
71
|
licenses:
|
136
72
|
- MIT
|
137
73
|
metadata:
|
74
|
+
homepage_uri: https://github.com/ixti/sidekiq-throttled
|
75
|
+
source_code_uri: https://github.com/ixti/sidekiq-throttled/tree/v1.0.0.alpha
|
76
|
+
bug_tracker_uri: https://github.com/ixti/sidekiq-throttled/issues
|
77
|
+
changelog_uri: https://github.com/ixti/sidekiq-throttled/blob/v1.0.0.alpha/CHANGES.md
|
138
78
|
rubygems_mfa_required: 'true'
|
139
79
|
post_install_message:
|
140
80
|
rdoc_options: []
|
@@ -147,12 +87,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
87
|
version: '2.7'
|
148
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
89
|
requirements:
|
150
|
-
- - "
|
90
|
+
- - ">"
|
151
91
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
92
|
+
version: 1.3.1
|
153
93
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
94
|
+
rubygems_version: 3.4.10
|
155
95
|
signing_key:
|
156
96
|
specification_version: 4
|
157
|
-
summary: Concurrency and
|
97
|
+
summary: Concurrency and rate-limit throttling for Sidekiq
|
158
98
|
test_files: []
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
service_name: travis-ci
|
data/.github/dependabot.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
2
|
-
|
3
|
-
version: 2
|
4
|
-
updates:
|
5
|
-
- package-ecosystem: "github-actions"
|
6
|
-
directory: "/"
|
7
|
-
schedule:
|
8
|
-
interval: "daily"
|
9
|
-
- package-ecosystem: "bundler"
|
10
|
-
directory: "/"
|
11
|
-
schedule:
|
12
|
-
interval: "daily"
|
data/.github/workflows/ci.yml
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [ main ]
|
6
|
-
pull_request:
|
7
|
-
branches: [ main ]
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test:
|
11
|
-
name: "rspec (ruby:${{ matrix.ruby }} sidekiq:${{ matrix.sidekiq }})"
|
12
|
-
|
13
|
-
strategy:
|
14
|
-
fail-fast: false
|
15
|
-
matrix:
|
16
|
-
ruby: [ "2.7", "3.0", "3.1" ]
|
17
|
-
sidekiq: [ "6.4", "6.5" ]
|
18
|
-
|
19
|
-
runs-on: ubuntu-latest
|
20
|
-
|
21
|
-
services:
|
22
|
-
redis:
|
23
|
-
image: redis
|
24
|
-
ports: ["6379:6379"]
|
25
|
-
options: "--entrypoint redis-server"
|
26
|
-
|
27
|
-
env:
|
28
|
-
BUNDLE_GEMFILE: gemfiles/sidekiq_${{ matrix.sidekiq }}.gemfile
|
29
|
-
|
30
|
-
steps:
|
31
|
-
- uses: actions/checkout@v3
|
32
|
-
|
33
|
-
- uses: ruby/setup-ruby@v1
|
34
|
-
with:
|
35
|
-
ruby-version: ${{ matrix.ruby }}
|
36
|
-
bundler-cache: true
|
37
|
-
|
38
|
-
- name: bundle exec rspec
|
39
|
-
run: bundle exec rspec --format progress --force-colour
|
40
|
-
|
41
|
-
rubocop:
|
42
|
-
runs-on: ubuntu-latest
|
43
|
-
|
44
|
-
steps:
|
45
|
-
- uses: actions/checkout@v3
|
46
|
-
|
47
|
-
- uses: ruby/setup-ruby@v1
|
48
|
-
with:
|
49
|
-
ruby-version: "2.7"
|
50
|
-
bundler-cache: true
|
51
|
-
|
52
|
-
- run: bundle exec rubocop
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- rubocop-performance
|
3
|
-
- rubocop-rake
|
4
|
-
- rubocop-rspec
|
5
|
-
|
6
|
-
inherit_from:
|
7
|
-
- .rubocop_todo.yml
|
8
|
-
- rubocop/layout.yml
|
9
|
-
- rubocop/lint.yml
|
10
|
-
- rubocop/metrics.yml
|
11
|
-
- rubocop/performance.yml
|
12
|
-
- rubocop/rspec.yml
|
13
|
-
- rubocop/style.yml
|
14
|
-
|
15
|
-
AllCops:
|
16
|
-
Exclude:
|
17
|
-
- gemfiles/**/*
|
18
|
-
- vendor/**/*
|
19
|
-
NewCops: enable
|
20
|
-
TargetRubyVersion: 2.7
|
data/.rubocop_todo.yml
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2022-06-13 00:11:28 UTC using RuboCop version 1.30.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 3
|
10
|
-
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
11
|
-
Lint/EmptyBlock:
|
12
|
-
Exclude:
|
13
|
-
- 'spec/sidekiq/throttled/middleware_spec.rb'
|
14
|
-
- 'spec/sidekiq/throttled/registry_spec.rb'
|
15
|
-
|
16
|
-
# Offense count: 2
|
17
|
-
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
18
|
-
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
19
|
-
Naming/MemoizedInstanceVariableName:
|
20
|
-
Exclude:
|
21
|
-
- 'lib/sidekiq/throttled/communicator.rb'
|
22
|
-
- 'lib/sidekiq/throttled/queues_pauser.rb'
|
23
|
-
|
24
|
-
# Offense count: 2
|
25
|
-
Performance/MethodObjectAsBlock:
|
26
|
-
Exclude:
|
27
|
-
- 'lib/sidekiq/throttled/queues_pauser.rb'
|
28
|
-
|
29
|
-
# Offense count: 2
|
30
|
-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
31
|
-
# Include: **/*_spec*rb*, **/spec/**/*
|
32
|
-
RSpec/FilePath:
|
33
|
-
Exclude:
|
34
|
-
- 'spec/sidekiq/throttled/web/queues_spec.rb'
|
35
|
-
- 'spec/sidekiq/throttled/web/throttled_spec.rb'
|
36
|
-
|
37
|
-
# Offense count: 69
|
38
|
-
# Configuration parameters: .
|
39
|
-
# SupportedStyles: have_received, receive
|
40
|
-
RSpec/MessageSpies:
|
41
|
-
EnforcedStyle: receive
|
42
|
-
|
43
|
-
# Offense count: 22
|
44
|
-
RSpec/MultipleExpectations:
|
45
|
-
Max: 4
|
46
|
-
|
47
|
-
# Offense count: 7
|
48
|
-
# Configuration parameters: AllowSubject.
|
49
|
-
RSpec/MultipleMemoizedHelpers:
|
50
|
-
Max: 6
|
51
|
-
|
52
|
-
# Offense count: 46
|
53
|
-
RSpec/NestedGroups:
|
54
|
-
Max: 5
|
55
|
-
|
56
|
-
# Offense count: 5
|
57
|
-
RSpec/StubbedMock:
|
58
|
-
Exclude:
|
59
|
-
- 'spec/sidekiq/throttled/expirable_list_spec.rb'
|
60
|
-
- 'spec/sidekiq/throttled/fetch_spec.rb'
|
61
|
-
- 'spec/sidekiq/throttled/queues_pauser_spec.rb'
|
62
|
-
|
63
|
-
# Offense count: 6
|
64
|
-
RSpec/SubjectStub:
|
65
|
-
Exclude:
|
66
|
-
- 'spec/sidekiq/throttled/communicator_spec.rb'
|
67
|
-
- 'spec/sidekiq/throttled/fetch_spec.rb'
|
68
|
-
- 'spec/sidekiq/throttled/queues_pauser_spec.rb'
|
data/.travis.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
services:
|
4
|
-
- redis-server
|
5
|
-
|
6
|
-
cache: bundler
|
7
|
-
|
8
|
-
before_install:
|
9
|
-
- gem update --system
|
10
|
-
- gem --version
|
11
|
-
- gem install bundler
|
12
|
-
- bundle --version
|
13
|
-
# Install pahantomjs
|
14
|
-
- mkdir travis-phantomjs
|
15
|
-
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
|
16
|
-
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
|
17
|
-
- export PATH=$PWD/travis-phantomjs:$PATH
|
18
|
-
|
19
|
-
install: bundle install --without development
|
20
|
-
|
21
|
-
rvm:
|
22
|
-
- 2.4
|
23
|
-
- 2.5
|
24
|
-
- 2.6
|
25
|
-
- 2.7
|
26
|
-
|
27
|
-
matrix:
|
28
|
-
fast_finish: true
|
29
|
-
include:
|
30
|
-
-
|
31
|
-
rvm: 2.4
|
32
|
-
env: SUITE="rubocop"
|
33
|
-
gemfile: Gemfile
|
34
|
-
|
35
|
-
gemfile:
|
36
|
-
- gemfiles/sidekiq_6.4.gemfile
|
37
|
-
- gemfiles/sidekiq_6.5.gemfile
|
data/.yardopts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--no-private - LICENSE.md
|