google-cloud-trace 0.28.0 → 0.28.1

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: 155666f9d25b1a89fc1961ff6f951a85d70ee76d0b873c0ae8d0968d2fe7bdc5
4
- data.tar.gz: bb205f6876342cc8475afa4846199bf7776c9a424e22ae3bf76db4c4081dfcab
3
+ metadata.gz: 628e196ad54148b1cd059c46a832c855dd2f76f0161cfdf057cc6dbf8bba7bfc
4
+ data.tar.gz: f0ec1fd7e59d049c0a618eca86307eef293042d2a5ed12d96b7ed15745337d64
5
5
  SHA512:
6
- metadata.gz: 3f8611b26a07d784c37d71c57d067b7aa811176301cd146c47fc355c2b53e4da7987d19ea83a423fa1bdfda7a3780c465c4f4cf1f5413f922069b00259c07485
7
- data.tar.gz: 3cbfea10ed4fd5452a6b543177f713a8cdfe89944285ace795a6d83d33f69870aa5341b741adb6449371b743000a38ea7158206ccf9405c21c3e7c0ec00ca1c8
6
+ metadata.gz: d7a4250bf6484f40d3e5362b0a4d553d4632b7c8a9a2ccfa7bab3e0076dfea272d6d44e2729cbb018a8432247bafa89a60d2e99578f50b47dd8a37a979e22ac9
7
+ data.tar.gz: 53dc8672a18d5f4a05cccb6d54a0b3e8781a5fc2ecce1c4aa8703d86177650a398510de07d0d6351f17c22acf93ca8249613d748474b82dc82024a4954acabdd
@@ -168,9 +168,15 @@ module Google
168
168
 
169
169
  ##
170
170
  # @private Verify credentials
171
- def self.valid_credentials? project_id, keyfile
171
+ def self.valid_credentials? project_id, credentials
172
172
  begin
173
- Google::Cloud::Trace::Credentials.credentials_with_scope keyfile
173
+ # if credentials is nil, get default
174
+ credentials ||= Trace::Credentials.default
175
+ # only create a new Credentials object if the val isn't one already
176
+ unless credentials.is_a? Google::Auth::Credentials
177
+ # if credentials is not a Credentials object, create one
178
+ Trace::Credentials.new credentials
179
+ end
174
180
  rescue Exception => e
175
181
  STDOUT.puts "Note: Google::Cloud::Trace is disabled because " \
176
182
  "it failed to authorize with the service. (#{e.message})"
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Trace
19
- VERSION = "0.28.0".freeze
19
+ VERSION = "0.28.1".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-15 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core