fly.io-rails 0.0.12 → 0.0.13

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: 580f640bd3cf1841fe8d6bd38690f2ba2827510b83ae3265c295b292c16ea007
4
- data.tar.gz: f00643fe5ea9d16364909b1324259b0132887f2c1c531b8a68ddf81548c99ac3
3
+ metadata.gz: 5bb1cef3e9640f7281ba74125505cca0e8a1cc2aeb9c7d0c81381ab310c32202
4
+ data.tar.gz: 5b124f788739f616fa20d523ff88ebd4e9121940757bf753e547218ae16b32b2
5
5
  SHA512:
6
- metadata.gz: 4ddc3a7e877f15f595836c008348fdcd13422a892a041a2b19e795d557402986f1d4c19463785f1210e527314071bc5cbb6df3ec71e69b92a6326b0da853350b
7
- data.tar.gz: bc79ea6cbfce294c741a9580c31dfaa74dd8b0b9079e45e5e6391f7b8f9ee8e1658a6e2c3817bfbe04d2824bf02975fa3acfc157bf50c445d91939665de0a81e
6
+ metadata.gz: 3dbf081712e28c68ae67e3b6dc0e2f287f02db7bae53f925f5ada13caa539cb4bafecd7431b8c76b946806087fb93726c852f02d4238c1f562c85b978a07dd7b
7
+ data.tar.gz: c9c04e0a140690e86efe01be232397f8d8f4d7ee2a5fb37cef2e1caa9029c2f9be769b368796692d1ed359fffa7782d72660a44b1f5faf2904006eabf3e237b6
@@ -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: ruby
6
6
  authors:
7
7
  - Sam Ruby