bin/gem2rpm in gem2rpm-1.0.1 vs bin/gem2rpm in gem2rpm-1.0.2

- old
+ new

@@ -50,15 +50,15 @@ end if options[:fetch] gem_uri = '' begin - open("https://rubygems.org/api/v1/gems/#{gemfile}.json") do |f| + URI("https://rubygems.org/api/v1/gems/#{gemfile}.json").open do |f| gem_uri = f.read.match(/"gem_uri":\s*"(.*?)",/m)[1] gemfile = URI.parse(gem_uri).path.split('/').last gemfile = File.join(out_dir, gemfile) open(gemfile, 'w') do |gf| - gf.write(open(gem_uri).read) + gf.write(URI(gem_uri).open.read) end end rescue OpenURI::HTTPError => e Gem2Rpm.show_message("Gem fetch failed with error: #{e.message}") exit(1)