ax-track 0.2.3 → 0.2.5

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: bd2f0e29c25c63a3d0ba8fa8ebfd51b608737ef0031250fbc94980065e11c122
4
- data.tar.gz: e43566965134307c34a3e1c9821ef3d7ab55b62758a81cbfabb42be5d9a59485
3
+ metadata.gz: 95e294f6bd99ab7e87c04391742d8f670ade8cb020c53fac68eb0a5849bc5675
4
+ data.tar.gz: 960a6e7a575c81141cec86665ed328599cadf98afe5c28260a53e78e2b075bbf
5
5
  SHA512:
6
- metadata.gz: 8dc872bcee3f20330251703d696919dbf69b77705b85bcd9ccb4a7291fc7fbf804c9605ba58c21758cddc685122eb29dd8076a2c971657ea18cb0643d2b8524b
7
- data.tar.gz: 026c286cfc104b610b2f49a6d46f360564611bdd64092ce991f83c9c35cf16c3c7a048c4c4a4fc179a5016288f7471f0ede63e12553817cc0d822265b23d110b
6
+ metadata.gz: 86d54e1f259fbb4486d9bc5e465ae3ad322055dc29ab0588c04677975e0d73f8e93ce6337ae288cc0e3fbcc45c6efcc89f158485826c3503209c6b8f1e954b59
7
+ data.tar.gz: ce387bfd144fc624417b4dae73148303dfe87be436643ab4df523c49ef46f3ff8fc0d881338c52ee4027f243eebdcc1861e3ed28631fdd4ea539c35e4025c133
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ax-track (0.2.3)
4
+ ax-track (0.2.5)
5
5
  faraday (~> 1.7)
6
6
  faraday_middleware (~> 1.1)
7
7
 
@@ -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['picture'] = Faraday::FilePart.new(
32
- body['picture'].tempfile.path,
33
- body['picture'].content_type,
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))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AxTrack
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ax-track
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Baumann