Skip to content

Commit

Permalink
Update rubocop ruby target version
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso committed Sep 21, 2021
1 parent 8801187 commit b1a6941
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_gem:
rubocop-shopify: rubocop.yml

AllCops:
TargetRubyVersion: 2.4.4
TargetRubyVersion: 2.6.5
Exclude:
- 'vendor/bundle/**/*'
Lint/SuppressedException:
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ gem "pry"
gem "mocha"

gem "rubocop-shopify", require: false
gem "rubocop", "<= 1.12.1", require: false # 1.13.0 drops Ruby 2.4 support
gem "yard"
gem "rake"

Expand Down
4 changes: 2 additions & 2 deletions job-iteration.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = ">= 2.6"
spec.name = "job-iteration"
spec.version = JobIteration::VERSION
spec.authors = %w(Shopify)
spec.authors = ["Shopify"]
spec.email = ["ops-accounts+shipit@shopify.com"]

spec.summary = "Makes your background jobs interruptible and resumable."
Expand All @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = %w(lib)
spec.require_paths = ["lib"]

spec.metadata["changelog_uri"] = "https://github.com/Shopify/job-iteration/blob/master/CHANGELOG.md"
spec.metadata["allowed_push_host"] = "https://rubygems.org"
Expand Down
6 changes: 3 additions & 3 deletions test/unit/active_job_iteration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -547,13 +547,13 @@ def test_supports_multiple_job_arguments_and_global_id
end

def test_supports_multiple_job_arguments
MultiArgumentIterationJob.perform_later(2, %w(a b c))
MultiArgumentIterationJob.perform_later(2, ["a", "b", "c"])

work_one_job

expected = [
[0, 2, %w(a b c)],
[1, 2, %w(a b c)],
[0, 2, ["a", "b", "c"]],
[1, 2, ["a", "b", "c"]],
]
assert_equal(expected, MultiArgumentIterationJob.records_performed)
end
Expand Down
12 changes: 7 additions & 5 deletions test/unit/iteration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,13 @@ def test_jobs_using_on_complete_have_accurate_total_time

def assert_raises_cursor_error(&block)
error = assert_raises(JobIteration::Iteration::CursorError, &block)
inspected_cursor = begin
error.cursor.inspect
rescue NoMethodError
Object.instance_method(:inspect).bind(error.cursor).call
end
inspected_cursor =
begin
error.cursor.inspect
rescue NoMethodError
Object.instance_method(:inspect).bind(error.cursor).call
end

assert_equal(
"Cursor must be composed of objects capable of built-in (de)serialization: " \
"Strings, Integers, Floats, Arrays, Hashes, true, false, or nil. " \
Expand Down

0 comments on commit b1a6941

Please sign in to comment.