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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3c1fc749a8387f060bd64519a41ff75516668a53e4960d2ad36b5f876b58d6d
4
- data.tar.gz: 4818733c054814165462e31b131ca1edbfde01d2d1d34f8c0715a497421679c6
3
+ metadata.gz: 0f6d590d1b812ab56310014c2d5dce0dab26312642dc18498b5072079b41832b
4
+ data.tar.gz: 33300d06a7022b8f956ea9b02e67a6d055557d77966a01f16c04cb3055ed4e25
5
5
  SHA512:
6
- metadata.gz: 95ca846fca450e6df9221e933c28d041fabb91715b9b57f952951d350c50bf87bce4ce183495348c4df812133a8d068b41317855dc8f3e74457ca9664d4b463e
7
- data.tar.gz: a6ca9a870d6e9423ca066c3c11541b1ef5d458b875f4f2f02e88e6f5c0ba3c30482a84f19e5b4f52b9a4d3e202338cc9b3486112db195267c100ffae87d3c6ce
6
+ metadata.gz: 4d513159020c0dd6cedde3191a8a19f6029b8e8faa20e573a3bd03619a04e744bc5174895229173ff1413e9d26997a2488ded1ff94451f7b6938627e3dca42b4
7
+ data.tar.gz: f6ce068108d4c1a5006483fa886cebe33cbe95c377f68f361da76009b56cd0c230aa356166f28f0276a9c67cd1b5bbff92886917d76f82a2e1e2dee12d2f3845
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ # [v0.8.7.1] - 04-12-2024
2
+ **Full Changelog**: https://github.com/yettoapp/hephaestus/compare/v0.8.7...v0.8.7.1
1
3
  # [v0.8.7] - 04-12-2024
2
4
  ## What's Changed
3
5
  * Load infra better by @gjtorikian in https://github.com/yettoapp/hephaestus/pull/77
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: <%= ENV["DATABASE_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: <%= ENV["DATABASE_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"] = Hephaestus::Engine.fetch_infra_secret(
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 = Hephaestus::Engine.fetch_infra_secret(
10
+ config.webhook_url = fetch_infra_secret(
11
11
  label: "SLACK_LOG_URL",
12
12
  default: "https://slack.com/the_log_room",
13
13
  )
@@ -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!
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Hephaestus
5
- VERSION = "0.8.7"
5
+ VERSION = "0.8.7.1"
6
6
  RAILS_VERSION = ">= 8.0"
7
7
  RUBY_VERSION = File
8
8
  .read("#{File.dirname(__FILE__)}/../../.ruby-version")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hephaestus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian