fmrest-core 0.26.0 → 0.26.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eed30260591437d4845f975bcb4abc74d6d1da8177958b2d71ddc47e7a3cbee4
4
- data.tar.gz: 0705f1f61c964162f60e0a967ce00fc833b75bf968260392874c76df736caf85
3
+ metadata.gz: 8f5ff7c2a8bae8216fe6c87f0ecd3f52e9f0ee79a58688750089c09bbd7c258a
4
+ data.tar.gz: ea339e65464e436fedef11f247e093c3d4ec6c4a0af8aa92f7d29e5a71ddace7
5
5
  SHA512:
6
- metadata.gz: 9667f68401137c9ffd110c5c393a236113b16a9c19bb2c58058081e5bbc042e042d7cb1db35f83f538504c64320ef19a012a567f967ba246f3ca785c768d4e0b
7
- data.tar.gz: c62741865b4add8835925024752d1467ffe631f5b750468bfc273a86589acd91bc1176dd6d2dab775d3b9c3a68bbf340ccfffdecb1d666b91f7c831231176e0e
6
+ metadata.gz: 155e1c9578fbcd8c4bd179ba521f58f5b776175d65c0c12f4a8f32c8bcaa20346d4da928b2c94aa65f3314682311f02de1ad72fcc344a2a5990911278e98dcb6
7
+ data.tar.gz: e54e44904fb094fca77af030d7ba553b28c42d360b814eab984b37e24bb9eca725854cc74ee087db8f9b6291846d5baf55f460c33953184212cdf09677ab52bb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Changelog
2
2
 
3
+ ### 0.26.1
4
+
5
+ * Fix downloading of container files in FileMaker 20
6
+
3
7
  ### 0.26.0
4
8
 
5
9
  * Add support for ActiveSupport 7.1
data/README.md CHANGED
@@ -588,7 +588,7 @@ FM Data API reference: https://help.claris.com/en/data-api-guide/
588
588
 
589
589
  The latest fmrest-ruby is
590
590
  [tested against](https://github.com/beezwax/fmrest-ruby/actions?query=workflow%3ACI)
591
- Ruby 3.0 through 3.3.0-rc1, and Rails (ActiveSupport) 6.1 through 7.1.
591
+ Ruby 3.0 through 3.3, and Rails (ActiveSupport) 6.1 through 7.1.
592
592
 
593
593
  ## Gem development
594
594
 
@@ -55,7 +55,11 @@ module FmRest
55
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
56
  end
57
57
 
58
- url = URI(e.io.meta["location"])
58
+ url = if e.io.meta["location"].match(/\Ahttps?:/)
59
+ URI(e.io.meta["location"])
60
+ else
61
+ URI.join("#{url.scheme}://#{url.host}:#{url.port}", e.io.meta["location"])
62
+ end
59
63
 
60
64
  # Now request the URL again with the proper session cookie using
61
65
  # OpenURI, which wraps the response in an IO object which also responds
@@ -71,10 +71,10 @@ module FmRest
71
71
 
72
72
  # Do we have ActiveSupport's TimeZone?
73
73
  time = if time.respond_to?(:in_time_zone)
74
- time.in_time_zone(zone || ::Time.zone)
75
- else
76
- time.localtime
77
- end
74
+ time.in_time_zone(zone || ::Time.zone)
75
+ else
76
+ time.localtime
77
+ end
78
78
 
79
79
  Rational(time.utc_offset, 86400) # seconds in one day (24*60*60)
80
80
  end
@@ -101,12 +101,13 @@ module FmRest
101
101
  # Strip the host part to just the hostname (i.e. no scheme or port)
102
102
  host = @settings.host!
103
103
  host = URI(host).hostname if host =~ /\Ahttps?:\/\//
104
- identity_segment = if fmid_token = @settings.fmid_token
105
- require "digest"
106
- Digest::SHA256.hexdigest(fmid_token)
107
- else
108
- @settings.username!
109
- end
104
+ identity_segment =
105
+ if fmid_token = @settings.fmid_token
106
+ require "digest"
107
+ Digest::SHA256.hexdigest(fmid_token)
108
+ else
109
+ @settings.username!
110
+ end
110
111
  "#{host}:#{@settings.database!}:#{identity_segment}"
111
112
  end
112
113
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FmRest
4
- VERSION = "0.26.0"
4
+ VERSION = "0.26.1.rc1"
5
5
  end
data/lib/fmrest.rb CHANGED
@@ -40,12 +40,13 @@ module FmRest
40
40
  end
41
41
 
42
42
  def logger
43
- @logger ||= if defined?(Rails)
44
- Rails.logger
45
- else
46
- require "logger"
47
- Logger.new($stdout)
48
- end
43
+ @logger ||=
44
+ if defined?(Rails)
45
+ Rails.logger
46
+ else
47
+ require "logger"
48
+ Logger.new($stdout)
49
+ end
49
50
  end
50
51
 
51
52
  # Shortcut for `FmRest::V1.escape_find_operators`
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.26.0
4
+ version: 0.26.1.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Carbajal
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-22 00:00:00.000000000 Z
11
+ date: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -97,9 +97,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - ">"
101
101
  - !ruby/object:Gem::Version
102
- version: '0'
102
+ version: 1.3.1
103
103
  requirements: []
104
104
  rubygems_version: 3.4.6
105
105
  signing_key: