hephaestus 0.8.20.2 → 0.8.21
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 +8 -0
- data/config/initializers/environment.rb +9 -4
- data/config/initializers/filter_job_params.rb +1 -1
- data/config/initializers/opentelemetry.rb +2 -0
- data/lib/hephaestus/version.rb +1 -1
- data/templates/bin/bundle +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff85095b28dd317366e31d4a27335a18a69dd8d56f50d8b0528024ab1967f948
|
4
|
+
data.tar.gz: 38e0995783957661d1475f99c9ba22a9fdc1d512ca32917e3cfd48b912e1fc84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68ae814bf3df3e3e94a6238c55885e9a98a8a45e82925fdeb73cdb2f277028f4cb8e00b8edfde953f8616a1dec7afa1f0ce4ebf6d9358a799d3723031779fd8d
|
7
|
+
data.tar.gz: 3d526424e3c31748a9ffa26634cdf06b758fe16cb04b6649c35657ee2bf955e76965e39b8944e6b9fc2bac2dd783ea836b9fcc17cb6ba9bbf798ce4bc0a411d1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [v0.8.21] - 02-07-2025
|
2
|
+
## What's Changed
|
3
|
+
* Dashes instead of dots in hostnames by @balevine in https://github.com/yettoapp/hephaestus/pull/128
|
4
|
+
|
5
|
+
|
6
|
+
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.20.3...v0.8.21
|
7
|
+
# [v0.8.20.3] - 10-04-2025
|
8
|
+
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.20.2...v0.8.20.3
|
1
9
|
# [v0.8.20.2] - 10-04-2025
|
2
10
|
**Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.20.1...v0.8.20.2
|
3
11
|
# [v0.8.20.1] - 10-04-2025
|
@@ -5,7 +5,7 @@ OP_VAULT_SECRETS = {}
|
|
5
5
|
OP_INFRA_SECRETS = {}
|
6
6
|
|
7
7
|
def fetch_vault_secret(label:, default: "")
|
8
|
-
if productionish?
|
8
|
+
if productionish? && !compiling_assets?
|
9
9
|
OP_VAULT_SECRETS.delete(label) || Rails.logger.error("Secret `#{label}` not found in 1Password")
|
10
10
|
else
|
11
11
|
ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
|
@@ -13,7 +13,7 @@ def fetch_vault_secret(label:, default: "")
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def fetch_infra_secret(label:, default: "")
|
16
|
-
if productionish?
|
16
|
+
if productionish? && !compiling_assets?
|
17
17
|
OP_INFRA_SECRETS.delete(label) || Rails.logger.error("Secret `#{label}` not found in 1Password")
|
18
18
|
else
|
19
19
|
ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
|
@@ -40,6 +40,10 @@ def productionish?
|
|
40
40
|
Rails.env.production? || Rails.env.staging?
|
41
41
|
end
|
42
42
|
|
43
|
+
def compiling_assets?
|
44
|
+
ENV.fetch("PRECOMPILING", nil).present?
|
45
|
+
end
|
46
|
+
|
43
47
|
def print_user_api_errors?
|
44
48
|
(Rails.env.development? || Rails.env.staging?) || ENV.fetch("DEBUG", false)
|
45
49
|
end
|
@@ -62,7 +66,8 @@ def plug_url
|
|
62
66
|
elsif Rails.env.staging?
|
63
67
|
"#{plug_shortname}.plugs.yetto.dev"
|
64
68
|
elsif Rails.env.development?
|
65
|
-
|
69
|
+
# Replace the `.` with `-` to avoid issues with ngrok subdomains
|
70
|
+
"#{%x(hostname).tr(".", "-").chomp.downcase}-plug-#{plug_shortname}.ngrok.io"
|
66
71
|
elsif Rails.env.test?
|
67
72
|
"#{plug_shortname}.plugs.yetto.test"
|
68
73
|
end
|
@@ -106,7 +111,7 @@ module Hephaestus
|
|
106
111
|
|
107
112
|
# Every plug has secrets; to reduce the amount of API calls to 1Password,
|
108
113
|
# we can grab one document that contains all the secrets we need
|
109
|
-
if productionish?
|
114
|
+
if productionish? && !compiling_assets?
|
110
115
|
res = JSON.parse(op_load_vault_into_env(vault: "Plug-#{plug_name}", tag: ENV["RAILS_ENV"]))
|
111
116
|
["Common", "Unique", "Yetto"].each do |section_label|
|
112
117
|
res["fields"].select { |f| f["section"] && f["section"]["label"] }.each do |field|
|
@@ -9,7 +9,7 @@ Rails.application.config.after_initialize do
|
|
9
9
|
class LogSubscriber < ActiveSupport::LogSubscriber
|
10
10
|
alias_method :original_format, :format
|
11
11
|
|
12
|
-
private
|
12
|
+
private define_method(:format) do |arg|
|
13
13
|
if arg.is_a?(Hash)
|
14
14
|
parameter_filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
|
15
15
|
parameter_filter.filter(arg.transform_values { |value| original_format(value) })
|
@@ -5,6 +5,8 @@
|
|
5
5
|
return if Rails.env.development?
|
6
6
|
return if defined?(Rails::Console)
|
7
7
|
|
8
|
+
return if compiling_assets?
|
9
|
+
|
8
10
|
# establish the environment for OTEL
|
9
11
|
ENV["OTEL_EXPORTER_OTLP_ENDPOINT"] = "http://service-otelcol-#{Rails.env}.internal:4318"
|
10
12
|
ENV["OTEL_EXPORTER_OTLP_HEADERS"] = "x-honeycomb-dataset=plug-#{plug_shortname}-#{Rails.env}"
|
data/lib/hephaestus/version.rb
CHANGED
data/templates/bin/bundle
CHANGED
@@ -13,15 +13,15 @@ require "rubygems"
|
|
13
13
|
m = Module.new do
|
14
14
|
module_function
|
15
15
|
|
16
|
-
|
16
|
+
define_method(:invoked_as_script?) do
|
17
17
|
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
define_method(:env_var_version) do
|
21
21
|
ENV["BUNDLER_VERSION"]
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
define_method(:cli_arg_version) do
|
25
25
|
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
26
|
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
27
|
|
@@ -39,14 +39,14 @@ m = Module.new do
|
|
39
39
|
bundler_version
|
40
40
|
end
|
41
41
|
|
42
|
-
|
42
|
+
define_method(:gemfile) do
|
43
43
|
gemfile = ENV["BUNDLE_GEMFILE"]
|
44
44
|
return gemfile if gemfile && !gemfile.empty? # rubocop:disable Rails/Present
|
45
45
|
|
46
46
|
File.expand_path("../Gemfile", __dir__)
|
47
47
|
end
|
48
48
|
|
49
|
-
|
49
|
+
define_method(:lockfile) do
|
50
50
|
lockfile =
|
51
51
|
case File.basename(gemfile)
|
52
52
|
when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
|
@@ -55,7 +55,7 @@ m = Module.new do
|
|
55
55
|
File.expand_path(lockfile)
|
56
56
|
end
|
57
57
|
|
58
|
-
|
58
|
+
define_method(:lockfile_version) do
|
59
59
|
return unless File.file?(lockfile)
|
60
60
|
|
61
61
|
lockfile_contents = File.read(lockfile)
|
@@ -64,14 +64,14 @@ m = Module.new do
|
|
64
64
|
Regexp.last_match(1)
|
65
65
|
end
|
66
66
|
|
67
|
-
|
67
|
+
define_method(:bundler_requirement) do
|
68
68
|
@bundler_requirement ||=
|
69
69
|
env_var_version ||
|
70
70
|
cli_arg_version ||
|
71
71
|
bundler_requirement_for(lockfile_version)
|
72
72
|
end
|
73
73
|
|
74
|
-
|
74
|
+
define_method(:bundler_requirement_for) do |version|
|
75
75
|
return "#{Gem::Requirement.default}.a" unless version
|
76
76
|
|
77
77
|
bundler_gem_version = Gem::Version.new(version)
|
@@ -79,13 +79,13 @@ m = Module.new do
|
|
79
79
|
bundler_gem_version.approximate_recommendation
|
80
80
|
end
|
81
81
|
|
82
|
-
|
82
|
+
define_method(:load_bundler!) do
|
83
83
|
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
84
84
|
|
85
85
|
activate_bundler
|
86
86
|
end
|
87
87
|
|
88
|
-
|
88
|
+
define_method(:activate_bundler) do
|
89
89
|
gem_error = activation_error_handling do
|
90
90
|
gem("bundler", bundler_requirement)
|
91
91
|
end
|
@@ -100,7 +100,7 @@ m = Module.new do
|
|
100
100
|
exit(42)
|
101
101
|
end
|
102
102
|
|
103
|
-
|
103
|
+
define_method(:activation_error_handling) do
|
104
104
|
yield
|
105
105
|
nil
|
106
106
|
rescue StandardError, LoadError => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hephaestus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootsnap
|