Support versions of rest-client < 1.7.0 such as 1.7.0.rc1 which check ssl certificates by default

As gem specification for restfully allows for rest-client v 1.7.0.rc1 to be pulled, restfully's behaviour will change when connecting to https servers with certificates that do no validate against system-wide certificate authorities. 

This commits add support for ssl options such as verify_ssl and any option name starting with ssl to be passed to be saved at session level and used by RestClient::Request when creating a RestClient::Resource

This might mean the restfully.gemspec could be updated to support rest-client in the 1.7.x branch
Le 17/09/2014 16:34, Cyril Rohr a écrit :
> In lib/restfully/session.rb:
> 
>> @@ -49,7 +50,16 @@ def initialize(options = {})
>>        end
>>  
>>        setup
>> -
>> +      
>> +      @ssl_options=config.to_hash.select{|k,v| k =~ /^ssl/ || k =~ /verify_ssl/} 
> 
> I think you can achieve the same thing with:
> 
> |@ssl_options = Hash[*config.select{|k,v| k =~ /^ssl/ || k =~ /verify_ssl/}.flatten]
> |
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/crohr/restfully/pull/7/files#r17667169>.
> 

I guess the interest of the second option is that it is compatible with
ruby 1.8.7 without the ugly lines following ?

David
-- 
David Margery <><   (jabber/mail:David.Margery@inria.fr)
Ingénieur de Recherche
Directeur technique d'ALADDIN-G5K pour Grid'5000
Centre de recherche INRIA Rennes - Bretagne Atlantique, France
Equipe Myriads, bureau E201, niveau vert, tel +33 2 99 84 25 12