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 +4 -4
- data/lib/google/cloud/debugger/rails.rb +15 -14
- data/lib/google/cloud/debugger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19e34e42860eb8dd9022366055dc29ad8d9d5bad
|
4
|
+
data.tar.gz: cbf0364442fdb7de6b44a1cc2e6b037c69457571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
61
|
+
if self.class.use_debugger? app.config
|
62
|
+
debugger_config = Railtie.parse_rails_config config
|
62
63
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
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
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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.
|
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.
|
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
|
|