http-client 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 463b25c7e2306882b064f06c3b9d6a0b79b0c17c
4
- data.tar.gz: a699f8db865ec291272e4405c2ceebb291253845
3
+ metadata.gz: 6bd3c5c6c67b68ab191ee00c5dcdcb75b5a4549e
4
+ data.tar.gz: 5bbbcb5bab7c3bedf0b670f73b836803437e89c3
5
5
  SHA512:
6
- metadata.gz: f54e15e22e2cc94f29efd2c5a89143a6a9522b0c9afc2c6c9b6e82cbab0a9ba8f7f903033380e26a2c80f0a9da05737d9848630d65a7bdaad2c425e173467f33
7
- data.tar.gz: f09b9d4be97f9b8c7f3f180fc8555982c286360c4db3f5be35042f2ccc7962b5dc9ddef08c8c9e8b9671f1422c230fb1bb50d750affe6ef900d13e0243d1f3e0
6
+ metadata.gz: aba36be8c66578583270f7cd2e71f105a37a8c5af8d6cb3585c35795af02a6be32f39d51178bbdb53d35922389ea6fd6ea2874b33dbe3f27e8b31e43772b7413
7
+ data.tar.gz: 05e2370d9f6c65885ef2adc18087e209a35dceebe44b567b737821903b882233c5e79342297b97665116a7e462e01f8ceab2d60a4b0fb083a616b226ca45e7d3
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.2.2 (2016-09-21)
2
+
3
+ * URI parser error for relative paths.
4
+
1
5
  == 0.2.1 (2016-09-21)
2
6
 
3
7
  * Module scoped errors.
data/lib/http/client.rb CHANGED
@@ -9,7 +9,7 @@ require 'zlib'
9
9
 
10
10
  module HTTP
11
11
  module Client
12
- VERSION = '0.2.1'
12
+ VERSION = '0.2.2'
13
13
 
14
14
  GET = Net::HTTP::Get
15
15
  HEAD = Net::HTTP::Head
@@ -158,7 +158,7 @@ module HTTP
158
158
  raise ArgumentError, "Invalid URI #{uri}" if uri.host.nil?
159
159
  uri
160
160
  when URI::Generic
161
- if @delegate.uri
161
+ if @delegate && @delegate.uri
162
162
  @delegate.uri.dup.tap {|s| s += uri }
163
163
  else
164
164
  raise ArgumentError, "Invalid URI #{uri}"
data/test/test_request.rb CHANGED
@@ -6,6 +6,7 @@ describe 'HTTP Client Request' do
6
6
  it 'should reject invalid arguments' do
7
7
  assert_raises(HTTP::Client::ArgumentError, 'invalid verb') {HTTP::Client::Request.new(:foo, 'http://example.org/')}
8
8
  assert_raises(HTTP::Client::ArgumentError, 'invalid uri') {HTTP::Client::Request.new(:get, 'http://')}
9
+ assert_raises(HTTP::Client::ArgumentError, 'invalid uri') {HTTP::Client::Request.new(:get, '/hello')}
9
10
 
10
11
  assert_raises(HTTP::Client::ArgumentError, 'invalid argument') do
11
12
  HTTP::Client::Request.new(:get, 'http://example.org/', foo: 1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bharanee Rathna