fmrest-core 0.20.0 → 0.21.0.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: 45fc41042ceaacc56c0d27b9d705a635ddad09f34d7e9dbdd33b0965a61a59b3
4
- data.tar.gz: 37d8f75cb978808a08745efa558aa58c4369a43b023336c1b67f3921c6031cba
3
+ metadata.gz: 2404b4260deeceb47d94995c5952a87a5e012138f7b5700995e8554f82278d94
4
+ data.tar.gz: 48b31d91a7017d1d4c1c27ab006d09855fd110ebb8b09babb8ad99e653450e3d
5
5
  SHA512:
6
- metadata.gz: 7cf50096d31b71e98238a2a4cde059ff771c32929298c277aa9972fb2ec6ddb4a5ebaeef227e6bb63dba2ccc8e8240afb500db4b88669b67b66a5e9887cbd8cf
7
- data.tar.gz: 2b706a20520719bb1311a7b72c5be838168cb88701904da2ffcd5fcdb973015f825447d5367104819387e1d391af26f289105ac1ae7ccf03ea74f6801f097d68
6
+ metadata.gz: 3e7dcc78c4eebaa745b7b49c0d3cf05d1ac954d759f38ee906bd3cb45e0f73d68b4fec8e0c66c837f7ca1539d3d87881b58980517c514520ab2a18df7473d6d4
7
+ data.tar.gz: d4d403552c87f7f6a735fc76b613300818640f15135e567bd5e528c61cac14146dff4c4794d5d01a0d15d7db1816fd221a38456ed2ebb838373310760c6b3a63
data/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/fmrest.svg?style=flat)](https://rubygems.org/gems/fmrest)
4
4
  ![CI](https://github.com/beezwax/fmrest-ruby/workflows/CI/badge.svg)
5
5
  [![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/github/beezwax/fmrest-ruby)
6
+ [![Powered by Beezwax](https://img.shields.io/badge/Powered%20By-Beezwax-gold?logo=data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMTA5IiBoZWlnaHQ9IjEwOSIgdmlld0JveD0iMCAw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Njc1MTU1IDQ1LjUgMC40MjQ4NDUgNDUuMyAwLjYyNDg0NUwyMy4xIDEzLjMyNDhIMjIuOVoiIGZpbGw9IiNGRkQ5MzkiPjwvcGF0aD4NCiAgICAgIDxwYXRoIGQ9Ik0wLjEgMzEuNTI0NFY3OC4yMjQ0QzAuMSA4MC44MjQ0IDIuMiA4Mi4zMjQ0IDIuNyA4Mi43MjQ0TDE0LjggODkuNjI0NEwxNy44IDkxLjMyNDRDMjQuNCA4NC43MjQ0IDI4LjQgNzYuMzI0NCAyOC41IDY3LjEyNDRDMjguNSA1MS41MjQ0IDE2LjggMzguMDI0NCAwIDMxLjUyNDRIMC4xWiIgZmlsbD0iI0ZGRDkzOSI+PC9wYXRoPg0KICAgPC9nPg0KPC9zdmc+)](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,20 +17,6 @@ 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
22
  The `fmrest` gem is a wrapper for two other gems:
@@ -124,7 +111,8 @@ to, for instance, disable SSL verification:
124
111
  {
125
112
  host: "…",
126
113
 
127
- ssl: { verify: false }
114
+ ssl: { verify: false },
115
+ proxy: "http://user:password@proxy.host:4321"
128
116
  }
129
117
  ```
130
118
 
@@ -135,13 +123,13 @@ You can also pass a `:log` option for basic request logging, see the section on
135
123
 
136
124
  Option | Description | Format | Default
137
125
  --------------------|--------------------------------------------|-----------------------------|--------
138
- `:host` | Hostname with optional port, e.g. `"example.com:9000"` | String | None
126
+ `:host` | Hostname with optional port, e.g. `example.com:9000` | String | None
139
127
  `:database` | The name of the database to connect to | String | None
140
128
  `:username` | A Data API-ready account | String | None
141
129
  `:password` | Your password | String | None
142
130
  `:account_name` | Alias of `:username` | String | None
143
- `:ssl` | SSL options to be forwarded to Faraday | Faraday SSL options | None
144
- `:proxy` | Proxy URI e.g. `http://username:password@proxy.host:5000` | String / URI | None
131
+ `:ssl` | SSL options to be forwarded to Faraday | [Faraday SSL options](https://www.rubydoc.info/gems/faraday/Faraday/SSLOptions) hash | None
132
+ `:proxy` | Proxy URI, e.g. `http://user:password@proxy.host:4321` | String | None
145
133
  `:log` | Log JSON responses to STDOUT | Boolean | `false`
146
134
  `:log_level` | Which log level to log into | Values accepted by `Logger#level=` | `:debug`
147
135
  `:coerce_dates` | See section on [date fields](#date-fields-and-timezones) | Boolean \| `:hybrid` \| `:full` | `false`
@@ -561,13 +549,8 @@ FM Data API reference: https://help.claris.com/en/data-api-guide/
561
549
 
562
550
  ## Supported Ruby versions
563
551
 
564
- fmrest-ruby aims to support and is [tested against](https://github.com/beezwax/fmrest-ruby/actions?query=workflow%3ACI)
565
- the following Ruby implementations:
566
-
567
- * Ruby 2.5
568
- * Ruby 2.6
569
- * Ruby 2.7
570
- * Ruby 3.0
552
+ fmrest-ruby is [tested against](https://github.com/beezwax/fmrest-ruby/actions?query=workflow%3ACI)
553
+ Ruby 2.6 through 3.1.
571
554
 
572
555
  ## Gem development
573
556
 
@@ -72,7 +72,7 @@ module FmRest
72
72
  elsif is_cloud_host
73
73
  conn.request :authorization, CLARIS_ID_HTTP_AUTH_TYPE, -> { Cloud::ClarisIdTokenManager.new(settings).fetch_token }
74
74
  else
75
- conn.request :basic_auth, settings.username!, settings.password!
75
+ conn.request :authorization, :basic, settings.username!, settings.password!
76
76
  end
77
77
 
78
78
  if settings.log
@@ -80,11 +80,11 @@ module FmRest
80
80
 
81
81
  connection.post do |request|
82
82
  request.url container_path
83
- request.headers['Content-Type'] = ::Faraday::Request::Multipart.mime_type
83
+ request.headers['Content-Type'] = ::Faraday::Multipart::Middleware.mime_type
84
84
 
85
85
  filename = options[:filename] || filename_or_io.try(:original_filename)
86
86
 
87
- request.body = { upload: Faraday::UploadIO.new(filename_or_io, content_type, filename) }
87
+ request.body = { upload: Faraday::Multipart::FilePart.new(filename_or_io, content_type, filename) }
88
88
  end
89
89
  end
90
90
 
@@ -5,7 +5,7 @@ module FmRest
5
5
  # FM Data API response middleware for raising exceptions on API response
6
6
  # errors
7
7
  #
8
- class RaiseErrors < Faraday::Response::Middleware
8
+ class RaiseErrors < Faraday::Middleware
9
9
  # Error codes reference:
10
10
  # https://help.claris.com/en/pro-help/content/error-codes.html
11
11
  ERROR_RANGES = {
@@ -4,7 +4,7 @@ require "fmrest/string_date"
4
4
 
5
5
  module FmRest
6
6
  module V1
7
- class TypeCoercer < Faraday::Response::Middleware
7
+ class TypeCoercer < Faraday::Middleware
8
8
  # We use this date to represent a FileMaker time for consistency with
9
9
  # ginjo-rfm
10
10
  JULIAN_ZERO_DAY = "-4712/1/1"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FmRest
4
- VERSION = "0.20.0"
4
+ VERSION = "0.21.0.rc1"
5
5
  end
data/lib/fmrest.rb CHANGED
@@ -1,17 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "faraday"
4
- require "faraday_middleware"
4
+ require "faraday/multipart"
5
5
 
6
6
  require "fmrest/version"
7
7
  require "fmrest/connection_settings"
8
8
  require "fmrest/errors"
9
9
 
10
10
  module FmRest
11
- autoload :V1, "fmrest/v1"
12
- autoload :TokenStore, "fmrest/token_store"
13
- autoload :Spyke, "fmrest/spyke"
14
- autoload :Layout, "fmrest/spyke"
11
+ autoload :V1, "fmrest/v1"
12
+ autoload :TokenStore, "fmrest/token_store"
13
+ autoload :Spyke, "fmrest/spyke"
14
+ autoload :Layout, "fmrest/spyke"
15
+ autoload :StringDateAwareness, "fmrest/string_date"
15
16
 
16
17
  class << self
17
18
  attr_accessor :token_store
metadata CHANGED
@@ -1,23 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fmrest-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.0.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: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2022-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 1.8.0
20
- - - "<"
21
18
  - !ruby/object:Gem::Version
22
19
  version: '2.0'
23
20
  type: :runtime
@@ -25,31 +22,22 @@ dependencies:
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 1.8.0
30
- - - "<"
31
25
  - !ruby/object:Gem::Version
32
26
  version: '2.0'
33
27
  - !ruby/object:Gem::Dependency
34
- name: faraday_middleware
28
+ name: faraday-multipart
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - ">="
38
32
  - !ruby/object:Gem::Version
39
- version: 0.9.1
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '2.0'
33
+ version: '0'
43
34
  type: :runtime
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
46
37
  requirements:
47
38
  - - ">="
48
39
  - !ruby/object:Gem::Version
49
- version: 0.9.1
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '2.0'
40
+ version: '0'
53
41
  description: fmrest-core is a FileMaker Data API client built with Faraday. It handles
54
42
  authentication as well as providing many utilities for working with the Data API.
55
43
  An ORM library built on top of fmrest-core is also available.
@@ -104,11 +92,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
92
  version: '0'
105
93
  required_rubygems_version: !ruby/object:Gem::Requirement
106
94
  requirements:
107
- - - ">="
95
+ - - ">"
108
96
  - !ruby/object:Gem::Version
109
- version: '0'
97
+ version: 1.3.1
110
98
  requirements: []
111
- rubygems_version: 3.2.3
99
+ rubygems_version: 3.3.3
112
100
  signing_key:
113
101
  specification_version: 4
114
102
  summary: FileMaker Data API client using Faraday, core library