lib/onebox/mixins/git_blob_onebox.rb in onebox-2.2.2 vs lib/onebox/mixins/git_blob_onebox.rb in onebox-2.2.4
- old
+ new
@@ -165,10 +165,10 @@
@model_file = @lang.dup
@raw = "https://render.githubusercontent.com/view/solid?url=" + self.raw_template(m)
else
- contents = open(self.raw_template(m), read_timeout: timeout).read
+ contents = URI.open(self.raw_template(m), read_timeout: timeout).read
contents_lines = contents.lines #get contents lines
contents_lines_size = contents_lines.size #get number of lines
cr = calc_range(m, contents_lines_size) #calculate the range of lines for output