lhc 9.0.0 → 9.1.0
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 +2 -2
- data/lib/lhc/version.rb +1 -1
- data/spec/basic_methods/get_spec.rb +1 -1
- data/spec/formats/json_spec.rb +1 -1
- data/spec/response/data_accessor_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1759668d50d0a7291b762b0553b00dc123f89f02
|
4
|
+
data.tar.gz: f5620c4d475ee6c5a0229b18391ac12f97af19fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41fcea12918b753278d4d6062fbd5bdb104d435382187799962c417ec3bd3a94a12607fca3cb2626613cf68543bded472e774a2f9a706540eee0b63a0187e12b
|
7
|
+
data.tar.gz: e1a671c9f2a3f5d971a6195e8ed31f8bf72ba1b0aec690b3f7d8ae73d639adf8f68fb5f941d2ce8d960b3421518818050b1c265bdcd6c0771adaf6a91677e86a
|
data/lib/lhc/formats/json.rb
CHANGED
@@ -4,8 +4,8 @@ module LHC::Formats
|
|
4
4
|
|
5
5
|
def self.request(options)
|
6
6
|
options[:headers] ||= {}
|
7
|
-
options[:headers]['Content-Type'] = 'application/json'
|
8
|
-
options[:headers]['Accept'] = 'application/json'
|
7
|
+
options[:headers]['Content-Type'] = 'application/json; charset=utf-8'
|
8
|
+
options[:headers]['Accept'] = 'application/json; charset=utf-8'
|
9
9
|
options[:format] = new
|
10
10
|
super(options)
|
11
11
|
end
|
data/lib/lhc/version.rb
CHANGED
@@ -35,7 +35,7 @@ describe LHC do
|
|
35
35
|
|
36
36
|
context 'get json' do
|
37
37
|
before(:each) do
|
38
|
-
stub_request(:get, 'http://datastore/v2/feedbacks').with(headers: { 'Content-Type' => 'application/json' })
|
38
|
+
stub_request(:get, 'http://datastore/v2/feedbacks').with(headers: { 'Content-Type' => 'application/json; charset=utf-8' })
|
39
39
|
.to_return(body: { some: 'json' }.to_json)
|
40
40
|
end
|
41
41
|
|
data/spec/formats/json_spec.rb
CHANGED
@@ -4,7 +4,7 @@ describe LHC do
|
|
4
4
|
context 'formats' do
|
5
5
|
it 'adds Content-Type and Accept Headers to the request' do
|
6
6
|
stub_request(:get, "http://local.ch/")
|
7
|
-
.with(headers: { 'Accept' => 'application/json', 'Content-Type' => 'application/json' })
|
7
|
+
.with(headers: { 'Accept' => 'application/json; charset=utf-8', 'Content-Type' => 'application/json; charset=utf-8' })
|
8
8
|
.to_return(body: {}.to_json)
|
9
9
|
LHC.json.get('http://local.ch')
|
10
10
|
end
|
@@ -4,7 +4,7 @@ describe LHC do
|
|
4
4
|
context 'data accessor (hash with indifferent access)' do
|
5
5
|
before(:each) do
|
6
6
|
stub_request(:get, "http://local.ch/")
|
7
|
-
.with(headers: { 'Accept' => 'application/json', 'Content-Type' => 'application/json' })
|
7
|
+
.with(headers: { 'Accept' => 'application/json; charset=utf-8', 'Content-Type' => 'application/json; charset=utf-8' })
|
8
8
|
.to_return(body: { 'MyProp' => 'MyValue' }.to_json)
|
9
9
|
end
|
10
10
|
|