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 +4 -4
- data/lib/aris-control/bookkeeper.rb +7 -0
- data/lib/aris-control/thor.rb +11 -2
- data/lib/aris-control/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4553d7e5aad8d0fef3edb1922f54be0dbc2207f5
|
4
|
+
data.tar.gz: a91ce30271b8021abbc02bcf224239f6d92e2cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/aris-control/thor.rb
CHANGED
@@ -2,10 +2,10 @@ require 'thor'
|
|
2
2
|
require 'pp'
|
3
3
|
|
4
4
|
class ArisControl::Thor < Thor
|
5
|
-
desc 'add
|
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:
|
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)
|
data/lib/aris-control/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|