fmrest-core 0.26.0 → 0.26.1

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: 47bbc3a1dd60de769f11e2e95034ff7e2a88374553251ea5f210b5328551999a
4
+ data.tar.gz: a96c1503865da0c440e4ee4516ebb156d4bef6e39d800fced6ad2110cb8b4264
5
5
  SHA512:
6
- metadata.gz: 9667f68401137c9ffd110c5c393a236113b16a9c19bb2c58058081e5bbc042e042d7cb1db35f83f538504c64320ef19a012a567f967ba246f3ca785c768d4e0b
7
- data.tar.gz: c62741865b4add8835925024752d1467ffe631f5b750468bfc273a86589acd91bc1176dd6d2dab775d3b9c3a68bbf340ccfffdecb1d666b91f7c831231176e0e
6
+ metadata.gz: dc5bc00c7e9122511fac018624f5ac8a5faf2102f78cb0ad350e3366fc56cbbb91a32af7975aeee74400c7ade2c456190c5ce2abdf7ba1ef24d7f2830944a037
7
+ data.tar.gz: 1eabd5a9c384b7ee398cbae514d350d96eb3c4d7e62e358f005ebcc174da27ed561e08399a2efb6c138a1a7b697921c496f90091ba7ecc7469fca15014fb745f
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"
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
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