rapidash 0.1.1 → 0.1.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: 27988e3bc9f82d6c93ca68a8f5e4a18a802b56c0
4
- data.tar.gz: 65b988d98e2feb6afed163fb8876ef3f033d04d4
3
+ metadata.gz: a24e88b9990655513929505bdfded740ae3bc5d0
4
+ data.tar.gz: 10b580d030b0db97f695b353bdcbc8f4f5046fa9
5
5
  SHA512:
6
- metadata.gz: e379666447ac2040248ea184dae2068c871ac9b51e0d446a71a5b6abe0525f981bd9cd2f43bd73050706091984f4d4d2a0f800fc3a74931f1682fb19b55c0b59
7
- data.tar.gz: d9ca90ec4f6c5c88da837644642396281807b3387285a870ebc98b2ad54148f984535d7b0c7dca49133adf2bd0d6ee8769fce88d349d251aed565a6aedf3e9fd
6
+ metadata.gz: 737c8447bca4d1c56110fa957f7cfe5fa0e8752baf9a7974f8a3e5cbec657e6f30bd0740a1ecbdffe17d0b1a57dc09a667e86243f5a69d511871713cea291fb8
7
+ data.tar.gz: dcaa32a236b129363fc317b2219c69954e85216d10c9403b8431730b8dfd2e40b0d42014374497e4eaeba94532d318cf440405ef61416bedaed8914d4b962d09
data/lib/rapidash/base.rb CHANGED
@@ -49,8 +49,8 @@ module Rapidash
49
49
  def call!
50
50
  self.options ||= {}
51
51
  options.delete(:previous_url)
52
- options[:header] ||= {}
53
- options[:header]["content-type"] = "application/json"
52
+ options[:headers] ||= {}
53
+ options[:headers]["content-type"] = "application/json"
54
54
  method = options.delete(:method) || :get
55
55
  client.send(method, url, options)
56
56
  end
@@ -29,7 +29,7 @@ module Rapidash
29
29
  url = "#{url}.#{(self.class.url_extension)}"
30
30
  end
31
31
  url = connection.build_url(url, options[:params]).to_s
32
- response = connection.run_request(verb, url, options[:body], options[:header])
32
+ response = connection.run_request(verb, url, options[:body], options[:headers])
33
33
 
34
34
  # "foo"[0] does not work in 1.8.7, "foo"[0,1] is required
35
35
  case response.status.to_s[0,1]
@@ -1,3 +1,3 @@
1
1
  module Rapidash
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -118,13 +118,13 @@ describe Rapidash::Base do
118
118
  describe ".call!" do
119
119
  it "should call get on the client" do
120
120
  subject.url = "tester/1"
121
- client.should_receive(:get).with("tester/1", {:header => headers})
121
+ client.should_receive(:get).with("tester/1", {:headers => headers})
122
122
  subject.call!
123
123
  end
124
124
 
125
125
 
126
126
  it "should call a post on the client if set" do
127
- client.should_receive(:post).with("tester", {:header => headers})
127
+ client.should_receive(:post).with("tester", {:headers => headers})
128
128
  subject.options = {:method => :post}
129
129
  subject.url = "tester"
130
130
  subject.call!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapidash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary 'Gazler' Rennie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-16 00:00:00.000000000 Z
11
+ date: 2013-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.0.2
170
+ rubygems_version: 2.0.0
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: An opinionated core for creating clients for RESTful APIs quickly