launchbox 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 9ef674b40bbed8b4e12e1cc8789be5b7edab51d8
4
- data.tar.gz: 4386581c893f230a066af21a56c0478ebe7d785c
3
+ metadata.gz: 2f1a60820062367d90b20ae1e00b722d116cbe2b
4
+ data.tar.gz: 4571173f4a20d9d231258df618e0047dd0a1c75c
5
5
  SHA512:
6
- metadata.gz: 0364d092af674d238478257387c04ef549ed73228b3e26b232dc8c239c166f125130e889148c64a35e82d3327deeb60547bcbed7ab32d6029507a2a670746ab7
7
- data.tar.gz: 075cf1aa087c8ba277c9723aeaef9b7a6aa024aedaa0798b5ff350378997e94daae0e15c6483e7c7d9d0a5d64ead02a8f3948b9df9ed52a21fe224db9fc5f6fc
6
+ metadata.gz: f2b0e8af4e82a947c63754d03aebcb10c73607326515f942c26c6e9526f56ae92b829f6cfa942ca5f238279fb96bfbcef9b1a3674eac6090c31bc61315d9bf8f
7
+ data.tar.gz: 75557ae244acfc688691bfd4a10b5981609ed635c735cf8f46ce4b4c1762b01fdb54404b2edaf179dd04da0a52583ed426abb7f66c49d181e6fb924c45a8a319
@@ -28,6 +28,16 @@ module Launchbox
28
28
  # FIXME: LAUNCHBOX_APP_ID -- json[0] is hardcoding the first app.
29
29
  app = json[0]
30
30
 
31
+ # gitignore config/application.yml so we aren't storing sensitive info in .git
32
+ # TODO: replace figaro with figaro-launchbox and application.yml with launchbox.yml
33
+ gitignore = Rails.root.join('.gitignore')
34
+ if File.readlines(gitignore).grep(/config\/application.yml/).size == 0
35
+ File.open(gitignore, 'a') do |file|
36
+ file.puts 'config/application.yml'
37
+ end
38
+ end
39
+
40
+ # write config/application.yml to load env vars on startup
31
41
  filename = Rails.root.join('config', 'application.yml')
32
42
 
33
43
  # NOTE: 'w' overwrites the previous file!
@@ -37,9 +47,10 @@ module Launchbox
37
47
  service['env_vars'].each do |key, value|
38
48
  puts "setting environment variable #{key}"
39
49
 
40
- # add for after the restart
50
+ # add new vars to application.yml for the restart
41
51
  file.puts "#{key}: #{value}"
42
- # add for now
52
+
53
+ # add new vars to this instance
43
54
  ENV[key] = value
44
55
  end
45
56
  end
@@ -1,3 +1,3 @@
1
1
  module Launchbox
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: launchbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Addonlist