fmrest-core 0.19.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: b926dab37c995250c014ce4a0a21f732d4322da0fd4223f91e7810aa35e0b256
4
- data.tar.gz: f9e59bf3c0c73a8b855c6f9c83bd6c3eb2b07b347ac0414015f139972f623a83
3
+ metadata.gz: 2404b4260deeceb47d94995c5952a87a5e012138f7b5700995e8554f82278d94
4
+ data.tar.gz: 48b31d91a7017d1d4c1c27ab006d09855fd110ebb8b09babb8ad99e653450e3d
5
5
  SHA512:
6
- metadata.gz: 55658cc6acfa077411b242e3473ab763a6754ef02337fcf9871a5aa2143082180a3c62adeb798ef1baae0f76f0d3eb3af248141997922caf260494eca0841982
7
- data.tar.gz: eb32863a601a0a3ac248d9b76aef9507996513a05a7539a0d8280546bbf9f5192b109d6762d05aefaf165ad430350dc8b9ec5d7804f6ab261c72fa318ebe8891
6
+ metadata.gz: 3e7dcc78c4eebaa745b7b49c0d3cf05d1ac954d759f38ee906bd3cb45e0f73d68b4fec8e0c66c837f7ca1539d3d87881b58980517c514520ab2a18df7473d6d4
7
+ data.tar.gz: d4d403552c87f7f6a735fc76b613300818640f15135e567bd5e528c61cac14146dff4c4794d5d01a0d15d7db1816fd221a38456ed2ebb838373310760c6b3a63
data/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  ## Changelog
2
2
 
3
+ ### 0.20.0
4
+
5
+ * Forward proxy options to AWS Client when using `fmrest-cloud` gem
6
+
3
7
  ### 0.19.0
4
8
 
5
- * Add native support for FileMaker cloud through the `fmrest-cloud` gem
9
+ * Added native support for FileMaker Cloud through the `fmrest-cloud` gem
6
10
 
7
11
  ### 0.18.0
