activemodel-datastore 0.6.0 → 0.8.0

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: 6cb0d9446cce815b9dd1b3ef33c955b79c2170643256b60e059b867e7c39fa09
4
- data.tar.gz: 8b3664f1e5bbe8aad5647397d392f5d80071a943c5dc86bd1a06126aa2ef04ee
3
+ metadata.gz: 9c26efa635bdc60b33239d0f6b33cc6e4ac86fb5c752672f25f6969b2c3dda5c
4
+ data.tar.gz: 9651de6765b071963bbf0ee9da4680dbb46c5d0b820d463e34db0fc0e3d36612
5
5
  SHA512:
6
- metadata.gz: daf7db6ad22662105e6fe1e8be137abf3a1e65d3effdc9dad679edfa4d6ae1ab4d523e6958699bbaf795e40ce59c2e7e8a9f8f8c787879915524f06f6ed15822
7
- data.tar.gz: 8cbfa6c1916501f812be09040bcd34e4d0de7cac93aa24fe52781cd82fcc6924f96495da39f029998a837c3ab78ddec0f085ecda64f96fcd86927a5413df218b
6
+ metadata.gz: 4227107ad98274df5bac98ffb38e7de8ebfc8ec3d61edf4f09497ad1498fe936cf2a4a10a4c583ba43f0288f0f011cd8b20dd454f8d2f677380c6967dc3c4c9c
7
+ data.tar.gz: 38d33728917c185c9beaf6c5ecb64e6adcf5e94ab672651ea33a41d22e9a9b6be503ee043b8878fc19aa81b552b7eae662cc568a50bf073853782bd45e568770
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 0.8.0 / 2024-03-05
2
+ * updating GCLOUD_KEYFILE_JSON to work with the latest version of GoogleAuth
3
+
4
+ ### 0.7.0 / 2021-11-04
5
+ * adding support for Ruby 3
6
+
1
7
  ### 0.6.0 / 2021-09-20
2
8
  * defaulting the Google::Cloud.datastore network timeout to 15 sec and providing the env var DATASTORE_NETWORK_TIMEOUT as an override.
3
9
 
@@ -21,8 +21,12 @@ module CloudDatastore
21
21
  ENV['GCLOUD_PROJECT'] ||= 'test-datastore'
22
22
  elsif ENV['SERVICE_ACCOUNT_PRIVATE_KEY'].present? &&
23
23
  ENV['SERVICE_ACCOUNT_CLIENT_EMAIL'].present?
24
- ENV['GCLOUD_KEYFILE_JSON'] ||= '{"private_key": "' + ENV['SERVICE_ACCOUNT_PRIVATE_KEY'] + '",
25
- "client_email": "' + ENV['SERVICE_ACCOUNT_CLIENT_EMAIL'] + '"}'
24
+ ENV['GCLOUD_KEYFILE_JSON'] ||=
25
+ '{' \
26
+ '"private_key": "' + ENV['SERVICE_ACCOUNT_PRIVATE_KEY'] + '",' \
27
+ '"client_email": "' + ENV['SERVICE_ACCOUNT_CLIENT_EMAIL'] + '",' \
28
+ '"type": "service_account"' \
29
+ '}'
26
30
  end
27
31
  end
28
32
 
@@ -248,7 +248,7 @@ module ActiveModel::Datastore
248
248
  def validate_each(record, attribute, value)
249
249
  return unless Array(value).reject(&:valid?).any?
250
250
 
251
- record.errors.add(attribute, :invalid, options.merge(value: value))
251
+ record.errors.add(attribute, :invalid, **options.merge(value: value))
252
252
  end
253
253
  end
254
254
  end
@@ -88,7 +88,7 @@ module ActiveModel::Datastore
88
88
  with_changes = Array(send(attr.to_sym)).select(&:values_changed?)
89
89
  send("#{attr}=", with_changes)
90
90
  end
91
- nested_attributes.delete_if { |attr| Array(send(attr.to_sym)).size.zero? }
91
+ nested_attributes.delete_if { |attr| Array(send(attr.to_sym)).empty? }
92
92
  end
93
93
 
94
94
  module ClassMethods
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  module Datastore
3
- VERSION = '0.6.0'
3
+ VERSION = '0.8.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel-datastore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryce McLean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-20 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  requirements: []
203
- rubygems_version: 3.1.6
203
+ rubygems_version: 3.5.3
204
204
  signing_key:
205
205
  specification_version: 4
206
206
  summary: Cloud Datastore integration with Active Model