Skip to content

Commit

Permalink
[improvement] Ruby 3.2 support (3m)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobsy committed Oct 7, 2024
1 parent 5699af7 commit c4d630c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [ "2.3", "2.4", "2.5", "2.6", "2.7", "3.0" ]
ruby-version: [ "3.0", "3.1", "3.2", "3.3", "3.4" ]

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ test/version_tmp
*.o
*.a
mkmf.log
.DS_Store
2 changes: 1 addition & 1 deletion lib/openxml/has_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def valid_in?(value, list)
end

def matches?(value, regexp)
return if value =~ regexp
return if value.is_a?(String) && value =~ regexp
raise ArgumentError, "Value does not match #{regexp}"
end

Expand Down
4 changes: 2 additions & 2 deletions test/has_properties_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def tag
end

should "call to_xml on each property" do
builder = Nokogiri::XML::Builder.new
builder = OpenXml::Builder.new
mock = MiniTest::Mock.new
def mock.render?; true; end
mock.expect(:render?, true)
mock.expect(:to_xml, nil, [ builder ])

OpenXml::Properties::BooleanProperty.stub :new, mock do
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
require "rr"

require "minitest/reporters/turn_reporter"
MiniTest::Reporters.use! Minitest::Reporters::TurnReporter.new
Minitest::Reporters.use! Minitest::Reporters::TurnReporter.new

require "shoulda/context"
require "pry"
Expand Down

0 comments on commit c4d630c

Please sign in to comment.