fidor_api 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fidor_api/client/dsl.rb +4 -4
- data/lib/fidor_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f161e9822fbceefb3e7489d724fa03ad74caf6b4a2cdda9124d84200eaa25e9f
|
4
|
+
data.tar.gz: 184b885970ca54f5abaf3ae6231b3c7f535af360a970868382ac18e3be479062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 264b621669e7e4a42e2d0da1416ebdaa3ee72993873d6cf901b80204d2eea8ca03c7a434783709853aa65a867623c611c743d0b5837d47a6c9492d68d83ab53c
|
7
|
+
data.tar.gz: 8698d599b46510f3bea8ffdeaa1bfbbb52d236eae2ec8f7fd3d7930b33beb08049706dba8f18ce4665fd638ff44853513d8a657e68f9ccd922d2145b74da3977
|
data/lib/fidor_api/client/dsl.rb
CHANGED
@@ -36,14 +36,14 @@ module FidorApi
|
|
36
36
|
request(klass, endpoint, :post, attributes)
|
37
37
|
end
|
38
38
|
|
39
|
-
def update(klass, endpoint, id, attributes)
|
40
|
-
request(klass, endpoint, :put, attributes.merge(id: id))
|
39
|
+
def update(klass, endpoint, id, attributes, headers = {})
|
40
|
+
request(klass, endpoint, :put, attributes.merge(id: id), headers)
|
41
41
|
end
|
42
42
|
|
43
|
-
def request(klass, endpoint, method, attributes) # rubocop:disable Metrics/AbcSize
|
43
|
+
def request(klass, endpoint, method, attributes, headers = {}) # rubocop:disable Metrics/AbcSize
|
44
44
|
model = klass.new(attributes)
|
45
45
|
model.tap do |m|
|
46
|
-
response = connection.public_send(method, endpoint, body: m.as_json)
|
46
|
+
response = connection.public_send(method, endpoint, body: m.as_json, headers: headers)
|
47
47
|
m.set_attributes(response.body) if response.body.is_a?(Hash)
|
48
48
|
m.confirmable_action_id = extract_confirmable_id(response.headers)
|
49
49
|
end
|
data/lib/fidor_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fidor_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fidor Solutions AG
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|