dispatch-rider 1.8.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) 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/.travis.yml +4 -4
  8. data/CHANGELOG.md +20 -0
  9. data/README.md +2 -2
  10. data/dispatch-rider.gemspec +16 -10
  11. data/gemfiles/Gemfile-5-2 +8 -0
  12. data/gemfiles/Gemfile-6-0 +8 -0
  13. data/gemfiles/Gemfile-6-1 +8 -0
  14. data/gemfiles/Gemfile-7-0 +8 -0
  15. data/lib/dispatch-rider/callbacks/access.rb +0 -1
  16. data/lib/dispatch-rider/callbacks/storage.rb +0 -2
  17. data/lib/dispatch-rider/callbacks/support.rb +0 -2
  18. data/lib/dispatch-rider/command.rb +0 -2
  19. data/lib/dispatch-rider/demultiplexer.rb +1 -1
  20. data/lib/dispatch-rider/dispatcher.rb +0 -2
  21. data/lib/dispatch-rider/error_handlers.rb +0 -1
  22. data/lib/dispatch-rider/handlers/inheritance_tracking.rb +0 -2
  23. data/lib/dispatch-rider/handlers/named_process.rb +0 -2
  24. data/lib/dispatch-rider/integrations/appsignal.rb +0 -2
  25. data/lib/dispatch-rider/logging/json_formatter.rb +0 -2
  26. data/lib/dispatch-rider/logging/lifecycle_logger.rb +0 -1
  27. data/lib/dispatch-rider/logging/text_formatter.rb +1 -3
  28. data/lib/dispatch-rider/logging/translator/base_translator.rb +0 -2
  29. data/lib/dispatch-rider/logging/translator/complete_translator.rb +0 -2
  30. data/lib/dispatch-rider/logging/translator/error_handler_fail_translator.rb +0 -2
  31. data/lib/dispatch-rider/logging/translator/fail_translator.rb +0 -2
  32. data/lib/dispatch-rider/logging/translator/start_translator.rb +0 -2
  33. data/lib/dispatch-rider/logging/translator/stop_translator.rb +0 -2
  34. data/lib/dispatch-rider/logging/translator/success_translator.rb +0 -2
  35. data/lib/dispatch-rider/logging/translator.rb +0 -2
  36. data/lib/dispatch-rider/logging.rb +0 -1
  37. data/lib/dispatch-rider/notification_services/aws_sns.rb +4 -4
  38. data/lib/dispatch-rider/notification_services/base.rb +1 -1
  39. data/lib/dispatch-rider/notification_services/file_system/channel.rb +1 -2
  40. data/lib/dispatch-rider/notification_services/file_system/notifier.rb +0 -2
  41. data/lib/dispatch-rider/publisher/configuration/destination.rb +0 -2
  42. data/lib/dispatch-rider/publisher/configuration/notification_service.rb +0 -2
  43. data/lib/dispatch-rider/publisher/configuration.rb +0 -2
  44. data/lib/dispatch-rider/publisher/configuration_reader.rb +0 -3
  45. data/lib/dispatch-rider/publisher/configuration_support.rb +0 -2
  46. data/lib/dispatch-rider/queue_services/aws_sqs/sqs_received_message.rb +6 -7
  47. data/lib/dispatch-rider/queue_services/aws_sqs.rb +28 -20
  48. data/lib/dispatch-rider/queue_services/file_system/fs_received_message.rb +0 -1
  49. data/lib/dispatch-rider/queue_services/file_system.rb +2 -2
  50. data/lib/dispatch-rider/queue_services/received_message.rb +0 -2
  51. data/lib/dispatch-rider/registrars/base.rb +2 -2
  52. data/lib/dispatch-rider/registrars/sns_channel.rb +1 -1
  53. data/lib/dispatch-rider/runner.rb +0 -1
  54. data/lib/dispatch-rider/version.rb +1 -1
  55. data/lib/dispatch-rider.rb +2 -0
  56. data/lib/generators/dispatch_rider/install/install_generator.rb +0 -2
  57. data/lib/generators/dispatch_rider/job/dispatch_job_generator.rb +0 -2
  58. data/spec/factories/messages.rb +7 -6
  59. data/spec/lib/dispatch-rider/callbacks/access_spec.rb +2 -2
  60. data/spec/lib/dispatch-rider/callbacks/storage_spec.rb +3 -3
  61. data/spec/lib/dispatch-rider/configuration_spec.rb +1 -1
  62. data/spec/lib/dispatch-rider/default_error_handler_spec.rb +1 -0
  63. data/spec/lib/dispatch-rider/demultiplexer_spec.rb +2 -2
  64. data/spec/lib/dispatch-rider/notification_services/aws_sns_spec.rb +3 -3
  65. data/spec/lib/dispatch-rider/notification_services/base_spec.rb +7 -7
  66. data/spec/lib/dispatch-rider/notification_services/file_system/channel_spec.rb +5 -4
  67. data/spec/lib/dispatch-rider/publisher/base_spec.rb +2 -2
  68. data/spec/lib/dispatch-rider/publisher/configuration/destination_spec.rb +1 -2
  69. data/spec/lib/dispatch-rider/publisher/configuration/notification_service_spec.rb +1 -2
  70. data/spec/lib/dispatch-rider/publisher/configuration_spec.rb +2 -2
  71. data/spec/lib/dispatch-rider/publisher_spec.rb +2 -1
  72. data/spec/lib/dispatch-rider/queue_services/aws_sqs_spec.rb +24 -34
  73. data/spec/lib/dispatch-rider/queue_services/file_system_spec.rb +2 -2
  74. data/spec/lib/dispatch-rider/scheduled_job_spec.rb +12 -12
  75. data/spec/lib/dispatch-rider/subscriber_spec.rb +4 -0
  76. data/spec/spec_helper.rb +32 -4
  77. data/spec/support/integration_support.rb +0 -1
  78. metadata +93 -33
  79. data/.rubocop.hound.yml +0 -261
  80. 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: 11c19c4d7096034476aa3fffb95eb6e7869752cf84bdd5183f6bb3913f78da2d
4
- data.tar.gz: 3ef2c5d4dab6092efdfede637aef2403717132b9e0ab9df0bce839f356a77dcb
3
+ metadata.gz: 04bd4129729bcc4dde07208deabe117e052c1eb4fa22231932b12a244f9023eb
4
+ data.tar.gz: 9235bd4599a819cd6e1b62a95a90e06e28970e6594a361628c64542005486cca
5
5
  SHA512:
6
- metadata.gz: a6bac7e6799ab63335faa94b4a912973794b96dbfa227964bc769fab1307b76c38f49defd99be4bfe3a9d8a17c5871c54a8d17117fcbfc31be6264b55a30efc7
7
- data.tar.gz: cb91f3492228c514a12a2cd29035bf60a51eb88226a380f6d56ed42cb13c63f8beec493584cb4f188bfa593edeca9e2b1ded87e448ae30aad7173fcfe72d7ca9
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