sunstone 1.7.11 → 1.7.12

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: d428b2ba4f6592d1ebf678cc96a904302ba961bd
4
- data.tar.gz: 58129a5578f196261560e28b5fbbf68ffc648990
3
+ metadata.gz: 639ccca9f61f13b5503f4d3557b1cdeff1cad9bc
4
+ data.tar.gz: acd3fd748c78d4a5a91273e98774ccf8459871ab
5
5
  SHA512:
6
- metadata.gz: afc81281b06fb2440968f772c4b04277b03442673adf816324a30612fa668d35c1db20fd6742ab11a05c5b5a193346fcf3c57b5cffb6651346b10a8bf34d45db
7
- data.tar.gz: f0f10ecdfe799474be88df3dcd13caf8bbb21e3e91802d90453553c6b4847188b4365ccfc03213de05f1ab044d2a55d5d391f332c7f84330aea178b0199c5492
6
+ metadata.gz: c3790ab0d8753649934fcf2c41f078fecc83e73090028f04f162df45678171159583cd94f87b1cc7c0d9a409a73685bf7ffe8e1f135021ae42b5b9c52cfd59a9
7
+ data.tar.gz: 492ad87d420d3ef99c0edca902fbfd76c73f9de11c978b1dc67fcc96cdd3ef3478934f8496db2b6651ae7155b3e8b5b61f0b1a79509d31806d4407952e370344
@@ -100,7 +100,8 @@ module Sunstone
100
100
  def send_request(request, body=nil, &block)
101
101
  request_uri = "http#{use_ssl ? 's' : ''}://#{host}#{port != 80 ? (port == 443 && use_ssl ? '' : ":#{port}") : ''}#{request.path}"
102
102
  request_headers.each { |k, v| request[k] = v }
103
-
103
+ request['Content-Type'] ||= 'application/json'
104
+
104
105
  if Thread.current[:sunstone_cookie_store]
105
106
  request['Cookie'] = Thread.current[:sunstone_cookie_store].cookie_header_for(request_uri)
106
107
  end
@@ -111,7 +112,7 @@ module Sunstone
111
112
  elsif body.is_a?(String)
112
113
  request.body = body
113
114
  elsif body
114
- request['Content-Type'] = 'application/json'
115
+
115
116
  request.body = Wankel.encode(body)
116
117
  end
117
118
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sunstone"
3
- s.version = '1.7.11'
3
+ s.version = '1.7.12'
4
4
  s.authors = ["Jon Bracy"]
5
5
  s.email = ["jonbracy@gmail.com"]
6
6
  s.homepage = "http://sunstonerb.com"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.11
4
+ version: 1.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-01 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake