Hello community,

here is the log from the commit of package rubygem-excon for openSUSE:Factory 
checked in at 2015-04-18 10:41:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-excon (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-excon.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-excon"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-excon/rubygem-excon.changes      
2015-04-10 09:50:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-excon.new/rubygem-excon.changes 
2015-04-18 10:41:03.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Apr 17 04:28:48 UTC 2015 - co...@suse.com
+
+- updated to version 0.45.2
+
+-------------------------------------------------------------------

Old:
----
  excon-0.45.1.gem

New:
----
  excon-0.45.2.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-excon.spec ++++++
--- /var/tmp/diff_new_pack.3hdyai/_old  2015-04-18 10:41:03.000000000 +0200
+++ /var/tmp/diff_new_pack.3hdyai/_new  2015-04-18 10:41:03.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-excon
-Version:        0.45.1
+Version:        0.45.2
 Release:        0
 %define mod_name excon
 %define mod_full_name %{mod_name}-%{version}

++++++ excon-0.45.1.gem -> excon-0.45.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock
--- old/Gemfile.lock    2015-03-27 15:00:47.000000000 +0100
+++ new/Gemfile.lock    2015-04-16 16:49:54.000000000 +0200
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    excon (0.45.1)
+    excon (0.45.2)
 
 GEM
   remote: http://rubygems.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/changelog.txt new/changelog.txt
--- old/changelog.txt   2015-03-27 15:00:47.000000000 +0100
+++ new/changelog.txt   2015-04-16 16:49:54.000000000 +0200
@@ -1,3 +1,13 @@
+0.45.2 04/16/2015
+=================
+
+add raw_status reader
+improved tests around response/status
+rescue IO::WaitWritable for SSL sockets also
+indentation fixes
+tighten rescue in ssl socket connect to better report non-timeouts
+rescue EAGAIN and EWOULDBLOCK for non-blocking connects
+
 0.45.1 03/27/2015
 =================
 
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/excon.gemspec new/excon.gemspec
--- old/excon.gemspec   2015-03-27 15:00:47.000000000 +0100
+++ new/excon.gemspec   2015-04-16 16:49:54.000000000 +0200
@@ -13,8 +13,8 @@
   ## If your rubyforge_project name is different, then edit it and comment out
   ## the sub! line in the Rakefile
   s.name              = 'excon'
-  s.version           = '0.45.1'
-  s.date              = '2015-03-27'
+  s.version           = '0.45.2'
+  s.date              = '2015-04-16'
   s.rubyforge_project = 'excon'
 
   ## Make sure your summary is short. The description may be as long
@@ -122,6 +122,7 @@
     tests/authorization_header_tests.rb
     tests/bad_tests.rb
     tests/basic_tests.rb
+    tests/complete_responses.rb
     tests/data/127.0.0.1.cert.crt
     tests/data/127.0.0.1.cert.key
     tests/data/excon.cert.crt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/constants.rb new/lib/excon/constants.rb
--- old/lib/excon/constants.rb  2015-03-27 15:00:47.000000000 +0100
+++ new/lib/excon/constants.rb  2015-04-16 16:49:54.000000000 +0200
@@ -1,6 +1,6 @@
 module Excon
 
-  VERSION = '0.45.1'
+  VERSION = '0.45.2'
 
   CR_NL = "\r\n"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/response.rb new/lib/excon/response.rb
--- old/lib/excon/response.rb   2015-03-27 15:00:47.000000000 +0100
+++ new/lib/excon/response.rb   2015-04-16 16:49:54.000000000 +0200
@@ -22,6 +22,12 @@
     def status
       @data[:status]
     end
+    def status_line
+      @data[:status_line]
+    end
+    def status_line=(new_status_line)
+      @data[:status_line] = new_status_line
+    end
     def reason_phrase=(new_reason_phrase)
       @data[:reason_phrase] = new_reason_phrase
     end
@@ -53,6 +59,7 @@
         :body          => '',
         :headers       => Excon::Headers.new,
         :status        => status,
+        :status_line   => line,
         :reason_phrase => reason_phrase
       }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/socket.rb new/lib/excon/socket.rb
--- old/lib/excon/socket.rb     2015-03-27 15:00:47.000000000 +0100
+++ new/lib/excon/socket.rb     2015-04-16 16:49:54.000000000 +0200
@@ -64,12 +64,12 @@
     end
 
     def legacy_readline
-       begin
+      begin
         Timeout.timeout(@data[:read_timeout]) do
           @socket.readline
-      end
+        end
       rescue Timeout::Error
-      raise Excon::Errors::Timeout.new('read timeout reached')
+        raise Excon::Errors::Timeout.new('read timeout reached')
       end
     end
 
@@ -163,37 +163,37 @@
 
     def read_nonblock(max_length)
       begin
