Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ruby 2.5 support #1415

Merged
merged 3 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
ruby:
- 2.7.2
- 2.6.6
- 2.5.8
appraisal:
- rails_6_0
- rails_5_2
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require:
- rubocop-rails
AllCops:
NewCops: disable
TargetRubyVersion: 2.5
TargetRubyVersion: 2.6
Exclude:
- 'gemfiles/*'
Bundler/OrderedGems:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ machine, understanding the codebase, and creating a good pull request.

## Compatibility

Shoulda Matchers is tested and supported against Ruby 2.5+, Rails
Shoulda Matchers is tested and supported against Ruby 2.6+, Rails
5.0+, RSpec 3.x, and Minitest 5.x.

- For Ruby < 2.4 and Rails < 4.1 compatibility, please use [v3.1.3][v3.1.3].
Expand Down
2 changes: 1 addition & 1 deletion doc_config/yard/templates/default/layout/html/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def preprocess_index(contents)
map do |value|
value.
split('_').
map { |word| word[0].upcase + word[1..-1] }.
map { |word| word[0].upcase + word[1..] }.
join
end.
join('::')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def build_submatcher_failure_message_for(
if number_of_submatchers_for_failure_message > 1
"In checking that #{model.name} #{submatcher_description}, " +
failure_message[0].downcase +
failure_message[1..-1]
failure_message[1..]
else
failure_message
end
Expand Down
2 changes: 1 addition & 1 deletion lib/shoulda/matchers/util/word_wrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def wrap_line(line)
leftover = ''
else
fitted_line = line[0..index].rstrip
leftover = line[index + 1..-1]
leftover = line[index + 1..]
end

{ fitted_line: fitted_line, leftover: leftover }
Expand Down
2 changes: 1 addition & 1 deletion shoulda-matchers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Gem::Specification.new do |s|
'shoulda-matchers.gemspec']
s.require_paths = ['lib']

s.required_ruby_version = '>= 2.5.0'
s.required_ruby_version = '>= 2.6.0'
s.add_dependency('activesupport', '>= 5.0.0')
end
2 changes: 1 addition & 1 deletion spec/support/tests/command_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def elided_output
new_lines << "(...#{lines.size - 10} more lines...)"
end

new_lines << lines[-5..-1]
new_lines << lines[-5..]
new_lines.join("\n")
end

Expand Down
2 changes: 1 addition & 1 deletion spec/support/unit/matchers/fail_with_message_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def supports_block_expectations?
lines << Shoulda::Matchers::Util.indent(expected, 2)

if @actual
diff = differ.diff(@actual, expected)[1..-1]
diff = differ.diff(@actual, expected)[1..]

lines << 'Actually failed with:'
lines << Shoulda::Matchers::Util.indent(@actual, 2)
Expand Down
2 changes: 1 addition & 1 deletion spec/support/unit/matchers/match_against.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def matcher_fails_in_positive?
end

def diff(expected, actual)
differ.diff(expected, actual)[1..-1]
differ.diff(expected, actual)[1..]
end

def differ
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def configure_validation_matcher(matcher)

it 'matches given a subset of the valid values' do
builder = build_object_allowing(possible_values)
expect_to_match_on_values(builder, possible_values[1..-1])
expect_to_match_on_values(builder, possible_values[1..])
end

if zero
Expand Down