dispatch-rider 1.9.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +50 -0
  3. data/.github/workflows/rubocop-challenger.yml +26 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +31 -20
  6. data/.rubocop_todo.yml +904 -0
  7. data/CHANGELOG.md +12 -0
  8. data/README.md +2 -2
  9. data/dispatch-rider.gemspec +16 -10
  10. data/gemfiles/Gemfile-5-2 +8 -0
  11. data/gemfiles/Gemfile-6-0 +8 -0
  12. data/gemfiles/Gemfile-6-1 +8 -0
  13. data/gemfiles/Gemfile-7-0 +8 -0
  14. data/lib/dispatch-rider/callbacks/access.rb +0 -1
  15. data/lib/dispatch-rider/callbacks/storage.rb +0 -2
  16. data/lib/dispatch-rider/callbacks/support.rb +0 -2
  17. data/lib/dispatch-rider/command.rb +0 -2
  18. data/lib/dispatch-rider/demultiplexer.rb +0 -1
  19. data/lib/dispatch-rider/dispatcher.rb +0 -2
  20. data/lib/dispatch-rider/error_handlers.rb +0 -1
  21. data/lib/dispatch-rider/handlers/inheritance_tracking.rb +0 -2
  22. data/lib/dispatch-rider/handlers/named_process.rb +0 -2
  23. data/lib/dispatch-rider/integrations/appsignal.rb +0 -2
  24. data/lib/dispatch-rider/logging/json_formatter.rb +0 -2
  25. data/lib/dispatch-rider/logging/lifecycle_logger.rb +0 -1
  26. data/lib/dispatch-rider/logging/text_formatter.rb +1 -3
  27. data/lib/dispatch-rider/logging/translator/base_translator.rb +0 -2
  28. data/lib/dispatch-rider/logging/translator/complete_translator.rb +0 -2
  29. data/lib/dispatch-rider/logging/translator/error_handler_fail_translator.rb +0 -2
  30. data/lib/dispatch-rider/logging/translator/fail_translator.rb +0 -2
  31. data/lib/dispatch-rider/logging/translator/start_translator.rb +0 -2
  32. data/lib/dispatch-rider/logging/translator/stop_translator.rb +0 -2
  33. data/lib/dispatch-rider/logging/translator/success_translator.rb +0 -2
  34. data/lib/dispatch-rider/logging/translator.rb +0 -2
  35. data/lib/dispatch-rider/logging.rb +0 -1
  36. data/lib/dispatch-rider/notification_services/aws_sns.rb +4 -4
  37. data/lib/dispatch-rider/notification_services/base.rb +1 -1
  38. data/lib/dispatch-rider/notification_services/file_system/channel.rb +1 -2
  39. data/lib/dispatch-rider/notification_services/file_system/notifier.rb +0 -2
  40. data/lib/dispatch-rider/publisher/configuration/destination.rb +0 -2
  41. data/lib/dispatch-rider/publisher/configuration/notification_service.rb +0 -2
  42. data/lib/dispatch-rider/publisher/configuration.rb +0 -2
  43. data/lib/dispatch-rider/publisher/configuration_reader.rb +0 -3
  44. data/lib/dispatch-rider/publisher/configuration_support.rb +0 -2
  45. data/lib/dispatch-rider/queue_services/aws_sqs/sqs_received_message.rb +6 -7
  46. data/lib/dispatch-rider/queue_services/aws_sqs.rb +28 -20
  47. data/lib/dispatch-rider/queue_services/file_system/fs_received_message.rb +0 -1
  48. data/lib/dispatch-rider/queue_services/file_system.rb +2 -2
  49. data/lib/dispatch-rider/queue_services/received_message.rb +0 -2
  50. data/lib/dispatch-rider/registrars/base.rb +2 -2
  51. data/lib/dispatch-rider/registrars/sns_channel.rb +1 -1
  52. data/lib/dispatch-rider/runner.rb +0 -1
  53. data/lib/dispatch-rider/version.rb +1 -1
  54. data/lib/dispatch-rider.rb +2 -0
  55. data/lib/generators/dispatch_rider/install/install_generator.rb +0 -2
  56. data/lib/generators/dispatch_rider/job/dispatch_job_generator.rb +0 -2
  57. data/spec/factories/messages.rb +7 -6
  58. data/spec/lib/dispatch-rider/callbacks/access_spec.rb +2 -2
  59. data/spec/lib/dispatch-rider/callbacks/storage_spec.rb +3 -3
  60. data/spec/lib/dispatch-rider/configuration_spec.rb +1 -1
  61. data/spec/lib/dispatch-rider/default_error_handler_spec.rb +1 -0
  62. data/spec/lib/dispatch-rider/demultiplexer_spec.rb +2 -2
  63. data/spec/lib/dispatch-rider/notification_services/aws_sns_spec.rb +3 -3
  64. data/spec/lib/dispatch-rider/notification_services/base_spec.rb +7 -7
  65. data/spec/lib/dispatch-rider/notification_services/file_system/channel_spec.rb +5 -4
  66. data/spec/lib/dispatch-rider/publisher/base_spec.rb +2 -2
  67. data/spec/lib/dispatch-rider/publisher/configuration/destination_spec.rb +1 -2
  68. data/spec/lib/dispatch-rider/publisher/configuration/notification_service_spec.rb +1 -2
  69. data/spec/lib/dispatch-rider/publisher/configuration_spec.rb +2 -2
  70. data/spec/lib/dispatch-rider/publisher_spec.rb +2 -1
  71. data/spec/lib/dispatch-rider/queue_services/aws_sqs_spec.rb +24 -34
  72. data/spec/lib/dispatch-rider/queue_services/file_system_spec.rb +2 -2
  73. data/spec/lib/dispatch-rider/scheduled_job_spec.rb +12 -12
  74. data/spec/lib/dispatch-rider/subscriber_spec.rb +4 -0
  75. data/spec/spec_helper.rb +32 -4
  76. data/spec/support/integration_support.rb +0 -1
  77. metadata +92 -32
  78. data/.rubocop.hound.yml +0 -261
  79. data/spec/lib/dispatch-rider/queue_services_spec.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 120128934f54269c8c160d5b0e5c21571019918f5254e71c1607837c3ef42cb9
