yabeda-sidekiq 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d63d31846975b74ec0fc5a7209b8b405065c52ff49074bcad1f36d92bb97e36
4
- data.tar.gz: 3bd52a1b15a38d2fb80df6e54d9b702311e9311f37b04f5622e6c2b92411b768
3
+ metadata.gz: 3a429f27fdff4c0295a99045e54af89fac47d0ed6bcae3e13988c1c1b811e8b0
4
+ data.tar.gz: 6508f78bfc9d19697b688fef975c82de7be3177ee05df1aceea9befc0e271b6f
5
5
  SHA512:
6
- metadata.gz: '05919789943b693dcc75c7b3b50a6594b924f4703affdffac32720fae69b8cb1de0e3a9818301c16edc8d7b08c57e6431474ebce66d81fa5ca5a33805846ea46'
7
- data.tar.gz: 17699edb8dc44c6ee0a7a89c0488253af8dbbb978f012e8d5c828c180e59644c82092f03dad5c517cf973c79853d167ec56c1da266b0e2de6b1c555b7ce05876
6
+ metadata.gz: 127a4ffc2ad85ac7f472dc4de218df07be1612b05c145ceb8edc14c14cbb31390e45c1608a676c03bcfa927fe2a1398f7d2855731ee4d42a547388e8f45d975c
7
+ data.tar.gz: 362af4e3b0058f6d8453a0f8fc19ee81ce2963f285a5a82aafbfc4e7f09ae5a73ce5b73ccdfe044b60c83c31a9ce5a9408b9a07852d57c0dd5e51cb671abd642
data/CHANGELOG.md CHANGED
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.12.0 - 2024-03-08
11
+
12
+ ### Added
13
+
14
+ - Optional capture of error class for failed jobs counter.
15
+
16
+ Set `label_for_error_class_on_sidekiq_jobs_failed` to `true` to add `error` label to `sidekiq_jobs_failed_total` metric.
17
+
18
+ Pull request [#34](https://github.com/yabeda-rb/yabeda-sidekiq/pull/34) by [@niborg]
19
+
20
+ ### Changed
21
+
22
+ - Stop including development-related files into packaged gem to avoid confusing users or software tools. [@Envek]
23
+
24
+ ## 0.11.0 - 2024-02-07
25
+
26
+ ### Added
27
+
28
+ - `retries_segmented_by_queue` configuration setting to allow segmentation of retry count by queue.
29
+
30
+ It is disabled by default as it requires to iterate over all jobs in the retry set and may be very slow if number of retries is huge.
31
+
32
+ Pull request [#32](https://github.com/yabeda-rb/yabeda-sidekiq/pull/32) by [@SxDx]
33
+
10
34
  ## 0.10.0 - 2022-10-25
11
35
 
12
36
  ### Added
@@ -119,3 +143,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
119
143
  [@asusikov]: https://github.com/asusikov "Alexander Susikov"
120
144
  [@mrexox]: https://github.com/mrexox "Valentine Kiselev"
121
145
  [@LukinEgor]: https://github.com/LukinEgor "Egor Lukin"
146
+ [@SxDx]: https://github.com/SxDx "René Koller"
147
+ [@niborg]: https://github.com/niborg "Nick Knipe"
data/README.md CHANGED
@@ -99,14 +99,16 @@ end
99
99
 
100
100
  Configuration is handled by [anyway_config] gem. With it you can load settings from environment variables (upcased and prefixed with `YABEDA_SIDEKIQ_`), YAML files, and other sources. See [anyway_config] docs for details.
101
101
 
102
- Config key | Type | Default | Description |
103
- ------------------------- | -------- | ------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------|
104
- `collect_cluster_metrics` | boolean | Enabled in Sidekiq worker processes, disabled otherwise | Defines whether this Ruby process should collect and expose metrics representing state of the whole Sidekiq installation (queues, processes, etc). |
105
- `declare_process_metrics` | boolean | Enabled in Sidekiq worker processes, disabled otherwise | Declare metrics that are only tracked inside worker process even outside of them. Useful for multiprocess metric collection. |
102
+ | Config key | Type | Default | Description |
103
+ |------------------------------------------------|---------|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
104
+ | `collect_cluster_metrics` | boolean | Enabled in Sidekiq worker processes, disabled otherwise | Defines whether this Ruby process should collect and expose metrics representing state of the whole Sidekiq installation (queues, processes, etc). |
105
+ | `declare_process_metrics` | boolean | Enabled in Sidekiq worker processes, disabled otherwise | Declare metrics that are only tracked inside worker process even outside of them. Useful for multiprocess metric collection. |
106
+ | `retries_segmented_by_queue` | boolean | Disabled | Defines wheter retries are segemented by queue or reported as a single metric |
107
+ | `label_for_error_class_on_sidekiq_jobs_failed` | boolean | Disabled | Defines whether `error` label should be added to `sidekiq_jobs_failed_total` metric. |
106
108
 
107
109
  # Roadmap (TODO or Help wanted)
108
110
 
109
- - Implement optional segmentation of retry/schedule/dead sets
111
+ - Implement optional segmentation of schedule/dead sets
110
112
 
111
113
  It should be disabled by default as it requires to iterate over all jobs in sets and may be very slow on large sets.
112
114
 
@@ -16,6 +16,13 @@ module Yabeda
16
16
 
17
17
  # Declare metrics that are only tracked inside worker process even outside them
18
18
  attr_config declare_process_metrics: ::Sidekiq.server?
19
+
20
+ # Retries are tracked by default as a single metric. If you want to track them separately for each queue, set this to +true+
21
+ # Disabled by default because it is quite slow if the retry set is large
22
+ attr_config retries_segmented_by_queue: false
23
+
24
+ # If set to true, an `:error` label will be added with name of the error class to all failed jobs
25
+ attr_config label_for_error_class_on_sidekiq_jobs_failed: false
19
26
  end
20
27
  end
21
28
  end
@@ -20,8 +20,10 @@ module Yabeda
20
20
  yield
21
21
  end
22
22
  Yabeda.sidekiq_jobs_success_total.increment(labels)
23
- rescue Exception # rubocop: disable Lint/RescueException
24
- Yabeda.sidekiq_jobs_failed_total.increment(labels)
23
+ rescue Exception => e # rubocop: disable Lint/RescueException
24
+ jobs_failed_labels = labels.dup
25
+ jobs_failed_labels[:error] = e.class.name if Yabeda::Sidekiq.config.label_for_error_class_on_sidekiq_jobs_failed
26
+ Yabeda.sidekiq_jobs_failed_total.increment(jobs_failed_labels)
25
27
  raise
26
28
  ensure
27
29
  Yabeda.sidekiq_job_runtime.measure(labels, elapsed(start))
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Sidekiq
5
- VERSION = "0.10.0"
5
+ VERSION = "0.12.0"
6
6
  end
7
7
  end
@@ -29,9 +29,11 @@ module Yabeda
29
29
  counter :jobs_rerouted_total, tags: %i[from_queue to_queue worker], comment: "A counter of the total number of rerouted jobs sidekiq enqueued."
30
30
 
31
31
  if config.declare_process_metrics # defaults to +::Sidekiq.server?+
32
+ failed_total_tags = config.label_for_error_class_on_sidekiq_jobs_failed ? %i[queue worker error] : %i[queue worker]
33
+
32
34
  counter :jobs_executed_total, tags: %i[queue worker], comment: "A counter of the total number of jobs sidekiq executed."
33
35
  counter :jobs_success_total, tags: %i[queue worker], comment: "A counter of the total number of jobs successfully processed by sidekiq."
34
- counter :jobs_failed_total, tags: %i[queue worker], comment: "A counter of the total number of jobs failed in sidekiq."
36
+ counter :jobs_failed_total, tags: failed_total_tags, comment: "A counter of the total number of jobs failed in sidekiq."
35
37
 
36
38
  gauge :running_job_runtime, tags: %i[queue worker], aggregation: :max, unit: :seconds,
37
39
  comment: "How long currently running jobs are running (useful for detection of hung jobs)"
@@ -49,13 +51,16 @@ module Yabeda
49
51
  # Metrics not specific for current Sidekiq process, but representing state of the whole Sidekiq installation (queues, processes, etc)
50
52
  # You can opt-out from collecting these by setting YABEDA_SIDEKIQ_COLLECT_CLUSTER_METRICS to falsy value (+no+ or +false+)
51
53
  if config.collect_cluster_metrics # defaults to +::Sidekiq.server?+
52
- gauge :jobs_waiting_count, tags: %i[queue], aggregation: :most_recent, comment: "The number of jobs waiting to process in sidekiq."
53
- gauge :active_workers_count, tags: [], aggregation: :most_recent, comment: "The number of currently running machines with sidekiq workers."
54
- gauge :jobs_scheduled_count, tags: [], aggregation: :most_recent, comment: "The number of jobs scheduled for later execution."
55
- gauge :jobs_retry_count, tags: [], aggregation: :most_recent, comment: "The number of failed jobs waiting to be retried"
56
- gauge :jobs_dead_count, tags: [], aggregation: :most_recent, comment: "The number of jobs exceeded their retry count."
57
- gauge :active_processes, tags: [], aggregation: :most_recent, comment: "The number of active Sidekiq worker processes."
58
- gauge :queue_latency, tags: %i[queue], aggregation: :most_recent,
54
+ retry_count_tags = config.retries_segmented_by_queue ? %i[queue] : []
55
+
56
+ gauge :jobs_waiting_count, tags: %i[queue], aggregation: :most_recent, comment: "The number of jobs waiting to process in sidekiq."
57
+ gauge :active_workers_count, tags: [], aggregation: :most_recent,
58
+ comment: "The number of currently running machines with sidekiq workers."
59
+ gauge :jobs_scheduled_count, tags: [], aggregation: :most_recent, comment: "The number of jobs scheduled for later execution."
60
+ gauge :jobs_retry_count, tags: retry_count_tags, aggregation: :most_recent, comment: "The number of failed jobs waiting to be retried"
61
+ gauge :jobs_dead_count, tags: [], aggregation: :most_recent, comment: "The number of jobs exceeded their retry count."
62
+ gauge :active_processes, tags: [], aggregation: :most_recent, comment: "The number of active Sidekiq worker processes."
63
+ gauge :queue_latency, tags: %i[queue], aggregation: :most_recent,
59
64
  comment: "The queue latency, the difference in seconds since the oldest job in the queue was enqueued"
60
65
  end
61
66
 
@@ -73,21 +78,22 @@ module Yabeda
73
78
  sidekiq_jobs_scheduled_count.set({}, stats.scheduled_size)
74
79
  sidekiq_jobs_dead_count.set({}, stats.dead_size)
75
80
  sidekiq_active_processes.set({}, stats.processes_size)
76
- sidekiq_jobs_retry_count.set({}, stats.retry_size)
77
81
 
78
82
  ::Sidekiq::Queue.all.each do |queue|
79
83
  sidekiq_queue_latency.set({ queue: queue.name }, queue.latency)
80
84
  end
81
85
 
82
- # That is quite slow if your retry set is large
83
- # I don't want to enable it by default
84
- # retries_by_queues =
85
- # ::Sidekiq::RetrySet.new.each_with_object(Hash.new(0)) do |job, cntr|
86
- # cntr[job["queue"]] += 1
87
- # end
88
- # retries_by_queues.each do |queue, count|
89
- # sidekiq_jobs_retry_count.set({ queue: queue }, count)
90
- # end
86
+ if config.retries_segmented_by_queue
87
+ retries_by_queues =
88
+ ::Sidekiq::RetrySet.new.each_with_object(Hash.new(0)) do |job, cntr|
89
+ cntr[job["queue"]] += 1
90
+ end
91
+ retries_by_queues.each do |queue, count|
92
+ sidekiq_jobs_retry_count.set({ queue: queue }, count)
93
+ end
94
+ else
95
+ sidekiq_jobs_retry_count.set({}, stats.retry_size)
96
+ end
91
97
  end
92
98
  end
93
99
 
@@ -112,11 +118,7 @@ module Yabeda
112
118
  end
113
119
 
114
120
  def worker_class(worker, job)
115
- if defined?(ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper)
116
- if worker.is_a?(ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper) || worker == ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper
117
- return job["wrapped"].to_s
118
- end
119
- end
121
+ worker = job["wrapped"] || worker
120
122
  (worker.is_a?(String) || worker.is_a?(Class) ? worker : worker.class).to_s
121
123
  end
122
124
 
@@ -15,8 +15,13 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = "https://github.com/yabeda-rb/yabeda-sidekiq"
16
16
  spec.license = "MIT"
17
17
 
18
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
- f.match(%r{^(test|spec|features)/})
18
+ spec.metadata["homepage_uri"] = spec.homepage
19
+ spec.metadata["source_code_uri"] = spec.homepage
20
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
21
+ spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ f.match(%r{^(\.|bin/|spec/|tmp/|Gemfile|Rakefile|yabeda-sidekiq-logo\.png)})
20
25
  end
21
26
  spec.bindir = "exe"
22
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2024-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config
@@ -122,30 +122,23 @@ executables: []
122
122
  extensions: []
123
123
  extra_rdoc_files: []
124
124
  files:
125
- - ".github/workflows/build-release.yml"
126
- - ".github/workflows/lint.yml"
127
- - ".github/workflows/test.yml"
128
- - ".gitignore"
129
- - ".rspec"
130
- - ".rubocop.yml"
131
125
  - CHANGELOG.md
132
- - Gemfile
133
126
  - LICENSE.txt
134
127
  - README.md
135
- - Rakefile
136
- - bin/console
137
- - bin/setup
138
128
  - lib/yabeda/sidekiq.rb
139
129
  - lib/yabeda/sidekiq/client_middleware.rb
140
130
  - lib/yabeda/sidekiq/config.rb
141
131
  - lib/yabeda/sidekiq/server_middleware.rb
142
132
  - lib/yabeda/sidekiq/version.rb
143
- - yabeda-sidekiq-logo.png
144
133
  - yabeda-sidekiq.gemspec
145
134
  homepage: https://github.com/yabeda-rb/yabeda-sidekiq
146
135
  licenses:
147
136
  - MIT
148
- metadata: {}
137
+ metadata:
138
+ homepage_uri: https://github.com/yabeda-rb/yabeda-sidekiq
139
+ source_code_uri: https://github.com/yabeda-rb/yabeda-sidekiq
140
+ changelog_uri: https://github.com/yabeda-rb/yabeda-sidekiq/blob/master/CHANGELOG.md
141
+ bug_tracker_uri: https://github.com/yabeda-rb/yabeda-sidekiq/issues
149
142
  post_install_message:
150
143
  rdoc_options: []
151
144
  require_paths:
@@ -161,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
154
  - !ruby/object:Gem::Version
162
155
  version: '0'
163
156
  requirements: []
164
- rubygems_version: 3.1.6
157
+ rubygems_version: 3.5.3
165
158
  signing_key:
166
159
  specification_version: 4
167
160
  summary: Extensible Prometheus exporter for monitoring your Sidekiq
@@ -1,82 +0,0 @@
1
- name: Build and release gem to RubyGems
2
-
3
- on:
4
- push:
5
- tags:
6
- - v*
7
-
8
- jobs:
9
- release:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v2
13
- with:
14
- fetch-depth: 0 # Fetch current tag as annotated. See https://github.com/actions/checkout/issues/290
15
- - uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: 2.7
18
- - name: "Extract data from tag: version, message, body"
19
- id: tag
20
- run: |
21
- git fetch --tags --force # Really fetch annotated tag. See https://github.com/actions/checkout/issues/290#issuecomment-680260080
22
- echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
23
- echo ::set-output name=subject::$(git for-each-ref $GITHUB_REF --format='%(contents:subject)')
24
- BODY="$(git for-each-ref $GITHUB_REF --format='%(contents:body)')"
25
- # Extract changelog entries between this and previous version headers
26
- escaped_version=$(echo ${GITHUB_REF#refs/tags/v} | sed -e 's/[]\/$*.^[]/\\&/g')
27
- changelog=$(awk "BEGIN{inrelease=0} /## ${escaped_version}/{inrelease=1;next} /## [0-9]+\.[0-9]+\.[0-9]+/{inrelease=0;exit} {if (inrelease) print}" CHANGELOG.md)
28
- # Multiline body for release. See https://github.community/t/set-output-truncates-multiline-strings/16852/5
29
- BODY="${BODY}"$'\n'"${changelog}"
30
- BODY="${BODY//'%'/'%25'}"
31
- BODY="${BODY//$'\n'/'%0A'}"
32
- BODY="${BODY//$'\r'/'%0D'}"
33
- echo "::set-output name=body::$BODY"
34
- # Add pre-release option if tag name has any suffix after vMAJOR.MINOR.PATCH
35
- if [[ ${GITHUB_REF#refs/tags/} =~ ^v[0-9]+\.[0-9]+\.[0-9]+.+ ]]; then
36
- echo ::set-output name=prerelease::true
37
- fi
38
- - name: Build gem
39
- run: gem build
40
- - name: Calculate checksums
41
- run: sha256sum yabeda-sidekiq-${{ steps.tag.outputs.version }}.gem > SHA256SUM
42
- - name: Check version
43
- run: ls -l yabeda-sidekiq-${{ steps.tag.outputs.version }}.gem
44
- - name: Create Release
45
- id: create_release
46
- uses: actions/create-release@v1
47
- env:
48
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
- with:
50
- tag_name: ${{ github.ref }}
51
- release_name: ${{ steps.tag.outputs.subject }}
52
- body: ${{ steps.tag.outputs.body }}
53
- draft: false
54
- prerelease: ${{ steps.tag.outputs.prerelease }}
55
- - name: Upload built gem as release asset
56
- uses: actions/upload-release-asset@v1
57
- env:
58
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59
- with:
60
- upload_url: ${{ steps.create_release.outputs.upload_url }}
61
- asset_path: yabeda-sidekiq-${{ steps.tag.outputs.version }}.gem
62
- asset_name: yabeda-sidekiq-${{ steps.tag.outputs.version }}.gem
63
- asset_content_type: application/x-tar
64
- - name: Upload checksums as release asset
65
- uses: actions/upload-release-asset@v1
66
- env:
67
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68
- with:
69
- upload_url: ${{ steps.create_release.outputs.upload_url }}
70
- asset_path: SHA256SUM
71
- asset_name: SHA256SUM
72
- asset_content_type: text/plain
73
- - name: Publish to GitHub packages
74
- env:
75
- GEM_HOST_API_KEY: Bearer ${{ secrets.GITHUB_TOKEN }}
76
- run: |
77
- gem push yabeda-sidekiq-${{ steps.tag.outputs.version }}.gem --host https://rubygems.pkg.github.com/${{ github.repository_owner }}
78
- - name: Publish to RubyGems
79
- env:
80
- GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_API_KEY }}"
81
- run: |
82
- gem push yabeda-sidekiq-${{ steps.tag.outputs.version }}.gem
@@ -1,25 +0,0 @@
1
- name: Lint
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches:
7
- - '**'
8
- tags-ignore:
9
- - 'v*'
10
-
11
- jobs:
12
- rubocop:
13
- # Skip running tests for local pull requests (use push event instead), run only for foreign ones
14
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
15
- name: RuboCop
16
- runs-on: ubuntu-latest
17
- steps:
18
- - uses: actions/checkout@v2
19
- - uses: ruby/setup-ruby@v1
20
- with:
21
- ruby-version: "3.0"
22
- bundler-cache: true
23
- - name: Lint Ruby code with RuboCop
24
- run: |
25
- bundle exec rubocop
@@ -1,47 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches:
7
- - '**'
8
- tags-ignore:
9
- - 'v*'
10
-
11
- jobs:
12
- test:
13
- name: 'Ruby ${{ matrix.ruby }}'
14
- # Skip running tests for local pull requests (use push event instead), run only for foreign ones
15
- if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
16
- runs-on: ubuntu-latest
17
- strategy:
18
- fail-fast: false
19
- matrix:
20
- include:
21
- - ruby: '3.1'
22
- - ruby: '3.0'
23
- - ruby: '2.7'
24
- - ruby: '2.6'
25
- - ruby: '2.5'
26
- container:
27
- image: ruby:${{ matrix.ruby }}
28
- env:
29
- CI: true
30
- steps:
31
- - uses: actions/checkout@v2
32
- - uses: actions/cache@v2
33
- with:
34
- path: vendor/bundle
35
- key: bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
36
- restore-keys: |
37
- bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
38
- bundle-${{ matrix.ruby }}-
39
- - name: Upgrade Bundler to 2.0 (for older Rubies)
40
- run: gem install bundler -v '~> 2.0'
41
- - name: Bundle install
42
- run: |
43
- bundle config path vendor/bundle
44
- bundle install
45
- bundle update
46
- - name: Run RSpec
47
- run: bundle exec rspec
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- Gemfile.lock
10
-
11
- # rspec failure tracking
12
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,67 +0,0 @@
1
- ---
2
- require:
3
- - rubocop-rspec
4
-
5
- AllCops:
6
- TargetRubyVersion: 2.3
7
-
8
- Metrics/BlockLength:
9
- Enabled: false
10
- Exclude:
11
- - "Gemfile"
12
- - "spec/**/*"
13
-
14
- Layout/LineLength:
15
- Max: 160
16
-
17
- Style/StringLiterals:
18
- EnforcedStyle: double_quotes
19
-
20
- # Allow to use let!
21
- RSpec/LetSetup:
22
- Enabled: false
23
-
24
- RSpec/MultipleExpectations:
25
- Enabled: false
26
-
27
- Bundler/OrderedGems:
28
- Enabled: false
29
-
30
- Style/TrailingCommaInArguments:
31
- Description: 'Checks for trailing comma in argument lists.'
32
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
33
- Enabled: true
34
- EnforcedStyleForMultiline: consistent_comma
35
-
36
- Style/TrailingCommaInArrayLiteral:
37
- Description: 'Checks for trailing comma in array literals.'
38
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
39
- Enabled: true
40
- EnforcedStyleForMultiline: consistent_comma
41
-
42
- Style/TrailingCommaInHashLiteral:
43
- Description: 'Checks for trailing comma in hash literals.'
44
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
45
- Enabled: true
46
- EnforcedStyleForMultiline: consistent_comma
47
-
48
- Style/HashEachMethods:
49
- Enabled: true
50
-
51
- Style/HashTransformKeys:
52
- Enabled: true
53
-
54
- Style/HashTransformValues:
55
- Enabled: true
56
-
57
- RSpec/ExampleLength:
58
- Enabled: false
59
-
60
- Style/Documentation:
61
- Enabled: false
62
-
63
- Metrics/MethodLength:
64
- Max: 15
65
-
66
- Metrics/AbcSize:
67
- Max: 17
data/Gemfile DELETED
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
-
7
- # Specify your gem's dependencies in yabeda-sidekiq.gemspec
8
- gemspec
9
-
10
- group :development, :test do
11
- gem "pry"
12
- gem "pry-byebug", platform: :mri
13
-
14
- gem "rubocop", "~> 0.80.0"
15
- gem "rubocop-rspec"
16
- end
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
- require "rubocop/rake_task"
6
-
7
- RuboCop::RakeTask.new
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
-
11
- task default: %i[rubocop spec]
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "yabeda/sidekiq"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
Binary file