Skip to content

Commit

Permalink
Merge pull request #73 from maxmind/horgh/update-ruby
Browse files Browse the repository at this point in the history
Test on Ruby 3.4, drop Ruby 2.7
  • Loading branch information
oschwald authored Dec 30, 2024
2 parents 21cb417 + 97daf2d commit f73f12b
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
ruby-version: 3.4
- run: bundle install
- run: bundle exec rake -t rubocop
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
version:
[
2.7,
'3.0',
3.1,
3.2,
3.3,
3.4,
jruby,
]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require: rubocop-performance

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: '3.0'
NewCops: enable

# Metrics are too arbitrary.
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## 1.3.0

* Ruby 2.5 and 2.6 are no longer supported. If you're using one of these
versions, please use version 1.2.0 of this gem.
* Ruby 3.0+ is now required. If you're using Ruby 2.5, 2.6, or 2.7, please
use version 1.2.0 of this gem.

## 1.2.0 (2023-11-22)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For more information see the

## Requirements

This code requires Ruby version 2.7 or higher.
This code requires Ruby version 3.0 or higher.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion maxmind-db.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |s|
'source_code_uri' => 'https://github.com/maxmind/MaxMind-DB-Reader-ruby',
'rubygems_mfa_required' => 'true',
}
s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0'

s.add_development_dependency 'minitest'
s.add_development_dependency 'rake'
Expand Down
6 changes: 2 additions & 4 deletions test/test_decoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,9 @@ def test_uint128
end

def validate_type_decoding(type, tests)
values = []
tests.each do |input, expected|
values << check_decoding(type, input, expected)
tests.map do |input, expected|
check_decoding(type, input, expected)
end
values
end

def check_decoding(type, input, expected, name = nil)
Expand Down
3 changes: 1 addition & 2 deletions test/test_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,9 @@ def test_metadata_unknown_attribute
reader = MaxMind::DB.new(
'test/data/test-data/MaxMind-DB-test-decoder.mmdb'
)
e = assert_raises NoMethodError do
assert_raises NoMethodError do
reader.metadata.what
end
assert(e.message.include?('undefined method `what\''))
reader.close
end

Expand Down

0 comments on commit f73f12b

Please sign in to comment.