4
- data.tar.gz: 8bf2a5927a4d2911fd9d218b1db4072e70b40d2334df2df95dcb033125904eed
3
+ metadata.gz: 04bd4129729bcc4dde07208deabe117e052c1eb4fa22231932b12a244f9023eb
4
+ data.tar.gz: 9235bd4599a819cd6e1b62a95a90e06e28970e6594a361628c64542005486cca
5
5
  SHA512:
6
- metadata.gz: 860e869560495877c18b94ae8c6dc9237742e1cc8850a91bfcd51816df1040b0b1ca496ba2dc6a6c05308df067b7269cd83472c98ae00af5434b4848e031fbd2
7
- data.tar.gz: 32452cc072e9a8b12b5fc04add7385845739c763dfdea5789af7c0c67ba5f26915bfcbc47515d71f14deecb9f6801ee432776fe355ff2032949facbbbc73891c
6
+ metadata.gz: 4dc3ad18550e07953004269e63c4d377bd462435c4e8653ba40fcd03e4a9df1d462fe9bbc43f1b8718ee0788e4e550d5975a6cc08cf4662f7b0884c140bb2541
7
+ data.tar.gz: 8fafaafe38c362712a164509a608d74cf76b063e1a8a86de25eff5f227883b0067131d5f8bcbd9b4cb08bfb058a498215a032b11b1d4adde3c3201dfa4ddc027
@@ -0,0 +1,50 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: build
9
+
10
+ on: [push, pull_request]
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-20.04
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ ruby:
19
+ - 2.7
20
+ - 2.6
21
+ awssdk:
22
+ - v1
23
+ - v3
24
+ gemfile:
25
+ - Gemfile-5-2
26
+ - Gemfile-6-0
27
+ - Gemfile-6-1
28
+ - Gemfile-7-0
29
+ exclude:
30
+ - gemfile: Gemfile-7-0
31
+ ruby: 2.6
32
+ - gemfile: Gemfile-5-2
33
+ ruby: 3.0
34
+
35
+ env:
36
+ AWS_SDK_VER: ${{ matrix.awssdk }}
37
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
38
+ AWS_REGION: us-east1
39
+ CI: true
40
+ COVERALLS_REPO_TOKEN: 7XadchWU3QuK3zHjHMRbFRr2wKxKckxPw
41
+ steps:
42
+ - uses: actions/checkout@v2
43
+ - uses: ruby/setup-ruby@v1
44
+ with:
45
+ ruby-version: ${{ matrix.ruby }}
46
+ bundler-cache: true
47
+ - name: Rubocop
48
+ run: bundle exec rubocop -c .rubocop.yml
49
+ - name: Rspec
50
+ run: bundle exec rspec
@@ -0,0 +1,26 @@
1
+ name: "RuboCop Challenge"
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '30 23 * * 2,3,4' # この設定の場合、火水木のAM8:30に自動でPRが作られます。
6
+
7
+ jobs:
8
+ create-pr:
9
+ name: Create Pull Request
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Set up Ruby 2.7
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.7.5
17
+ - name: Install bundler
18
+ run: gem install bundler
19
+ - name: Install gems
20
+ run: bundle install --jobs 4 --retry 3
21
+ - name: Set git configuration
22
+ run: git config remote.origin.url "git@github.com:payrollhero/dispatch-rider.git" # プロジェクトごとに変わる値です。
23
+ - name: Create RuboCop challenge pull request
24
+ env:
25
+ GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26
+ run: bundle exec rubocop_challenger go --base-branch=master --email=rubocop@payrollhero.com --name="Rubocop Challenger" --mode=random
data/.gitignore CHANGED
@@ -4,6 +4,7 @@
4
4
  .config
