Skip to content

Commit 21a70e4

Browse files
authored
Merge pull request #42 from openxml/ruby-3.2
Ruby 3.2 Support
2 parents 5699af7 + 79cfdb3 commit 21a70e4

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
ruby-version: [ "2.3", "2.4", "2.5", "2.6", "2.7", "3.0" ]
10+
ruby-version: [ "3.0", "3.1", "3.2", "3.3" ]
1111

1212
steps:
1313
- name: Checkout

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ test/version_tmp
2222
*.o
2323
*.a
2424
mkmf.log
25+
.DS_Store

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.5 - Oct 7, 2024
2+
3+
- Ruby 3.2 support
4+
15
## 0.3.4 - Oct 16, 2019
26

37
- Removed rubyzip lock

lib/openxml-package/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module OpenXmlPackage
2-
VERSION = "0.3.4"
2+
VERSION = "0.3.5"
33
end

lib/openxml/has_attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def valid_in?(value, list)
162162
end
163163

164164
def matches?(value, regexp)
165-
return if value =~ regexp
165+
return if value.is_a?(String) && value =~ regexp
166166
raise ArgumentError, "Value does not match #{regexp}"
167167
end
168168

test/has_children_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def render?
3535
end
3636

3737
should "call to_xml on all of its children" do
38-
child = MiniTest::Mock.new
38+
child = Minitest::Mock.new
3939
child.expect :to_xml, "xml", %w{ xml }
4040
element << child
4141
element.to_xml "xml"

test/has_properties_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def tag
130130
end
131131

132132
should "call to_xml on each property" do
133-
builder = Nokogiri::XML::Builder.new
134-
mock = MiniTest::Mock.new
135-
def mock.render?; true; end
133+
builder = OpenXml::Builder.new
134+
mock = Minitest::Mock.new
135+
mock.expect(:render?, true)
136136
mock.expect(:to_xml, nil, [ builder ])
137137

138138
OpenXml::Properties::BooleanProperty.stub :new, mock do

test/test_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
require "rr"
1010

1111
require "minitest/reporters/turn_reporter"
12-
MiniTest::Reporters.use! Minitest::Reporters::TurnReporter.new
12+
Minitest::Reporters.use! Minitest::Reporters::TurnReporter.new
1313

1414
require "shoulda/context"
1515
require "pry"

0 commit comments

Comments
 (0)