aris-control 3.2.0 → 3.3.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: c4b7c5dc7480d525076af010423e015327c080fe
4
- data.tar.gz: fc5018068adbfb2cfe4ea341084924f7c87bca08
3
+ metadata.gz: 4553d7e5aad8d0fef3edb1922f54be0dbc2207f5
4
+ data.tar.gz: a91ce30271b8021abbc02bcf224239f6d92e2cff
5
5
  SHA512:
6
- metadata.gz: 1e195c14392f14593fa72d8413fbb657439c7b09af40091f9cf2998d25158f86ee6569efaec554cb35be3cec03da697eef71f76142df2cda0ef13582f82c4922
7
- data.tar.gz: 079b9c1a199819613b5f5b3df1273746674517c6b654615a04c18e4c0508a0cd225b4dcaaea6d1fb9f5a6fe0653e29682702748e8c4b70157c8aed77737852b2
6
+ metadata.gz: c4175f19c0f5971be558c3f76d3dbd218f0d546540785c1815a030b8516a549e9afb5df614584d8f57e564c4112ff4aab858499d4cfc863a492b8476601c9494
7
+ data.tar.gz: 3610070c0f1ff94cde16f981385b31e38dfa213162da316ab596706e854e6e796dfabdafb2c6da79cc950a0b0302ef403fc3a74c23a9f195246e2e54db5bc3e7
@@ -24,6 +24,13 @@ module ArisControl
24
24
  persistence.store_apps(apps)
25
25
  end
26
26
 
27
+ def add_env_vars(name, additional_env_vars = {})
28
+ app = apps[name] or return
29
+ _env_vars = with_upcased_keys(additional_env_vars)
30
+ app['env_vars'] = app['env_vars'].merge(_env_vars)
31
+ persistence.store_apps(apps)
32
+ end
33
+
27
34
  def delete(name)
28
35
  apps.delete(name)
29
36
  persistence.store_apps(apps)
@@ -2,10 +2,10 @@ require 'thor'
2
2
  require 'pp'
3
3
 
4
4
  class ArisControl::Thor < Thor
5
- desc 'add/update appname', 'Adds/Updates an aris app.'
5
+ desc 'add appname [opts]', '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 :env_vars, type: :hash, desc: 'The apps app env vars. Env vars will be accessible inside the app via ENV[VAR-NAME].'
8
+ method_option :env_vars, type: :hash, desc: "WARNING. This overwrites all previously existing env_vars.\nThe apps app env vars. Env vars will be accessible inside the app via ENV[VAR-NAME]."
9
9
  def add(name)
10
10
  opts = Hash.new.tap do |o|
11
11
  o[:email] = options[:email]
@@ -18,6 +18,15 @@ class ArisControl::Thor < Thor
18
18
  print_current_aris_apps
19
19
  end
20
20
 
21
+ desc 'add-env-vars [opts]', 'Adds an env var to the given app.'
22
+ method_option :env_vars, type: :hash, desc: 'The apps app env vars. Env vars will be accessible inside the app via ENV[VAR-NAME].'
23
+ def add_env_vars(name)
24
+ bookkeeper.add_env_vars(name, options[:env_vars])
25
+ puts "Added/Updated app: #{name}, #{options}"
26
+ puts "-----------------------------"
27
+ print_current_aris_apps
28
+ end
29
+
21
30
  desc 'delete name', 'Deletes aris app'
22
31
  def delete(name)
23
32
  bookkeeper.delete(name)
@@ -1,3 +1,3 @@
1
1
  module ArisControl
2
- VERSION = '3.2.0'
2
+ VERSION = '3.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aris-control
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Igelmund
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-19 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler