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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2029b7fba3b5f493abe43cc9fe6ec8705fbc7788d066ceaac6ee828291bf33ba
4
- data.tar.gz: 8ee1149b514a16af4b1704f1de01fd9daf27290289eba2d6b870b415e273d493
3
+ metadata.gz: ec19b63be4a06397aa677712a4a83bd053493f5d2bdc7cd72f6d022fc0f37eb6
4
+ data.tar.gz: 819271f7637ec17effa65b3faec5b5e9e6460f106c682611030553f51d811329
5
5
  SHA512:
6
- metadata.gz: ddd18e2a75f0e75263c07b9187d7a89429fe64f8beda9e9090314cf8d326dbcd8f15aa13e2ee2cc1def30c638614e514ab6c4ed572ad465484538e1752de7d46
7
- data.tar.gz: 78ccfc36e20a979a165daaa19fd0381893ed0f32b6c57620eeb571fa2cc216da28ad725dfaa6cacf63b19c1117c50f4c82a23adb887e15270090070e6c1e8652
6
+ metadata.gz: 959ced0ea6380281e1038e478aeb71c141c62a73abe75a871a6fb28ffd9d0dbf0c10ec7b216e61ba7aa3758f33db2e849d3b7db3d76e70a57432193ba39e4913
7
+ data.tar.gz: 40884bf25744d04ec1069b2cc573d90ac64483599e77f54d288e677c39765d248bee1882284e4325d19d8dc2a2a1a766e22f979fb026d623fc0bde8e2002ab4f
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Sam Ruby