fmrest-core 0.17.0.rc1 → 0.18.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +4 -0
- data/lib/fmrest/v1/token_session.rb +7 -1
- data/lib/fmrest/v1/utils.rb +14 -0
- data/lib/fmrest/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: 41dc491640fb564e4c8fd798a66e86411f24e9e31c9b10cd233ff280d488ee3e
|
4
|
+
data.tar.gz: 0c0e7e91983fdab51ed16657a42b5c7ac92beb4afc6028689732b202a3535129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbc7f99b2de4af84ddfca9978e51d187bfa2f94af1ac09745c7e14b3fd60c0b4a4eb492172a686e2a1f3419dacf7af6228a02b1dc7b0e40b2437f529e46b1254
|
7
|
+
data.tar.gz: f6ebda3cfdac93c5c0188fbf2a099619075396a5f9e9c507c390985ccc56ae5d6fb72dd6ddec155d01c3d04ba1bbe9d28fc0295e36f97b0ac864312de6047181
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
+
### 0.18.0
|
4
|
+
|
5
|
+
* Better support for portals with mismatching field qualifiers
|
6
|
+
* Defining an attribute on a model that would collide with an existing method
|
7
|
+
now raises an error
|
8
|
+
|
9
|
+
### 0.17.1
|
10
|
+
|
11
|
+
* Fixed crash when `fmid_token` is set but `username` isn't
|
12
|
+
|
3
13
|
### 0.17.0
|
4
14
|
|
5
15
|
* Added support for Claris ID token login
|
data/README.md
CHANGED
@@ -543,6 +543,10 @@ class LoggyBee < FmRest::Layout
|
|
543
543
|
end
|
544
544
|
```
|
545
545
|
|
546
|
+
## Gotchas
|
547
|
+
|
548
|
+
Read about unexpected scenarios in the [gotchas doc](docs/Gotchas.md).
|
549
|
+
|
546
550
|
## API implementation completeness table
|
547
551
|
|
548
552
|
FM Data API reference: https://fmhelp.filemaker.com/docs/18/en/dataapi/
|
@@ -100,7 +100,13 @@ module FmRest
|
|
100
100
|
# Strip the host part to just the hostname (i.e. no scheme or port)
|
101
101
|
host = @settings.host!
|
102
102
|
host = URI(host).hostname if host =~ /\Ahttps?:\/\//
|
103
|
-
|
103
|
+
identity_segment = if fmid_token = @settings.fmid_token
|
104
|
+
require "digest"
|
105
|
+
Digest::SHA256.hexdigest(fmid_token)
|
106
|
+
else
|
107
|
+
@settings.username!
|
108
|
+
end
|
109
|
+
"#{host}:#{@settings.database!}:#{identity_segment}"
|
104
110
|
end
|
105
111
|
end
|
106
112
|
|
data/lib/fmrest/v1/utils.rb
CHANGED
@@ -8,6 +8,8 @@ module FmRest
|
|
8
8
|
# See https://help.claris.com/en/pro-help/content/finding-text.html
|
9
9
|
FM_FIND_OPERATORS_RE = /([@\*#\?!=<>"])/
|
10
10
|
|
11
|
+
FULLY_QUALIFIED_FIELD_NAME_MATCHER = /\A[^:]+::[^:]+\Z/.freeze
|
12
|
+
|
11
13
|
# Converts custom script options to a hash with the Data API's expected
|
12
14
|
# JSON script format.
|
13
15
|
#
|
@@ -104,6 +106,18 @@ module FmRest
|
|
104
106
|
s.gsub(FM_FIND_OPERATORS_RE, "\\\\\\1")
|
105
107
|
end
|
106
108
|
|
109
|
+
# Returns whether the given FileMaker field name is a fully-qualified
|
110
|
+
# name. In other words, whether it contains the string "::".
|
111
|
+
#
|
112
|
+
# Note that this is a simple naive check which doesn't account for
|
113
|
+
# invalid field names.
|
114
|
+
#
|
115
|
+
# @param field_name [String] The field name to test
|
116
|
+
# @return [Boolean] Whether the field is a FQN
|
117
|
+
def is_fully_qualified?(field_name)
|
118
|
+
FULLY_QUALIFIED_FIELD_NAME_MATCHER === field_name.to_s
|
119
|
+
end
|
120
|
+
|
107
121
|
private
|
108
122
|
|
109
123
|
def convert_script_arguments(script_arguments, suffix = nil)
|
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.
|
4
|
+
version: 0.18.0.rc2
|
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-
|
11
|
+
date: 2021-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|