eac_rest 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_rest/request.rb +5 -1
- data/lib/eac_rest/response.rb +2 -2
- data/lib/eac_rest/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: 66c3020339ccd5df2e47dfd97c85114a10aaa67da61bacf21ca43ac834bbfc24
|
4
|
+
data.tar.gz: d2e34918c150896f372a686dc093905adf54b6f30db300622f07f6b187368af6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fc42e19e74493f10ffd0e30473dd5b173c96317946b8950e021f996c211c8e2769d81785bdb4b60a471156f085fd0cc20c32747b78dc63b549e1bc964f2e818
|
7
|
+
data.tar.gz: fa104d01ea1de4bb202c40b5c602de8754300bd16cb358b9744e01575a77ce91f7206cfafb48f691850e84b61d31f379e096b6dedd50af38cd6aa2227efdeb00
|
data/lib/eac_rest/request.rb
CHANGED
@@ -30,7 +30,11 @@ module EacRest
|
|
30
30
|
def faraday_connection
|
31
31
|
::Faraday.default_connection_options[:headers] = {}
|
32
32
|
::Faraday::Connection.new(faraday_connection_options) do |conn|
|
33
|
-
|
33
|
+
if body_with_file?
|
34
|
+
conn.request :multipart, flat_encode: true
|
35
|
+
else
|
36
|
+
conn.request :url_encoded
|
37
|
+
end
|
34
38
|
auth.if_present { |v| conn.request :authorization, :basic, v.username, v.password }
|
35
39
|
end
|
36
40
|
end
|
data/lib/eac_rest/response.rb
CHANGED
@@ -78,7 +78,7 @@ module EacRest
|
|
78
78
|
performed.status.to_i
|
79
79
|
end
|
80
80
|
|
81
|
-
delegate :url, to: :
|
81
|
+
delegate :url, to: :request
|
82
82
|
|
83
83
|
def to_s
|
84
84
|
"URL: #{url}\nStatus: #{status}\nBody:\n\n#{body_str}"
|
@@ -103,7 +103,7 @@ module EacRest
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def performed
|
106
|
-
@
|
106
|
+
@performed ||= request.faraday_response
|
107
107
|
rescue ::Faraday::Error
|
108
108
|
raise ::EacRest::Error
|
109
109
|
end
|
data/lib/eac_rest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_fs
|