fly.io-rails 0.0.12-x86-linux → 0.0.13-x86-linux

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: 781bb4132af54e48da60f6b907af330d3e53de2d9678d734318a853b8da9d230
4
- data.tar.gz: 99fb3ddbfa80ea0394a9114c53bad0334a174ed8a323a59a63d5bd96580716c1
3
+ metadata.gz: 1e8702fd0340271db744295fe652c95004453f99ec9a926a5a3e3d264454a365
4
+ data.tar.gz: 5efb500895f53801a38763eed56b8ebc2b7c3f2d1ac528ffce02ac471a270f3f
5
5
  SHA512:
6
- metadata.gz: e81d15a74756cc34436808d5dea256dbf2030160cea7e57e3f2f5c88dd74d587ca6e251c714ccd47a2cc74a5848d9a2925b720a1b3470dfcf70d9f1392e00aad
7
- data.tar.gz: d8e2111b357ec2997049a09eccba0147a137f2c447d5b846c9425b198b4e74f2d99dfb9493f7120dd77a81b2d99e6b0e318897a47d7595d7b1b206359fc75f9a
6
+ metadata.gz: 8898673f5970004a16ae03110dd554a3ade7febd7a0db5d1af938d1e1b27d7e3501e0b68bfc0712e3a9b649fe905f7442eb581e414cb483829588b9b6e154ae2
7
+ data.tar.gz: d6d8763a6005a8dbc769e372aec46c2a5335abffbc49ec4e3c4baeb40faca9c6bd0408734bdf3b7db12b0a6e0ce06e2f71f3d747905a0248787692e4fa5fb402
@@ -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-linux
6
6
  authors:
7
7
  - Sam Ruby