aris-control 3.0.1 → 3.1.0

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: 5d6ea4084e8e8ef5e2231a1703549d83694a1b40
4
- data.tar.gz: b5ffad423578b924b83a937364fd17f77e1a0955
3
+ metadata.gz: 47f5a4b25d09aa4971c478f813b664ed6b32ced1
4
+ data.tar.gz: 53e740ce9a4947fdffe9233c5749ef6c7e75caac
5
5
  SHA512:
6
- metadata.gz: 61f44aa24b942529f5761c223ffe46a594584d49f18268a2c255628f94d4cd06dc3eebccb3a022daebbfac2408a4b70ab6c327f629074818beaddda78206ae26
7
- data.tar.gz: d3b3f2674e04f2b6edde27351e1ce761163b70d6d49701dc1d880b000f7dc8f9daec7c85aea4053da61e537388ecd714b58ed9d886a35225d742dfcd93cf3337
6
+ metadata.gz: bdb0f2f7749ffe4b374c160269b0e39696053d69fc3207ec0d5d27f5a754145cf3f4915e1d20486c3ede1855fb4408e0dd5fc307956e8b5fcf1427c504e2b1c7
7
+ data.tar.gz: ede15203756193ac6eb025d112528bb3c21f2b6e98a1a9ff9675463148a280e9a187009d1c9439affce9ca0dd90a3262b1965c699abc645e1e34362c385e1195
@@ -14,17 +14,15 @@ module ArisControl
14
14
  end
15
15
 
16
16
  def add(name, opts = {})
17
- app = apps[name] || {}
18
- ssh_key = opts[:ssh_key]
19
17
  env_vars = opts[:env_vars]
20
-
21
- _opts = Hash.new.tap do |h|
22
- h['email'] = opts[:email] || app.fetch('email')
23
- h['ssh_key'] = ssh_key || app['ssh_key'] || ''
24
- h['env_vars'] = with_upcased_keys(env_vars) if env_vars
18
+ app = apps[name] || {}
19
+ apps[name] = app.dup.tap do |h|
20
+ h['email'] = opts[:email] || app.fetch('email')
21
+ h['ssh_key'] = opts[:ssh_key] if opts[:ssh_key]
22
+ h['pg_role'] = opts[:pg_role] if opts[:pg_role]
23
+ h['pg_pass'] = opts[:pg_pass] if opts[:pg_pass]
24
+ h['env_vars'] = with_upcased_keys(env_vars) if env_vars
25
25
  end
26
-
27
- apps[name] = app.merge(_opts)
28
26
  persistence.store_apps(apps)
29
27
  end
30
28
 
@@ -5,12 +5,16 @@ class ArisControl::Thor < Thor
5
5
  desc 'add/update appname', 'Adds/Updates an aris app.'
6
6
  method_option :email, type: :string, desc: 'The apps email address. Used for web login.'
7
7
  method_option :ssh_key, type: :string, desc: 'The apps ssh public key. Used for git access via ssh.'
8
+ method_option :pg_role, type: :string, desc: 'The apps postgres role.'
9
+ method_option :pg_pass, type: :string, desc: 'The apps postgres password.'
8
10
  method_option :env_vars, type: :hash, desc: 'The apps app env vars. Env vars will be accessible inside the app via ENV[VAR-NAME].'
9
11
  def add(name)
10
- opts = Hash.new.tap do |h|
11
- h[:email] = options[:email]
12
- h[:ssh_key] = options[:ssh_key] if options[:ssh_key]
13
- h[:env_vars] = options[:env_vars] if options[:env_vars]
12
+ opts = Hash.new.tap do |o|
13
+ o[:email] = options[:email]
14
+ o[:ssh_key] = options[:ssh_key] if options[:ssh_key]
15
+ o[:pg_role] = options[:pg_role] if options[:pg_role]
16
+ o[:pg_pass] = options[:pg_pass] if options[:pg_pass]
17
+ o[:env_vars] = options[:env_vars] if options[:env_vars]
14
18
  end
15
19
  bookkeeper.add(name, **opts)
16
20
  puts "Added/Updated app: #{name}, #{opts}"
@@ -1,3 +1,3 @@
1
1
  module ArisControl
2
- VERSION = '3.0.1'
2
+ VERSION = '3.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aris-control
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Igelmund