lhc 3.5.2 → 3.5.3

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: 9eab71d5754c000d8a3810c90416a09b3c615b2e
4
- data.tar.gz: 4de1ed988db86d463c7e573b48280f38d5172cb9
3
+ metadata.gz: 9f9dd4a891bb2dfe1d92a2645cabc2f62e20f151
4
+ data.tar.gz: 79773712ea94e1067655ba8009c585a22a20f58a
5
5
  SHA512:
6
- metadata.gz: f20cb466d43ff753fa3ec8b454879a100234d9231d4d440ba5132af9c79b245664b42953cc8e1e061e58bc1775b7eb6c7b32c0002782160c13a838f907f6c147
7
- data.tar.gz: 45e4f0e2d27b4b30e072b504de2c6db24bb2a1bee673a33780e55c8a380db5f761f40871d14422fea3b4b6894ea7aeb4fbf5c6b7ba6405837b6be3e46077fe11
6
+ metadata.gz: 7eb974645a68588ffcd873ecbbaa501807de0bb6abd8f5fb0a7a7b419b86169b7c788756ed1260c4ee2015ec5c21b86356124695f0296c9f30f1996f1a3349be
7
+ data.tar.gz: 46e449afd28c4d99a45d679e7daadde1ec1edba2bfe57bfdeaf9e2b67916fbee9a57caf3345bd5a8d23d0daa770a4a7f7d6d137c4694df83d1b1fd2a8260c983
@@ -4,6 +4,7 @@ class JsonFormat
4
4
  def self.request(options)
5
5
  options[:headers] ||= {}
6
6
  options[:headers]['Content-Type'] = 'application/json'
7
+ options[:headers]['Accept'] = 'application/json'
7
8
  options[:format] = new
8
9
  super(options)
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module LHC
2
- VERSION = "3.5.2"
2
+ VERSION = "3.5.3"
3
3
  end
@@ -0,0 +1,12 @@
1
+ require 'rails_helper'
2
+
3
+ describe LHC do
4
+ context 'formats' do
5
+ it 'adds Content-Type and Accept Headers to the request' do
6
+ stub_request(:get, "http://local.ch/")
7
+ .with(headers: { 'Accept' => 'application/json', 'Content-Type' => 'application/json' })
8
+ .to_return(body: {}.to_json)
9
+ LHC.json.get('http://local.ch')
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.2
4
+ version: 3.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - local.ch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -223,6 +223,7 @@ files:
223
223
  - spec/error/find_spec.rb
224
224
  - spec/error/response_spec.rb
225
225
  - spec/error/timeout_spec.rb
226
+ - spec/formats/json_spec.rb
226
227
  - spec/interceptors/after_request_spec.rb
227
228
  - spec/interceptors/after_response_spec.rb
228
229
  - spec/interceptors/before_request_spec.rb
@@ -333,6 +334,7 @@ test_files:
333
334
  - spec/error/find_spec.rb
334
335
  - spec/error/response_spec.rb
335
336
  - spec/error/timeout_spec.rb
337
+ - spec/formats/json_spec.rb
336
338
  - spec/interceptors/after_request_spec.rb
337
339
  - spec/interceptors/after_response_spec.rb
338
340
  - spec/interceptors/before_request_spec.rb