diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 035cd8a..6bb6099 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.gitignore b/.gitignore index a217564..d82ea09 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ test/version_tmp *.o *.a mkmf.log +.DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e550d..c075273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.5 - Oct 7, 2024 + + - Ruby 3.2 support + ## 0.3.4 - Oct 16, 2019 - Removed rubyzip lock diff --git a/lib/openxml-package/version.rb b/lib/openxml-package/version.rb index ac4c3e0..ccb0440 100644 --- a/lib/openxml-package/version.rb +++ b/lib/openxml-package/version.rb @@ -1,3 +1,3 @@ module OpenXmlPackage - VERSION = "0.3.4" + VERSION = "0.3.5" end diff --git a/lib/openxml/has_attributes.rb b/lib/openxml/has_attributes.rb index 15d3910..d97ef99 100644 --- a/lib/openxml/has_attributes.rb +++ b/lib/openxml/has_attributes.rb @@ -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 diff --git a/test/has_children_test.rb b/test/has_children_test.rb index f8c41d2..4f8b51b 100644 --- a/test/has_children_test.rb +++ b/test/has_children_test.rb @@ -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" diff --git a/test/has_properties_test.rb b/test/has_properties_test.rb index 15a344f..b38cda8 100644 --- a/test/has_properties_test.rb +++ b/test/has_properties_test.rb @@ -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 diff --git a/test/test_helper.rb b/test/test_helper.rb index b4d9307..5958bce 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -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"