Skip to content

Commit

Permalink
Merge pull request #42 from openxml/ruby-3.2
Browse files Browse the repository at this point in the history
Ruby 3.2 Support
  • Loading branch information
kobsy authored Oct 7, 2024
2 parents 5699af7 + 79cfdb3 commit 21a70e4
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 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" ]

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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.5 - Oct 7, 2024

- Ruby 3.2 support

## 0.3.4 - Oct 16, 2019

- Removed rubyzip lock
Expand Down
2 changes: 1 addition & 1 deletion lib/openxml-package/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module OpenXmlPackage
VERSION = "0.3.4"
VERSION = "0.3.5"
end
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
2 changes: 1 addition & 1 deletion test/has_children_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def render?
end

should "call to_xml on all of its children" do
child = MiniTest::Mock.new
child = Minitest::Mock.new
child.expect :to_xml, "xml", %w{ xml }
element << child
element.to_xml "xml"
Expand Down
6 changes: 3 additions & 3 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
mock = MiniTest::Mock.new
def mock.render?; true; end
builder = OpenXml::Builder.new
mock = Minitest::Mock.new
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 21a70e4

Please sign in to comment.