8
12
 
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,PHN2ZyB3aWR0aD0iMTA5IiBoZWlnaHQ9IjEwOSIgdmlld0JveD0iMCAwIDEwOSAxMDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik01MC44IDEwNi42MjVDNTkuMSA5OS4zMjUgNjEuOSA5MS42MjUgNjEuOSA5MS42MjVDNjMuMiA4Ny43MjUgNjQuNyA4NC41MjUgNjQuNyA2OS4zMjVDNjQuNyA0Ni40MjUgNTYuMiAzOC45MjUgNDcgMzIuMDI1QzQwLjggMjcuMzI1IDI0LjkgMjEuMTI1IDE1LjUgMTcuNjI1TDIuMjk5OTggMjUuMTI1QzEuNDk5OTggMjUuNzI1IDAuOTk5OTc2IDI2LjIyNSAwLjU5OTk3NiAyNi44MjVDMjQuNCAzMi4xMjUgNDEuNSA0OC4wMjUgNDEuNSA2Ni44MjVDNDEuNSA3OC4yMjUgMzUuMSA4OC42MjUgMjQuOSA5Ni4xMjVMNDQuNyAxMDcuNTI1QzQ1LjEgMTA3LjcyNSA0NiAxMDguMTI1IDQ3LjMgMTA4LjEyNUM0Ny45IDEwOC4xMjUgNDkgMTA3LjkyNSA1MC4zIDEwNi44MjVMNTAuOCAxMDYuNjI1WiIgZmlsbD0iI0ZGRDkzOSI+PC9wYXRoPg0KICAgICAgPHBhdGggZD0iTTIyLjkgMTMuMzI0OEw0NCAyMC40MjQ4QzY0LjYgMjcuNzI0OCA3My4yIDM3LjgyNDggNzMuMiAzNy44MjQ4Qzg0LjUgNDkuMTI0OCA4My4yIDYxLjYyNDggODMuMiA3Ni44MjQ4QzgzLjIgODAuNjI0OCA4Mi42IDg0LjkyNDggODEuNyA4OS4wMjQ4TDkzIDgyLjYyNDhDOTUuNiA4MS4xMjQ4IDk1LjYgNzcuOTI0OCA5NS42IDc3LjkyNDhWMjkuMzI0OEM5NS42IDI2LjEyNDggOTMgMjQuNjI0OCA5MyAyNC42MjQ4TDcyLjUgMTMuMjI0OEw1MC42IDAuNjI0ODQ1QzQ4LjEgLTAuNjc1MTU1IDQ1LjUgMC40MjQ4NDUgNDUuMyAwLjYyNDg0NUwyMy4xIDEzLjMyNDhIMjIuOVoiIGZpbGw9IiNGRkQ5MzkiPjwvcGF0aD4NCiAgICAgIDxwYXRoIGQ9Ik0wLjEgMzEuNTI0NFY3OC4yMjQ0QzAuMSA4MC44MjQ0IDIuMiA4Mi4zMjQ0IDIuNyA4Mi43MjQ0TDE0LjggODkuNjI0NEwxNy44IDkxLjMyNDRDMjQuNCA4NC43MjQ0IDI4LjQgNzYuMzI0NCAyOC41IDY3LjEyNDRDMjguNSA1MS41MjQ0IDE2LjggMzguMDI0NCAwIDMxLjUyNDRIMC4xWiIgZmlsbD0iI0ZGRDkzOSI+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)
@@ -13,19 +14,8 @@ While pretty feature-rich, fmrest-ruby doesn't yet support 100% of FileMaker
13
14
  table](#api-implementation-completeness-table) to check if a feature you need
14
15
  is natively supported by the gem.
15
16
 
16
- ## Contents
17
-
18
- * [Gems](#gems)
19
- * [Installation](#installation)
20
- * [Simple example](#simple-example)
21
- * [Connection settings](#connection-settings)
22
- * [Session token store](#session-token-store)
23
- * [Date fields and timezones](#date-fields-and-timezones)
24
- * [ActiveRecord-like ORM (fmrest-spyke)](#activerecord-like-orm--fmrest-spyke-)
25
- * [Logging](#logging)
26
- * [Gotchas](#gotchas)
27
- * [API implementation completeness table](#api-implementation-completeness-table)
28
- * [Supported Ruby versions](#supported-ruby-versions)
17
+ Need Ruby or FileMaker consulting? Contact us at
18
+ [Beezwax.net](https://beezwax.net/)
29
19
 
30
20
  ## Gems
31
21
 
@@ -121,7 +111,8 @@ to, for instance, disable SSL verification:
121
111
  {
122
112
  host: "…",
123
113
 
124
- ssl: { verify: false }
114
+ ssl: { verify: false },
115
+ proxy: "http://user:password@proxy.host:4321"
125
116
  }
126
117
  ```
127
118
 
@@ -132,13 +123,13 @@ You can also pass a `:log` option for basic request logging, see the section on
132
123
 
133
124
  Option | Description | Format | Default
134
125
  --------------------|--------------------------------------------|-----------------------------|--------
135
- `: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
136
127
  `:database` | The name of the database to connect to | String | None
137
128
  `:username` | A Data API-ready account | String | None
138
129
  `:password` | Your password | String | None
139
130
  `:account_name` | Alias of `:username` | String | None
140
- `:ssl` | SSL options to be forwarded to Faraday | Faraday SSL options | None
141
- `:proxy` | Proxy options to be forwarded to Faraday | Faraday proxy options | 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
142
133
  `:log` | Log JSON responses to STDOUT | Boolean | `false`
143
134
  `:log_level` | Which log level to log into | Values accepted by `Logger#level=` | `:debug`
144
135
  `:coerce_dates` | See section on [date fields](#date-fields-and-timezones) | Boolean \| `:hybrid` \| `:full` | `false`
@@ -558,13 +549,8 @@ FM Data API reference: https://help.claris.com/en/data-api-guide/
558
549
 
559
550
  ## Supported Ruby versions
560
551
 
561
- fmrest-ruby aims to support and is [tested against](https://github.com/beezwax/fmrest-ruby/actions?query=workflow%3ACI)
562
- the following Ruby implementations:
563
-
564
- * Ruby 2.5
565
- * Ruby 2.6
566
- * Ruby 2.7
567
- * 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.
568
554
 
569
555
  ## Gem development
570
556
 
@@ -1,20 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "singleton"
4
-
5
3
  module FmRest
6
4
  module TokenStore
7
- module Null < Base
8
- include Singleton
9
-
10
- def delete(key)
11
- end
12
-
13
- def load(key)
14
- end
15
-
16
- def store(key, value)
17
- end
5
+ class Null < Base
6
+ def delete(key); end
7
+ def load(key); end
8
+ def store(key, value); end
18
9
  end
19
10
  end
20
11
  end
@@ -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.19.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.19.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-06 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