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:42, 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/} 
> 
> Yes, this means lines 55 to 62 can be removed, since the new form takes
> care of retarded ruby1.8 behaviour.
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/crohr/restfully/pull/7/files#r17667732>.
> 
Hello,

I needed an explicit conversion to hash, but the change passes the tests.

Future readers of the code might wonder why I coded like that. I'll
commit a comment.

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