aitch 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c38a1b4c89a137aad0faec66bd2c53f00d59871c
4
+ data.tar.gz: 6d6054265f125130692693f502f43e856830a7e8
5
+ SHA512:
6
+ metadata.gz: 233cb27de492f6e8f03cceaf0f8d5ddf65aaffdaee7aaf963db1865aecbed347024360727ec5e72e3064bd046b53bc196e7f50cdce435a5cc6ae8bd38d3ca62b
7
+ data.tar.gz: 9c02590e9d20323273e4584ae86f0ac0694ef316a2e35be6e2c7516402afb78991110f9aa228cbd2a35207c3c8dd510df57da2e4d6720906b55286401a7a2e26
data/README.md CHANGED
@@ -1,9 +1,7 @@
1
1
  # Aitch
2
2
 
3
3
  [![Build Status](https://travis-ci.org/fnando/aitch.png)](https://travis-ci.org/fnando/aitch)
4
-
5
4
  [![CodeClimate](https://codeclimate.com/github/fnando/aitch.png)](https://codeclimate.com/github/fnando/aitch/)
6
-
7
5
  [![RubyGems](https://badge.fury.io/rb/aitch.png)](https://rubygems.org/gems/aitch)
8
6
 
9
7
  A simple HTTP client.
@@ -132,6 +130,20 @@ Aitch.get("http://restrict.example.org/", {}, {}, user: "john", password: "test"
132
130
  Aitch.get("http://example.org", {}, {"User-Agent" => "MyBot/1.0.0"})
133
131
  ```
134
132
 
133
+ ### Creating namespaced requests
134
+
135
+ Sometimes you don't want to use the global settings (maybe you're building a
136
+ lib). In this case, you can instantiate the namespace.
137
+
138
+ ```ruby
139
+ Request = Aitch::Namespace.new
140
+ Request.configure do |config|
141
+ config.user_agent = "MyLib/1.0.0"
142
+ end
143
+
144
+ Request.get("http://example.org")
145
+ ```
146
+
135
147
  ## Contributing
136
148
 
137
149
  1. Fork it
@@ -3,6 +3,7 @@ require "forwardable"
3
3
  require "json"
4
4
  require "zlib"
5
5
 
6
+ require "aitch/namespace"
6
7
  require "aitch/configuration"
7
8
  require "aitch/errors"
8
9
  require "aitch/request"
@@ -14,34 +15,25 @@ require "aitch/xml_parser"
14
15
  require "aitch/version"
15
16
 
16
17
  module Aitch
17
- extend self
18
+ class << self
19
+ extend Forwardable
18
20
 
19
- def execute(method, url, args = {}, headers = {}, options = {})
20
- Request.new(method, url, args, headers, options).perform
21
+ def_delegators :namespace,
22
+ :configuration, :config,
23
+ :get, :get!,
24
+ :post, :post!,
25
+ :put, :put!,
26
+ :patch, :patch!,
27
+ :options, :options!,
28
+ :trace, :trace!,
29
+ :head, :head!,
30
+ :delete, :delete!,
31
+ :execute, :execute!,
32
+ :configure
21
33
  end
22
34
 
23
- def execute!(*args)
24
- response = execute(*args)
25
- raise response.error if response.error?
26
- response
27
- end
28
-
29
- %w[
30
- get
31
- post
32
- put
33
- patch
34
- delete
35
- options
36
- trace
37
- head
38
- ].each do |method_name|
39
- define_method(method_name) do |url, args = {}, headers = {}, options = {}|
40
- execute(method_name, url, args, headers, options)
41
- end
42
-
43
- define_method("#{method_name}!") do |url, args = {}, headers = {}, options = {}|
44
- execute!(method_name, url, args, headers, options)
45
- end
35
+ private
36
+ def self.namespace
37
+ @namespace ||= Namespace.new
46
38
  end
47
39
  end
@@ -37,12 +37,4 @@ module Aitch
37
37
  @xml_parser = XMLParser
38
38
  end
39
39
  end
40
-
41
- def self.configure(&block)
42
- yield configuration
43
- end
44
-
45
- def self.configuration
46
- @configuration ||= Configuration.new
47
- end
48
40
  end
@@ -0,0 +1,48 @@
1
+ module Aitch
2
+ class Namespace
3
+ def configure(&block)
4
+ yield config
5
+ end
6
+
7
+ def config
8
+ @config ||= Configuration.new
9
+ end
10
+ alias_method :configuration, :config
11
+
12
+ def execute(request_method, url, data = {}, headers = {}, options = {})
13
+ Request.new({
14
+ config: config,
15
+ request_method: request_method,
16
+ url: url,
17
+ data: data,
18
+ headers: headers,
19
+ options: options
20
+ }).perform
21
+ end
22
+
23
+ def execute!(*args)
24
+ response = execute(*args)
25
+ raise response.error if response.error?
26
+ response
27
+ end
28
+
29
+ %w[
30
+ get
31
+ post
32
+ put
33
+ patch
34
+ delete
35
+ options
36
+ trace
37
+ head
38
+ ].each do |method_name|
39
+ define_method(method_name) do |url, data = {}, headers = {}, options = {}|
40
+ execute(method_name, url, data, headers, options)
41
+ end
42
+
43
+ define_method("#{method_name}!") do |url, data = {}, headers = {}, options = {}|
44
+ execute!(method_name, url, data, headers, options)
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,8 +1,9 @@
1
1
  module Aitch
2
2
  class Redirect
3
- def initialize
3
+ def initialize(config)
4
4
  @tries = 1
5
- @max_tries = Aitch.configuration.redirect_limit
5
+ @config = config
6
+ @max_tries = @config.redirect_limit
6
7
  end
7
8
 
8
9
  def followed!
@@ -14,7 +15,7 @@ module Aitch
14
15
  end
15
16
 
16
17
  def enabled?
17
- Aitch.configuration.follow_redirect
18
+ @config.follow_redirect
18
19
  end
19
20
  end
20
21
  end
@@ -1,16 +1,24 @@
1
1
  module Aitch
2
2
  class Request
3
- def initialize(request_method, url, args = {}, headers = {}, options = {})
4
- @request_method = request_method
5
- @url = url
6
- @args = args
7
- @headers = headers
8
- @options = options
3
+ attr_accessor :config
4
+ attr_accessor :request_method
5
+ attr_accessor :url
6
+ attr_accessor :data
7
+ attr_accessor :headers
8
+ attr_accessor :options
9
+
10
+ def initialize(options)
11
+ options.each do |name, value|
12
+ public_send("#{name}=", value)
13
+ end
14
+
15
+ self.headers ||= {}
16
+ self.options ||= {}
9
17
  end
10
18
 
11
19
  def perform
12
- response = Response.new(client.request(request))
13
- redirect = Redirect.new
20
+ response = Response.new(config, client.request(request))
21
+ redirect = Redirect.new(config)
14
22
 
15
23
  while redirect.follow?(response)
16
24
  redirect.followed!
@@ -43,37 +51,37 @@ module Aitch
43
51
  end
44
52
 
45
53
  def uri
46
- @uri ||= URI.parse(@url)
54
+ @uri ||= URI.parse(url)
47
55
  rescue URI::InvalidURIError
48
56
  raise InvalidURIError
49
57
  end
50
58
 
51
59
  def http_method_class
52
- Net::HTTP.const_get(@request_method.to_s.capitalize)
60
+ Net::HTTP.const_get(request_method.to_s.capitalize)
53
61
  rescue NameError
54
- raise InvalidHTTPMethodError, "unexpected HTTP verb: #{@request_method.inspect}"
62
+ raise InvalidHTTPMethodError, "unexpected HTTP verb: #{request_method.inspect}"
55
63
  end
56
64
 
57
65
  private
58
66
  def set_body(request)
59
- if @args.respond_to?(:to_h)
60
- request.form_data = @args.to_h
61
- elsif @args.kind_of?(Hash)
62
- request.form_data = @args
67
+ if data.respond_to?(:to_h)
68
+ request.form_data = data.to_h
69
+ elsif data.kind_of?(Hash)
70
+ request.form_data = data
63
71
  else
64
- request.body = @args.to_s
72
+ request.body = data.to_s
65
73
  end
66
74
  end
67
75
 
68
76
  def set_headers(request)
69
- all_headers = Aitch.configuration.default_headers.merge(@headers)
77
+ all_headers = config.default_headers.merge(headers)
70
78
  all_headers.each do |name, value|
71
79
  request[name.to_s] = value.to_s
72
80
  end
73
81
  end
74
82
 
75
83
  def set_credentials(request)
76
- request.basic_auth(@options[:user], @options[:password]) if @options[:user]
84
+ request.basic_auth(options[:user], options[:password]) if options[:user]
77
85
  end
78
86
 
79
87
  def set_https(client)
@@ -82,16 +90,16 @@ module Aitch
82
90
  end
83
91
 
84
92
  def set_timeout(client)
85
- client.read_timeout = Aitch.configuration.timeout
93
+ client.read_timeout = config.timeout
86
94
  end
87
95
 
88
96
  def set_logger(client)
89
- logger = Aitch.configuration.logger
97
+ logger = config.logger
90
98
  client.set_debug_output(logger) if logger
91
99
  end
92
100
 
93
101
  def set_user_agent(request)
94
- request["User-Agent"] = Aitch.configuration.user_agent
102
+ request["User-Agent"] = config.user_agent
95
103
  end
96
104
 
97
105
  def set_gzip(request)
@@ -4,7 +4,8 @@ module Aitch
4
4
 
5
5
  def_delegators :@http_response, :content_type
6
6
 
7
- def initialize(http_response)
7
+ def initialize(config, http_response)
8
+ @config = config
8
9
  @http_response = http_response
9
10
  end
10
11
 
@@ -46,9 +47,9 @@ module Aitch
46
47
 
47
48
  def data
48
49
  if json?
49
- Aitch.configuration.json_parser.load(body)
50
+ @config.json_parser.load(body)
50
51
  elsif xml?
51
- Aitch.configuration.xml_parser.load(body)
52
+ @config.xml_parser.load(body)
52
53
  else
53
54
  body
54
55
  end
@@ -1,3 +1,3 @@
1
1
  module Aitch
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -20,25 +20,36 @@ describe Aitch do
20
20
  it { should respond_to(:trace!) }
21
21
  it { should respond_to(:execute) }
22
22
  it { should respond_to(:execute!) }
23
+ it { should respond_to(:config) }
24
+ it { should respond_to(:configuration) }
23
25
  end
24
26
 
25
27
  describe "#execute" do
26
28
  let(:request) { mock.as_null_object }
27
29
 
28
30
  it "delegates to Request" do
31
+ expected = {
32
+ config: Aitch.config,
33
+ request_method: "get",
34
+ url: "URL",
35
+ data: "DATA",
36
+ headers: "HEADERS",
37
+ options: "OPTIONS"
38
+ }
39
+
29
40
  Aitch::Request
30
41
  .should_receive(:new)
31
- .with("METHOD", "URL", "ARGS", "HEADERS", "OPTIONS")
42
+ .with(expected)
32
43
  .and_return(request)
33
44
 
34
- Aitch.execute("METHOD", "URL", "ARGS", "HEADERS", "OPTIONS")
45
+ Aitch.get("URL", "DATA", "HEADERS", "OPTIONS")
35
46
  end
36
47
 
37
48
  it "performs request" do
38
49
  Aitch::Request.stub new: request
39
50
  request.should_receive(:perform)
40
51
 
41
- Aitch.execute("METHOD", "URL")
52
+ Aitch.get("URL")
42
53
  end
43
54
  end
44
55
 
@@ -47,7 +58,7 @@ describe Aitch do
47
58
  response = stub(error?: false)
48
59
  Aitch::Request.any_instance.stub perform: response
49
60
 
50
- expect(Aitch.execute!("METHOD", "URL")).to eql(response)
61
+ expect(Aitch.get!("URL")).to eql(response)
51
62
  end
52
63
 
53
64
  it "raises when has errors" do
@@ -55,7 +66,7 @@ describe Aitch do
55
66
  Aitch::Request.any_instance.stub perform: response
56
67
 
57
68
  expect {
58
- Aitch.execute!("METHOD", "URL")
69
+ Aitch.get!("URL")
59
70
  }.to raise_error("ERROR")
60
71
  end
61
72
  end
@@ -0,0 +1,11 @@
1
+ require "spec_helper"
2
+
3
+ describe Aitch::Namespace do
4
+ it "isolates namespace configuration" do
5
+ ns = Aitch::Namespace.new
6
+ ns.config.user_agent = "MyLib/1.0.0"
7
+
8
+ expect(ns.config.user_agent).to eql("MyLib/1.0.0")
9
+ expect(Aitch.config.user_agent).to match(%r[^Aitch])
10
+ end
11
+ end
@@ -1,14 +1,22 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Aitch::Request do
4
+ def build_request(options = {})
5
+ Aitch::Request.new({
6
+ request_method: "get",
7
+ url: "URL",
8
+ config: Aitch::Configuration.new
9
+ }.merge(options))
10
+ end
11
+
4
12
  it "raises with invalid uri" do
5
13
  expect {
6
- Aitch::Request.new("post", "\\").uri
14
+ build_request(url: "\\").uri
7
15
  }.to raise_error(Aitch::InvalidURIError)
8
16
  end
9
17
 
10
18
  it "raises on timeout", ruby: 2.0 do
11
- request = Aitch::Request.new("post", "http://example.org")
19
+ request = build_request(request_method: "post", url: "http://example.org")
12
20
  request.stub_chain(:client, :request).and_raise(Net::ReadTimeout)
13
21
 
14
22
  expect {
@@ -17,7 +25,7 @@ describe Aitch::Request do
17
25
  end
18
26
 
19
27
  it "raises on timeout", ruby: 1.9 do
20
- request = Aitch::Request.new("post", "http://example.org")
28
+ request = build_request(request_method: "post", url: "http://example.org")
21
29
  request.stub_chain(:client, :request).and_raise(Timeout::Error)
22
30
 
23
31
  expect {
@@ -26,56 +34,59 @@ describe Aitch::Request do
26
34
  end
27
35
 
28
36
  it "sets user agent" do
29
- request = Aitch::Request.new("post", "http://example.org/some/path").request
30
- expect(request["User-Agent"]).to eql(Aitch.configuration.user_agent)
37
+ requester = build_request
38
+ request = requester.request
39
+ expect(request["User-Agent"]).to eql(requester.config.user_agent)
31
40
  end
32
41
 
33
42
  it "requests gzip encoding" do
34
- request = Aitch::Request.new("get", "http://example.org").request
43
+ request = build_request.request
35
44
  expect(request["Accept-Encoding"]).to eql("gzip,deflate")
36
45
  end
37
46
 
38
47
  it "sets path" do
39
- request = Aitch::Request.new("post", "http://example.org/some/path").request
48
+ request = build_request(url: "http://example.org/some/path").request
40
49
  expect(request.path).to eql("/some/path")
41
50
  end
42
51
 
43
52
  it "sets request body from hash" do
44
- request = Aitch::Request.new("post", "http://example.org/", {a: 1}).request
53
+ request = build_request(data: {a: 1}).request
45
54
  expect(request.body).to eql("a=1")
46
55
  end
47
56
 
48
57
  it "sets request body from string" do
49
- request = Aitch::Request.new("post", "http://example.org/", "some body").request
58
+ request = build_request(data: "some body").request
50
59
  expect(request.body).to eql("some body")
51
60
  end
52
61
 
53
62
  it "sets request body from to_h protocol" do
54
63
  data = stub(to_h: {a: 1})
55
- request = Aitch::Request.new("post", "http://example.org/", data).request
64
+ request = build_request(data: data).request
56
65
  expect(request.body).to eql("a=1")
57
66
  end
58
67
 
59
68
  it "sets request body from to_s protocol" do
60
69
  data = stub(to_s: "some body")
61
- request = Aitch::Request.new("post", "http://example.org/", data).request
70
+ request = build_request(data: data).request
62
71
 
63
72
  expect(request.body).to eql("some body")
64
73
  end
65
74
 
66
75
  it "sets default headers" do
67
- Aitch.configuration.default_headers = {"HEADER" => "VALUE"}
68
- request = Aitch::Request.new("post", "http://example.org/").request
76
+ requester = build_request
77
+ requester.config.default_headers = {"HEADER" => "VALUE"}
78
+ request = requester.request
79
+
69
80
  expect(request["HEADER"]).to eql("VALUE")
70
81
  end
71
82
 
72
83
  it "sets custom headers" do
73
- request = Aitch::Request.new("post", "http://example.org/", {}, {"HEADER" => "VALUE"}).request
84
+ request = build_request(headers: {"HEADER" => "VALUE"}).request
74
85
  expect(request["HEADER"]).to eql("VALUE")
75
86
  end
76
87
 
77
88
  it "sets basic auth credentials" do
78
- request = Aitch::Request.new("post", "http://example.org/", {}, {}, {user: "USER", password: "PASS"}).request
89
+ request = build_request(options: {user: "USER", password: "PASS"}).request
79
90
  credentials = Base64.decode64(request["Authorization"].gsub(/Basic /, ""))
80
91
 
81
92
  expect(credentials).to eql("USER:PASS")
@@ -83,9 +94,8 @@ describe Aitch::Request do
83
94
 
84
95
  describe "#client" do
85
96
  context "https" do
86
- subject(:client) {
87
- Aitch::Request.new("get", "https://example.org").client
88
- }
97
+ let(:request) { build_request(url: "https://example.org") }
98
+ subject(:client) { request.client }
89
99
 
90
100
  it "sets https" do
91
101
  expect(client.use_ssl?).to be_true
@@ -96,7 +106,7 @@ describe Aitch::Request do
96
106
  end
97
107
 
98
108
  it "sets timeout" do
99
- Aitch.configuration.timeout = 20
109
+ request.config.timeout = 20
100
110
  expect(client.read_timeout).to eql(20)
101
111
  end
102
112
  end
@@ -105,7 +115,7 @@ describe Aitch::Request do
105
115
  describe "Request class" do
106
116
  it "raises with invalid method" do
107
117
  expect {
108
- Aitch::Request.new("invalid", "URL").request
118
+ build_request(request_method: "invalid").request
109
119
  }.to raise_error(Aitch::InvalidHTTPMethodError, %[unexpected HTTP verb: "invalid"])
110
120
  end
111
121
 
@@ -120,7 +130,7 @@ describe Aitch::Request do
120
130
  trace
121
131
  ].each do |method|
122
132
  it "instantiates #{method.upcase} method" do
123
- request = Aitch::Request.new(method, "URL").request
133
+ request = build_request(request_method: method).request
124
134
  expect(request.class.name).to eql("Net::HTTP::#{method.capitalize}")
125
135
  end
126
136
  end
metadata CHANGED
@@ -1,126 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aitch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Nando Vieira
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-29 00:00:00.000000000 Z
11
+ date: 2013-04-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: pry-meta
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: test_notifier
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: fakeweb
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: nokogiri
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  description: A simple HTTP client
@@ -141,6 +126,7 @@ files:
141
126
  - lib/aitch.rb
142
127
  - lib/aitch/configuration.rb
143
128
  - lib/aitch/errors.rb
129
+ - lib/aitch/namespace.rb
144
130
  - lib/aitch/redirect.rb
145
131
  - lib/aitch/request.rb
146
132
  - lib/aitch/response.rb
@@ -150,6 +136,7 @@ files:
150
136
  - lib/aitch/xml_parser.rb
151
137
  - spec/aitch/aitch_spec.rb
152
138
  - spec/aitch/configuration_spec.rb
139
+ - spec/aitch/namespace_spec.rb
153
140
  - spec/aitch/request_spec.rb
154
141
  - spec/aitch/response_spec.rb
155
142
  - spec/aitch/xml_parser_spec.rb
@@ -157,31 +144,31 @@ files:
157
144
  homepage: http://rubygems.org/gems/aitch
158
145
  licenses:
159
146
  - MIT
147
+ metadata: {}
160
148
  post_install_message:
161
149
  rdoc_options: []
162
150
  require_paths:
163
151
  - lib
164
152
  required_ruby_version: !ruby/object:Gem::Requirement
165
- none: false
166
153
  requirements:
167
- - - ! '>='
154
+ - - '>='
168
155
  - !ruby/object:Gem::Version
169
156
  version: '0'
170
157
  required_rubygems_version: !ruby/object:Gem::Requirement
171
- none: false
172
158
  requirements:
173
- - - ! '>='
159
+ - - '>='
174
160
  - !ruby/object:Gem::Version
175
161
  version: '0'
176
162
  requirements: []
177
163
  rubyforge_project:
178
- rubygems_version: 1.8.23
164
+ rubygems_version: 2.0.0
179
165
  signing_key:
180
- specification_version: 3
166
+ specification_version: 4
181
167
  summary: A simple HTTP client
182
168
  test_files:
183
169
  - spec/aitch/aitch_spec.rb
184
170
  - spec/aitch/configuration_spec.rb
171
+ - spec/aitch/namespace_spec.rb
185
172
  - spec/aitch/request_spec.rb
186
173
  - spec/aitch/response_spec.rb
187
174
  - spec/aitch/xml_parser_spec.rb