activemodel-datastore 0.6.0 → 0.8.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c26efa635bdc60b33239d0f6b33cc6e4ac86fb5c752672f25f6969b2c3dda5c
|
|
4
|
+
data.tar.gz: 9651de6765b071963bbf0ee9da4680dbb46c5d0b820d463e34db0fc0e3d36612
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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'] ||=
|
|
25
|
-
|
|
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)).
|
|
91
|
+
nested_attributes.delete_if { |attr| Array(send(attr.to_sym)).empty? }
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
module ClassMethods
|
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.
|
|
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:
|
|
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.
|
|
203
|
+
rubygems_version: 3.5.3
|
|
204
204
|
signing_key:
|
|
205
205
|
specification_version: 4
|
|
206
206
|
summary: Cloud Datastore integration with Active Model
|