fmrest-core 0.13.0 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/fmrest/v1/container_fields.rb +15 -10
- data/lib/fmrest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53d29a0e4e2956b66ae0054f5f4fd355115a9889fab57dae36506b37f5d68cf2
|
4
|
+
data.tar.gz: b4228ee457a91c8e1b1f217678c66d7d86a23e5b8dd6420120904e801b61224d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0909eaef29e7ba596aa469ef62eccf60f7e73ab33fb3e2ab5d88b4fce1d96d15fd3ebcb3404eb767d15ccfd262713c0b190af0cff51bbd5a72f7c9bf31f134
|
7
|
+
data.tar.gz: 56ab9b3d5a8ebc11ca44c04c1200b6bfdff8c49da0aa767be74965d1df11b0fcb836d88dcff7d4a954585cb54ac316c15d6a7b71a5306e6b62cab1d2562d04e9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -45,18 +45,23 @@ module FmRest
|
|
45
45
|
proxy: proxy_options || FmRest.default_connection_settings[:proxy]
|
46
46
|
)
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
cookie_response = conn.get url
|
48
|
+
openuri_options =
|
49
|
+
faraday_connection_to_openuri_options(conn).merge(redirect: false)
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
begin
|
52
|
+
url.open(openuri_options)
|
53
|
+
rescue OpenURI::HTTPRedirect => e
|
54
|
+
unless cookie = e.io.metas.dig("set-cookie", 0)
|
55
|
+
raise FmRest::ContainerFieldError, "Container field's initial request didn't return a session cookie, the URL may be stale (try downloading it again immediately after retrieving the record)"
|
56
|
+
end
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
url = URI(e.io.meta["location"])
|
59
|
+
|
60
|
+
# Now request the URL again with the proper session cookie using
|
61
|
+
# OpenURI, which wraps the response in an IO object which also responds
|
62
|
+
# to #content_type
|
63
|
+
url.open(openuri_options.merge("Cookie" => cookie))
|
64
|
+
end
|
60
65
|
end
|
61
66
|
|
62
67
|
# Handles the core logic of uploading a file into a container field
|
data/lib/fmrest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fmrest-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pedro Carbajal
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.0.6
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: FileMaker Data API client using Faraday, core library
|