sawyer 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sawyer.rb +1 -1
  3. data/lib/sawyer/agent.rb +3 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfd4d1232630a874ef6148436ec032cd58ccbcda
4
- data.tar.gz: 1548f8adc99856f383bc8b3ebc1d6501c2b62d2f
3
+ metadata.gz: 5d7b54a1fff4008a1f9b1ce3b71e10b21f513cf0
4
+ data.tar.gz: 15f7461f65c71a52f259887192c881d7cacb63c8
5
5
  SHA512:
6
- metadata.gz: 9507fe98ea69328e2932fde6adce2432d8a2566ed30020f692f98933e7f7d54758fa69663ef322dc3931829cbda6b4f46a202174edf66fdb7bf2cdf99908ac37
7
- data.tar.gz: 71f6df7b3be49de481986689e0fd210cf46f0b44ad3dd2b7955560b0d66e4e09ae31df0a2f0c2f9972855fc4131325328d4f7fa3b63027d52b9898e74f508792
6
+ metadata.gz: cb2cbf128ccb8abb1ea3a09f4dff794eacde58efa511ab0a1cee9e87e092432244b43bacebb738e26e8909a98804b010ca175679bd4a7260e8c09fcca2c1d925
7
+ data.tar.gz: fb09d67d7c006cf2a14285a228ddeb85758d77e5a6ab1553c27980fd4ec46bab382b64eff069c03a967a4cee0afd8cae12a6752a30ebf19c491cc876cec9516c
@@ -1,5 +1,5 @@
1
1
  module Sawyer
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
 
4
4
  class Error < StandardError; end
5
5
  end
@@ -92,7 +92,9 @@ module Sawyer
92
92
  url = expand_url(url, options[:uri])
93
93
  started = nil
94
94
  res = @conn.send method, url do |req|
95
- req.body = encode_body(data) if data
95
+ if data
96
+ req.body = data.is_a?(String) ? data : encode_body(data)
97
+ end
96
98
  if params = options[:query]
97
99
  req.params.update params
98
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sawyer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Olson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-22 00:00:00.000000000 Z
12
+ date: 2013-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday