saddle 0.0.51 → 0.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjAxNjc4ZDBjMjUwZTg1ZTVlNzc1YjI1YTAxZTg0YmU2N2M2YTFkMA==
4
+ ODQ4YmI4OGJiZDRjMjBhNmFkOWI1NGEzZWIyNDA0NWM3NGJjZTdlMQ==
5
5
  data.tar.gz: !binary |-
6
- OGYxYjA4M2VhNDM1ZjI4NzdmZDQ2NmNlMmYwYzAwM2U1NGJlYjczZg==
6
+ NGI3MWM5MDgzZWIyYjVkM2RhYzk1YmRjMGY5YjU3MmE2N2MxNGYyMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDEwZjdjNmIzNzg2ODFiNDlmZjNhM2Y5MjkwMWZhODY3N2ExNDgzYzQzNWI2
10
- MTc3MDZhNTJlOTU4MGE1MTc1ZmUyNjc2MTBhMDU0OGQ0YzMyNGQ3MTYzYTU4
11
- MTI2NjBiMjc0ZTMxYmE2ZGU3M2E2MDA0MmUzY2U4ODg1ZGU5YzU=
9
+ M2JkMWY0YTljNmFmOGI3MjA0NjY0MDRkZmU0ODc4MDNlYmYzMTNmNjVkMmJl
10
+ YmI4ZjBkMzhiOWJhMmFlYjg1MGE1YTJjZDg4MmY5Mjc0N2RmNDBkZjFjZmMy
11
+ ZjYxZWVjYzZiZjI1MzMwYWJmMjdiYWY3NDJmODNmMDk5ZGY0M2I=
12
12
  data.tar.gz: !binary |-
13
- YmE5MWExZmJiNmI1ZjM1YzY1NGQ5MWM4OGZjOTk0NTlhN2ZhMzg3MDU1MzE4
14
- NDg4YWNhYzFkMzhjYjkzOTU5YWZiOTEzODhkNjZlMmFhNDYwMGExNTczMTI1
15
- Y2VmMzNmYmY5ZGQxZTkxZTA5OGNhZGQ4NmI2NmViZmI5M2RlNzI=
13
+ M2Q3NWU4ODRkZGRkOWI5MDY2NmFkZWY3NDViNmZmYjE2NWJlMjEyYTBhY2Qx
14
+ ZGY3M2VmYzIwMmFkMjc2M2VlZTRhNTQwZjU1Yjg1MGRlNzMyMTQ0Mzg0NDRj
15
+ NGViYjZjY2EwMWIwN2VkYzgzNGU0MGI2NjJiODVkNGY5M2ZjZDU=
@@ -3,6 +3,5 @@ rvm:
3
3
  - 2.0.0
4
4
  - 1.9.3
5
5
  - jruby-19mode # JRuby in 1.9 mode
6
- - 1.8.7
7
6
 
8
7
  script: bundle exec rspec
data/bin/saddle CHANGED
@@ -5,6 +5,8 @@ require 'ostruct'
5
5
 
6
6
  require 'active_support/core_ext/string'
7
7
 
8
+ require 'saddle'
9
+
8
10
 
9
11
  # Creation options
10
12
  # TODO: read via CLI
@@ -1,4 +1,3 @@
1
- require 'airbrake'
2
1
  require 'faraday'
3
2
 
4
3
 
@@ -80,6 +80,7 @@ module Saddle
80
80
  def get(url, params={}, options={})
81
81
  response = connection.get do |req|
82
82
  req.options.deep_merge!(options)
83
+ req.body = options[:body] if options.has_key?(:body)
83
84
  req.url(url, params)
84
85
  end
85
86
  handle_response(response)
@@ -1,3 +1,3 @@
1
1
  module Saddle
2
- VERSION = '0.0.51'
2
+ VERSION = '0.0.53'
3
3
  end
@@ -25,6 +25,21 @@ describe Saddle::Client do
25
25
  ).should == 'Party on!'
26
26
  end
27
27
 
28
+ it "should request properly with params in the body" do
29
+ @stubs.send(:new_stub, :get, '/test', "body data") {
30
+ [
31
+ 200,
32
+ {},
33
+ 'Party on!',
34
+ ]
35
+ }
36
+ @default_client.requester.get(
37
+ '/test',
38
+ {},
39
+ {:body => 'body data'}
40
+ ).should == 'Party on!'
41
+ end
42
+
28
43
  it "should parse JSON encoded responses" do
29
44
  @stubs.get('/test.json') {
30
45
  [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.51
4
+ version: 0.0.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Lewis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.1.11
143
+ rubygems_version: 2.2.2
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: A full-featured, generic consumer layer for you to build API client implementations