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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 856800f976dd118a58e2d5b43d77546801385ee228b44220fd2e324be5925f49
4
- data.tar.gz: 20db553783b3725244d98cf20213f7b84575e807a267aa5fce7ab42fe9e47647
3
+ metadata.gz: 6c291bab1f01ba437e8e067ec11344b5359d3eb0b0b2e47fa22fe6a2bbb167cf
4
+ data.tar.gz: efd511f6ddd83380fe3c8826daa2376410960f608a4325ca49153f11a2d77143
5
5
  SHA512:
6
- metadata.gz: '08a3a3bce9e76a2ef44da3a6f918c8a343449bd12d550da718e3d4cfc4049832f27357145159a017355b2cabcd1ef40442322ce5d2502a40ff2c32eb8da3cc4b'
7
- data.tar.gz: 0fb9b1a56ea81118c0704b62a0df9d50b93894b81d4d59bfe8e34f0ea071369aa01e10d3fa8184ebeba994acceff8d2a64243c175b0ecc2a24d2dcfa9e724f6d
6
+ metadata.gz: 2bc2afbd450c1a5dcb1d8c01094b4278fbf920f3f3551a694ccfaa2cdb5bcd5db62cd8edddbcf10462e79db0c0976b85e520645b0b85287298928e5170c7c5b0
7
+ data.tar.gz: 943402aea38d5d6a550863123454559bf7c22b020dc3563ba132a6c03cf438c0ee880934008c164c9db8e091ce9e8434a26048d88871b6019bfd27ecd51f070b
@@ -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: x64-mingw32
6
6
  authors:
7
7
  - Sam Ruby