shoryuken 6.2.1 → 7.0.2
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/.github/workflows/push.yml +36 -0
- data/.github/workflows/specs.yml +49 -44
- data/.github/workflows/verify-action-pins.yml +16 -0
- data/.gitignore +4 -1
- data/.rspec +3 -1
- data/.rubocop.yml +6 -1
- data/.ruby-version +1 -0
- data/.yard-lint.yml +279 -0
- data/CHANGELOG.md +308 -139
- data/Gemfile +1 -8
- data/Gemfile.lint +9 -0
- data/Gemfile.lint.lock +69 -0
- data/README.md +16 -33
- data/Rakefile +6 -10
- data/bin/clean_sqs +52 -0
- data/bin/cli/base.rb +22 -2
- data/bin/cli/sqs.rb +74 -7
- data/bin/integrations +275 -0
- data/bin/scenario +154 -0
- data/bin/shoryuken +3 -2
- data/docker-compose.yml +6 -0
- data/lib/{shoryuken/extensions/active_job_extensions.rb → active_job/extensions.rb} +20 -6
- data/lib/active_job/queue_adapters/shoryuken_adapter.rb +208 -0
- data/lib/active_job/queue_adapters/shoryuken_concurrent_send_adapter.rb +78 -0
- data/lib/shoryuken/active_job/current_attributes.rb +139 -0
- data/lib/shoryuken/active_job/job_wrapper.rb +28 -0
- data/lib/shoryuken/body_parser.rb +11 -1
- data/lib/shoryuken/client.rb +16 -0
- data/lib/shoryuken/default_exception_handler.rb +11 -0
- data/lib/shoryuken/default_worker_registry.rb +39 -11
- data/lib/shoryuken/environment_loader.rb +85 -15
- data/lib/shoryuken/errors.rb +36 -0
- data/lib/shoryuken/fetcher.rb +41 -3
- data/lib/shoryuken/helpers/atomic_boolean.rb +58 -0
- data/lib/shoryuken/helpers/atomic_counter.rb +104 -0
- data/lib/shoryuken/helpers/atomic_hash.rb +182 -0
- data/lib/shoryuken/helpers/hash_utils.rb +56 -0
- data/lib/shoryuken/helpers/string_utils.rb +65 -0
- data/lib/shoryuken/helpers/timer_task.rb +80 -0
- data/lib/shoryuken/inline_message.rb +22 -0
- data/lib/shoryuken/launcher.rb +55 -0
- data/lib/shoryuken/logging/base.rb +26 -0
- data/lib/shoryuken/logging/pretty.rb +25 -0
- data/lib/shoryuken/logging/without_timestamp.rb +25 -0
- data/lib/shoryuken/logging.rb +43 -15
- data/lib/shoryuken/manager.rb +84 -5
- data/lib/shoryuken/message.rb +116 -1
- data/lib/shoryuken/middleware/chain.rb +141 -43
- data/lib/shoryuken/middleware/entry.rb +30 -0
- data/lib/shoryuken/middleware/server/active_record.rb +10 -0
- data/lib/shoryuken/middleware/server/auto_delete.rb +12 -0
- data/lib/shoryuken/middleware/server/auto_extend_visibility.rb +37 -11
- data/lib/shoryuken/middleware/server/exponential_backoff_retry.rb +34 -3
- data/lib/shoryuken/middleware/server/non_retryable_exception.rb +95 -0
- data/lib/shoryuken/middleware/server/timing.rb +13 -0
- data/lib/shoryuken/options.rb +154 -13
- data/lib/shoryuken/polling/base_strategy.rb +127 -0
- data/lib/shoryuken/polling/queue_configuration.rb +103 -0
- data/lib/shoryuken/polling/strict_priority.rb +41 -0
- data/lib/shoryuken/polling/weighted_round_robin.rb +44 -0
- data/lib/shoryuken/processor.rb +37 -3
- data/lib/shoryuken/queue.rb +99 -8
- data/lib/shoryuken/runner.rb +54 -16
- data/lib/shoryuken/util.rb +32 -7
- data/lib/shoryuken/version.rb +4 -1
- data/lib/shoryuken/worker/default_executor.rb +23 -1
- data/lib/shoryuken/worker/inline_executor.rb +33 -2
- data/lib/shoryuken/worker.rb +224 -0
- data/lib/shoryuken/worker_registry.rb +35 -0
- data/lib/shoryuken.rb +27 -38
- data/renovate.json +62 -0
- data/shoryuken.gemspec +8 -4
- data/spec/integration/.rspec +1 -0
- data/spec/integration/active_job/adapter_configuration/configuration_spec.rb +26 -0
- data/spec/integration/active_job/bulk_enqueue/bulk_enqueue_spec.rb +53 -0
- data/spec/integration/active_job/current_attributes/bulk_enqueue_spec.rb +50 -0
- data/spec/integration/active_job/current_attributes/complex_types_spec.rb +55 -0
- data/spec/integration/active_job/current_attributes/empty_context_spec.rb +41 -0
- data/spec/integration/active_job/current_attributes/full_context_spec.rb +63 -0
- data/spec/integration/active_job/current_attributes/partial_context_spec.rb +57 -0
- data/spec/integration/active_job/custom_attributes/number_attributes_spec.rb +37 -0
- data/spec/integration/active_job/custom_attributes/string_attributes_spec.rb +39 -0
- data/spec/integration/active_job/error_handling/job_wrapper_spec.rb +53 -0
- data/spec/integration/active_job/fifo_and_attributes/deduplication_spec.rb +86 -0
- data/spec/integration/active_job/keyword_arguments/keyword_arguments_spec.rb +63 -0
- data/spec/integration/active_job/retry/discard_on_spec.rb +43 -0
- data/spec/integration/active_job/retry/retry_on_spec.rb +36 -0
- data/spec/integration/active_job/roundtrip/roundtrip_spec.rb +52 -0
- data/spec/integration/active_job/scheduled/scheduled_spec.rb +76 -0
- data/spec/integration/active_record_middleware/active_record_middleware_spec.rb +84 -0
- data/spec/integration/auto_delete/auto_delete_spec.rb +53 -0
- data/spec/integration/auto_extend_visibility/auto_extend_visibility_spec.rb +57 -0
- data/spec/integration/aws_config/aws_config_spec.rb +59 -0
- data/spec/integration/batch_processing/batch_processing_spec.rb +37 -0
- data/spec/integration/body_parser/json_parser_spec.rb +45 -0
- data/spec/integration/body_parser/proc_parser_spec.rb +54 -0
- data/spec/integration/body_parser/text_parser_spec.rb +43 -0
- data/spec/integration/concurrent_processing/concurrent_processing_spec.rb +45 -0
- data/spec/integration/custom_group_polling_strategy/custom_group_polling_strategy_spec.rb +87 -0
- data/spec/integration/dead_letter_queue/dead_letter_queue_spec.rb +91 -0
- data/spec/integration/exception_handlers/exception_handlers_spec.rb +69 -0
- data/spec/integration/exponential_backoff/exponential_backoff_spec.rb +67 -0
- data/spec/integration/fifo_ordering/fifo_ordering_spec.rb +44 -0
- data/spec/integration/large_payloads/large_payloads_spec.rb +30 -0
- data/spec/integration/launcher/launcher_spec.rb +40 -0
- data/spec/integration/message_attributes/message_attributes_spec.rb +54 -0
- data/spec/integration/message_operations/message_operations_spec.rb +59 -0
- data/spec/integration/middleware_chain/empty_chain_spec.rb +11 -0
- data/spec/integration/middleware_chain/execution_order_spec.rb +33 -0
- data/spec/integration/middleware_chain/removal_spec.rb +31 -0
- data/spec/integration/middleware_chain/short_circuit_spec.rb +40 -0
- data/spec/integration/non_retryable_exception/non_retryable_exception_spec.rb +149 -0
- data/spec/integration/polling_strategies/polling_strategies_spec.rb +46 -0
- data/spec/integration/queue_operations/queue_operations_spec.rb +84 -0
- data/spec/integration/rails/rails_72/Gemfile +6 -0
- data/spec/integration/rails/rails_72/activejob_adapter_spec.rb +98 -0
- data/spec/integration/rails/rails_80/Gemfile +6 -0
- data/spec/integration/rails/rails_80/activejob_adapter_spec.rb +98 -0
- data/spec/integration/rails/rails_80/continuation_spec.rb +79 -0
- data/spec/integration/rails/rails_81/Gemfile +6 -0
- data/spec/integration/rails/rails_81/activejob_adapter_spec.rb +98 -0
- data/spec/integration/rails/rails_81/continuation_spec.rb +79 -0
- data/spec/integration/retry_behavior/retry_behavior_spec.rb +45 -0
- data/spec/integration/spec_helper.rb +7 -0
- data/spec/integration/strict_priority_polling/strict_priority_polling_spec.rb +58 -0
- data/spec/integration/visibility_timeout/visibility_timeout_spec.rb +37 -0
- data/spec/integration/worker_enqueueing/worker_enqueueing_spec.rb +60 -0
- data/spec/integration/worker_groups/worker_groups_spec.rb +79 -0
- data/spec/integration/worker_lifecycle/worker_lifecycle_spec.rb +33 -0
- data/spec/integrations_helper.rb +243 -0
- data/spec/lib/active_job/extensions_spec.rb +225 -0
- data/spec/lib/active_job/queue_adapters/shoryuken_adapter_spec.rb +29 -0
- data/spec/{shoryuken/extensions/active_job_concurrent_send_adapter_spec.rb → lib/active_job/queue_adapters/shoryuken_concurrent_send_adapter_spec.rb} +5 -4
- data/spec/{shoryuken/extensions/active_job_wrapper_spec.rb → lib/shoryuken/active_job/job_wrapper_spec.rb} +6 -5
- data/spec/{shoryuken → lib/shoryuken}/body_parser_spec.rb +2 -4
- data/spec/{shoryuken → lib/shoryuken}/client_spec.rb +1 -1
- data/spec/{shoryuken → lib/shoryuken}/default_exception_handler_spec.rb +9 -10
- data/spec/{shoryuken → lib/shoryuken}/default_worker_registry_spec.rb +1 -2
- data/spec/{shoryuken → lib/shoryuken}/environment_loader_spec.rb +10 -9
- data/spec/{shoryuken → lib/shoryuken}/fetcher_spec.rb +23 -26
- data/spec/lib/shoryuken/helpers/atomic_boolean_spec.rb +196 -0
- data/spec/lib/shoryuken/helpers/atomic_counter_spec.rb +177 -0
- data/spec/lib/shoryuken/helpers/atomic_hash_spec.rb +307 -0
- data/spec/lib/shoryuken/helpers/hash_utils_spec.rb +145 -0
- data/spec/lib/shoryuken/helpers/string_utils_spec.rb +124 -0
- data/spec/lib/shoryuken/helpers/timer_task_spec.rb +298 -0
- data/spec/lib/shoryuken/helpers_integration_spec.rb +96 -0
- data/spec/lib/shoryuken/inline_message_spec.rb +196 -0
- data/spec/{shoryuken → lib/shoryuken}/launcher_spec.rb +23 -2
- data/spec/lib/shoryuken/logging_spec.rb +242 -0
- data/spec/{shoryuken → lib/shoryuken}/manager_spec.rb +1 -2
- data/spec/lib/shoryuken/message_spec.rb +109 -0
- data/spec/{shoryuken → lib/shoryuken}/middleware/chain_spec.rb +1 -1
- data/spec/lib/shoryuken/middleware/entry_spec.rb +68 -0
- data/spec/lib/shoryuken/middleware/server/active_record_spec.rb +133 -0
- data/spec/{shoryuken → lib/shoryuken}/middleware/server/auto_delete_spec.rb +1 -1
- data/spec/{shoryuken → lib/shoryuken}/middleware/server/auto_extend_visibility_spec.rb +51 -1
- data/spec/{shoryuken → lib/shoryuken}/middleware/server/exponential_backoff_retry_spec.rb +1 -1
- data/spec/lib/shoryuken/middleware/server/non_retryable_exception_spec.rb +214 -0
- data/spec/{shoryuken → lib/shoryuken}/middleware/server/timing_spec.rb +1 -1
- data/spec/{shoryuken → lib/shoryuken}/options_spec.rb +49 -6
- data/spec/lib/shoryuken/polling/base_strategy_spec.rb +280 -0
- data/spec/lib/shoryuken/polling/queue_configuration_spec.rb +195 -0
- data/spec/{shoryuken → lib/shoryuken}/polling/strict_priority_spec.rb +1 -1
- data/spec/{shoryuken → lib/shoryuken}/polling/weighted_round_robin_spec.rb +1 -1
- data/spec/{shoryuken → lib/shoryuken}/processor_spec.rb +1 -1
- data/spec/{shoryuken → lib/shoryuken}/queue_spec.rb +2 -3
- data/spec/{shoryuken → lib/shoryuken}/runner_spec.rb +1 -3
- data/spec/{shoryuken → lib/shoryuken}/util_spec.rb +2 -2
- data/spec/lib/shoryuken/version_spec.rb +17 -0
- data/spec/{shoryuken → lib/shoryuken}/worker/default_executor_spec.rb +1 -1
- data/spec/lib/shoryuken/worker/inline_executor_spec.rb +105 -0
- data/spec/lib/shoryuken/worker_registry_spec.rb +63 -0
- data/spec/{shoryuken → lib/shoryuken}/worker_spec.rb +15 -11
- data/spec/{shoryuken_spec.rb → lib/shoryuken_spec.rb} +1 -1
- data/spec/shared_examples_for_active_job.rb +40 -15
- data/spec/spec_helper.rb +48 -2
- metadata +295 -101
- data/.codeclimate.yml +0 -20
- data/.devcontainer/Dockerfile +0 -17
- data/.devcontainer/base.Dockerfile +0 -43
- data/.devcontainer/devcontainer.json +0 -35
- data/.github/FUNDING.yml +0 -12
- data/.github/dependabot.yml +0 -6
- data/.github/workflows/stale.yml +0 -20
- data/.reek.yml +0 -5
- data/Appraisals +0 -42
- data/gemfiles/.gitignore +0 -1
- data/gemfiles/aws_sdk_core_2.gemfile +0 -21
- data/gemfiles/rails_4_2.gemfile +0 -20
- data/gemfiles/rails_5_2.gemfile +0 -21
- data/gemfiles/rails_6_0.gemfile +0 -21
- data/gemfiles/rails_6_1.gemfile +0 -21
- data/gemfiles/rails_7_0.gemfile +0 -22
- data/lib/shoryuken/core_ext.rb +0 -69
- data/lib/shoryuken/extensions/active_job_adapter.rb +0 -103
- data/lib/shoryuken/extensions/active_job_concurrent_send_adapter.rb +0 -50
- data/lib/shoryuken/polling/base.rb +0 -67
- data/shoryuken.jpg +0 -0
- data/spec/integration/launcher_spec.rb +0 -128
- data/spec/shoryuken/core_ext_spec.rb +0 -40
- data/spec/shoryuken/extensions/active_job_adapter_spec.rb +0 -7
- data/spec/shoryuken/extensions/active_job_base_spec.rb +0 -84
- data/spec/shoryuken/worker/inline_executor_spec.rb +0 -49
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63763ea11f3377475150b2270c7162fa5cb9a35e39cdd2a534e353837dc3e6ff
|
|
4
|
+
data.tar.gz: f265d74ebdb8a087cb658a8f442489523305e7cd551e5fae4ae16f9709f238ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 012a20c2c6cf74c8af2be01f046e137f74df8f6ca0746bc3c05f3dfc6eb45d0bf320a4a6493917c8c12371f94dafb0777873eb71d4298f097ecdb1bf9f9b2fd5
|
|
7
|
+
data.tar.gz: e257ec56be80a862449937cf882fd2dfb42037c4b9e1bbfe2987463a45e7bd0857a18a94bafd225ecb3e170180a62d59b4e3cd926d863246621d6c5683bce9a1
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Push Gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
push:
|
|
13
|
+
if: github.repository_owner == 'ruby-shoryuken'
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment: deployment
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
id-token: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- name: Set up Ruby
|
|
27
|
+
uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0
|
|
28
|
+
with:
|
|
29
|
+
bundler-cache: false
|
|
30
|
+
|
|
31
|
+
- name: Bundle install
|
|
32
|
+
run: |
|
|
33
|
+
bundle install --jobs 4 --retry 3
|
|
34
|
+
|
|
35
|
+
# Release
|
|
36
|
+
- uses: rubygems/release-gem@6317d8d1f7e28c24d28f6eff169ea854948bd9f7 # v1.2.0
|
data/.github/workflows/specs.yml
CHANGED
|
@@ -1,65 +1,70 @@
|
|
|
1
1
|
name: Specs
|
|
2
|
-
|
|
3
2
|
on:
|
|
4
3
|
- push
|
|
5
4
|
- pull_request
|
|
6
|
-
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
7
|
jobs:
|
|
8
|
-
|
|
9
|
-
name:
|
|
8
|
+
specs:
|
|
9
|
+
name: Specs
|
|
10
10
|
strategy:
|
|
11
11
|
matrix:
|
|
12
|
-
ruby: ['
|
|
13
|
-
|
|
14
|
-
runs-on: ubuntu-20.04
|
|
15
|
-
services:
|
|
16
|
-
moto_sqs:
|
|
17
|
-
image: quay.io/cjlarose/moto-sqs-server:1.1.0
|
|
18
|
-
ports:
|
|
19
|
-
- 5000:5000
|
|
20
|
-
env:
|
|
21
|
-
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
12
|
+
ruby: ['3.2', '3.3', '3.4', '4.0']
|
|
13
|
+
runs-on: ubuntu-latest
|
|
22
14
|
steps:
|
|
23
15
|
- name: Checkout code
|
|
24
|
-
uses: actions/checkout@
|
|
25
|
-
|
|
16
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
17
|
+
|
|
18
|
+
- uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0
|
|
26
19
|
with:
|
|
27
20
|
ruby-version: ${{ matrix.ruby }}
|
|
28
21
|
bundler-cache: true
|
|
22
|
+
|
|
29
23
|
- name: Run specs
|
|
30
24
|
run: bundle exec rake spec
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
name: Rails Specs
|
|
25
|
+
|
|
26
|
+
integrations:
|
|
27
|
+
name: Integrations
|
|
35
28
|
strategy:
|
|
36
29
|
matrix:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- rails: '4.2'
|
|
40
|
-
ruby: '2.2'
|
|
41
|
-
gemfile: gemfiles/rails_4_2.gemfile
|
|
42
|
-
- rails: '5.2'
|
|
43
|
-
ruby: '2.5'
|
|
44
|
-
gemfile: gemfiles/rails_5_2.gemfile
|
|
45
|
-
- rails: '6.0'
|
|
46
|
-
ruby: '2.6'
|
|
47
|
-
gemfile: gemfiles/rails_6_0.gemfile
|
|
48
|
-
- rails: '6.1'
|
|
49
|
-
ruby: '3.0'
|
|
50
|
-
gemfile: gemfiles/rails_6_1.gemfile
|
|
51
|
-
- rails: '7.0'
|
|
52
|
-
ruby: '3.1'
|
|
53
|
-
gemfile: gemfiles/rails_7_0.gemfile
|
|
54
|
-
runs-on: ubuntu-20.04
|
|
55
|
-
env:
|
|
56
|
-
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
30
|
+
ruby: ['3.2', '3.3', '3.4', '4.0']
|
|
31
|
+
runs-on: ubuntu-latest
|
|
57
32
|
steps:
|
|
58
33
|
- name: Checkout code
|
|
59
|
-
uses: actions/checkout@
|
|
60
|
-
|
|
34
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
35
|
+
|
|
36
|
+
- name: Start ElasticMQ
|
|
37
|
+
run: docker compose up -d
|
|
38
|
+
|
|
39
|
+
- name: Wait for ElasticMQ
|
|
40
|
+
run: |
|
|
41
|
+
timeout 30s bash -c '
|
|
42
|
+
until curl -s http://localhost:9324/health; do
|
|
43
|
+
echo "Waiting for ElasticMQ..."
|
|
44
|
+
sleep 1
|
|
45
|
+
done
|
|
46
|
+
'
|
|
47
|
+
|
|
48
|
+
- uses: ruby/setup-ruby@e65c17d16e57e481586a6a5a0282698790062f92 # v1.300.0
|
|
61
49
|
with:
|
|
62
50
|
ruby-version: ${{ matrix.ruby }}
|
|
63
51
|
bundler-cache: true
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
|
|
53
|
+
- name: Run integration specs
|
|
54
|
+
run: bundle exec rake spec:integration
|
|
55
|
+
|
|
56
|
+
ci-success:
|
|
57
|
+
name: CI Success
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
if: always()
|
|
60
|
+
needs:
|
|
61
|
+
- specs
|
|
62
|
+
- integrations
|
|
63
|
+
steps:
|
|
64
|
+
- name: Check all jobs passed
|
|
65
|
+
if: |
|
|
66
|
+
contains(needs.*.result, 'failure') ||
|
|
67
|
+
contains(needs.*.result, 'cancelled') ||
|
|
68
|
+
contains(needs.*.result, 'skipped')
|
|
69
|
+
run: exit 1
|
|
70
|
+
- run: echo "All CI checks passed!"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Verify Action Pins
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
paths:
|
|
5
|
+
- '.github/workflows/**'
|
|
6
|
+
jobs:
|
|
7
|
+
verify:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
11
|
+
- name: Check SHA pins
|
|
12
|
+
run: |
|
|
13
|
+
if grep -E -r "uses: .*/.*@(v[0-9]+|main|master)($|[[:space:]]|$)" --include="*.yml" --include="*.yaml" .github/workflows/ | grep -v "#"; then
|
|
14
|
+
echo "::error::Actions should use SHA pins, not tags or branch names"
|
|
15
|
+
exit 1
|
|
16
|
+
fi
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4.0.2
|
data/.yard-lint.yml
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# YARD-Lint Configuration
|
|
2
|
+
# See https://github.com/mensfeld/yard-lint for documentation
|
|
3
|
+
|
|
4
|
+
# Global settings for all validators
|
|
5
|
+
AllValidators:
|
|
6
|
+
YardOptions:
|
|
7
|
+
- "--private"
|
|
8
|
+
- "--protected"
|
|
9
|
+
Exclude:
|
|
10
|
+
- "\\.git"
|
|
11
|
+
- vendor/**/*
|
|
12
|
+
- node_modules/**/*
|
|
13
|
+
- spec/**/*
|
|
14
|
+
- test/**/*
|
|
15
|
+
- bin/**/*
|
|
16
|
+
- examples/**/*
|
|
17
|
+
- test_workers/**/*
|
|
18
|
+
FailOnSeverity: convention
|
|
19
|
+
MinCoverage: 100
|
|
20
|
+
DiffMode:
|
|
21
|
+
DefaultBaseRef:
|
|
22
|
+
|
|
23
|
+
# Documentation validators
|
|
24
|
+
Documentation/UndocumentedObjects:
|
|
25
|
+
Description: Checks for classes, modules, and methods without documentation.
|
|
26
|
+
Enabled: true
|
|
27
|
+
Severity: error
|
|
28
|
+
ExcludedMethods:
|
|
29
|
+
- initialize/0
|
|
30
|
+
- "/^_/"
|
|
31
|
+
|
|
32
|
+
Documentation/UndocumentedMethodArguments:
|
|
33
|
+
Description: Checks for method parameters without @param tags.
|
|
34
|
+
Enabled: true
|
|
35
|
+
Severity: error
|
|
36
|
+
|
|
37
|
+
Documentation/UndocumentedBooleanMethods:
|
|
38
|
+
Description: Checks that question mark methods document their boolean return.
|
|
39
|
+
Enabled: true
|
|
40
|
+
Severity: error
|
|
41
|
+
|
|
42
|
+
Documentation/UndocumentedOptions:
|
|
43
|
+
Description: Detects methods with options hash parameters but no @option tags.
|
|
44
|
+
Enabled: true
|
|
45
|
+
Severity: error
|
|
46
|
+
|
|
47
|
+
Documentation/MarkdownSyntax:
|
|
48
|
+
Description: Detects common markdown syntax errors in documentation.
|
|
49
|
+
Enabled: true
|
|
50
|
+
Severity: error
|
|
51
|
+
|
|
52
|
+
Documentation/EmptyCommentLine:
|
|
53
|
+
Description: Detects empty comment lines at the start or end of documentation blocks.
|
|
54
|
+
Enabled: true
|
|
55
|
+
Severity: convention
|
|
56
|
+
EnabledPatterns:
|
|
57
|
+
Leading: true
|
|
58
|
+
Trailing: true
|
|
59
|
+
|
|
60
|
+
Documentation/BlankLineBeforeDefinition:
|
|
61
|
+
Description: Detects blank lines between YARD documentation and method definition.
|
|
62
|
+
Enabled: true
|
|
63
|
+
Severity: convention
|
|
64
|
+
OrphanedSeverity: convention
|
|
65
|
+
EnabledPatterns:
|
|
66
|
+
SingleBlankLine: true
|
|
67
|
+
OrphanedDocs: true
|
|
68
|
+
|
|
69
|
+
# Tags validators
|
|
70
|
+
Tags/Order:
|
|
71
|
+
Description: Enforces consistent ordering of YARD tags.
|
|
72
|
+
Enabled: true
|
|
73
|
+
Severity: error
|
|
74
|
+
EnforcedOrder:
|
|
75
|
+
- param
|
|
76
|
+
- option
|
|
77
|
+
- return
|
|
78
|
+
- raise
|
|
79
|
+
- example
|
|
80
|
+
|
|
81
|
+
Tags/InvalidTypes:
|
|
82
|
+
Description: Validates type definitions in @param, @return, @option tags.
|
|
83
|
+
Enabled: true
|
|
84
|
+
Severity: error
|
|
85
|
+
ValidatedTags:
|
|
86
|
+
- param
|
|
87
|
+
- option
|
|
88
|
+
- return
|
|
89
|
+
|
|
90
|
+
Tags/TypeSyntax:
|
|
91
|
+
Description: Validates YARD type syntax using YARD parser.
|
|
92
|
+
Enabled: true
|
|
93
|
+
Severity: error
|
|
94
|
+
ValidatedTags:
|
|
95
|
+
- param
|
|
96
|
+
- option
|
|
97
|
+
- return
|
|
98
|
+
- yieldreturn
|
|
99
|
+
|
|
100
|
+
Tags/MeaninglessTag:
|
|
101
|
+
Description: Detects @param/@option tags on classes, modules, or constants.
|
|
102
|
+
Enabled: true
|
|
103
|
+
Severity: error
|
|
104
|
+
CheckedTags:
|
|
105
|
+
- param
|
|
106
|
+
- option
|
|
107
|
+
InvalidObjectTypes:
|
|
108
|
+
- class
|
|
109
|
+
- module
|
|
110
|
+
- constant
|
|
111
|
+
|
|
112
|
+
Tags/CollectionType:
|
|
113
|
+
Description: Validates Hash collection syntax consistency.
|
|
114
|
+
Enabled: true
|
|
115
|
+
Severity: error
|
|
116
|
+
EnforcedStyle: long
|
|
117
|
+
ValidatedTags:
|
|
118
|
+
- param
|
|
119
|
+
- option
|
|
120
|
+
- return
|
|
121
|
+
- yieldreturn
|
|
122
|
+
|
|
123
|
+
Tags/TagTypePosition:
|
|
124
|
+
Description: Validates type annotation position in tags.
|
|
125
|
+
Enabled: true
|
|
126
|
+
Severity: error
|
|
127
|
+
CheckedTags:
|
|
128
|
+
- param
|
|
129
|
+
- option
|
|
130
|
+
EnforcedStyle: type_after_name
|
|
131
|
+
|
|
132
|
+
Tags/ApiTags:
|
|
133
|
+
Description: Enforces @api tags on public objects.
|
|
134
|
+
Enabled: false
|
|
135
|
+
Severity: error
|
|
136
|
+
AllowedApis:
|
|
137
|
+
- public
|
|
138
|
+
- private
|
|
139
|
+
- internal
|
|
140
|
+
|
|
141
|
+
Tags/OptionTags:
|
|
142
|
+
Description: Requires @option tags for methods with options parameters.
|
|
143
|
+
Enabled: true
|
|
144
|
+
Severity: error
|
|
145
|
+
|
|
146
|
+
Tags/ExampleSyntax:
|
|
147
|
+
Description: Validates Ruby syntax in @example tags.
|
|
148
|
+
Enabled: true
|
|
149
|
+
Severity: warning
|
|
150
|
+
|
|
151
|
+
Tags/RedundantParamDescription:
|
|
152
|
+
Description: Detects meaningless parameter descriptions that add no value.
|
|
153
|
+
Enabled: true
|
|
154
|
+
Severity: convention
|
|
155
|
+
CheckedTags:
|
|
156
|
+
- param
|
|
157
|
+
- option
|
|
158
|
+
Articles:
|
|
159
|
+
- The
|
|
160
|
+
- the
|
|
161
|
+
- A
|
|
162
|
+
- a
|
|
163
|
+
- An
|
|
164
|
+
- an
|
|
165
|
+
MaxRedundantWords: 6
|
|
166
|
+
GenericTerms:
|
|
167
|
+
- object
|
|
168
|
+
- instance
|
|
169
|
+
- value
|
|
170
|
+
- data
|
|
171
|
+
- item
|
|
172
|
+
- element
|
|
173
|
+
EnabledPatterns:
|
|
174
|
+
ArticleParam: true
|
|
175
|
+
PossessiveParam: true
|
|
176
|
+
TypeRestatement: true
|
|
177
|
+
ParamToVerb: true
|
|
178
|
+
IdPattern: true
|
|
179
|
+
DirectionalDate: true
|
|
180
|
+
TypeGeneric: true
|
|
181
|
+
|
|
182
|
+
Tags/InformalNotation:
|
|
183
|
+
Description: Detects informal tag notation patterns like "Note:" instead of @note.
|
|
184
|
+
Enabled: true
|
|
185
|
+
Severity: warning
|
|
186
|
+
CaseSensitive: false
|
|
187
|
+
RequireStartOfLine: true
|
|
188
|
+
Patterns:
|
|
189
|
+
Note: "@note"
|
|
190
|
+
Todo: "@todo"
|
|
191
|
+
TODO: "@todo"
|
|
192
|
+
FIXME: "@todo"
|
|
193
|
+
See: "@see"
|
|
194
|
+
See also: "@see"
|
|
195
|
+
Warning: "@deprecated"
|
|
196
|
+
Deprecated: "@deprecated"
|
|
197
|
+
Author: "@author"
|
|
198
|
+
Version: "@version"
|
|
199
|
+
Since: "@since"
|
|
200
|
+
Returns: "@return"
|
|
201
|
+
Raises: "@raise"
|
|
202
|
+
Example: "@example"
|
|
203
|
+
|
|
204
|
+
Tags/NonAsciiType:
|
|
205
|
+
Description: Detects non-ASCII characters in type annotations.
|
|
206
|
+
Enabled: true
|
|
207
|
+
Severity: warning
|
|
208
|
+
ValidatedTags:
|
|
209
|
+
- param
|
|
210
|
+
- option
|
|
211
|
+
- return
|
|
212
|
+
- yieldreturn
|
|
213
|
+
- yieldparam
|
|
214
|
+
|
|
215
|
+
Tags/TagGroupSeparator:
|
|
216
|
+
Description: Enforces blank line separators between different YARD tag groups.
|
|
217
|
+
Enabled: false
|
|
218
|
+
Severity: convention
|
|
219
|
+
TagGroups:
|
|
220
|
+
param:
|
|
221
|
+
- param
|
|
222
|
+
- option
|
|
223
|
+
return:
|
|
224
|
+
- return
|
|
225
|
+
error:
|
|
226
|
+
- raise
|
|
227
|
+
- throws
|
|
228
|
+
example:
|
|
229
|
+
- example
|
|
230
|
+
meta:
|
|
231
|
+
- see
|
|
232
|
+
- note
|
|
233
|
+
- todo
|
|
234
|
+
- deprecated
|
|
235
|
+
- since
|
|
236
|
+
- version
|
|
237
|
+
- api
|
|
238
|
+
yield:
|
|
239
|
+
- yield
|
|
240
|
+
- yieldparam
|
|
241
|
+
- yieldreturn
|
|
242
|
+
RequireAfterDescription: false
|
|
243
|
+
|
|
244
|
+
# Warnings validators - catches YARD parser errors
|
|
245
|
+
Warnings/UnknownTag:
|
|
246
|
+
Description: Detects unknown YARD tags.
|
|
247
|
+
Enabled: true
|
|
248
|
+
Severity: error
|
|
249
|
+
|
|
250
|
+
Warnings/UnknownDirective:
|
|
251
|
+
Description: Detects unknown YARD directives.
|
|
252
|
+
Enabled: true
|
|
253
|
+
Severity: error
|
|
254
|
+
|
|
255
|
+
Warnings/InvalidTagFormat:
|
|
256
|
+
Description: Detects malformed tag syntax.
|
|
257
|
+
Enabled: true
|
|
258
|
+
Severity: error
|
|
259
|
+
|
|
260
|
+
Warnings/InvalidDirectiveFormat:
|
|
261
|
+
Description: Detects malformed directive syntax.
|
|
262
|
+
Enabled: true
|
|
263
|
+
Severity: error
|
|
264
|
+
|
|
265
|
+
Warnings/DuplicatedParameterName:
|
|
266
|
+
Description: Detects duplicate @param tags.
|
|
267
|
+
Enabled: true
|
|
268
|
+
Severity: error
|
|
269
|
+
|
|
270
|
+
Warnings/UnknownParameterName:
|
|
271
|
+
Description: Detects @param tags for non-existent parameters.
|
|
272
|
+
Enabled: true
|
|
273
|
+
Severity: error
|
|
274
|
+
|
|
275
|
+
# Semantic validators
|
|
276
|
+
Semantic/AbstractMethods:
|
|
277
|
+
Description: Ensures @abstract methods do not have real implementations.
|
|
278
|
+
Enabled: true
|
|
279
|
+
Severity: error
|