Hello community,

here is the log from the commit of package rubygem-excon for openSUSE:Factory 
checked in at 2016-07-21 07:58:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      
2016-04-12 19:34:17.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-excon.new/rubygem-excon.changes 
2016-07-21 07:58:50.000000000 +0200
@@ -1,0 +2,29 @@
+Sat Jul  9 04:29:42 UTC 2016 - [email protected]
+
+- updated to version 0.51.0
+ see installed changelog.txt
+
+  0.51.0 07/08/2016
+  
+  tweak new errors to be an alias rather than inherit
+
+-------------------------------------------------------------------
+Wed Jun 29 04:29:31 UTC 2016 - [email protected]
+
+- updated to version 0.50.1
+ see installed changelog.txt
+
+  0.50.1 06/28/2016
+  =================
+  
+  re-add some missing errors from refactoring
+  
+  0.50.0 06/28/2016
+  =================
+  
+  expand readme
+  refactor errors for consistancy
+  optionally allow unstubbed requests
+  parse/verify path as well as host for connection
+
+-------------------------------------------------------------------

Old:
----
  excon-0.49.0.gem

New:
----
  excon-0.51.0.gem

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

Other differences:
------------------
++++++ rubygem-excon.spec ++++++
--- /var/tmp/diff_new_pack.YaqSoX/_old  2016-07-21 07:58:51.000000000 +0200
+++ /var/tmp/diff_new_pack.YaqSoX/_new  2016-07-21 07:58:51.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-excon
-Version:        0.49.0
+Version:        0.51.0
 Release:        0
 %define mod_name excon
 %define mod_full_name %{mod_name}-%{version}

++++++ excon-0.49.0.gem -> excon-0.51.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CONTRIBUTORS.md new/CONTRIBUTORS.md
--- old/CONTRIBUTORS.md 2016-03-28 22:32:51.000000000 +0200
+++ new/CONTRIBUTORS.md 2016-07-08 16:19:40.000000000 +0200
@@ -1,4 +1,8 @@
+* Aaron Stone <[email protected]>
+* Adam Esterline <[email protected]>
+* Alexander Sandström <[email protected]>
 * Andrew Katz <[email protected]>
+* Andy Delcambre <[email protected]>
 * Anshul Khandelwal <[email protected]>
 * Ash Wilson <[email protected]>
 * Ben Burkert <[email protected]>
@@ -7,12 +11,15 @@
 * Brandur <[email protected]>
 * Brian D. Burns <[email protected]>
 * Brian Hartsock <[email protected]>
+* Bryan Paxton <[email protected]>
 * Caio Chassot <[email protected]>
 * Caius Durling <[email protected]>
 * Carl Hörberg <[email protected]>
+* Carl Hörberg <[email protected]>
 * Carlos Sanchez <[email protected]>
+* Casper Thomsen <[email protected]>
+* Chris Hanks <[email protected]>
 * Claudio Poli <[email protected]>
-* Colin Dean <[email protected]>
 * Damien Mathieu <[email protected]>
 * Dan Hensgen <[email protected]>
 * Dan Peterson <[email protected]>
@@ -24,35 +31,44 @@
 * David Biehl <[email protected]>
 * Dimitrij Denissenko <[email protected]>
 * Dominik Richter <[email protected]>
+* Doug McInnes <[email protected]>
 * Eugene Howe <[email protected]>
 * Evan Phoenix <[email protected]>
 * Fabian Wiesel <[email protected]>
 * Federico Ravasio <[email protected]>
 * Glenn Pratt <[email protected]>
 * Graeme Nelson <[email protected]>
+* Guillaume Balaine <[email protected]>
 * Hakan Ensari <[email protected]>
 * Ian Neubert <[email protected]>
 * Jacob Atzen <[email protected]>
+* James Cox <[email protected]>
 * James Watling <[email protected]>
+* Jean Mertz <[email protected]>
 * Jeremy Hinegardner <[email protected]>
+* Jesse Kempf <[email protected]>
+* Joe Rafaniello <[email protected]>
 * John Keiser <[email protected]>
 * John Leach <[email protected]>
 * Jonas Pfenniger <[email protected]>
 * Jonathan Dance <[email protected]>
 * Jonathan Dance <[email protected]>
 * Jonathan Roes <[email protected]>
+* Joshua B. Smith <[email protected]>
 * Joshua Gross <[email protected]>
 * Joshua Mckinney <[email protected]>
 * Joshua Napoli <[email protected]>
 * Joshua Napoli <[email protected]>
-* Joshua Smith <[email protected]>
+* Kelly Mahan <[email protected]>
 * Kensuke Nagae <[email protected]>
 * Konstantin Shabanov <[email protected]>
 * Kyle Rames <[email protected]>
 * Lewis Marshall <[email protected]>
 * Lincoln Stoll <[email protected]>
 * Louis Sobel <[email protected]>
+* Mahemoff <[email protected]>
 * Mathias Meyer <[email protected]>
+* Matt Gauger <[email protected]>
 * Matt Sanders <[email protected]>
 * Matt Sanders <[email protected]>
 * Matt Snyder <[email protected]>
@@ -68,16 +84,27 @@
 * Nathan Sutton <[email protected]>
 * Nick Osborn <[email protected]>
 * Nicolas Sanguinetti <[email protected]>
+* Paul Gideon Dann <[email protected]>
+* Pavel <[email protected]>
 * Peter Meier <[email protected]>
 * Peter Weldon <[email protected]>
 * Peter Weldon <[email protected]>
+* Phil Ross <[email protected]>
+* Richard Ramsden <[email protected]>
+* Ruslan Korolev <[email protected]>
+* Ruslan Korolev <[email protected]>
 * Ruslan Kyrychuk <[email protected]>
