lhs 16.0.0 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85363475f6b932bc4489de41fdd883f457f906cf28b342ae2c867f1ecdad2c4c
4
- data.tar.gz: 7a264c7eecd67ea68f372f83673cf3926f542ede49934a8d09c4703258f85ddd
3
+ metadata.gz: 519bda1b6733055661e7c322952675d1a8e05dc4b946314ccf84ec1fbcff7fe5
4
+ data.tar.gz: 9a8fca55ca2145b107872375e09244b0fa7bb9d54e18f193a627689cdeac1dc8
5
5
  SHA512:
6
- metadata.gz: eb6b4ec461ce10728b4c23db1a72c70426cf6492c0b5d895c86e0c33c04d3263a6e45dbf8e31d25c4371cae56b4a883995452e81ce0bb12031d7ee122324573f
7
- data.tar.gz: cac3e95397f9cfd5aa152d973130363526ffd78dde337369e701576614bb3d3557a0a46f2e2f4425d9582a63949ac44f80d59f04c3fe8afe691e8fecf5ce2a37
6
+ metadata.gz: 8b34a119d3d592fc15ce1c0bf1bee4f4f6943ab043b34dc783e1c564f939bc5c6e0e13a092a61357a6cd31a9cba895103182cfadbf5bd61300c241c3ace77d23
7
+ data.tar.gz: 5318780360ec447fae0820747c6bc0b86a8f9c2a0b37d827a5086c391e1b160a68cd186380171630b2b915944a319577e7385ba535e06bcb2bb468c968f74ab8
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_dependency 'activemodel'
24
24
  s.add_dependency 'activesupport', '> 4.2'
25
- s.add_dependency 'lhc', '~> 10.0'
25
+ s.add_dependency 'lhc', '~> 10.1.1'
26
26
 
27
27
  s.add_development_dependency 'capybara'
28
28
  s.add_development_dependency 'json', '>= 1.8.2'
@@ -28,7 +28,6 @@ class LHS::Item < LHS::Proxy
28
28
  def apply_default_creation_options(options, url, data)
29
29
  options = options.merge(method: :post, url: url, body: data)
30
30
  options[:headers] ||= {}
31
- options[:headers].merge!('Content-Type' => 'application/json')
32
31
  options
33
32
  end
34
33
 
@@ -33,8 +33,7 @@ class LHS::Item < LHS::Proxy
33
33
  options.merge(
34
34
  method: options.fetch(:method, :post),
35
35
  url: url,
36
- body: data_sent,
37
- headers: { 'Content-Type' => 'application/json' }
36
+ body: data_sent
38
37
  )
39
38
  )
40
39
  _data.merge_raw!(response_data.unwrap(:item_created_key))
@@ -43,8 +43,7 @@ class LHS::Item < LHS::Proxy
43
43
  url: url,
44
44
  method: :post,
45
45
  params: params,
46
- body: _data,
47
- headers: { 'Content-Type' => 'application/json' }
46
+ body: _data
48
47
  )
49
48
  )
50
49
  end
@@ -1,3 +1,3 @@
1
1
  module LHS
2
- VERSION = '16.0.0'
2
+ VERSION = '16.0.1'
3
3
  end
@@ -31,12 +31,12 @@ describe LHS::Record do
31
31
  .with(
32
32
  headers: {
33
33
  'Privatekey' => '123',
34
- 'Accept' => 'application/json'
34
+ 'X-Custom' => '123'
35
35
  }
36
36
  )
37
37
  .to_return(body: [].to_json)
38
38
 
39
- Location.options(headers: { 'Accept' => 'application/json' }).fetch
39
+ Location.options(headers: { 'X-Custom' => '123' }).fetch
40
40
  end
41
41
  end
42
42
  end
@@ -61,7 +61,7 @@ describe LHS::Record do
61
61
  it 'is also applicable to create' do
62
62
  stub_request(:post, 'http://datastore/v2/records').to_return(body: {}.to_json)
63
63
  expect(LHC).to receive(:request)
64
- .with(options.merge(method: :post, url: "http://datastore/v2/records", body: { name: 'Steve' }, headers: { 'Content-Type' => 'application/json' }))
64
+ .with(options.merge(method: :post, url: "http://datastore/v2/records", body: { name: 'Steve' }, headers: {}))
65
65
  .and_call_original
66
66
  Record.options(options).create(name: 'Steve')
67
67
  end
@@ -76,7 +76,7 @@ describe LHS::Record do
76
76
  before do
77
77
  stub_request(:post, 'http://datastore/v2/records/123').to_return(body: {}.to_json)
78
78
  expect(LHC).to receive(:request)
79
- .with(options.merge(method: :post, url: "http://datastore/v2/records/123", body: { href: 'http://datastore/v2/records/123' }, headers: { "Content-Type" => "application/json" }))
79
+ .with(options.merge(method: :post, url: "http://datastore/v2/records/123", body: { href: 'http://datastore/v2/records/123' }, headers: {}))
80
80
  .and_call_original
81
81
  end
82
82
 
@@ -119,7 +119,7 @@ describe LHS::Record do
119
119
  stub_request(:post, "http://datastore/v2/records/123").to_return(body: {}.to_json)
120
120
  body = LHS::Data.new({ href: 'http://datastore/v2/records/123', name: 'steve' }, nil, Record)
121
121
  expect(LHC).to receive(:request)
122
- .with(options.merge(method: :post, url: "http://datastore/v2/records/123", body: body, headers: { "Content-Type" => "application/json" }))
122
+ .with(options.merge(method: :post, url: "http://datastore/v2/records/123", body: body))
123
123
  .and_call_original
124
124
  end
125
125
 
@@ -145,7 +145,7 @@ describe LHS::Record do
145
145
  stub_request(:post, 'http://datastore/v2/records?persist=false').to_return(body: {}.to_json)
146
146
  body = LHS::Data.new({ href: 'http://datastore/v2/records/123' }, nil, Record)
147
147
  expect(LHC).to receive(:request)
148
- .with(options.merge(url: '{+datastore}/records', method: :post, params: { persist: false }, body: body, headers: { "Content-Type" => "application/json" }))
148
+ .with(options.merge(url: '{+datastore}/records', method: :post, params: { persist: false }, body: body))
149
149
  .and_call_original
150
150
  end
151
151
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhs
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.0
4
+ version: 16.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhs/graphs/contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2018-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: 10.1.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: 10.1.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: capybara
57
57
  requirement: !ruby/object:Gem::Requirement