lib/gems/connection.rb in gems-0.0.1 vs lib/gems/connection.rb in gems-0.0.2

- old
+ new

@@ -3,10 +3,16 @@ module Gems module Connection private def connection - Faraday.new(:url => 'http://rubygems.org') do |connection| + options = { + :headers => {'Accept' => 'application/json'}, + :ssl => {:verify => false}, + :url => 'https://rubygems.org', + } + + Faraday.new(options) do |connection| connection.use Faraday::Request::UrlEncoded connection.use Faraday::Response::RaiseError connection.use Faraday::Response::Rashify connection.use Faraday::Response::ParseJson connection.adapter(Faraday.default_adapter)