hephaestus 0.8.7 → 0.8.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/config/database.yml +2 -2
- data/config/initializers/environment.rb +2 -2
- data/config/initializers/opentelemetry.rb +1 -1
- data/config/initializers/slack_webhook_logger.rb +1 -1
- data/lib/hephaestus/engine.rb +0 -16
- data/lib/hephaestus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6d590d1b812ab56310014c2d5dce0dab26312642dc18498b5072079b41832b
|
4
|
+
data.tar.gz: 33300d06a7022b8f956ea9b02e67a6d055557d77966a01f16c04cb3055ed4e25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d513159020c0dd6cedde3191a8a19f6029b8e8faa20e573a3bd03619a04e744bc5174895229173ff1413e9d26997a2488ded1ff94451f7b6938627e3dca42b4
|
7
|
+
data.tar.gz: f6ce068108d4c1a5006483fa886cebe33cbe95c377f68f361da76009b56cd0c230aa356166f28f0276a9c67cd1b5bbff92886917d76f82a2e1e2dee12d2f3845
|
data/CHANGELOG.md
CHANGED
data/config/database.yml
CHANGED
@@ -49,7 +49,7 @@ staging:
|
|
49
49
|
# url: <%= ENV["DATABASE_URL"] %>
|
50
50
|
queue:
|
51
51
|
<<: *default_productionish
|
52
|
-
url: <%=
|
52
|
+
url: "<%= fetch_infra_secret(label: 'DATABASE_URL') %>"
|
53
53
|
migrations_paths: db/queue_migrate
|
54
54
|
|
55
55
|
production:
|
@@ -58,5 +58,5 @@ production:
|
|
58
58
|
# url: <%= ENV["DATABASE_URL"] %>
|
59
59
|
queue:
|
60
60
|
<<: *default_productionish
|
61
|
-
url: <%=
|
61
|
+
url: "<%= fetch_infra_secret(label: 'DATABASE_URL') %>"
|
62
62
|
migrations_paths: db/queue_migrate
|
@@ -4,7 +4,7 @@
|
|
4
4
|
OP_VAULT_SECRETS = {}
|
5
5
|
OP_INFRA_SECRETS = {}
|
6
6
|
|
7
|
-
def fetch_vault_secret(label:, default:)
|
7
|
+
def fetch_vault_secret(label:, default: "")
|
8
8
|
if productionish?
|
9
9
|
OP_VAULT_SECRETS.delete(label) || raise("Secret `#{label}` not found in 1Password")
|
10
10
|
else
|
@@ -12,7 +12,7 @@ def fetch_vault_secret(label:, default:)
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
def fetch_infra_secret(label:, default:)
|
15
|
+
def fetch_infra_secret(label:, default: "")
|
16
16
|
if productionish?
|
17
17
|
OP_INFRA_SECRETS.delete(label) || raise("Secret `#{label}` not found in 1Password")
|
18
18
|
else
|
@@ -5,7 +5,7 @@ unless Rails.env.development?
|
|
5
5
|
# establish the environment for OTEL
|
6
6
|
ENV["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://api.honeycomb.io"
|
7
7
|
|
8
|
-
ENV["OTEL_EXPORTER_OTLP_HEADERS"] =
|
8
|
+
ENV["OTEL_EXPORTER_OTLP_HEADERS"] = fetch_infra_secret(
|
9
9
|
label: "OTEL_EXPORTER_OTLP_HEADERS",
|
10
10
|
default: "x-honeycomb-team=your-api-key",
|
11
11
|
)
|
@@ -7,7 +7,7 @@ SlackWebhookLogger.setup do |config|
|
|
7
7
|
# Webhook URL
|
8
8
|
#
|
9
9
|
# The URL where messages will be sent.
|
10
|
-
config.webhook_url =
|
10
|
+
config.webhook_url = fetch_infra_secret(
|
11
11
|
label: "SLACK_LOG_URL",
|
12
12
|
default: "https://slack.com/the_log_room",
|
13
13
|
)
|
data/lib/hephaestus/engine.rb
CHANGED
@@ -60,22 +60,6 @@ module Hephaestus
|
|
60
60
|
match("/*unmatched_route", to: "application#not_found", via: :all)
|
61
61
|
end
|
62
62
|
end
|
63
|
-
|
64
|
-
# we need to check if the 1Password CLI is installed and load it ASAP,
|
65
|
-
# because it contains all the secrets
|
66
|
-
def fetch_infra_secret(label:, default:)
|
67
|
-
if Rails.env.local?
|
68
|
-
ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
|
69
|
-
else
|
70
|
-
op_read("op://Infra/Global Secrets/#{label}")
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def op_read(label)
|
76
|
-
%x(#{include_sudo?}op read "#{label}").chomp.tap do
|
77
|
-
raise "Failed to fetch `#{label}` from 1Password" unless $CHILD_STATUS.success?
|
78
|
-
end
|
79
63
|
end
|
80
64
|
|
81
65
|
def check_dependencies!
|
data/lib/hephaestus/version.rb
CHANGED