+* Ryan Bigg <[email protected]>
 * Ryan Mohr <[email protected]>
+* Sam Withrow <[email protected]>
 * Scott Gonyea <[email protected]>
 * Scott Gonyea <[email protected]>
+* Scott Walkinshaw <[email protected]>
 * Sean Cribbs <[email protected]>
 * Sergio Rubio <[email protected]>
 * Shai Rosenfeld <[email protected]>
+* Stefan Merettig <[email protected]>
+* Stephen Chu <[email protected]>
 * Swanand Pagnis <[email protected]>
 * Terry Howe <[email protected]>
 * Thom Mahoney & Josh Lane <[email protected]>
@@ -88,12 +115,14 @@
 * Tom Maher <[email protected]>
 * Trym Skaar <[email protected]>
 * Tuomas Silen <[email protected]>
+* Victor Costan <[email protected]>
 * Viven <[email protected]>
 * Wesley Beary <[email protected]>
 * Wesley Beary <[email protected]>
 * Wesley Beary <[email protected]>
 * Wesley Beary <[email protected]>
 * Wesley Beary <[email protected]>
+* Zach Anker <[email protected]>
 * chrisrhoden <[email protected]>
 * dickeyxxx <[email protected]>
 * geemus (Wesley Beary) <[email protected]>
@@ -106,5 +135,6 @@
 * rinrinne <[email protected]>
 * rkyrychuk <[email protected]>
 * sshaw <[email protected]>
+* starbelly <[email protected]>
 * twrodriguez <[email protected]>
-* zimbatm <[email protected]>
+* zimbatm <[email protected]>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock
--- old/Gemfile.lock    2016-03-28 22:32:51.000000000 +0200
+++ new/Gemfile.lock    2016-07-08 16:19:40.000000000 +0200
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    excon (0.49.0)
+    excon (0.51.0)
 
 GEM
   remote: http://rubygems.org/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2016-03-28 22:32:51.000000000 +0200
+++ new/README.md       2016-07-08 16:19:40.000000000 +0200
@@ -9,6 +9,23 @@
 [![Gem 
Version](https://badge.fury.io/rb/excon.svg)](http://badge.fury.io/rb/excon)
 
[![Gittip](http://img.shields.io/gittip/geemus.svg)](https://www.gittip.com/geemus/)
 
+* [Getting Started](#getting-started)
+* [Options](#options)
+* [Chunked Requests](#chunked-requests)
+* [Pipelining Requests](#pipelining-requests)
+* [Streaming Responses](#streaming-responses)
+* [Proxy Support](#proxy-support)
+* [Reusable ports](#reusable-ports)
+* [Unix Socket Support](#unix-socket-support)
+* [Stubs](#stubs)
+* [Instrumentation](#instrumentation)
+* [HTTPS client certificate](#https-client-certificate)
+* [HTTPS/SSL Issues](#httpsssl-issues)
+* [Getting Help](#getting-help)
+* [Contributing](#contributing)
+* [Plugins and Middlewares](#plugins-and-middlewares)
+* [License](#license)
+
 ## Getting Started
 
 Install the gem.
@@ -282,6 +299,12 @@
 
 Omitted attributes are assumed to match, so this stub will match *any* request 
and return an Excon::Response with a body of 'body' and status of 200.  You can 
add whatever stubs you might like this way and they will be checked against in 
the order they were added, if none of them match then excon will raise an 
`Excon::Errors::StubNotFound` error to let you know.
 
+If you want to allow unstubbed requests without raising `StubNotFound`, set 
the `allow_unstubbed_requests` option either globally or per request.
+
+```ruby
+connection = Excon.new('http://example.com', :mock => true, 
:allow_unstubbed_requests => true)
+```
+
 To remove a previously defined stub, or all stubs:
 
 ```ruby
@@ -417,6 +440,27 @@
 
 Please refer to 
[CONTRIBUTING.md](https://github.com/excon/excon/blob/master/CONTRIBUTING.md).
 
+# Plugins and Middlewares
+
+Using Excon's [Middleware system][middleware], you can easily extend Excon's
+functionality with your own. The following plugins extend Excon in their own
+way:
+
+* [excon-addressable](https://github.com/JeanMertz/excon-addressable)
+
+  Set [addressable](https://github.com/sporkmonger/addressable) as the default
+  URI parser, and add support for [URI templating][templating].
+
+* [excon-hypermedia](https://github.com/JeanMertz/excon-hypermedia)
+
+  Teaches Excon to talk with [HyperMedia APIs][hypermedia]. Allowing you to use
+  all of Excon's functionality, while traversing APIs in an easy and
+  self-discovering way.
+
 ## License
 
 Please refer to 
[LICENSE.md](https://github.com/excon/excon/blob/master/LICENSE.md).
+
+[middleware]: lib/excon/middlewares/base.rb
+[hypermedia]: https://en.wikipedia.org/wiki/HATEOAS
+[templating]: https://www.rfc-editor.org/rfc/rfc6570.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/changelog.txt new/changelog.txt
--- old/changelog.txt   2016-03-28 22:32:51.000000000 +0200
+++ new/changelog.txt   2016-07-08 16:19:40.000000000 +0200
@@ -1,3 +1,20 @@
+0.51.0 07/08/2016
+
+tweak new errors to be an alias rather than inherit
+
+0.50.1 06/28/2016
+=================
+
+re-add some missing errors from refactoring
+
+0.50.0 06/28/2016
+=================
+
+expand readme
+refactor errors for consistancy
+optionally allow unstubbed requests
+parse/verify path as well as host for connection
+
 0.49.0 03/28/2016
 =================
 
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/data/cacert.pem new/data/cacert.pem
--- old/data/cacert.pem 2016-03-28 22:32:51.000000000 +0200
+++ new/data/cacert.pem 2016-07-08 16:19:40.000000000 +0200
@@ -1,7 +1,7 @@
 ##
 ## Bundle of CA Root Certificates
 ##
-## Certificate data from Mozilla as of: Wed Jan 20 04:12:04 2016
+## Certificate data from Mozilla as of: Wed Apr 20 03:12:05 2016
 ##
 ## This is a bundle of X.509 certificates of public Certificate Authorities
 ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -14,7 +14,7 @@
 ## Just configure this file as the SSLCACertificateFile.
 ##
 ## Conversion done with mk-ca-bundle.pl version 1.25.
-## SHA1: 0ab47e2f41518f8d223eab517cb799e5b071231e
+## SHA1: 5df367cda83086392e1acdf22bfef00c48d5eba6
 ##
 
 
@@ -629,28 +629,6 @@
 llpwrN9M
 -----END CERTIFICATE-----
 
-Staat der Nederlanden Root CA
-=============================
------BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE
-ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4w
-HAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxh
-bmRlbiBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFt
-vsznExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw719tV2U02P
-jLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MOhXeiD+EwR+4A5zN9RGca
-C1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+UtFE5A3+y3qcym7RHjm+0Sq7lr7HcsBth
-vJly3uSJt3omXdozSVtSnA71iq3DuD3oBmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn6
-22r+I/q85Ej0ZytqERAhSQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRV
-HSAAMDwwOgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMvcm9v
-dC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA7Jbg0zTBLL9s+DAN
-BgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k/rvuFbQvBgwp8qiSpGEN/KtcCFtR
-EytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzmeafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbw
-MVcoEoJz6TMvplW0C5GUR5z6u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3y
-nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
-iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
------END CERTIFICATE-----
-
 UTN USERFirst Hardware Root CA
 ==============================
 -----BEGIN CERTIFICATE-----
@@ -731,41 +709,6 @@
 t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
 -----END CERTIFICATE-----
 
-NetLock Notary (Class A) Root
-=============================
------BEGIN CERTIFICATE-----
-MIIGfTCCBWWgAwIBAgICAQMwDQYJK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tigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr
-KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM
-8CgHrTwXZoi1/baI
------END CERTIFICATE-----
-
 XRamp Global CA Root
 ====================
 -----BEGIN CERTIFICATE-----
@@ -1876,30 +1819,6 @@
 66+KAQ==
 -----END CERTIFICATE-----
 
-CA Disig
-========
------BEGIN CERTIFICATE-----
-MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMK
-QnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwHhcNMDYw
-MzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlz
-bGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3
-DQEBAQUAA4IBDwAwggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgm
-GErENx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnXmjxUizkD
-Pw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYDXcDtab86wYqg6I7ZuUUo
-hwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhWS8+2rT+MitcE5eN4TPWGqvWP+j1scaMt
-ymfraHtuM6kMgiioTGohQBUgDCZbg8KpFhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8w
-gfwwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0P
-AQH/BAQDAgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cuZGlz
-aWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5zay9jYS9jcmwvY2Ff
-ZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2svY2EvY3JsL2NhX2Rpc2lnLmNybDAa
-BgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEwDQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59t
-WDYcPQuBDRIrRhCA/ec8J9B6yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3
-mkkp7M5+cTxqEEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/
-CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeBEicTXxChds6K
-ezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFNPGO+I++MzVpQuGhU+QqZMxEA
-4Z7CRneC9VkGjCFMhwnN5ag=
------END CERTIFICATE-----
-
 Juur-SK
 =======
 -----BEGIN CERTIFICATE-----
@@ -3891,3 +3810,56 @@
 Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYu
 a/GRspBl9JrmkO5K
 -----END CERTIFICATE-----
+
+SZAFIR ROOT CA2
+===============
+-----BEGIN CERTIFICATE-----
+MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG
+A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV
+BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBa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4ueE742pye
+hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM
+BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI
+hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW
+Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA
+L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo
+clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM
+pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb
+w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo
+J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm
+ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX
+is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7
+zAYspsbiDrW5viSP
+-----END CERTIFICATE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/excon.gemspec new/excon.gemspec
--- old/excon.gemspec   2016-03-28 22:32:51.000000000 +0200
+++ new/excon.gemspec   2016-07-08 16:19:40.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.49.0'
-  s.date              = '2016-03-28'
+  s.version           = '0.51.0'
+  s.date              = '2016-07-08'
   s.rubyforge_project = 'excon'
 
   ## Make sure your summary is short. The description may be as long
@@ -101,7 +101,7 @@
     lib/excon.rb
     lib/excon/connection.rb
     lib/excon/constants.rb
-    lib/excon/errors.rb
+    lib/excon/error.rb
     lib/excon/extensions/uri.rb
     lib/excon/headers.rb
     lib/excon/middlewares/base.rb
@@ -130,7 +130,7 @@
     tests/data/excon.cert.crt
     tests/data/excon.cert.key
     tests/data/xs
-    tests/errors_tests.rb
+    tests/error_tests.rb
     tests/header_tests.rb
     tests/middlewares/canned_response_tests.rb
     tests/middlewares/capture_cookies_tests.rb
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  2016-03-28 22:32:51.000000000 +0200
+++ new/lib/excon/constants.rb  2016-07-08 16:19:40.000000000 +0200
@@ -1,6 +1,6 @@
 module Excon
 
-  VERSION = '0.49.0'
+  VERSION = '0.51.0'
 
   CR_NL = "\r\n"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/error.rb new/lib/excon/error.rb
--- old/lib/excon/error.rb      1970-01-01 01:00:00.000000000 +0100
+++ new/lib/excon/error.rb      2016-07-08 16:19:40.000000000 +0200
@@ -0,0 +1,214 @@
+module Excon
+  # Excon exception classes
+  class Error < StandardError
+    @default_status_error = :HTTPStatus
+
+    class StubNotFound < Error; end
+    class InvalidStub < Error; end
+
+    # Socket related errors
+    class Socket < Error
+      attr_reader :socket_error
+
+      def initialize(socket_error = Excon::Error.new)
+        if is_a?(Certificate) || is_a?(Excon::Errors::CertificateError)
+          super
+        else
+          super("#{socket_error.message} (#{socket_error.class})")
+          set_backtrace(socket_error.backtrace)
+          @socket_error = socket_error
+        end
+      end
+    end
+
+    # Certificate related errors
+    class Certificate < Socket
+      def initialize(socket_error = Excon::Error.new)
+        msg = <<-EOL
+Unable to verify certificate. This may be an issue with the remote host or 
with Excon. Excon has certificates bundled, but these can be customized:
+
+            `Excon.defaults[:ssl_ca_path] = path_to_certs`
+            `ENV['SSL_CERT_DIR'] = path_to_certs`
+            `Excon.defaults[:ssl_ca_file] = path_to_file`
+            `ENV['SSL_CERT_FILE'] = path_to_file'
+            `Excon.defaults[:ssl_verify_callback] = callback`
+                (see OpenSSL::SSL::SSLContext#verify_callback)
+or:
+            `Excon.defaults[:ssl_verify_peer] = false` (less secure).
+        EOL
+        full_message = "#{socket_error.message} (#{socket_error.class})"
+        full_message << ' ' + msg
+        super(full_message)
+        set_backtrace(socket_error.backtrace)
+        @socket_error = socket_error
+      end
+    end
+
+    class Timeout < Error; end
+    class ResponseParse < Error; end
+    class ProxyParse < Error; end
+    class ProxyConnection < Error; end
+
+    # Base class for HTTP Error classes
+    class HTTPStatus < Error
+      attr_reader :request, :response
+
+      def initialize(msg, request = nil, response = nil)
+        super(msg)
+        @request = request
+        @response = response
+      end
+    end
+
+    # HTTP Error classes
+    class Informational < HTTPStatus; end
+    class Success < HTTPStatus; end
+    class Redirection < HTTPStatus; end
+    class Client < HTTPStatus; end
+    class Server < HTTPStatus; end
+
+    class Continue < Informational; end                  # 100
+    class SwitchingProtocols < Informational; end        # 101
+    class OK < Success; end                              # 200
+    class Created < Success; end                         # 201
+    class Accepted < Success; end                        # 202
+    class NonAuthoritativeInformation < Success; end     # 203
+    class NoContent < Success; end                       # 204
+    class ResetContent < Success; end                    # 205
+    class PartialContent < Success; end                  # 206
+    class MultipleChoices < Redirection; end             # 300
+    class MovedPermanently < Redirection; end            # 301
+    class Found < Redirection; end                       # 302
+    class SeeOther < Redirection; end                    # 303
+    class NotModified < Redirection; end                 # 304
+    class UseProxy < Redirection; end                    # 305
+    class TemporaryRedirect < Redirection; end           # 307
+    class BadRequest < Client; end                       # 400
+    class Unauthorized < Client; end                     # 401
+    class PaymentRequired < Client; end                  # 402
+    class Forbidden < Client; end                        # 403
+    class NotFound < Client; end                         # 404
+    class MethodNotAllowed < Client; end                 # 405
+    class NotAcceptable < Client; end                    # 406
+    class ProxyAuthenticationRequired < Client; end      # 407
+    class RequestTimeout < Client; end                   # 408
+    class Conflict < Client; end                         # 409
+    class Gone < Client; end                             # 410
+    class LengthRequired < Client; end                   # 411
+    class PreconditionFailed < Client; end               # 412
+    class RequestEntityTooLarge < Client; end            # 413
+    class RequestURITooLong < Client; end                # 414
+    class UnsupportedMediaType < Client; end             # 415
+    class RequestedRangeNotSatisfiable < Client; end     # 416
+    class ExpectationFailed < Client; end                # 417
+    class UnprocessableEntity < Client; end              # 422
+    class TooManyRequests < Client; end                  # 429
+    class InternalServerError < Server; end              # 500
+    class NotImplemented < Server; end                   # 501
+    class BadGateway < Server; end                       # 502
+    class ServiceUnavailable < Server; end               # 503
+    class GatewayTimeout < Server; end                   # 504
+
+    def self.status_errors
+      @status_errors ||= {
+        100 => [Excon::Error::Continue, 'Continue'],
+        101 => [Excon::Error::SwitchingProtocols, 'Switching Protocols'],
+        200 => [Excon::Error::OK, 'OK'],
+        201 => [Excon::Error::Created, 'Created'],
+        202 => [Excon::Error::Accepted, 'Accepted'],
+        203 => [Excon::Error::NonAuthoritativeInformation, 'Non-Authoritative 
Information'],
+        204 => [Excon::Error::NoContent, 'No Content'],
+        205 => [Excon::Error::ResetContent, 'Reset Content'],
+        206 => [Excon::Error::PartialContent, 'Partial Content'],
+        300 => [Excon::Error::MultipleChoices, 'Multiple Choices'],
+        301 => [Excon::Error::MovedPermanently, 'Moved Permanently'],
+        302 => [Excon::Error::Found, 'Found'],
+        303 => [Excon::Error::SeeOther, 'See Other'],
+        304 => [Excon::Error::NotModified, 'Not Modified'],
+        305 => [Excon::Error::UseProxy, 'Use Proxy'],
+        307 => [Excon::Error::TemporaryRedirect, 'Temporary Redirect'],
+        400 => [Excon::Error::BadRequest, 'Bad Request'],
+        401 => [Excon::Error::Unauthorized, 'Unauthorized'],
+        402 => [Excon::Error::PaymentRequired, 'Payment Required'],
+        403 => [Excon::Error::Forbidden, 'Forbidden'],
+        404 => [Excon::Error::NotFound, 'Not Found'],
+        405 => [Excon::Error::MethodNotAllowed, 'Method Not Allowed'],
+        406 => [Excon::Error::NotAcceptable, 'Not Acceptable'],
+        407 => [Excon::Error::ProxyAuthenticationRequired, 'Proxy 
Authentication Required'],
+        408 => [Excon::Error::RequestTimeout, 'Request Timeout'],
+        409 => [Excon::Error::Conflict, 'Conflict'],
+        410 => [Excon::Error::Gone, 'Gone'],
+        411 => [Excon::Error::LengthRequired, 'Length Required'],
+        412 => [Excon::Error::PreconditionFailed, 'Precondition Failed'],
+        413 => [Excon::Error::RequestEntityTooLarge, 'Request Entity Too 
Large'],
+        414 => [Excon::Error::RequestURITooLong, 'Request-URI Too Long'],
+        415 => [Excon::Error::UnsupportedMediaType, 'Unsupported Media Type'],
+        416 => [Excon::Error::RequestedRangeNotSatisfiable, 'Request Range Not 
Satisfiable'],
+        417 => [Excon::Error::ExpectationFailed, 'Expectation Failed'],
+        422 => [Excon::Error::UnprocessableEntity, 'Unprocessable Entity'],
+        429 => [Excon::Error::TooManyRequests, 'Too Many Requests'],
+        500 => [Excon::Error::InternalServerError, 'InternalServerError'],
+        501 => [Excon::Error::NotImplemented, 'Not Implemented'],
+        502 => [Excon::Error::BadGateway, 'Bad Gateway'],
+        503 => [Excon::Error::ServiceUnavailable, 'Service Unavailable'],
+        504 => [Excon::Error::GatewayTimeout, 'Gateway Timeout']
+      }
+    end
+
+    # Messages for nicer exceptions, from rfc2616
+    def self.status_error(request, response)
+      error_class, error_message = status_errors[response[:status]]
+      if error_class.nil?
+        default_class = Excon::Error.const_get(@default_status_error)
+        error_class, error_message = [default_class, 'Unknown']
+      end
+      message = StringIO.new
+      str = "Expected(#{request[:expects].inspect}) <=>"
+      str << " Actual(#{response[:status]} #{error_message})"
+      message.puts(str)
+      if request[:debug_request]
+        message.puts('excon.error.request')
+        Excon::PrettyPrinter.pp(message, request)
+      end
+
+      if request[:debug_response]
+        message.puts('excon.error.response')
+        Excon::PrettyPrinter.pp(message, response.data)
+      end
+      message.rewind
+      error_class.new(message.read, request, response)
+    end
+  end
+
+  # Legacy
+  module Errors
+    Excon::Errors::Error = Excon::Error
+
+    legacy_re = /
+      \A
+      Client
+      |Server
+      |Socket
+      |Certificate
+      |HTTPStatus
+      |InternalServer
+      \Z
+    /x
+
+    klasses = Excon::Error.constants.select do |c|
+      Excon::Error.const_get(c).is_a? Class
+    end
+
+    klasses.each do |klass|
+      class_name = klass.to_s
+      unless class_name =~ /Error\Z/ 
+        class_name = klass.to_s + 'Error' if class_name =~ legacy_re
+      end
+      Excon::Errors.const_set(class_name, Excon::Error.const_get(klass))
+    end
+
+    def self.status_error(request, response)
+      Excon::Error.status_error(request, response)
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/errors.rb new/lib/excon/errors.rb
--- old/lib/excon/errors.rb     2016-03-28 22:32:51.000000000 +0200
+++ new/lib/excon/errors.rb     1970-01-01 01:00:00.000000000 +0100
@@ -1,172 +0,0 @@
-module Excon
-  module Errors
-
-    class Error < StandardError; end
-    class StubNotFound < StandardError; end
-    class InvalidStub < StandardError; end
-
-    class SocketError < Error
-      attr_reader :socket_error
-
-      def initialize(socket_error = Excon::Errors::Error.new)
-        if is_a?(CertificateError)
-          super
-        else
-          super("#{socket_error.message} (#{socket_error.class})")
-          set_backtrace(socket_error.backtrace)
-          @socket_error = socket_error
-        end
-      end
-    end
-
-    class CertificateError < SocketError
-      def initialize(socket_error = Excon::Errors::Error.new)
-        msg = "Unable to verify certificate. This may be an issue with the 
remote host or with Excon." +
-              "Excon has certificates bundled, but these can be customized." +
-              "`Excon.defaults[:ssl_ca_path] = path_to_certs`, " +
-              "`ENV['SSL_CERT_DIR'] = path_to_certs`, " +
-              "`Excon.defaults[:ssl_ca_file] = path_to_file`, " +
-              "`ENV['SSL_CERT_FILE'] = path_to_file`, " +
-              "`Excon.defaults[:ssl_verify_callback] = callback` (see 
OpenSSL::SSL::SSLContext#verify_callback), or " +
-              "`Excon.defaults[:ssl_verify_peer] = false` (less secure)."
-        full_message = "#{socket_error.message} (#{socket_error.class})" + ' ' 
+ msg
-        super(full_message)
-        set_backtrace(socket_error.backtrace)
-        @socket_error = socket_error
-      end
-    end
-
-    class Timeout < Error; end
-
-    class ResponseParseError < Error; end
-
-    class ProxyParseError < Error; end
-
-    class ProxyConnectionError < Error; end
-
-    class HTTPStatusError < Error
-      attr_reader :request, :response
-
-      def initialize(msg, request = nil, response = nil)
-        super(msg)
-        @request = request
-        @response = response
-      end
-    end
-
-    # HTTP Error classes
-    class Informational < HTTPStatusError; end
-    class Success < HTTPStatusError; end
-    class Redirection < HTTPStatusError; end
-    class ClientError < HTTPStatusError; end
-    class ServerError < HTTPStatusError; end
-
-    class Continue < Informational; end                       # 100
-    class SwitchingProtocols < Informational; end             # 101
-    class OK < Success; end                                   # 200
-    class Created < Success; end                              # 201
-    class Accepted < Success; end                             # 202
-    class NonAuthoritativeInformation < Success; end          # 203
-    class NoContent < Success; end                            # 204
-    class ResetContent < Success; end                         # 205
-    class PartialContent < Success; end                       # 206
-    class MultipleChoices < Redirection; end                  # 300
-    class MovedPermanently < Redirection; end                 # 301
-    class Found < Redirection; end                            # 302
-    class SeeOther < Redirection; end                         # 303
-    class NotModified < Redirection; end                      # 304
-    class UseProxy < Redirection; end                         # 305
-    class TemporaryRedirect < Redirection; end                # 307
-    class BadRequest < ClientError; end                       # 400
-    class Unauthorized < ClientError; end                     # 401
-    class PaymentRequired < ClientError; end                  # 402
-    class Forbidden < ClientError; end                        # 403
-    class NotFound < ClientError; end                         # 404
-    class MethodNotAllowed < ClientError; end                 # 405
-    class NotAcceptable < ClientError; end                    # 406
-    class ProxyAuthenticationRequired < ClientError; end      # 407
-    class RequestTimeout < ClientError; end                   # 408
-    class Conflict < ClientError; end                         # 409
-    class Gone < ClientError; end                             # 410
-    class LengthRequired < ClientError; end                   # 411
-    class PreconditionFailed < ClientError; end               # 412
-    class RequestEntityTooLarge < ClientError; end            # 413
-    class RequestURITooLong < ClientError; end                # 414
-    class UnsupportedMediaType < ClientError; end             # 415
-    class RequestedRangeNotSatisfiable < ClientError; end     # 416
-    class ExpectationFailed < ClientError; end                # 417
-    class UnprocessableEntity < ClientError; end              # 422
-    class TooManyRequests < ClientError; end                  # 429
-    class InternalServerError < ServerError; end              # 500
-    class NotImplemented < ServerError; end                   # 501
-    class BadGateway < ServerError; end                       # 502
-    class ServiceUnavailable < ServerError; end               # 503
-    class GatewayTimeout < ServerError; end                   # 504
-
-    # Messages for nicer exceptions, from rfc2616
-    def self.status_error(request, response)
-      @errors ||= {
-        100 => [Excon::Errors::Continue, 'Continue'],
-        101 => [Excon::Errors::SwitchingProtocols, 'Switching Protocols'],
-        200 => [Excon::Errors::OK, 'OK'],
-        201 => [Excon::Errors::Created, 'Created'],
-        202 => [Excon::Errors::Accepted, 'Accepted'],
-        203 => [Excon::Errors::NonAuthoritativeInformation, 'Non-Authoritative 
Information'],
-        204 => [Excon::Errors::NoContent, 'No Content'],
-        205 => [Excon::Errors::ResetContent, 'Reset Content'],
-        206 => [Excon::Errors::PartialContent, 'Partial Content'],
-        300 => [Excon::Errors::MultipleChoices, 'Multiple Choices'],
-        301 => [Excon::Errors::MovedPermanently, 'Moved Permanently'],
-        302 => [Excon::Errors::Found, 'Found'],
-        303 => [Excon::Errors::SeeOther, 'See Other'],
-        304 => [Excon::Errors::NotModified, 'Not Modified'],
-        305 => [Excon::Errors::UseProxy, 'Use Proxy'],
-        307 => [Excon::Errors::TemporaryRedirect, 'Temporary Redirect'],
-        400 => [Excon::Errors::BadRequest, 'Bad Request'],
-        401 => [Excon::Errors::Unauthorized, 'Unauthorized'],
-        402 => [Excon::Errors::PaymentRequired, 'Payment Required'],
-        403 => [Excon::Errors::Forbidden, 'Forbidden'],
-        404 => [Excon::Errors::NotFound, 'Not Found'],
-        405 => [Excon::Errors::MethodNotAllowed, 'Method Not Allowed'],
-        406 => [Excon::Errors::NotAcceptable, 'Not Acceptable'],
-        407 => [Excon::Errors::ProxyAuthenticationRequired, 'Proxy 
Authentication Required'],
-        408 => [Excon::Errors::RequestTimeout, 'Request Timeout'],
-        409 => [Excon::Errors::Conflict, 'Conflict'],
-        410 => [Excon::Errors::Gone, 'Gone'],
-        411 => [Excon::Errors::LengthRequired, 'Length Required'],
-        412 => [Excon::Errors::PreconditionFailed, 'Precondition Failed'],
-        413 => [Excon::Errors::RequestEntityTooLarge, 'Request Entity Too 
Large'],
-        414 => [Excon::Errors::RequestURITooLong, 'Request-URI Too Long'],
-        415 => [Excon::Errors::UnsupportedMediaType, 'Unsupported Media Type'],
-        416 => [Excon::Errors::RequestedRangeNotSatisfiable, 'Request Range 
Not Satisfiable'],
-        417 => [Excon::Errors::ExpectationFailed, 'Expectation Failed'],
-        422 => [Excon::Errors::UnprocessableEntity, 'Unprocessable Entity'],
-        429 => [Excon::Errors::TooManyRequests, 'Too Many Requests'],
-        500 => [Excon::Errors::InternalServerError, 'InternalServerError'],
-        501 => [Excon::Errors::NotImplemented, 'Not Implemented'],
-        502 => [Excon::Errors::BadGateway, 'Bad Gateway'],
-        503 => [Excon::Errors::ServiceUnavailable, 'Service Unavailable'],
-        504 => [Excon::Errors::GatewayTimeout, 'Gateway Timeout']
-      }
-
-      error_class, error_message = @errors[response[:status]] || 
[Excon::Errors::HTTPStatusError, 'Unknown']
-
-      message = StringIO.new
-      message.puts("Expected(#{request[:expects].inspect}) <=> 
Actual(#{response[:status]} #{error_message})")
-
-      if request[:debug_request]
-        message.puts('excon.error.request')
-        Excon::PrettyPrinter.pp(message, request)
-      end
-
-      if request[:debug_response]
-        message.puts('excon.error.response')
-        Excon::PrettyPrinter.pp(message, response.data)
-      end
-
-      message.rewind
-      error_class.new(message.read, request, response)
-    end
-
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon/middlewares/mock.rb 
new/lib/excon/middlewares/mock.rb
--- old/lib/excon/middlewares/mock.rb   2016-03-28 22:32:51.000000000 +0200
+++ new/lib/excon/middlewares/mock.rb   2016-07-08 16:19:40.000000000 +0200
@@ -35,7 +35,7 @@
             if stub_datum.has_key?(:headers)
               datum[:response][:headers].merge!(stub_datum[:headers])
             end
-          else
+          elsif datum[:allow_unstubbed_requests] != true
             # if we reach here no stubs matched
             message = StringIO.new
             message.puts('no stubs matched')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/excon.rb new/lib/excon.rb
--- old/lib/excon.rb    2016-03-28 22:32:51.000000000 +0200
+++ new/lib/excon.rb    2016-07-08 16:19:40.000000000 +0200
@@ -24,7 +24,7 @@
 require 'excon/utils'
 
 require 'excon/connection'
-require 'excon/errors'
+require 'excon/error'
 require 'excon/headers'
 require 'excon/response'
 require 'excon/middlewares/decompress'
@@ -107,6 +107,9 @@
     def new(url, params = {})
       uri_parser = params[:uri_parser] || defaults[:uri_parser]
       uri = uri_parser.parse(url)
+      if params[:path]
+        uri_parser.parse(params[:path])
+      end
       unless uri.scheme
         raise ArgumentError.new("Invalid URI: #{uri}")
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-03-28 22:32:51.000000000 +0200
+++ new/metadata        2016-07-08 16:19:40.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: excon
 version: !ruby/object:Gem::Version
-  version: 0.49.0
+  version: 0.51.0
 platform: ruby
 authors:
 - dpiddy (Dan Peterson)
@@ -10,7 +10,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-03-28 00:00:00.000000000 Z
+date: 2016-07-08 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -190,7 +190,7 @@
 - lib/excon.rb
 - lib/excon/connection.rb
 - lib/excon/constants.rb
-- lib/excon/errors.rb
+- lib/excon/error.rb
 - lib/excon/extensions/uri.rb
 - lib/excon/headers.rb
 - lib/excon/middlewares/base.rb
@@ -219,7 +219,7 @@
 - tests/data/excon.cert.crt
 - tests/data/excon.cert.key
 - tests/data/xs
-- tests/errors_tests.rb
+- tests/error_tests.rb
 - tests/header_tests.rb
 - tests/middlewares/canned_response_tests.rb
 - tests/middlewares/capture_cookies_tests.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/error_tests.rb new/tests/error_tests.rb
--- old/tests/error_tests.rb    1970-01-01 01:00:00.000000000 +0100
+++ new/tests/error_tests.rb    2016-07-08 16:19:40.000000000 +0200
@@ -0,0 +1,145 @@
+
+
+Shindo.tests('HTTPStatusError request/response debugging') do
+
+  # Regression against e300458f2d9330cb265baeb8973120d08c665d9
+  tests('Excon::Error knows about pertinent errors') do
+    expected = [
+      100, 
+      101, 
+      (200..206).to_a, 
+      (300..307).to_a, 
+      (400..417).to_a, 
+      422, 
+       429, 
+      (500..504).to_a
+    ]
+    expected.flatten == Excon::Error.status_errors.keys
+  end
+
+  tests('new returns an Error').returns(true) do
+    Excon::Error.new('bar').class == Excon::Error
+  end
+
+  tests('new raises errors for bad URIs').returns(true) do
+    begin
+      Excon.new('foo')
+      false
+    rescue => err
+      err.to_s.include? 'foo'
+    end
+  end
+
+  tests('new raises errors for bad paths').returns(true) do
+    begin
+      Excon.new('http://localhost', path: "foo\r\nbar: baz")
+      false
+    rescue => err
+      err.to_s.include? "foo\r\nbar: baz"
+    end
+  end
+
+  tests('can raise standard error and catch standard error').returns(true) do
+    begin 
+      raise Excon::Error::Client.new('foo')
+    rescue Excon::Error => e
+      true
+    end
+  end
+
+  tests('can raise legacy errors and catch legacy errors').returns(true) do
+    begin
+      raise Excon::Errors::Error.new('bar')
+    rescue Excon::Errors::Error => e
+      true
+    end
+  end
+
+  tests('can raise standard error and catch legacy errors').returns(true) do
+    begin
+      raise Excon::Error::NotFound.new('bar')
+    rescue Excon::Errors::Error => e
+      true
+    end
+  end
+
+  tests('can raise with status_error() and catch with standard 
error').returns(true) do
+    begin
+      raise Excon::Error.status_error({expects: 200}, {status: 400})
+    rescue Excon::Error
+      true
+    end
+  end
+
+
+  tests('can raise with  status_error() and catch with legacy 
error').returns(true) do
+    begin
+      raise Excon::Error.status_error({expects: 200}, {status: 400})
+    rescue Excon::Errors::BadRequest
+      true
+    end
+  end
+
+  tests('can raise with legacy status_error() and catch with 
legacy').returns(true) do
+    begin
+      raise Excon::Errors.status_error({expects: 200}, {status: 400})
+    rescue Excon::Errors::BadRequest
+      true
+    end
+  end
+
+
+  tests('can raise with legacy status_error() and catch with 
standard').returns(true) do
+    begin
+      raise Excon::Errors.status_error({expects: 200}, {status: 400})
+    rescue Excon::Error
+      true
+    end
+  end
+
+  with_server('error') do
+
+    tests('message does not include response or response info').returns(true) 
do
+      begin
+        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200)
+      rescue Excon::Errors::HTTPStatusError => err
+        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
+          !err.message.include?('excon.error.request') &&
+          !err.message.include?('excon.error.response')
+      end
+    end
+
+    tests('message includes only request info').returns(true) do
+      begin
+        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200,
+                  :debug_request => true)
+      rescue Excon::Errors::HTTPStatusError => err
+        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
+          err.message.include?('excon.error.request') &&
+          !err.message.include?('excon.error.response')
+      end
+    end
+
+    tests('message includes only response info').returns(true) do
+      begin
+        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200,
+                  :debug_response => true)
+      rescue Excon::Errors::HTTPStatusError => err
+        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
+          !err.message.include?('excon.error.request') &&
+          err.message.include?('excon.error.response')
+      end
+    end
+
+    tests('message include request and response info').returns(true) do
+      begin
+        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200,
+                  :debug_request => true, :debug_response => true)
+      rescue Excon::Errors::HTTPStatusError => err
+        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
+          err.message.include?('excon.error.request') &&
+          err.message.include?('excon.error.response')
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/errors_tests.rb new/tests/errors_tests.rb
--- old/tests/errors_tests.rb   2016-03-28 22:32:51.000000000 +0200
+++ new/tests/errors_tests.rb   1970-01-01 01:00:00.000000000 +0100
@@ -1,58 +0,0 @@
-Shindo.tests('HTTPStatusError request/response debugging') do
-
-  tests('new raises errors for bad URIs').returns(true) do
-    begin
-      Excon.new('foo')
-      false
-    rescue => err
-      err.to_s.include? 'foo'
-    end
-  end
-
-  with_server('error') do
-
-    tests('message does not include response or response info').returns(true) 
do
-      begin
-        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200)
-      rescue Excon::Errors::HTTPStatusError => err
-        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
-          !err.message.include?('excon.error.request') &&
-          !err.message.include?('excon.error.response')
-      end
-    end
-
-    tests('message includes only request info').returns(true) do
-      begin
-        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200,
-                  :debug_request => true)
-      rescue Excon::Errors::HTTPStatusError => err
-        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
-          err.message.include?('excon.error.request') &&
-          !err.message.include?('excon.error.response')
-      end
-    end
-
-    tests('message includes only response info').returns(true) do
-      begin
-        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200,
-                  :debug_response => true)
-      rescue Excon::Errors::HTTPStatusError => err
-        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
-          !err.message.include?('excon.error.request') &&
-          err.message.include?('excon.error.response')
-      end
-    end
-
-    tests('message include request and response info').returns(true) do
-      begin
-        Excon.get('http://127.0.0.1:9292/error/not_found', :expects => 200,
-                  :debug_request => true, :debug_response => true)
-      rescue Excon::Errors::HTTPStatusError => err
-        err.message.include?('Expected(200) <=> Actual(404 Not Found)') &&
-          err.message.include?('excon.error.request') &&
-          err.message.include?('excon.error.response')
-      end
-    end
-
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tests/middlewares/mock_tests.rb 
new/tests/middlewares/mock_tests.rb
--- old/tests/middlewares/mock_tests.rb 2016-03-28 22:32:51.000000000 +0200
+++ new/tests/middlewares/mock_tests.rb 2016-07-08 16:19:40.000000000 +0200
@@ -153,6 +153,17 @@
     Excon.get('http://127.0.0.1:9292/', :mock => true)
   end
 
+  with_server('good') do
+    tests('allow mismatched stub').returns(200) do
+      Excon.stub({:path => '/echo/request_count'}, {:body => 'body'})
+      Excon.get(
+        'http://127.0.0.1:9292/echo/request',
+        :mock => true,
+        :allow_unstubbed_requests => true
+      ).status
+    end
+  end
+
   Excon.stubs.clear
 
   tests("stub({}, {:body => 'x' * (Excon::DEFAULT_CHUNK_SIZE + 1)})") do


Reply via email to