ax-track 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ax_track/resource.rb +3 -6
- data/lib/ax_track/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e294f6bd99ab7e87c04391742d8f670ade8cb020c53fac68eb0a5849bc5675
|
4
|
+
data.tar.gz: 960a6e7a575c81141cec86665ed328599cadf98afe5c28260a53e78e2b075bbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86d54e1f259fbb4486d9bc5e465ae3ad322055dc29ab0588c04677975e0d73f8e93ce6337ae288cc0e3fbcc45c6efcc89f158485826c3503209c6b8f1e954b59
|
7
|
+
data.tar.gz: ce387bfd144fc624417b4dae73148303dfe87be436643ab4df523c49ef46f3ff8fc0d881338c52ee4027f243eebdcc1861e3ed28631fdd4ea539c35e4025c133
|
data/Gemfile.lock
CHANGED
data/lib/ax_track/resource.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module AxTrack
|
3
2
|
class Resource
|
4
3
|
attr_reader :client, :response
|
@@ -28,11 +27,9 @@ module AxTrack
|
|
28
27
|
raise "Client not defined" unless defined? @client
|
29
28
|
endpoint = endpoint + "/" unless endpoint[-1] == "/"
|
30
29
|
|
31
|
-
body
|
32
|
-
|
33
|
-
|
34
|
-
body['picture'].filename
|
35
|
-
) if body.key? :picture
|
30
|
+
if body.keys.include?(:picture)
|
31
|
+
body[:picture] = Faraday::FilePart.new(body[:picture].url, body[:picture].content_type, body[:picture].filename)
|
32
|
+
end
|
36
33
|
|
37
34
|
# client.connection['headers']['Content-Type'] = 'multipart/form-data' if body.key? :picture
|
38
35
|
@response = client.connection.public_send(http_method, endpoint, params.merge(body))
|
data/lib/ax_track/version.rb
CHANGED