activemodel-datastore 0.2.5 → 0.3.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
  SHA1:
3
- metadata.gz: 1c51e60669ae324f89ee6d6ceb70aedcc1b8f3e1
4
- data.tar.gz: a71e2146d58414c7c3251cf5452d65fa11f4613d
3
+ metadata.gz: 42e22683055e9669d08d461101ad0df167ed71af
4
+ data.tar.gz: a889f3599926be1f5dbd57fc8411446a46703782
5
5
  SHA512:
6
- metadata.gz: 211b19499c3c1523805e4989641d44bb4253afb80fccf0a885e385bfe2ba45abe94cac1a121acb878605da46bc5ac858451642d89d291ee79c85b89269145e4d
7
- data.tar.gz: aee1048afd652a79d7cc45fa94d0a4e438c85b08f6b7bf642b149378be1bea1bed23918ad56f225082c074edb00a01ba4647398c7d4a00487c339ead8208107a
6
+ metadata.gz: 6726447be7d06ca5630cd0b3516329d9280a3b0240e06d8ca5fe413722d4b699124aba7c3f1634b7dde42bf82a9e9d0b17aff708eb0ed9b98f0626d627e6d74a
7
+ data.tar.gz: 44d319fa90658e1ef6ab655a5e85c85a1291505d75dca3a91c0a8aff4ef3cd37774a7b0693c0c89fc9e87310b2bbd6ae5c62a54bcea8a02dd897a53819181952
@@ -1,3 +1,8 @@
1
+ ### 0.3.0 / 2018-04-17
2
+ * adding Travis CI configuration (rud)
3
+ * no longer override connection related environment variables if already defined(shao1555)
4
+ * adding support for passing query an array of select properties
5
+
1
6
  ### 0.2.5 / 2017-11-06
2
7
  * adding support for setting indexed false on individual entity properties
3
8
  * updating example Cloud Datastore Rails app to 5.1.4
data/README.md CHANGED
@@ -13,6 +13,7 @@ automatically scales to handle your applications' load. Cloud Datastore is a sch
13
13
  suited for unstructured or semi-structured application data.
14
14
 
15
15
  [![Gem Version](https://badge.fury.io/rb/activemodel-datastore.svg)](https://badge.fury.io/rb/activemodel-datastore)
16
+ [![Build Status](https://travis-ci.org/Agrimatics/activemodel-datastore.svg?branch=master)](https://travis-ci.org/Agrimatics/activemodel-datastore)
16
17
 
17
18
  ## Table of contents
18
19
 
@@ -439,7 +439,7 @@ module ActiveModel::Datastore
439
439
  query.cursor(options[:cursor]) if options[:cursor]
440
440
  query.limit(options[:limit]) if options[:limit]
441
441
  query_sort(query, options)
442
- query.select(options[:select]) if options[:select]
442
+ query.select(*options[:select]) if options[:select]
443
443
  query_property_filter(query, options)
444
444
  end
445
445
 
@@ -14,14 +14,14 @@
14
14
  module CloudDatastore
15
15
  if defined?(Rails) == 'constant'
16
16
  if Rails.env.development?
17
- ENV['DATASTORE_EMULATOR_HOST'] = 'localhost:8180'
18
- ENV['GCLOUD_PROJECT'] = 'local-datastore'
17
+ ENV['DATASTORE_EMULATOR_HOST'] ||= 'localhost:8180'
18
+ ENV['GCLOUD_PROJECT'] ||= 'local-datastore'
19
19
  elsif Rails.env.test?
20
- ENV['DATASTORE_EMULATOR_HOST'] = 'localhost:8181'
21
- ENV['GCLOUD_PROJECT'] = 'test-datastore'
20
+ ENV['DATASTORE_EMULATOR_HOST'] ||= 'localhost:8181'
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'] + '",
24
+ ENV['GCLOUD_KEYFILE_JSON'] ||= '{"private_key": "' + ENV['SERVICE_ACCOUNT_PRIVATE_KEY'] + '",
25
25
  "client_email": "' + ENV['SERVICE_ACCOUNT_CLIENT_EMAIL'] + '"}'
26
26
  end
27
27
  end
@@ -105,9 +105,7 @@ module ActiveModel::Datastore
105
105
 
106
106
  def nested_model_class_names
107
107
  entity_kinds = []
108
- if nested_attributes?
109
- nested_models.each { |x| entity_kinds << x.class.name }
110
- end
108
+ nested_models.each { |x| entity_kinds << x.class.name } if nested_attributes?
111
109
  entity_kinds.uniq
112
110
  end
113
111
 
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  module Datastore
3
- VERSION = '0.2.5'
3
+ VERSION = '0.3.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.2.5
4
+ version: 0.3.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: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2018-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -128,26 +128,6 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '5.10'
131
- - !ruby/object:Gem::Dependency
132
- name: minitest-reporters
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '1.1'
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- version: 1.1.14
141
- type: :development
142
- prerelease: false
143
- version_requirements: !ruby/object:Gem::Requirement
144
- requirements:
145
- - - "~>"
146
- - !ruby/object:Gem::Version
147
- version: '1.1'
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- version: 1.1.14
151
131
  - !ruby/object:Gem::Dependency
152
132
  name: rubocop
153
133
  requirement: !ruby/object:Gem::Requirement
@@ -200,7 +180,11 @@ files:
200
180
  homepage: https://github.com/Agrimatics/activemodel-datastore
201
181
  licenses:
202
182
  - MIT
203
- metadata: {}
183
+ metadata:
184
+ homepage_uri: https://github.com/Agrimatics/activemodel-datastore
185
+ changelog_uri: https://github.com/Agrimatics/activemodel-datastore/blob/master/CHANGELOG.md
186
+ source_code_uri: https://github.com/Agrimatics/activemodel-datastore/
187
+ bug_tracker_uri: https://github.com/Agrimatics/activemodel-datastore/issues
204
188
  post_install_message:
205
189
  rdoc_options: []
206
190
  require_paths:
@@ -217,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
201
  version: '0'
218
202
  requirements: []
219
203
  rubyforge_project:
220
- rubygems_version: 2.6.13
204
+ rubygems_version: 2.6.14
221
205
  signing_key:
222
206
  specification_version: 4
223
207
  summary: Cloud Datastore integration with Active Model