fly.io-rails 0.0.12-x64-mingw32 → 0.0.13-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fly.io-rails/version.rb +1 -1
- data/lib/generators/terraform_generator.rb +13 -0
- 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: 6c291bab1f01ba437e8e067ec11344b5359d3eb0b0b2e47fa22fe6a2bbb167cf
|
4
|
+
data.tar.gz: efd511f6ddd83380fe3c8826daa2376410960f608a4325ca49153f11a2d77143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bc2afbd450c1a5dcb1d8c01094b4278fbf920f3f3551a694ccfaa2cdb5bcd5db62cd8edddbcf10462e79db0c0976b85e520645b0b85287298928e5170c7c5b0
|
7
|
+
data.tar.gz: 943402aea38d5d6a550863123454559bf7c22b020dc3563ba132a6c03cf438c0ee880934008c164c9db8e091ce9e8434a26048d88871b6019bfd27ecd51f070b
|
data/lib/fly.io-rails/version.rb
CHANGED
@@ -41,6 +41,19 @@ class TerraformGenerator < Rails::Generators::Base
|
|
41
41
|
template 'main.tf.erb', 'main.tf'
|
42
42
|
template 'fly.rake.erb', 'lib/tasks/fly.rake'
|
43
43
|
|
44
|
+
credentials = nil
|
45
|
+
if File.exist? 'config/credentials/production.key'
|
46
|
+
credentials = 'config/credentials/production.key'
|
47
|
+
elsif File.exist? 'config/master.key'
|
48
|
+
credentials = 'config/master.key'
|
49
|
+
end
|
50
|
+
|
51
|
+
if credentials
|
52
|
+
say_status :run, "flyctl secrets set RAILS_MASTER_KEY from #{credentials}"
|
53
|
+
system "flyctl secrets set RAILS_MASTER_KEY=#{IO.read(credentials).chomp}"
|
54
|
+
puts
|
55
|
+
end
|
56
|
+
|
44
57
|
ENV['FLY_API_TOKEN'] = `flyctl auth token`
|
45
58
|
tee 'terraform init'
|
46
59
|
end
|