-            if max_length
-              until @read_buffer.length >= max_length
-                @read_buffer << @socket.read_nonblock(max_length - 
@read_buffer.length)
-              end
-            else
-              loop do
-                @read_buffer << @socket.read_nonblock(@data[:chunk_size])
-              end
-            end
-          rescue OpenSSL::SSL::SSLError => error
-            if error.message == 'read would block'
-              if timeout_reached('read')  
-                raise_timeout_error('read') 
-              else 
-                retry
-              end
-            else
-              raise(error)
-            end
-          rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
-            if @read_buffer.empty?
-              # if we didn't read anything, try again...
-              if timeout_reached('read') 
-                raise_timeout_error('read') 
-              else
-                retry
-              end
-            end
-          rescue EOFError
-            @eof = true
+        if max_length
+          until @read_buffer.length >= max_length
+            @read_buffer << @socket.read_nonblock(max_length - 
@read_buffer.length)
+          end
+        else
+          loop do
+            @read_buffer << @socket.read_nonblock(@data[:chunk_size])
+          end
+        end
+      rescue OpenSSL::SSL::SSLError => error
+        if error.message == 'read would block'
+          if timeout_reached('read')  
+            raise_timeout_error('read') 
+          else 
+            retry
           end
+        else
+          raise(error)
+        end
+      rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
+        if @read_buffer.empty?
+          # if we didn't read anything, try again...
+          if timeout_reached('read') 
+            raise_timeout_error('read') 
+          else
+            retry
+          end
+        end
+      rescue EOFError
+        @eof = true
+      end
 
       if max_length
         if @read_buffer.empty?
@@ -234,7 +234,7 @@
     def write_nonblock(data)
       if FORCE_ENC
         data.force_encoding('BINARY')
-          end
+      end
       loop do
         written = nil
         begin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/ssl_socket.rb new/lib/excon/ssl_socket.rb
--- old/lib/excon/ssl_socket.rb 2015-03-27 15:00:47.000000000 +0100
+++ new/lib/excon/ssl_socket.rb 2015-04-16 16:49:54.000000000 +0200
@@ -118,16 +118,17 @@
         if @nonblock
           begin
             @socket.connect_nonblock
-          rescue IO::WaitReadable
+          rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
             IO.select([@socket])
             retry
+          rescue IO::WaitWritable
+            IO.select(nil, [@socket])
+            retry
           end
         else
           @socket.connect
         end
-      rescue OpenSSL::SSL::SSLError
-        raise
-      rescue
+      rescue Errno::ETIMEDOUT, Timeout::Error
         raise Excon::Errors::Timeout.new('connect timeout reached')
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-03-27 15:00:47.000000000 +0100
+++ new/metadata        2015-04-16 16:49:54.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: excon
 version: !ruby/object:Gem::Version
-  version: 0.45.1
+  version: 0.45.2
 platform: ruby
 authors:
 - dpiddy (Dan Peterson)
@@ -10,7 +10,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-03-27 00:00:00.000000000 Z
+date: 2015-04-16 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -198,6 +198,7 @@
 - tests/authorization_header_tests.rb
 - tests/bad_tests.rb
 - tests/basic_tests.rb
+- tests/complete_responses.rb
 - tests/data/127.0.0.1.cert.crt
 - tests/data/127.0.0.1.cert.key
 - tests/data/excon.cert.crt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/complete_responses.rb 
new/tests/complete_responses.rb
--- old/tests/complete_responses.rb     1970-01-01 01:00:00.000000000 +0100
+++ new/tests/complete_responses.rb     2015-04-16 16:49:54.000000000 +0200
@@ -0,0 +1,31 @@
+Shindo.tests('Excon Response Validation') do
+  env_init
+
+  with_server('good') do
+    tests('good responses with complete headers') do
+        100.times do
+          res = Excon.get('http://127.0.0.1:9292/chunked/simple')
+          returns(true) { res.body == "hello world" }
+          returns(true) { res.status_line ==  "HTTP/1.1 200 OK\r\n" }
+          returns(true) { res.status == 200}
+          returns(true) { res.reason_phrase == "OK" }
+          returns(true) { res.remote_ip == "127.0.0.1" }
+      end
+    end
+  end
+ 
+  with_server('error') do
+    tests('error responses with complete headers') do
+        100.times do
+          res = Excon.get('http://127.0.0.1:9292/error/not_found')
+          returns(true) { res.body == "server says not found" }
+          returns(true) { res.status_line ==  "HTTP/1.1 404 Not Found\r\n" }
+          returns(true) { res.status == 404}
+          returns(true) { res.reason_phrase == "Not Found" }
+          returns(true) { res.remote_ip == "127.0.0.1" }
+      end
+    end
+  end
+  
+  env_restore
+end


Reply via email to