Skip to content

Commit 20cf2b1

Browse files
committed
book2: use URI.open to get translation attributes
Otherwise we get a complaint that opening a URI through a plain `open` is deprecated (though it still works for now).
1 parent 4f4b011 commit 20cf2b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/tasks/book2.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require "nokogiri"
44
require "octokit"
55
require "pathname"
6-
require "open-uri"
76

87
def expand(content, path, &get_content)
98
content.gsub(/include::(\S+)\[\]/) do |line|
@@ -71,7 +70,7 @@ def genbook(code, &get_content)
7170
end
7271

7372
begin
74-
l10n_file = open("https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/data/locale/attributes-#{code}.adoc").read
73+
l10n_file = URI.open("https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/data/locale/attributes-#{code}.adoc").read
7574
rescue
7675
l10n_file = ""
7776
end

0 commit comments

Comments
 (0)