google_cloud_run 0.2.1 → 0.2.2

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: 2c8d02a7aa37f6be629a228bd62059eb1a514899e173854e817533622b3c58d8
4
- data.tar.gz: bbb36a2b29fbb2de1b0684cdec5eaaa8783e26685f88655e5d68e4703816835f
3
+ metadata.gz: 64a3ccfb97299da2a54921e2a7969757fbc5190a242debed09e8de37fcd18b2b
4
+ data.tar.gz: 650147e25f7b01df2629fc9cc70a0e11fe37725fa3e6be7b42f4af763392dd57
5
5
  SHA512:
6
- metadata.gz: 972661d376df900e15ea89cfa0bb6104532b9ce0435f5393b32163dfb0c1c7af01e85ce20ed78bd2aa448727a765f8e3de87b934d654712509edb570498c2075
7
- data.tar.gz: f66583d771322a8e576ba38bd445ab50ed10423bbf2ca4758c39b3aba7419ba172a32d3508b1dc420bb187b763f6fa1bfe442bd2f4f38442842b1c3e41412d4b
6
+ metadata.gz: d7a40bc1511b1dd2b60b16ce14830cb0d2b65af031036629d496fcc3854b2d10e83b1e19c4e25d1225a8686ddd1a6387d70a4cff2a5b30c927fd87b764235265
7
+ data.tar.gz: a35e89f50bc6069ae82629fed6a1d334793a5e2c1f641d49264a2bfb93beeb4906395d582e179800182e71b453030c0826702c3d184151af58e5d64c82bc4a8d
data/README.md CHANGED
@@ -75,7 +75,7 @@ In the default production config, the logger is wrapped around
75
75
  a `ENV["RAILS_LOG_TO_STDOUT"].present?` block. I usually just
76
76
  remove this block so I don't have to actually set this ENV var.
77
77
 
78
- You can also remove `config.log_formatter` as we don't need it anymore.
78
+ You can also remove `config.log_formatter` and `config.log_tags` as we don't need it anymore.
79
79
 
80
80
  I recommend logging `:g_notice` and higher. Rails logs a lot of noise when logging
81
81
  `:info` and higher.
@@ -65,7 +65,7 @@ module ActiveJob
65
65
  raise "Failed sending job #{job_name}(#{job_id}) to queue '#{region}/#{queue_name}'. Google didn't return a response."
66
66
  end
67
67
 
68
- Rails.logger&.notice "Job #{job_name}(#{job_id}) sent to queue '#{region}/#{queue_name}'"
68
+ Rails.logger&.info "Job #{job_name}(#{job_id}) sent to queue '#{region}/#{queue_name}'"
69
69
  end
70
70
 
71
71
  def build_task_request(name, url, service_account_email, body, job_timeout, scheduled_at)
@@ -52,6 +52,7 @@ module GoogleCloudRun
52
52
  # project_id returns the current Google project id from the
53
53
  # metadata server
54
54
  def self.project_id
55
+ return ENV["GOOGLE_PROJECT_ID"] unless ENV["GOOGLE_PROJECT_ID"].blank?
55
56
  return "dummy-project" if Rails.env.test?
56
57
 
57
58
  @project_id ||= begin
@@ -78,6 +79,7 @@ module GoogleCloudRun
78
79
  # default_service_account_email returns the default service account's email from the
79
80
  # metadata server
80
81
  def self.default_service_account_email
82
+ return ENV["GOOGLE_SERVICE_ACCOUNT_EMAIL"] unless ENV["GOOGLE_SERVICE_ACCOUNT_EMAIL"].blank?
81
83
  return "123456789-compute@developer.gserviceaccount.com" if Rails.env.test?
82
84
 
83
85
  @default_service_account_email ||= begin
@@ -1,3 +1,3 @@
1
1
  module GoogleCloudRun
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_cloud_run
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Kadenbach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-12 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails