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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5857f087515872eb0d81bd356d7a7ed7624cafcdc945da2ab24f670e44306556
4
- data.tar.gz: 9d3771f96a72285b1395b14ccf0e8a086699eb3d15b171fe71a001708167603f
3
+ metadata.gz: ff85095b28dd317366e31d4a27335a18a69dd8d56f50d8b0528024ab1967f948
4
+ data.tar.gz: 38e0995783957661d1475f99c9ba22a9fdc1d512ca32917e3cfd48b912e1fc84
5
5
  SHA512:
6
- metadata.gz: 2f81b6695e92491a180ef15336ffcfa381d18e4c60426d7d49db794c2cbd737b033fd1955efe30d9eb20c6f752a867209d0e480d39640fa831970969e4a875e0
7
- data.tar.gz: a0c430ec9d95897f879b914f6c4df26224233f283b9512f04df1c5f64444d48da277a7f97078ada4347d61bbaac527e8974f2afee78b1efc12274d8665a060a0
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
- "#{%x(hostname).chomp.downcase}-plug-#{plug_shortname}.ngrok.io"
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 def format(arg)
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}"
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Hephaestus
5
- VERSION = "0.8.20.2"
5
+ VERSION = "0.8.21"
6
6
  RAILS_VERSION = ">= 8.0"
7
7
  RUBY_VERSION = File
8
8
  .read("#{File.dirname(__FILE__)}/../../.ruby-version")
data/templates/bin/bundle CHANGED
@@ -13,15 +13,15 @@ require "rubygems"
13
13
  m = Module.new do
14
14
  module_function
15
15
 
16
- def invoked_as_script?
16
+ define_method(:invoked_as_script?) do
17
17
  File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
18
18
  end
19
19
 
20
- def env_var_version
20
+ define_method(:env_var_version) do
21
21
  ENV["BUNDLER_VERSION"]
22
22
  end
23
23
 
24
- def cli_arg_version
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
- def gemfile
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
- def lockfile
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
- def lockfile_version
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
- def bundler_requirement
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
- def bundler_requirement_for(version)
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
- def load_bundler!
82
+ define_method(:load_bundler!) do
83
83
  ENV["BUNDLE_GEMFILE"] ||= gemfile
84
84
 
85
85
  activate_bundler
86
86
  end
87
87
 
88
- def activate_bundler
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
- def activation_error_handling
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.20.2
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-04-10 00:00:00.000000000 Z
11
+ date: 2025-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap