Skip to content

Commit 10eb016

Browse files
authored
Merge pull request #78 from openxml/fix-kernel-open-deprecation
Fixed deprecation where URI.open is no longer available via kernel open
2 parents 873d05c + cdbe72a commit 10eb016

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

.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.6", "2.7" ]
10+
ruby-version: [ "2.6", "2.7", "3.0" ]
1111

1212
steps:
1313
- name: Checkout

Gemfile.lock

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
openxml-docx (0.11.3)
4+
openxml-docx (0.11.4)
55
nokogiri
66
openxml-drawingml
77
openxml-package (>= 0.2.2)
@@ -12,20 +12,20 @@ GEM
1212
specs:
1313
coderay (1.1.2)
1414
diff-lcs (1.3)
15-
docile (1.3.2)
15+
docile (1.4.0)
1616
method_source (1.0.0)
1717
mini_portile2 (2.6.1)
1818
nokogiri (1.12.5)
1919
mini_portile2 (~> 2.6.1)
2020
racc (~> 1.4)
21-
openxml-drawingml (0.2.0)
21+
openxml-drawingml (0.2.1)
2222
nokogiri
2323
openxml-package (~> 0.3.2)
2424
openxml-package (0.3.4)
2525
nokogiri
2626
ox
2727
rubyzip
28-
ox (2.14.5)
28+
ox (2.14.6)
2929
pry (0.13.1)
3030
coderay (~> 1.1)
3131
method_source (~> 1.0)
@@ -46,10 +46,12 @@ GEM
4646
rspec-support (~> 3.9.0)
4747
rspec-support (3.9.3)
4848
rubyzip (2.3.2)
49-
simplecov (0.18.5)
49+
simplecov (0.21.2)
5050
docile (~> 1.1)
5151
simplecov-html (~> 0.11)
52-
simplecov-html (0.12.2)
52+
simplecov_json_formatter (~> 0.1)
53+
simplecov-html (0.12.3)
54+
simplecov_json_formatter (0.1.3)
5355
timecop (0.9.1)
5456

5557
PLATFORMS

lib/openxml/docx/package.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def initialize
5555
end
5656

5757
def embed_truetype_font(path: nil, name: nil)
58-
open(path, "rb") do |source_font|
58+
URI.open(path, "rb") do |source_font|
5959
obfuscation_data = obfuscate_font source_font
6060
data = obfuscation_data[:bytes] << source_font.read
6161
destination_font_name = "font#{fonts.fonts.count + 1}.odttf"
@@ -79,7 +79,7 @@ def embed_image(path: nil, content_type: nil, into_part: nil)
7979
content_type ||= extension_match[:extension] if extension_match
8080
return if content_type.nil?
8181

82-
open(path, "rb") do |source_image|
82+
URI.open(path, "rb") do |source_image|
8383
embed_image_data(data: source_image.read, content_type: content_type, into_part: into_part)
8484
end
8585
end

lib/openxml/docx/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module OpenXml
22
module Docx
3-
VERSION = "0.11.3"
3+
VERSION = "0.11.4"
44
end
55
end

0 commit comments

Comments
 (0)