1
0
rubygem-gem2rpm/0026-use-https-instead-of-http-for-rubygems.org.patch

40 lines
1.3 KiB
Diff
Raw Normal View History

From 304e55ea06e789e41683351c3eca7e8f20619201 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20R=C3=BCckert?= <mrueckert@suse.de>
Date: Thu, 10 Nov 2016 18:16:23 +0100
Subject: [PATCH 26/32] use https instead of http for rubygems.org
---
bin/gem2rpm | 2 +-
templates/opensuse.spec.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/gem2rpm b/bin/gem2rpm
index 8a6db05..45ed21c 100755
--- a/bin/gem2rpm
+++ b/bin/gem2rpm
@@ -111,7 +111,7 @@ gemfile = rest[0]
if fetch
gem_uri = ''
- open("http://rubygems.org/api/v1/gems/#{gemfile}.json") do |f|
+ open("https://rubygems.org/api/v1/gems/#{gemfile}.json") do |f|
gem_uri = f.read.match(/"gem_uri":\s*"(.*?)",/m)[1]
gemfile = URI.parse(gem_uri).path.split('/').last
open(gemfile, 'w') do |gf|
diff --git a/templates/opensuse.spec.erb b/templates/opensuse.spec.erb
index e6e9a1a..b070745 100644
--- a/templates/opensuse.spec.erb
+++ b/templates/opensuse.spec.erb
@@ -76,7 +76,7 @@ Url: <%= spec.homepage %>
<% if config[:sourceurl] -%>
Source: <%= config[:sourceurl] %>
<% else -%>
-Source: http://rubygems.org/gems/%{mod_full_name}.gem
+Source: https://rubygems.org/gems/%{mod_full_name}.gem
<% end -%>
<% if config[:sources]
config[:sources].each_with_index do |src, i| -%>
--
2.20.1