hephaestus 0.8.7.1 → 0.8.7.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 +2 -0
- data/config/database.yml +2 -2
- data/lib/hephaestus/engine.rb +14 -0
- 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: '089bc02279f0ea66446ee761f12e5a61d2c6c18f9648f204f9d2087625fcde27'
|
4
|
+
data.tar.gz: fcf45d196124e7ece8bf3d345fab2ca640c093efc20530550f10cc32cf614c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846f75d200fd5a66e0b25382d5a985e8eed9d90170f12f2f65d587457f035cbc5d181e6ccc12a8647a93d1ea22df26ca99312676a0fc95c9bcdbf38d219593c5
|
7
|
+
data.tar.gz: ce419a0eb8d0be0d506d4b0345ea9a5f11cecfe9b49c42ff687b34a6e53a44377cd08e7e54625768c274f63c6645c6eda6921768a63a1c6d823865c490dcc3c4
|
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: <%= ENV["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: <%= ENV["DATABASE_URL"] %>
|
62
62
|
migrations_paths: db/queue_migrate
|
data/lib/hephaestus/engine.rb
CHANGED
@@ -60,6 +60,18 @@ module Hephaestus
|
|
60
60
|
match("/*unmatched_route", to: "application#not_found", via: :all)
|
61
61
|
end
|
62
62
|
end
|
63
|
+
|
64
|
+
def load_environment
|
65
|
+
unless Rails.env.local?
|
66
|
+
ENV["DATABASE_URL"] = op_read("op://Infra/Plug #{Rails.env.upcase} Secrets/Common/DATABASE_URL")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def op_read(label)
|
72
|
+
%x(#{include_sudo?}op read "#{label}").chomp.tap do
|
73
|
+
raise "Failed to fetch `#{label}` from 1Password" unless $CHILD_STATUS.success?
|
74
|
+
end
|
63
75
|
end
|
64
76
|
|
65
77
|
def check_dependencies!
|
@@ -75,6 +87,8 @@ module Hephaestus
|
|
75
87
|
ENV.fetch("DOCKER", false) == "1" ? "sudo -E " : ""
|
76
88
|
end
|
77
89
|
|
90
|
+
# we need to check if the 1Password CLI is installed and load it ASAP,
|
91
|
+
# because it contains all the secrets
|
78
92
|
check_dependencies! unless Rails.env.local?
|
79
93
|
end
|
80
94
|
end
|
data/lib/hephaestus/version.rb
CHANGED