hephaestus 0.7.2.1 → 0.7.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/config/initializers/environment.rb +24 -26
- data/config/initializers/opentelemetry.rb +3 -4
- 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: aa434c3350cbeb0ba0f33457265f2f191196762b7b29d0857ed974cee9f8c008
|
4
|
+
data.tar.gz: 1ac324371d86e09c465918289d7ab64024d35ab3b3331de831816f37d150c6b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16c8f996fffbbda083c2c399e17691566a3b7a57ae83cf3f2653c7f8b01be60add0da975c47b99d5c7ce0ee3989dc92edab07396b320bf498fb29dc02d5eabb8
|
7
|
+
data.tar.gz: 7fac9568440247732d5c8f946f1992639d428c02424613e84a7be9f5b8f887cc17f6cd0598d1bd406d5fd4331c2078b2a187e7eff3fd6b99463b24565f761f66
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [v0.7.2.2] - 16-11-2024
|
2
|
+
## What's Changed
|
3
|
+
* is not yet available by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/33
|
4
|
+
|
5
|
+
|
6
|
+
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.7.2.1...v0.7.2.2
|
1
7
|
# [v0.7.2.1] - 16-11-2024
|
2
8
|
## What's Changed
|
3
9
|
* include all files in the gem by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/31
|
@@ -1,17 +1,28 @@
|
|
1
1
|
# typed: false
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
def
|
5
|
-
case
|
6
|
-
when "production"
|
7
|
-
|
8
|
-
when "staging"
|
9
|
-
%x(op read "#{staging}").chomp
|
4
|
+
def fetch_plug_env_secret(label:, default:)
|
5
|
+
case ENV["RAILS_ENV"]
|
6
|
+
when "production", "staging"
|
7
|
+
op_read("op://Plug-#{plug_name}/#{ENV["RAILS_ENV"].capitalize}/#{label}")
|
10
8
|
else
|
11
|
-
|
9
|
+
ENV.fetch(label.to_s, default)
|
12
10
|
end
|
13
11
|
end
|
14
12
|
|
13
|
+
def fetch_infra_secret(label:, default:)
|
14
|
+
case ENV["RAILS_ENV"]
|
15
|
+
when "production", "staging"
|
16
|
+
op_read("op://Infra/Global Secrets/#{label}")
|
17
|
+
else
|
18
|
+
ENV.fetch(label.to_s, default)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def op_read(label)
|
23
|
+
%x(op read "#{label}").chomp
|
24
|
+
end
|
25
|
+
|
15
26
|
def productionish?
|
16
27
|
Rails.env.production? || Rails.env.staging?
|
17
28
|
end
|
@@ -66,29 +77,16 @@ module Hephaestus
|
|
66
77
|
"web.yetto.test"
|
67
78
|
end
|
68
79
|
|
69
|
-
SLACK_LOG_URL =
|
70
|
-
|
71
|
-
|
72
|
-
local: ENV.fetch("SLACK_LOG_URL", "https://slack.com/the_log_room"),
|
80
|
+
SLACK_LOG_URL = fetch_infra_secret(
|
81
|
+
label: "SLACK_LOG_URL",
|
82
|
+
default: "https://slack.com/the_log_room",
|
73
83
|
)
|
74
84
|
|
75
85
|
YETTO_API_URL = "#{YETTO_URL}/api"
|
76
86
|
YETTO_REDIRECT_URL = productionish? ? "#{PROTOCOL}#{YETTO_URL}" : "#{PROTOCOL}127.0.0.1:3000"
|
77
87
|
|
78
88
|
# Every plug has these secrets
|
79
|
-
YETTO_PLUG_PEM =
|
80
|
-
|
81
|
-
|
82
|
-
local: ENV.fetch("YETTO_PLUG_PEM", Rails.root.join("test/fixtures/files/fake_pem_file/fake.pem").read),
|
83
|
-
)
|
84
|
-
YETTO_SIGNING_SECRET = set_env_var(
|
85
|
-
production: "op://Plug-#{plug_name}/Production/YETTO_SIGNING_SECRET",
|
86
|
-
staging: "op://Plug-#{plug_name}/Staging/YETTO_SIGNING_SECRET",
|
87
|
-
local: ENV.fetch("YETTO_SIGNING_SECRET", "super-secret"),
|
88
|
-
)
|
89
|
-
YETTO_PLUG_ID = set_env_var(
|
90
|
-
production: "op://Plug-#{plug_name}/Production/YETTO_PLUG_ID",
|
91
|
-
staging: "op://Plug-#{plug_name}/Staging/YETTO_PLUG_ID",
|
92
|
-
local: ENV.fetch("YETTO_PLUG_ID", "plug-id"),
|
93
|
-
)
|
89
|
+
YETTO_PLUG_PEM = fetch_plug_env_secret(label: "YETTO_PLUG_PEM", default: Rails.root.join("test/fixtures/files/fake_pem_file/fake.pem").read)
|
90
|
+
YETTO_SIGNING_SECRET = fetch_plug_env_secret(label: "YETTO_SIGNING_SECRET", default: "super-secret")
|
91
|
+
YETTO_PLUG_ID = fetch_plug_env_secret(label: "YETTO_PLUG_ID", default: "plug-id")
|
94
92
|
end
|
@@ -5,10 +5,9 @@ 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"] =
|
9
|
-
|
10
|
-
|
11
|
-
local: ENV.fetch("OTEL_EXPORTER_OTLP_HEADERS", "x-honeycomb-team=your-api-key"),
|
8
|
+
ENV["OTEL_EXPORTER_OTLP_HEADERS"] = fetch_plug_env_secret(
|
9
|
+
label: "OTEL_EXPORTER_OTLP_HEADERS",
|
10
|
+
default: "x-honeycomb-team=your-api-key",
|
12
11
|
)
|
13
12
|
|
14
13
|
ENV["OTEL_SERVICE_NAME"] = "plug-#{plug_shortname}-#{Rails.env}"
|
data/lib/hephaestus/version.rb
CHANGED