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 +4 -4
- data/lib/lhc/formats/json.rb +1 -0
- data/lib/lhc/version.rb +1 -1
- data/spec/formats/json_spec.rb +12 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f9dd4a891bb2dfe1d92a2645cabc2f62e20f151
|
4
|
+
data.tar.gz: 79773712ea94e1067655ba8009c585a22a20f58a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eb974645a68588ffcd873ecbbaa501807de0bb6abd8f5fb0a7a7b419b86169b7c788756ed1260c4ee2015ec5c21b86356124695f0296c9f30f1996f1a3349be
|
7
|
+
data.tar.gz: 46e449afd28c4d99a45d679e7daadde1ec1edba2bfe57bfdeaf9e2b67916fbee9a57caf3345bd5a8d23d0daa770a4a7f7d6d137c4694df83d1b1fd2a8260c983
|
data/lib/lhc/formats/json.rb
CHANGED
data/lib/lhc/version.rb
CHANGED
@@ -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.
|
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-
|
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
|