sidekiq-tool 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3c4ac9cae16fe1f82eb99c7ac0a5cef5665bd674a4427ea300b12ae87ab95949
4
+ data.tar.gz: 2df092ce21c716affe3fcd3fcbe029b7b2a26b88620d831e5484ff332de356e3
5
+ SHA512:
6
+ metadata.gz: 587dd1162e05777f0d6e9bf4edb10f8468b4fd4ab5384d20c81d1634effcb2ee973f2c3ba58a448eae1ad5e630a7179f3179c2f11c91f5810ce281f33a0ccf1b
7
+ data.tar.gz: 987d08471d7d55d38ebffe80b33b093a78ccd8e137818cf9fd70253bda9aaf9c30648df8b26810bb9355336eaee9dabde62686759b3e957b1e5d58403b08f459
data/.rubocop.yml ADDED
@@ -0,0 +1,42 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+ NewCops: enable
4
+
5
+ Style/StringLiterals:
6
+ Enabled: true
7
+ EnforcedStyle: double_quotes
8
+
9
+ Style/StringLiteralsInInterpolation:
10
+ Enabled: true
11
+ EnforcedStyle: double_quotes
12
+
13
+ Style/TrailingCommaInArrayLiteral:
14
+ Enabled: true
15
+ EnforcedStyleForMultiline: comma
16
+
17
+ Style/TrailingCommaInHashLiteral:
18
+ Enabled: true
19
+ EnforcedStyleForMultiline: comma
20
+
21
+ Layout/LineLength:
22
+ Max: 120
23
+
24
+
25
+ Metrics/MethodLength:
26
+ Enabled: false
27
+
28
+ Metrics/AbcSize:
29
+ Enabled: false
30
+
31
+ Metrics/CyclomaticComplexity:
32
+ Enabled: false
33
+
34
+ Metrics/PerceivedComplexity:
35
+ Enabled: false
36
+
37
+ Metrics/BlockLength:
38
+ Enabled: false
39
+
40
+
41
+ Naming/MethodParameterName:
42
+ Enabled: false
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at andrey.zaikin@every-pay.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in sidekiq-tool.gemspec
6
+ gemspec
7
+
8
+ group :development, :test do
9
+ gem "rake", "~> 13.0"
10
+ gem "rubocop", "~> 1.21"
11
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sidekiq-tool (0.0.2)
5
+ redis
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ connection_pool (2.2.5)
12
+ json (2.6.2)
13
+ parallel (1.22.1)
14
+ parser (3.1.2.1)
15
+ ast (~> 2.4.1)
16
+ rainbow (3.1.1)
17
+ rake (13.0.6)
18
+ redis (5.0.2)
19
+ redis-client (~> 0.7)
20
+ redis-client (0.7.3)
21
+ connection_pool
22
+ regexp_parser (2.5.0)
23
+ rexml (3.2.5)
24
+ rubocop (1.36.0)
25
+ json (~> 2.3)
26
+ parallel (~> 1.10)
27
+ parser (>= 3.1.2.1)
28
+ rainbow (>= 2.2.2, < 4.0)
29
+ regexp_parser (>= 1.8, < 3.0)
30
+ rexml (>= 3.2.5, < 4.0)
31
+ rubocop-ast (>= 1.20.1, < 2.0)
32
+ ruby-progressbar (~> 1.7)
33
+ unicode-display_width (>= 1.4.0, < 3.0)
34
+ rubocop-ast (1.21.0)
35
+ parser (>= 3.1.1.0)
36
+ ruby-progressbar (1.11.0)
37
+ unicode-display_width (2.2.0)
38
+
39
+ PLATFORMS
40
+ arm64-darwin-21
41
+ x86_64-linux
42
+
43
+ DEPENDENCIES
44
+ rake (~> 13.0)
45
+ rubocop (~> 1.21)
46
+ sidekiq-tool!
47
+
48
+ BUNDLED WITH
49
+ 2.3.12
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Andrey "Zed" Zaikin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # Sidekiq::Tool
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sidekiq/tool`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add sidekiq-tool
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install sidekiq-tool
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+
25
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/zed-0xff/sidekiq-tool. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/zed-0xff/sidekiq-tool/blob/master/CODE_OF_CONDUCT.md).
30
+
31
+ ## License
32
+
33
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
34
+
35
+ ## Code of Conduct
36
+
37
+ Everyone interacting in the Sidekiq::Tool project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/zed-0xff/sidekiq-tool/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rubocop/rake_task"
5
+
6
+ RuboCop::RakeTask.new
7
+
8
+ task default: :rubocop
data/exe/sidekiq-tool ADDED
@@ -0,0 +1,267 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "json"
5
+ require "optparse"
6
+ require "redis"
7
+
8
+ @options = {
9
+ url: ENV.fetch("REDIS_URL", nil),
10
+ range: "0..-1",
11
+ jid: [],
12
+ job_class: [],
13
+ }
14
+
15
+ @commands = []
16
+
17
+ optparse = OptionParser.new do |opts|
18
+ opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} [options]"
19
+
20
+ opts.on("-u URL", "Redis URL (default: from REDIS_URL env var)") do |v|
21
+ @options[:url] = v
22
+ end
23
+
24
+ opts.on("-q QUEUE", "--queue", "apply next commands to specified queue") do |v|
25
+ @options[:queue] = v
26
+ end
27
+
28
+ opts.on("--jid JID", "(alias for --job-id)") do |v|
29
+ @options[:jid] << v
30
+ end
31
+ opts.on("--job-id JID", "(can be used multiple times)") do |v|
32
+ @options[:jid] << v
33
+ end
34
+ opts.on("--job-class CLASS", "(can be used multiple times)") do |v|
35
+ @options[:job_class] << v
36
+ end
37
+
38
+ opts.separator("")
39
+
40
+ opts.on("-l", "--list", "list queues (default)") do
41
+ @commands << [:list]
42
+ end
43
+
44
+ opts.on("-s", "--show [RANGE]",
45
+ "show contents of queue",
46
+ "see https://redis.io/commands/lrange/") do |v|
47
+ @commands << [:show, v || "0..-1"]
48
+ end
49
+
50
+ opts.on("-S", "--schedule", "show scheduled jobs (respects queue parameter)") do
51
+ @commands << [:schedule]
52
+ end
53
+ opts.on("-P", "--processes", "show processes (respects queue parameter)") do
54
+ @commands << [:processes]
55
+ end
56
+ opts.on("-R", "--running-jobs", "show currently running jobs (respects queue/jid/job-class)") do
57
+ @commands << [:jobs]
58
+ end
59
+
60
+ opts.separator("")
61
+
62
+ opts.on("--import-jobs", "add jobs from STDIN into queue") do
63
+ @commands << [:import_jobs]
64
+ end
65
+
66
+ opts.on("--move-jobs [N]", Integer, "atomically move jobs to another queue") do |v|
67
+ @commands << [:move_jobs, v]
68
+ end
69
+ opts.on("-Q QUEUE", "--dst-queue", "destination queue") do |v|
70
+ @options[:dst_queue] = v
71
+ end
72
+
73
+ opts.separator("\nDestructive commands: (require confirmations)")
74
+
75
+ opts.on("--delete-jobs [N]", Integer,
76
+ "N limits number of jobs to delete, 0 (default) = delete all",
77
+ "respects --job-id and --job-class parameters") do |v|
78
+ @commands << [:delete_jobs, v]
79
+ end
80
+ opts.on("--export-jobs [N]", Integer, "same as delete, but job data is written to STDOUT beforehead") do |v|
81
+ @commands << [:export_jobs, v]
82
+ end
83
+ opts.on("--delete-queue", "deletes ALL jobs from queue") do
84
+ @commands << [:delete_queue]
85
+ end
86
+
87
+ opts.separator("")
88
+
89
+ opts.on("--confirm-delete-jobs", "jobs will not be deleted without this option") do
90
+ @options[:confirm_delete_jobs] = true
91
+ end
92
+ opts.on("--confirm-export-jobs") do
93
+ @options[:confirm_export_jobs] = true
94
+ end
95
+ opts.on("--confirm-queue-delete", "queue will not be deleted without this option") do
96
+ @options[:confirm_queue_delete] = true
97
+ end
98
+
99
+ opts.separator("")
100
+
101
+ opts.on("-W", "--omit-weight", "Omit weight from schedule output (easier to parse)") do
102
+ @options[:omit_weight] = true
103
+ end
104
+ opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
105
+ @options[:verbose] = v
106
+ end
107
+ opts.on("-k", "Bypass SSL verification (for debug/dev)") do
108
+ @options[:ssl_params] = { verify_mode: OpenSSL::SSL::VERIFY_NONE }
109
+ end
110
+ end
111
+ optparse.parse!
112
+
113
+ if @commands.empty?
114
+ puts optparse.help
115
+ exit
116
+ end
117
+
118
+ @redis = Redis.new url: @options[:url], ssl_params: @options[:ssl_params]
119
+
120
+ def queue_name
121
+ @options[:queue] || raise("no queue name set!")
122
+ end
123
+
124
+ def dst_queue_name
125
+ @options[:dst_queue] || raise("no destination queue name set!")
126
+ end
127
+
128
+ def list
129
+ @redis.keys("queue:*").each do |key|
130
+ queue_name = key.sub(/^queue:/, "")
131
+ puts queue_name
132
+ end
133
+ end
134
+
135
+ def show(range)
136
+ range = range.split("..").map(&:to_i)
137
+ puts @redis.lrange("queue:#{queue_name}", *range).join("\n")
138
+ end
139
+
140
+ def delete_queue
141
+ unless @options[:confirm_queue_delete]
142
+ warn "[!] cannot delete queue without confirmation"
143
+ exit 1
144
+ end
145
+ @redis.del "queue:#{queue_name}"
146
+ end
147
+
148
+ def _process_jobs(n)
149
+ if @options[:jid].empty? && @options[:job_class].empty? && n.to_i.zero?
150
+ warn "[!] add N or --job-id or --job-class"
151
+ exit 1
152
+ end
153
+ ndeleted = 0
154
+ n = Float::INFINITY if n.nil? || n.zero?
155
+ # TODO: select in chunks
156
+ @redis.lrange("queue:#{queue_name}", 0, -1).each do |jobdata|
157
+ job = JSON.parse(jobdata)
158
+ next if @options[:jid].any? && !@options[:jid].include?(job["jid"])
159
+ next if @options[:job_class].any? && !@options[:job_class].include?(job["class"])
160
+
161
+ ndeleted += @redis.lrem("queue:#{queue_name}", 1, jobdata).to_i
162
+ yield jobdata if block_given?
163
+ break if ndeleted >= n
164
+ end
165
+ ndeleted
166
+ end
167
+
168
+ def delete_jobs(n)
169
+ unless @options[:confirm_delete_jobs]
170
+ warn "[!] cannot delete jobs without confirmation"
171
+ exit 1
172
+ end
173
+ ndeleted = _process_jobs(n)
174
+ puts "[=] deleted #{ndeleted} jobs"
175
+ end
176
+
177
+ def export_jobs(n)
178
+ unless @options[:confirm_export_jobs]
179
+ warn "[!] cannot export jobs without confirmation"
180
+ exit 1
181
+ end
182
+ _process_jobs(n) do |jobdata|
183
+ puts jobdata
184
+ end
185
+ end
186
+
187
+ def import_jobs
188
+ n = 0
189
+ while (jobdata = gets)
190
+ jobdata.strip!
191
+ raise "invalid job format: #{jobdata.inspect}" unless jobdata =~ /^\{.+\}$/
192
+
193
+ @redis.rpush("queue:#{queue_name}", jobdata)
194
+ n += 1
195
+ end
196
+ puts "[=] imported #{n} jobs"
197
+ end
198
+
199
+ def move_jobs(n)
200
+ nmoved = _process_jobs(n) do |jobdata|
201
+ puts jobdata if @options[:verbose]
202
+ @redis.rpush("queue:#{dst_queue_name}", jobdata)
203
+ end
204
+ puts "[=] moved #{nmoved} jobs"
205
+ end
206
+
207
+ # can optionally accept queue/job_class/jid
208
+ def schedule
209
+ match = []
210
+ match << %("queue":"#{@options[:queue]}") if @options[:queue]
211
+ if @options[:job_class].size == 1
212
+ match << %("class":"#{@options[:job_class][0]}")
213
+ elsif @options[:job_class].size > 1
214
+ raise "multiple job classes filter TBD"
215
+ end
216
+ if @options[:jid].size == 1
217
+ match << %("jid":"#{@options[:jid][0]}")
218
+ elsif @options[:jid].size > 1
219
+ raise "multiple job ids filter TBD"
220
+ end
221
+ match = match.any? ? "*#{match.join("*")}*" : nil
222
+ @redis.zscan_each("schedule", count: 1000, match: match).each do |sdata, weight|
223
+ if @options[:omit_weight]
224
+ puts sdata
225
+ else
226
+ puts "[#{sdata}, #{weight}]"
227
+ end
228
+ end
229
+ end
230
+
231
+ # slowest!
232
+ def processes
233
+ @redis.smembers("processes").each do |pid|
234
+ r = @redis.hgetall pid
235
+ r["info"] = JSON.parse(r["info"])
236
+ if @options[:queue]
237
+ queues = r.dig("info", "queues")
238
+ next unless queues&.include?(@options[:queue])
239
+ end
240
+ r["workers"] = @redis.hgetall("#{pid}:workers")&.transform_values { |x| JSON.parse(x) }
241
+ puts r.to_json
242
+ $stdout.flush # makes grepping faster
243
+ end
244
+ end
245
+
246
+ # slow!
247
+ def jobs
248
+ @redis.smembers("processes").each do |pid|
249
+ workers = @redis.hgetall("#{pid}:workers")
250
+ next unless workers
251
+
252
+ workers.each_value do |wdata|
253
+ wdata = JSON.parse(wdata)
254
+ payload = JSON.parse(wdata["payload"])
255
+ next if @options[:queue] && payload["queue"] != @options[:queue]
256
+ next if @options[:jid].any? && !@options[:jid].include?(payload["jid"])
257
+ next if @options[:job_class].any? && !@options[:job_class].include?(payload["class"])
258
+
259
+ puts payload.to_json
260
+ $stdout.flush # makes grepping faster
261
+ end
262
+ end
263
+ end
264
+
265
+ @commands.each do |cmd|
266
+ send cmd[0], *cmd[1..]
267
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sidekiq
4
+ module Tool
5
+ VERSION = "0.0.2"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "tool/version"
4
+
5
+ module Sidekiq
6
+ module Tool
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
10
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/sidekiq/tool/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "sidekiq-tool"
7
+ spec.version = Sidekiq::Tool::VERSION
8
+ spec.authors = ["Andrey \"Zed\" Zaikin"]
9
+ spec.email = ["andrey.zaikin@every-pay.com"]
10
+
11
+ spec.summary = "swiss-army knife for tinkering with sidekiq guts"
12
+ spec.homepage = "https://github.com/zed-0xff/sidekiq-tool"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = spec.homepage
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(__dir__) do
22
+ `git ls-files -z`.split("\x0").reject do |f|
23
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
24
+ end
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_dependency "redis"
31
+
32
+ # For more information and examples about making a new gem, check out our
33
+ # guide at: https://bundler.io/guides/creating_gem.html
34
+ spec.metadata["rubygems_mfa_required"] = "true"
35
+ end
@@ -0,0 +1,6 @@
1
+ module Sidekiq
2
+ module Tool
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sidekiq-tool
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Andrey "Zed" Zaikin
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-09-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: redis
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
+ description:
28
+ email:
29
+ - andrey.zaikin@every-pay.com
30
+ executables:
31
+ - sidekiq-tool
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".rubocop.yml"
36
+ - CODE_OF_CONDUCT.md
37
+ - Gemfile
38
+ - Gemfile.lock
39
+ - LICENSE
40
+ - README.md
41
+ - Rakefile
42
+ - exe/sidekiq-tool
43
+ - lib/sidekiq/tool.rb
44
+ - lib/sidekiq/tool/version.rb
45
+ - sidekiq-tool.gemspec
46
+ - sig/sidekiq/tool.rbs
47
+ homepage: https://github.com/zed-0xff/sidekiq-tool
48
+ licenses:
49
+ - MIT
50
+ metadata:
51
+ homepage_uri: https://github.com/zed-0xff/sidekiq-tool
52
+ source_code_uri: https://github.com/zed-0xff/sidekiq-tool
53
+ rubygems_mfa_required: 'true'
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.6.0
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubygems_version: 3.3.7
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: swiss-army knife for tinkering with sidekiq guts
73
+ test_files: []