google-cloud-debugger 0.24.0 → 0.24.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
  SHA1:
3
- metadata.gz: e79671e49e76d01892d4e5f201c4294745f5d557
4
- data.tar.gz: 8f8c65e7bc266e86dda935b4251ca0f6c7c25390
3
+ metadata.gz: 19e34e42860eb8dd9022366055dc29ad8d9d5bad
4
+ data.tar.gz: cbf0364442fdb7de6b44a1cc2e6b037c69457571
5
5
  SHA512:
6
- metadata.gz: 27f14ab08ad2918160cb9cd2cbb06dd6c62d31221f5e3a545b1a79f9ad59643aceaa498b7eede242147c24dfb08c27b5aaff88e772656502627c8b9d7d9a2ee9
7
- data.tar.gz: 9767330424161a8bb10753bb4b3772e6f279279aafc6b30a157b110610ca430c7aeaba6e3079742b13dd8d1bf6088019b3c3ba207a466dc3179902239dbb7602
6
+ metadata.gz: 1e82fad49a95bdea0489aec8e1802d13a47be18d5a087ce44f5efc32a949450617b166a07b67da46f05b750121c557a15868b7bd799f44a073e7943cc7e08753
7
+ data.tar.gz: b44bf8ab8f0311ad131391653cd32a2562f66db634867c9a2b106941a1dbed10d4df76cb88e4158d8481b44cd0dd6cb27d966acc48e0f56c0a3e172f8b9699ae
@@ -58,19 +58,20 @@ module Google
58
58
  end
59
59
 
60
60
  initializer "Stackdriver.Debugger" do |app|
61
- debugger_config = Railtie.parse_rails_config config
61
+ if self.class.use_debugger? app.config
62
+ debugger_config = Railtie.parse_rails_config config
62
63
 
63
- project_id = debugger_config[:project_id]
64
- keyfile = debugger_config[:keyfile]
65
- module_name = debugger_config[:module_name]
66
- module_version = debugger_config[:module_version]
64
+ project_id = debugger_config[:project_id]
65
+ keyfile = debugger_config[:keyfile]
66
+ module_name = debugger_config[:module_name]
67
+ module_version = debugger_config[:module_version]
67
68
 
68
- debugger = Google::Cloud::Debugger.new project: project_id,
69
- keyfile: keyfile,
70
- module_name: module_name,
71
- module_version: module_version
69
+ debugger =
70
+ Google::Cloud::Debugger.new project: project_id,
71
+ keyfile: keyfile,
72
+ module_name: module_name,
73
+ module_version: module_version
72
74
 
73
- if self.class.use_debugger? app.config
74
75
  app.middleware.insert_after Rack::ETag,
75
76
  Google::Cloud::Debugger::Middleware,
76
77
  debugger: debugger
@@ -102,16 +103,16 @@ module Google
102
103
  Google::Cloud::Debugger::Credentials.credentials_with_scope(
103
104
  debugger_config[:keyfile])
104
105
  rescue => e
105
- Rails.log "Google::Cloud::Debugger is not activated due to " \
106
- "authorization error: #{e.message}"
106
+ Rails.logger.warn "Google::Cloud::Debugger is not activated due " \
107
+ "to authorization error: #{e.message}"
107
108
  return false
108
109
  end
109
110
 
110
111
  project_id = debugger_config[:project_id] ||
111
112
  Google::Cloud::Debugger::Project.default_project
112
113
  if project_id.to_s.empty?
113
- Rails.log "Google::Cloud::Debugger is not activated due to empty " \
114
- "project_id"
114
+ Rails.logger.warn "Google::Cloud::Debugger is not activated due " \
115
+ "to empty project_id"
115
116
  return false
116
117
  end
117
118
 
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Debugger
19
- VERSION = "0.24.0"
19
+ VERSION = "0.24.1"
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-debugger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heng Xiong