5
5
  .yardoc
6
6
  Gemfile.lock
7
+ gemfiles/*.lock
7
8
  InstalledFiles
8
9
  _yardoc
9
10
  coverage
data/.rubocop.yml CHANGED
@@ -1,30 +1,41 @@
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-rake
4
+ - rubocop-rspec
5
+ - rubocop-performance
6
+
1
7
  inherit_from:
2
- - .rubocop.hound.yml
8
+ - .rubocop_todo.yml
9
+
10
+ Rails:
11
+ Enabled: true
3
12
 
4
13
  AllCops:
5
- TargetRubyVersion: 2.1
14
+ NewCops: enable
15
+ TargetRubyVersion: 2.7
6
16
  Exclude:
7
17
  - '*.gemspec'
8
18
  - 'Gemfile'
19
+ - vendor/bundle/ruby/**/*
9
20
 
10
- Style/EmptyLinesAroundClassBody:
11
- Enabled: false
21
+ Layout/FirstHashElementIndentation:
22
+ EnforcedStyle: consistent
12
23
 
13
- Style/EmptyLinesAroundModuleBody:
14
- Enabled: false
15
-
16
- Style/EmptyLinesAroundMethodBody:
17
- Enabled: false
24
+ Rake/Desc:
25
+ Exclude:
26
+ - Rakefile
18
27
 
19
- Style/ClassCheck:
20
- Enabled: false
21
- # we don't care about kind_of? vs is_a?
28
+ RSpec/VariableName:
29
+ Exclude:
30
+ - spec/lib/dispatch-rider/publisher/base_spec.rb
22
31
 
23
32
  Style/StringLiterals:
24
33
  Enabled: false
25
34
 
26
- Style/FileName:
27
- Enabled: false
35
+ Naming/FileName:
36
+ Exclude:
37
+ - lib/dispatch-rider.rb
38
+ - spec/lib/dispatch-rider_spec.rb
28
39
 
29
40
  Style/RedundantException:
30
41
  Enabled: false
@@ -39,17 +50,17 @@ Style/CollectionMethods:
39
50
  PreferredMethods:
40
51
  detect: find
41
52
 
42
- # Github's PR width is 120 characters
43
- Metrics/LineLength:
44
- Max: 120
53
+ # Github's PR width is 145 characters
54
+ Layout/LineLength:
55
+ Max: 141
45
56
  AllowURI: true
46
57
 
47
58
  # Align with the style guide, we don't prefer anything
48
- Style/CollectionMethods:
49
- Enabled: false
59
+ #Style/CollectionMethods:
60
+ #Enabled: false
50
61
 
51
62
  Metrics/AbcSize:
52
63
  Description: A calculated magnitude based on number of assignments, branches, and
53
64
  conditions.
54
65
  Enabled: true
55
- Max: 30
66
+ Max: 22