lhs 16.0.0 → 16.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lhs.gemspec +1 -1
- data/lib/lhs/concerns/item/save.rb +0 -1
- data/lib/lhs/concerns/item/update.rb +1 -2
- data/lib/lhs/concerns/item/validation.rb +1 -2
- data/lib/lhs/version.rb +1 -1
- data/spec/record/endpoint_options_spec.rb +2 -2
- data/spec/record/options_spec.rb +4 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 519bda1b6733055661e7c322952675d1a8e05dc4b946314ccf84ec1fbcff7fe5
|
4
|
+
data.tar.gz: 9a8fca55ca2145b107872375e09244b0fa7bb9d54e18f193a627689cdeac1dc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b34a119d3d592fc15ce1c0bf1bee4f4f6943ab043b34dc783e1c564f939bc5c6e0e13a092a61357a6cd31a9cba895103182cfadbf5bd61300c241c3ace77d23
|
7
|
+
data.tar.gz: 5318780360ec447fae0820747c6bc0b86a8f9c2a0b37d827a5086c391e1b160a68cd186380171630b2b915944a319577e7385ba535e06bcb2bb468c968f74ab8
|
data/lhs.gemspec
CHANGED
@@ -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.
|
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))
|
data/lib/lhs/version.rb
CHANGED
@@ -31,12 +31,12 @@ describe LHS::Record do
|
|
31
31
|
.with(
|
32
32
|
headers: {
|
33
33
|
'Privatekey' => '123',
|
34
|
-
'
|
34
|
+
'X-Custom' => '123'
|
35
35
|
}
|
36
36
|
)
|
37
37
|
.to_return(body: [].to_json)
|
38
38
|
|
39
|
-
Location.options(headers: { '
|
39
|
+
Location.options(headers: { 'X-Custom' => '123' }).fetch
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
data/spec/record/options_spec.rb
CHANGED
@@ -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: {
|
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: {
|
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
|
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
|
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.
|
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-
|
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:
|
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:
|
54
|
+
version: 10.1.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: capybara
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|