Skip to content

Commit

Permalink
Fix rubocop prepare release (#96)
Browse files Browse the repository at this point in the history
* fix a couple of rubocop rules

* properly select the proper aws-sdk gem

* dont include all of aws-sdk, enforce using fork with json 2.6+

remove whitespace in gemfiles

* fix two remaining rubocop failures

* update to Changelog
  • Loading branch information
mathieujobin authored Sep 20, 2022
1 parent 7a30baf commit 9eed563
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- 2.7
- 2.6
awssdk:
- 1
- 3
- v1
- v3
gemfile:
- Gemfile-5-2
- Gemfile-6-0
Expand Down
4 changes: 0 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ RSpec/VariableName:
Exclude:
- spec/lib/dispatch-rider/publisher/base_spec.rb

Style/ClassCheck:
Enabled: false
# we don't care about kind_of? vs is_a?

Style/StringLiterals:
Enabled: false

Expand Down
13 changes: 0 additions & 13 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,6 @@ RSpec/AnyInstance:
- 'spec/lib/dispatch-rider/queue_services/aws_sqs_spec.rb'
- 'spec/lib/dispatch-rider/queue_services/base_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: be_a, be_kind_of
RSpec/ClassCheck:
Exclude:
- 'spec/lib/dispatch-rider/configuration_spec.rb'

# Offense count: 13
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
Expand Down Expand Up @@ -455,11 +447,6 @@ RSpec/NamedSubject:
RSpec/NestedGroups:
Max: 5

# Offense count: 1
RSpec/NoExpectationExample:
Exclude:
- 'spec/lib/dispatch-rider/queue_services_spec.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
Expand Down
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Change Log

## [v2.0.0]

* Now require Ruby 2.6.5 at the very minimum
* Now require Rails 5.2 at the very minimum
* Now support both Aws SDK 1.x and 3.x
## [v2.0.0](https://github.com/payrollhero/dispatch-rider/tree/v2.0.0) (2022-09-20)
[Full Changelog](https://github.com/payrollhero/dispatch-rider/compare/v1.9.0...v2.0.0)

* Tests now run via Github actions
* Requires Ruby 2.6.5 at the very minimum
* Requires Rails 5.2 at the very minimum
* Supports both Aws SDK 1.x and 3.x
* aws-sdk-sqs and aws-sdk-sns are marked as optional, but strongly recommended.
* Security Update Rails (CVE-2022-32224): Automatically set the active-record config DispatchRider::ScheduledJob model.
* Tests are validated against rails 5.2.x, 6.0.x, 6.1.x and 7.0.x
* Started addressing some of the style issue and tech debt via rubocop-challenger automated PR

## [v1.9.0](https://github.com/payrollhero/dispatch-rider/tree/v1.9.0) (2019-11-11)
[Full Changelog](https://github.com/payrollhero/dispatch-rider/compare/v1.8.6...v1.9.0)
Expand Down
4 changes: 3 additions & 1 deletion gemfiles/Gemfile-5-2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source 'https://rubygems.org'
gemspec path: '..'

gem 'rails', '~> 5.2.6'
gem 'aws-sdk', "~> #{ENV['AWS_SDK_VER']}"
gem 'aws-sdk-sns'
gem 'aws-sdk-sqs'
gem 'aws-sdk-v1', github: 'payrollhero/aws-sdk-ruby', branch: 'v1-require-json-2.6' if ENV['AWS_SDK_VER'] == 'v1'
4 changes: 3 additions & 1 deletion gemfiles/Gemfile-6-0
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source 'https://rubygems.org'
gemspec path: '..'

gem 'rails', '~> 6.0.4'
gem 'aws-sdk', "~> #{ENV['AWS_SDK_VER']}"
gem 'aws-sdk-sns'
gem 'aws-sdk-sqs'
gem 'aws-sdk-v1', github: 'payrollhero/aws-sdk-ruby', branch: 'v1-require-json-2.6' if ENV['AWS_SDK_VER'] == 'v1'
4 changes: 3 additions & 1 deletion gemfiles/Gemfile-6-1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source 'https://rubygems.org'
gemspec path: '..'

gem 'rails', '~> 6.1.4'
gem 'aws-sdk', "~> #{ENV['AWS_SDK_VER']}"
gem 'aws-sdk-sns'
gem 'aws-sdk-sqs'
gem 'aws-sdk-v1', github: 'payrollhero/aws-sdk-ruby', branch: 'v1-require-json-2.6' if ENV['AWS_SDK_VER'] == 'v1'
4 changes: 3 additions & 1 deletion gemfiles/Gemfile-7-0
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ source 'https://rubygems.org'
gemspec path: '..'

gem 'rails', '~> 7.0.3'
gem 'aws-sdk', "~> #{ENV['AWS_SDK_VER']}"
gem 'aws-sdk-sns'
gem 'aws-sdk-sqs'
gem 'aws-sdk-v1', github: 'payrollhero/aws-sdk-ruby', branch: 'v1-require-json-2.6' if ENV['AWS_SDK_VER'] == 'v1'
2 changes: 1 addition & 1 deletion spec/lib/dispatch-rider/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
describe "#logger" do

describe "default" do
example { expect(subject.logger).to be_kind_of(Logger) }
example { expect(subject.logger).to be_a(Logger) }
end

example { expect(subject).to respond_to(:logger) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
let(:published_message) { File.new(Dir["#{path}/*.ready"].first).read }

before { FileUtils.mkdir_p(path) }

after { FileUtils.rm_rf(path) }

describe "#publish" do
Expand Down
1 change: 1 addition & 0 deletions spec/lib/dispatch-rider/publisher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
}

before { DispatchRider.config.callbacks.for(:publish) << publish_callback }

after { DispatchRider.config.callbacks.for(:publish).delete publish_callback }

example do
Expand Down
6 changes: 0 additions & 6 deletions spec/lib/dispatch-rider/queue_services_spec.rb

This file was deleted.

0 comments on commit 9eed563

Please sign in to comment.