Skip to content

Commit

Permalink
drop ruby 2.5 (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser authored Sep 24, 2022
1 parent 6059df4 commit 6926aa0
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
strategy:
fail-fast: false # run all tests so we see which gem/ruby combinations break
matrix:
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', head, jruby-head]
ruby: ['2.6', '2.7', '3.0', '3.1', head, jruby-head]
os: [ubuntu-latest, windows-latest]
task: [spec]
include:
- ruby: '2.5' # lowest supported version
- ruby: '2.6' # lowest supported version, same as gemspec and .rubocop.yml
os: ubuntu-latest
task: rubocop
steps:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
NewCops: enable
TargetRubyVersion: 2.5
TargetRubyVersion: 2.6
SuggestExtensions: false
Exclude:
- '**/vendor/bundle/**/*'
Expand Down
4 changes: 2 additions & 2 deletions lib/parallel_tests/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@ def parse_options!(argv)
def extract_file_paths(argv)
dash_index = argv.rindex("--")
file_args_at = (dash_index || -1) + 1
[argv[file_args_at..-1], argv[0...(dash_index || 0)]]
[argv[file_args_at..], argv[0...(dash_index || 0)]]
end

def extract_test_options(argv)
dash_index = argv.index("--") || -1
argv[dash_index + 1..-1]
argv[dash_index + 1..]
end

def append_test_options(options, argv)
Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/cucumber/scenario_line_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def visit_feature_element(uri, feature_element, feature_tags, line_numbers: [])
example_tags = example.tags.map(&:name)
example_tags = scenario_tags + example_tags
next unless matches_tags?(example_tags)
example.rows[1..-1].each do |row|
example.rows[1..].each do |row|
test_line = row.source_line
next if line_numbers.any? && !line_numbers.include?(test_line)

Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/gherkin/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def summarize_results(results)
plural = "s" if (word == group) && (number != 1)
"#{number} #{word}#{plural}"
end
"#{sums[0]} (#{sums[1..-1].join(", ")})"
"#{sums[0]} (#{sums[1..].join(", ")})"
end.compact.join("\n")
end

Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/grouper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def in_even_groups_by_size(items, num_groups, options = {})
# add all files that should run in a multiple isolated processes to their own groups
group_features_by_size(items_to_group(single_items), groups[0..(isolate_count - 1)])
# group the non-isolated by size
group_features_by_size(items_to_group(items), groups[isolate_count..-1])
group_features_by_size(items_to_group(items), groups[isolate_count..])
else
# add all files that should run in a single non-isolated process to first group
single_items.each { |item, size| add_to_group(groups.first, item, size) }
Expand Down
2 changes: 1 addition & 1 deletion parallel_tests.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Gem::Specification.new name, ParallelTests::VERSION do |s|
s.license = "MIT"
s.executables = ["parallel_spinach", "parallel_cucumber", "parallel_rspec", "parallel_test"]
s.add_runtime_dependency "parallel"
s.required_ruby_version = '>= 2.5.0'
s.required_ruby_version = '>= 2.6.0'
end
2 changes: 1 addition & 1 deletion spec/parallel_tests/rspec/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def call(*args)
def call(*args)
base = ["ruby", "-Ilib:test", "test/minitest/test_minitest_unit.rb"]
result = ParallelTests::RSpec::Runner.command_with_seed([*base, *args], "555")
result[base.length..-1]
result[base.length..]
end

it "adds the randomized seed" do
Expand Down
2 changes: 1 addition & 1 deletion spec/parallel_tests/test/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def run_with_file(content)
def call(*args)
base = ["ruby", "-Ilib:test", "test/minitest/test_minitest_unit.rb"]
result = ParallelTests::Test::Runner.command_with_seed([*base, *args], "555")
result[base.length..-1]
result[base.length..]
end

it "adds the randomized seed" do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_tests_in_groups(klass, suffix)

def setup_runtime_log # rubocop:disable Lint/NestedMethodDefinition
File.open(log, 'w') do |f|
@files[1..-1].each { |file| f.puts "#{file}:#{@files.index(file)}" }
@files[1..].each { |file| f.puts "#{file}:#{@files.index(file)}" }
f.puts "#{@files[0]}:10"
end
end
Expand Down

0 comments on commit 6926aa0

Please sign in to comment.