google-cloud-datastore 1.4.4 → 1.5.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: c1b2e5fa18b768eeccbf94acc5f54c4d41af3d1db1ee9bec6d4b10c8568e21ac
4
- data.tar.gz: 46a422faaed27da2fa8f20e6fdff449c585b96748f826a3c79c9318fa2a46004
3
+ metadata.gz: 84e32dc83d15b1968b75bce2847502aaf2bd391a67f7dc19ba704c3d9af9b245
4
+ data.tar.gz: 213483d73df19c3babf7d45f654ec2c7e7c7c596b9b56be1e0b1da1c4b7a11ac
5
5
  SHA512:
6
- metadata.gz: 99e6d62a463c0bd7a737434327bed5822edda0e9009408423a1e094e172cff9838f365e5d2a913642177081665aa13d7ccd126f196abfca32e5d21d4aa7182c2
7
- data.tar.gz: e90bb6803f71a42fbaa6b7da129bb32263bbe9d7e05fdaad4b74a2bfef97c738e19f8f6cb1c97641df99e9c67c355904426b4a7c2c00ce10b39e3fb5790c50a4
6
+ metadata.gz: bbf78ed2bc3775acf045de75cf42681382a236a3285cf05b950b0e75a7dd1c92d7fb95dfd3cef3f097273be974afd74c118b3b7b782526ea26c848bc03a6e406
7
+ data.tar.gz: 86698b32f18c809a98d4089b73eb8c1cc1490c5ec6c5680799849f7ace763efa8c2330e34cb72ad214275d7ced5bd769b596e8aff20a7aea6a00a63b3c6aa3ae
@@ -1,5 +1,16 @@
1
1
  # Release History
2
2
 
3
+ ### 1.5.0 / 2019-02-01
4
+
5
+ * Make use of Credentials#project_id
6
+ * Use Credentials#project_id
7
+ If a project_id is not provided, use the value on the Credentials object.
8
+ This value was added in googleauth 0.7.0.
9
+ * Loosen googleauth dependency
10
+ Allow for new releases up to 0.10.
11
+ The googleauth devs have committed to maintanining the current API
12
+ and will not make backwards compatible changes before 0.10.
13
+
3
14
  ### 1.4.4 / 2018-09-20
4
15
 
5
16
  * Update documentation.
@@ -46,6 +46,7 @@ module Google
46
46
  # datastore.save task
47
47
  #
48
48
  module Datastore
49
+ # rubocop:disable Metrics/AbcSize
49
50
  # rubocop:disable Metrics/MethodLength
50
51
 
51
52
  ##
@@ -99,15 +100,16 @@ module Google
99
100
  def self.new project_id: nil, credentials: nil, scope: nil, timeout: nil,
100
101
  client_config: nil, emulator_host: nil, project: nil,
101
102
  keyfile: nil
102
- project_id ||= (project || default_project_id)
103
- project_id = project_id.to_s # Always cast to a string
104
- raise ArgumentError, "project_id is missing" if project_id.empty?
105
-
106
- scope ||= configure.scope
107
- timeout ||= configure.timeout
103
+ project_id ||= (project || default_project_id)
104
+ scope ||= configure.scope
105
+ timeout ||= configure.timeout
108
106
  client_config ||= configure.client_config
109
107
  emulator_host ||= configure.emulator_host
108
+
110
109
  if emulator_host
110
+ project_id = project_id.to_s # Always cast to a string
111
+ raise ArgumentError, "project_id is missing" if project_id.empty?
112
+
111
113
  return Datastore::Dataset.new(
112
114
  Datastore::Service.new(
113
115
  project_id, :this_channel_is_insecure,
@@ -122,6 +124,12 @@ module Google
122
124
  credentials = Datastore::Credentials.new credentials, scope: scope
123
125
  end
124
126
 
127
+ if credentials.respond_to? :project_id
128
+ project_id ||= credentials.project_id
129
+ end
130
+ project_id = project_id.to_s # Always cast to a string
131
+ raise ArgumentError, "project_id is missing" if project_id.empty?
132
+
125
133
  Datastore::Dataset.new(
126
134
  Datastore::Service.new(
127
135
  project_id, credentials,
@@ -130,6 +138,7 @@ module Google
130
138
  )
131
139
  end
132
140
 
141
+ # rubocop:enable Metrics/AbcSize
133
142
  # rubocop:enable Metrics/MethodLength
134
143
 
135
144
  ##
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2018 Google LLC
1
+ # Copyright 2019 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,38 +15,6 @@
15
15
 
16
16
  module Google
17
17
  module Protobuf
18
- # Wrapper message for `double`.
19
- #
20
- # The JSON representation for `DoubleValue` is JSON number.
21
- # @!attribute [rw] value
22
- # @return [Float]
23
- # The double value.
24
- class DoubleValue; end
25
-
26
- # Wrapper message for `float`.
27
- #
28
- # The JSON representation for `FloatValue` is JSON number.
29
- # @!attribute [rw] value
30
- # @return [Float]
31
- # The float value.
32
- class FloatValue; end
33
-
34
- # Wrapper message for `int64`.
35
- #
36
- # The JSON representation for `Int64Value` is JSON string.
37
- # @!attribute [rw] value
38
- # @return [Integer]
39
- # The int64 value.
40
- class Int64Value; end
41
-
42
- # Wrapper message for `uint64`.
43
- #
44
- # The JSON representation for `UInt64Value` is JSON string.
45
- # @!attribute [rw] value
46
- # @return [Integer]
47
- # The uint64 value.
48
- class UInt64Value; end
49
-
50
18
  # Wrapper message for `int32`.
51
19
  #
52
20
  # The JSON representation for `Int32Value` is JSON number.
@@ -54,37 +22,5 @@ module Google
54
22
  # @return [Integer]
55
23
  # The int32 value.
56
24
  class Int32Value; end
57
-
58
- # Wrapper message for `uint32`.
59
- #
60
- # The JSON representation for `UInt32Value` is JSON number.
61
- # @!attribute [rw] value
62
- # @return [Integer]
63
- # The uint32 value.
64
- class UInt32Value; end
65
-
66
- # Wrapper message for `bool`.
67
- #
68
- # The JSON representation for `BoolValue` is JSON `true` and `false`.
69
- # @!attribute [rw] value
70
- # @return [true, false]
71
- # The bool value.
72
- class BoolValue; end
73
-
74
- # Wrapper message for `string`.
75
- #
76
- # The JSON representation for `StringValue` is JSON string.
77
- # @!attribute [rw] value
78
- # @return [String]
79
- # The string value.
80
- class StringValue; end
81
-
82
- # Wrapper message for `bytes`.
83
- #
84
- # The JSON representation for `BytesValue` is JSON string.
85
- # @!attribute [rw] value
86
- # @return [String]
87
- # The bytes value.
88
- class BytesValue; end
89
25
  end
90
26
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Datastore
19
- VERSION = "1.4.4".freeze
19
+ VERSION = "1.5.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-21 00:00:00.000000000 Z
12
+ date: 2019-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -143,14 +143,14 @@ dependencies:
143
143
  requirements:
144
144
  - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: 0.50.0
146
+ version: 0.61.0
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: 0.50.0
153
+ version: 0.61.0
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: simplecov
156
156
  requirement: !ruby/object:Gem::Requirement
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  requirements: []
267
267
  rubyforge_project:
268
- rubygems_version: 2.7.7
268
+ rubygems_version: 2.7.6
269
269
  signing_key:
270
270
  specification_version: 4
271
271
  summary: API Client library for Google Cloud Datastore