Skip to content

Commit 114f0fd

Browse files
committed
Ingore net/http ssl warnings for gemfile.
1 parent 7f79ed4 commit 114f0fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ else
1919
version = spec.dependencies.detect{ |d|d.name == 'activerecord' }.requirement.requirements.first.last.version
2020
major, minor, tiny = version.split('.')
2121
uri = URI.parse "https://rubygems.org/api/v1/versions/activerecord.yaml"
22-
YAML.load(Net::HTTP.get(uri)).select do |data|
22+
http = Net::HTTP.new(uri.host, uri.port)
23+
http.use_ssl = true
24+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
25+
YAML.load(http.request(Net::HTTP::Get.new(uri.request_uri)).body).select do |data|
2326
a, b, c = data['number'].split('.')
2427
!data['prerelease'] && major == a && (minor.nil? || minor == b)
2528
end.first['number']

0 commit comments

Comments
 (0)