bcome 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bcome +8 -2
- data/lib/bcome/version.rb +1 -1
- data/lib/context_functions.rb +13 -2
- data/lib/stack/base.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e0ef34cf4079f32b9f5a8472f55f8e7fe3186cf
|
4
|
+
data.tar.gz: 3e14c57b673789e26c1f3553ab478351ffc21cb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91e0a4100fa35de6558e854509ff45303ec6c86f15190b8f5feddc47440e732c778c6663a735de45426880671e03bde0a5b67405406e6a5590513d20563016e3
|
7
|
+
data.tar.gz: ea5ee12c471a79b03252598e92d0160da2426625ce065a31600f971f8c298fb37433a76ab10d8acbfecb667eb4d28b6783e0da2cd5d2924de9ea1eb282c9e884
|
data/bin/bcome
CHANGED
@@ -36,5 +36,11 @@ end
|
|
36
36
|
## We're going to directly execute a command on a node, indicated by the method name at the end of our context breadcrumb.
|
37
37
|
## This works for commands specified in the users own personal framework installation, either from a context command or from an orchestration hook
|
38
38
|
## e,g, bcome platform:environment:node_name:bootstrap
|
39
|
-
|
40
|
-
|
39
|
+
if @context_object && @direct_execute_method
|
40
|
+
if ARGV && ARGV.size > 1
|
41
|
+
arguments = ARGV[1..ARGV.size]
|
42
|
+
@context_object.send(@direct_execute_method, arguments)
|
43
|
+
else
|
44
|
+
@context_object.send(@direct_execute_method)
|
45
|
+
end
|
46
|
+
end
|
data/lib/bcome/version.rb
CHANGED
data/lib/context_functions.rb
CHANGED
@@ -2,8 +2,19 @@ module Bcome::ContextFunctions
|
|
2
2
|
|
3
3
|
CONFIGS_PATH = "bcome/config"
|
4
4
|
|
5
|
-
def execute_command_for_context(context_command)
|
6
|
-
|
5
|
+
def execute_command_for_context(context_command, arguments = [])
|
6
|
+
arguments.flatten!
|
7
|
+
if arguments.any? && context_command[:executed_command_with_args]
|
8
|
+
raw_command = context_command[:executed_command_with_args]
|
9
|
+
arguments.each_with_index {|argument, index |
|
10
|
+
raw_command.gsub!("%#{index+1}%",argument)
|
11
|
+
}
|
12
|
+
full_command = raw_command
|
13
|
+
else
|
14
|
+
full_command = context_command[:executed_command]
|
15
|
+
end
|
16
|
+
full_command += " bcome_context=\"#{context_breadcrumb}\""
|
17
|
+
|
7
18
|
run_local(full_command)
|
8
19
|
end
|
9
20
|
|
data/lib/stack/base.rb
CHANGED
@@ -24,7 +24,7 @@ module ::Bcome::Stack
|
|
24
24
|
|
25
25
|
def method_missing(method_sym, *arguments, &block)
|
26
26
|
if command_for_context = command_for_context(method_sym)
|
27
|
-
execute_command_for_context(command_for_context)
|
27
|
+
execute_command_for_context(command_for_context, arguments)
|
28
28
|
elsif recipe = ::Bcome::Orchestrator::Recipe.by_identifier(method_sym.to_s, self)
|
29
29
|
puts "Executing Command Recipe #{recipe.recipe_identifier}".informational
|
30
30
|
puts "Description: #{recipe.description}".command
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Roderick (Webzakimbo)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
207
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
208
|
+
rubygems_version: 2.2.2
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Toolkit for managing machines - simplify your workflow.
|