fmrest 0.11.0 → 0.11.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6433cf32d6d0111377f6080967e96fd5ff4cd54c5e223551c777a24c58e8662
4
- data.tar.gz: 1a0fcd5951ab9b5bee88d822a429f16b02dcb01d5c95f74de9d529bb1ed00278
3
+ metadata.gz: d087824f401c6c36c5f0ac00acf9e3ee12fced43d002000533ba0b97e579d89d
4
+ data.tar.gz: 2c3f0018686f48f02c6e177cc10ba0cbdecd584523776c9269023bb7192eb271
5
5
  SHA512:
6
- metadata.gz: a0130f8b3598b3723d3c9e2514448a44a10381045176894cfed21244547c7ed41d0bc83fd18ab40981e9a2fc9ac7bd5c7290a5026b301878ea2c1d9ec440bb76
7
- data.tar.gz: 0fc6a827bb57dea0b261bb812b58322dad8a01eecf78a4344bef877732f4f0b016636750833c048c5831e63e5015c707264a0697282cc7fba9a6879a0cd7e8b1
6
+ metadata.gz: 9746926229c22793428d1c0d76c7d0b373cee751c15d83389e3a426ca434773524e1f8133d65914b0301d47c7e6c22f893f14850377bb8b665f065ce377f972f
7
+ data.tar.gz: a8d32edd04361bb9a4f8add3cc8ecd9e89cf1bcbcf0437cfcc3d30cba652c67b935d58091246f1657041dc0678ce0b01c3685d300b6a699fea3bb73dfb131846
@@ -1,5 +1,9 @@
1
1
  ## Changelog
2
2
 
3
+ ### 0.11.1
4
+
5
+ * Fix a couple crashes due to missing constants
6
+
3
7
  ### 0.11.0
4
8
 
5
9
  * Added custom class for connection settings, providing indifferent access
@@ -6,6 +6,8 @@ require "faraday_middleware"
6
6
  require "fmrest/version"
7
7
  require "fmrest/connection_settings"
8
8
 
9
+ require "fmrest/errors"
10
+
9
11
  module FmRest
10
12
  autoload :V1, "fmrest/v1"
11
13
  autoload :TokenStore, "fmrest/token_store"
@@ -63,9 +63,9 @@ module FmRest
63
63
  def serialize_values!(params)
64
64
  params.transform_values! do |value|
65
65
  case value
66
- when DateTime, Time, FmRest::StringDateTime
66
+ when *datetime_classes
67
67
  convert_datetime_timezone(value.to_datetime).strftime(FM_DATETIME_FORMAT)
68
- when Date, FmRest::StringDate
68
+ when *date_classes
69
69
  value.strftime(FM_DATE_FORMAT)
70
70
  else
71
71
  value
@@ -85,6 +85,14 @@ module FmRest
85
85
  dt
86
86
  end
87
87
  end
88
+
89
+ def datetime_classes
90
+ [DateTime, Time, defined?(FmRest::StringDateTime) && FmRest::StringDateTime].compact
91
+ end
92
+
93
+ def date_classes
94
+ [Date, defined?(FmRest::StringDate) && FmRest::StringDate].compact
95
+ end
88
96
  end
89
97
  end
90
98
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "fmrest/errors"
4
-
5
3
  module FmRest
6
4
  module V1
7
5
  # FM Data API response middleware for raising exceptions on API response
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "fmrest/v1/connection"
4
- require "fmrest/errors"
5
4
 
6
5
  module FmRest
7
6
  module V1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FmRest
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.1"
5
5
  end
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.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Carbajal
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-23 00:00:00.000000000 Z
11
+ date: 2020-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday