fmrest-spyke 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +16 -26
- data/lib/fmrest/spyke/model/connection.rb +1 -1
- data/lib/fmrest/spyke/spyke_formatter.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f606d5d9365cdd3e3dfdbd9eca86f03f95c950ad793d695b692c3177c2e695e
|
4
|
+
data.tar.gz: 17b268ee1f2ed93de74f624e90044dd60407c56c47b05b91cba1e5f634aaf835
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e74e883a25912e28813e60a18ec74f0ea51e2ec0e160706dec7a8c056b5a3e98d6003b01b9cafe86495e19a4d81a9d5ea45ff842a58858ab150eec286dfbb4af
|
7
|
+
data.tar.gz: babc9b457c7260fb4332aeeee2ba8b442161ac26a42d840c1410ba4ce0676e595ab7ca2de82c51eb8df6c5276b3c828cf364356b2f9b1aeed2a3d4320986635a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[](https://rubygems.org/gems/fmrest)
|
4
4
|

|
5
5
|
[](https://rubydoc.info/github/beezwax/fmrest-ruby)
|
6
|
+
[](https://beezwax.net/)
|
6
7
|
|
7
8
|
A Ruby client for
|
8
9
|
[FileMaker's Data API](https://help.claris.com/en/data-api-guide)
|
@@ -16,29 +17,16 @@ is natively supported by the gem.
|
|
16
17
|
Need Ruby or FileMaker consulting? Contact us at
|
17
18
|
[Beezwax.net](https://beezwax.net/)
|
18
19
|
|
19
|
-
## Contents
|
20
|
-
|
21
|
-
* [Gems](#gems)
|
22
|
-
* [Installation](#installation)
|
23
|
-
* [Simple example](#simple-example)
|
24
|
-
* [Connection settings](#connection-settings)
|
25
|
-
* [Session token store](#session-token-store)
|
26
|
-
* [Date fields and timezones](#date-fields-and-timezones)
|
27
|
-
* [ActiveRecord-like ORM (fmrest-spyke)](#activerecord-like-orm-fmrest-spyke)
|
28
|
-
* [Logging](#logging)
|
29
|
-
* [Gotchas](#gotchas)
|
30
|
-
* [API implementation completeness table](#api-implementation-completeness-table)
|
31
|
-
* [Supported Ruby versions](#supported-ruby-versions)
|
32
|
-
|
33
20
|
## Gems
|
34
21
|
|
35
|
-
The `fmrest` gem is a wrapper for
|
22
|
+
The `fmrest` gem is a wrapper for these gems:
|
36
23
|
|
37
24
|
* `fmrest-spyke`, providing an ActiveRecord-like ORM library built on top
|
38
25
|
of `fmrest-core` and [Spyke](https://github.com/balvig/spyke).
|
39
26
|
* `fmrest-core`, providing the core
|
40
27
|
[Faraday](https://github.com/lostisland/faraday) connection builder, session
|
41
28
|
management, and other core utilities.
|
29
|
+
* `fmrest-rails`, providing Rails integration.
|
42
30
|
|
43
31
|
In addition, the optional `fmrest-cloud` gem adds support for FileMaker Cloud.
|
44
32
|
See the [main document on connecting to FileMaker
|
@@ -55,6 +43,12 @@ gem 'fmrest'
|
|
55
43
|
gem 'fmrest-cloud'
|
56
44
|
```
|
57
45
|
|
46
|
+
If you're using Rails you can now run:
|
47
|
+
|
48
|
+
```
|
49
|
+
rails generate fmrest:config
|
50
|
+
```
|
51
|
+
|
58
52
|
## Simple example
|
59
53
|
|
60
54
|
```ruby
|
@@ -124,7 +118,8 @@ to, for instance, disable SSL verification:
|
|
124
118
|
{
|
125
119
|
host: "…",
|
126
120
|
…
|
127
|
-
ssl: { verify: false }
|
121
|
+
ssl: { verify: false },
|
122
|
+
proxy: "http://user:password@proxy.host:4321"
|
128
123
|
}
|
129
124
|
```
|
130
125
|
|
@@ -135,13 +130,13 @@ You can also pass a `:log` option for basic request logging, see the section on
|
|
135
130
|
|
136
131
|
Option | Description | Format | Default
|
137
132
|
--------------------|--------------------------------------------|-----------------------------|--------
|
138
|
-
`:host` | Hostname with optional port, e.g. `
|
133
|
+
`:host` | Hostname with optional port, e.g. `example.com:9000` | String | None
|
139
134
|
`:database` | The name of the database to connect to | String | None
|
140
135
|
`:username` | A Data API-ready account | String | None
|
141
136
|
`:password` | Your password | String | None
|
142
137
|
`:account_name` | Alias of `:username` | String | None
|
143
|
-
`:ssl` | SSL options to be forwarded to Faraday | Faraday SSL options
|
144
|
-
`:proxy` | Proxy URI e.g. `http://
|
138
|
+
`:ssl` | SSL options to be forwarded to Faraday | [Faraday SSL options](https://www.rubydoc.info/gems/faraday/Faraday/SSLOptions) hash | None
|
139
|
+
`:proxy` | Proxy URI, e.g. `http://user:password@proxy.host:4321` | String | None
|
145
140
|
`:log` | Log JSON responses to STDOUT | Boolean | `false`
|
146
141
|
`:log_level` | Which log level to log into | Values accepted by `Logger#level=` | `:debug`
|
147
142
|
`:coerce_dates` | See section on [date fields](#date-fields-and-timezones) | Boolean \| `:hybrid` \| `:full` | `false`
|
@@ -561,13 +556,8 @@ FM Data API reference: https://help.claris.com/en/data-api-guide/
|
|
561
556
|
|
562
557
|
## Supported Ruby versions
|
563
558
|
|
564
|
-
fmrest-ruby
|
565
|
-
|
566
|
-
|
567
|
-
* Ruby 2.5
|
568
|
-
* Ruby 2.6
|
569
|
-
* Ruby 2.7
|
570
|
-
* Ruby 3.0
|
559
|
+
fmrest-ruby is [tested against](https://github.com/beezwax/fmrest-ruby/actions?query=workflow%3ACI)
|
560
|
+
Ruby 2.6 through 3.1.
|
571
561
|
|
572
562
|
## Gem development
|
573
563
|
|
@@ -141,7 +141,7 @@ module FmRest
|
|
141
141
|
conn.use FmRest::V1::TypeCoercer, config
|
142
142
|
|
143
143
|
# FmRest::Spyke::SpykeFormatter expects symbol keys
|
144
|
-
conn.response :json, parser_options: { symbolize_names: true }
|
144
|
+
conn.response :json, parser_options: { symbolize_names: true }
|
145
145
|
end
|
146
146
|
|
147
147
|
@fmrest_connection = connection if memoize
|
@@ -22,7 +22,7 @@ module FmRest
|
|
22
22
|
|
23
23
|
# Response Faraday middleware for converting FM API's response JSON into
|
24
24
|
# Spyke's expected format
|
25
|
-
class SpykeFormatter < ::Faraday::
|
25
|
+
class SpykeFormatter < ::Faraday::Middleware
|
26
26
|
SINGLE_RECORD_RE = %r(/records/\d+\z).freeze
|
27
27
|
MULTIPLE_RECORDS_RE = %r(/records\z).freeze
|
28
28
|
CONTAINER_RE = %r(/records/\d+/containers/[^/]+/\d+\z).freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fmrest-spyke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pedro Carbajal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fmrest-core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.22.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.22.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spyke
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '7.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '7.0'
|
41
41
|
description: fmrest-spyke is an ActiveRecord-like ORM client library for the FileMaker
|
42
42
|
Data API built on top of fmrest-core and Spyke (https://github.com/balvig/spyke).
|
43
43
|
email:
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.3.3
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: FileMaker Data API ORM client library
|