fly.io-rails 0.0.12-x86_64-darwin → 0.0.13-x86_64-darwin
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: ec19b63be4a06397aa677712a4a83bd053493f5d2bdc7cd72f6d022fc0f37eb6
|
4
|
+
data.tar.gz: 819271f7637ec17effa65b3faec5b5e9e6460f106c682611030553f51d811329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 959ced0ea6380281e1038e478aeb71c141c62a73abe75a871a6fb28ffd9d0dbf0c10ec7b216e61ba7aa3758f33db2e849d3b7db3d76e70a57432193ba39e4913
|
7
|
+
data.tar.gz: 40884bf25744d04ec1069b2cc573d90ac64483599e77f54d288e677c39765d248bee1882284e4325d19d8dc2a2a1a766e22f979fb026d623fc0bde8e2002ab4f
|
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
|