inprovise 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/inprovise/cli/group.rb +1 -0
- data/lib/inprovise/cli/node.rb +1 -0
- data/lib/inprovise/cli/provision.rb +1 -0
- data/lib/inprovise/cli.rb +7 -5
- data/lib/inprovise/control.rb +0 -1
- data/lib/inprovise/infra.rb +1 -1
- data/lib/inprovise/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MThmN2UyZGE2MjczYzFiZWEwOGRlNWU0Y2I5ODRmNDgyMGExZmYyZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTY2NDY0MGY4YWMwNjkxOTFjZDllMTQ0NjY4ZDkxYjYxZmFhYzIwNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2UxZGQwNzhiNTJhMzkxMzZkY2IxNWRiZmU1YTY2NzUxZjZjMTQ4MmIxZDMx
|
10
|
+
N2Y4YTZhNmNhNWQ0YTcxOTA5ZWM2ZjM4OWI2OGExOGRhODRmMTliMTZjMDM2
|
11
|
+
MWI3YzNiYmU2MTI4ZTE0ZWEyNjg4ZTQ4MmYyMWY4YThlZDNmMWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTY1NjYyODI4YzBhOGMyYjY1YjE2NzBmNDBjMzMyMWQwNWFjODY1Y2FkOWNl
|
14
|
+
MzUzYWM5N2RiNDMyMzIyNWIxYzIyZDJlNjdlOGM4NmFiYTE5YTJlNWFhOGMz
|
15
|
+
ZWMyM2U1YWNjODA4MmFjOGUxYjNiMzQ5MGFlMzE1ZWY3Y2JiYjc=
|
data/lib/inprovise/cli/group.rb
CHANGED
@@ -51,6 +51,7 @@ class Inprovise::Cli
|
|
51
51
|
end
|
52
52
|
|
53
53
|
cgrp.desc 'List infrastructure groups (all or specified group(s))'
|
54
|
+
cgrp.skips_post
|
54
55
|
cgrp.arg_name '[GROUP[ GROUP [...]]]'
|
55
56
|
cgrp.command :list do |cgrp_list|
|
56
57
|
cgrp_list.switch [:d, :details], negatable: false, :desc => 'Show group details'
|
data/lib/inprovise/cli/node.rb
CHANGED
@@ -56,6 +56,7 @@ class Inprovise::Cli
|
|
56
56
|
end
|
57
57
|
|
58
58
|
cnod.desc 'List infrastructure nodes (all or for specified nodes/groups)'
|
59
|
+
cnod.skips_post
|
59
60
|
cnod.arg_name '[NAME[ NAME [...]]]'
|
60
61
|
cnod.command :list do |cnod_list|
|
61
62
|
cnod_list.switch [:d, :details], negatable: false, :desc => 'Show node details'
|
data/lib/inprovise/cli.rb
CHANGED
@@ -41,6 +41,7 @@ class Inprovise::Cli
|
|
41
41
|
require_relative './cli/provision'
|
42
42
|
|
43
43
|
desc 'Initialize Inprovise project.'
|
44
|
+
skips_post
|
44
45
|
command :init do |cinit|
|
45
46
|
cinit.action do |_global,_options,_args|
|
46
47
|
raise RuntimeError, 'Cannot initialize existing project directory.' if File.exists?(Inprovise::INFRA_FILE)
|
@@ -79,11 +80,12 @@ class Inprovise::Cli
|
|
79
80
|
true
|
80
81
|
end
|
81
82
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
post do |global,command,options,args|
|
84
|
+
# Post logic here
|
85
|
+
# Use skips_post before a command to skip this
|
86
|
+
# block on that command only
|
87
|
+
Inprovise::Infrastructure.save
|
88
|
+
end
|
87
89
|
|
88
90
|
on_error do |exception|
|
89
91
|
# Error logic here
|
data/lib/inprovise/control.rb
CHANGED
@@ -133,7 +133,6 @@ class Inprovise::Controller
|
|
133
133
|
|
134
134
|
def run_infra_command(cmd, target, *args)
|
135
135
|
add(Inprovise::Controller.new).send(:"#{cmd}_#{target}", *args)
|
136
|
-
Inprovise::Infrastructure.save
|
137
136
|
end
|
138
137
|
|
139
138
|
def run_provisioning_command(command, script, cfg, *targets)
|
data/lib/inprovise/infra.rb
CHANGED
@@ -58,7 +58,7 @@ module Inprovise::Infrastructure
|
|
58
58
|
def save
|
59
59
|
targets.synchronize do
|
60
60
|
data = []
|
61
|
-
targets.
|
61
|
+
targets.values.sort.each {|t| t.is_a?(Node) ? data.insert(0,t) : data.push(t) }
|
62
62
|
File.open(Inprovise.infra, 'w') {|f| f << JSON.pretty_generate(data) }
|
63
63
|
end
|
64
64
|
end
|
data/lib/inprovise/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inprovise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Corino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|