fmrest 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +13 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec213ebe845fe6b4e10e5cf54550d2a73fec05ac33fbeb5a9758b8f04327a8df
|
4
|
+
data.tar.gz: 9313ec2d6b743a6355535736f5d1fe77656c3f1d5c2648c4dcc2de36d49347d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 406e098733ea1c945b18d6df1063be38d1e9826c68d58bf1b9ce7d47784b0b8949d4d581e9918182c883ba674f2fff1ce0d4bb5b2854587ff0a1dc3d77a76f2d
|
7
|
+
data.tar.gz: c6e29a0b3f63adc1bb2c5c03a6c5f0a2eadb6ed4ae864159b9d504f77b1848ed51a94e6d1ca8aeb4abed8f36a08d58a99d4c66bfff04f56e227e4b117bb4e97e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -152,6 +152,7 @@ Option | Description | Format
|
|
152
152
|
`:ssl` | SSL options to be forwarded to Faraday | Faraday SSL options | None
|
153
153
|
`:proxy` | Proxy options to be forwarded to Faraday | Faraday proxy options | None
|
154
154
|
`:log` | Log JSON responses to STDOUT | Boolean | `false`
|
155
|
+
`:log_level` | Which log level to log into | Values accepted by `Logger#level=` | `:debug`
|
155
156
|
`:coerce_dates` | See section on [date fields](#date-fields-and-timezones) | Boolean \| `:hybrid` \| `:full` | `false`
|
156
157
|
`:date_format` | Date parsing format | String (FM date format) | `"MM/dd/yyyy"`
|
157
158
|
`:timestamp_format` | Timestmap parsing format | String (FM date format) | `"MM/dd/yyyy HH:mm:ss"`
|
@@ -457,7 +458,7 @@ If using `fmrest-spyke` with Rails then pretty log output will be set up for
|
|
457
458
|
you automatically by Spyke (see [their
|
458
459
|
README](https://github.com/balvig/spyke#log-output)).
|
459
460
|
|
460
|
-
You can also enable simple Faraday
|
461
|
+
You can also enable simple Faraday logging of raw requests (useful for
|
461
462
|
debugging) by passing `log: true` in the options hash for either
|
462
463
|
`FmRest.default_connection_settings=` or your models' `fmrest_config=`, e.g.:
|
463
464
|
|
@@ -478,7 +479,17 @@ class LoggyBee < FmRest::Layout
|
|
478
479
|
end
|
479
480
|
```
|
480
481
|
|
481
|
-
|
482
|
+
You can also pass `log_level` to connection settings to change the severity of
|
483
|
+
log output (defaults to `:debug`).
|
484
|
+
|
485
|
+
By default fmrest-ruby logs to STDOUT or to Rails' logger object if available.
|
486
|
+
You can change this by providing your own logger object to `FmRest.logger=`:
|
487
|
+
|
488
|
+
```ruby
|
489
|
+
FmRest.logger = Logger.new("fmrest.log")
|
490
|
+
```
|
491
|
+
|
492
|
+
If you need to set up more complex logging for your models you can use the
|
482
493
|
`faraday` block inside your class to inject your own logger middleware into the
|
483
494
|
Faraday connection, e.g.:
|
484
495
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fmrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.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: 2021-04-
|
11
|
+
date: 2021-04-14 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.16.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.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: fmrest-spyke
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.16.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: 0.
|
40
|
+
version: 0.16.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|