bcome 0.6.0 → 0.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0356068ab732695cc27cf83578703579897e3352
4
- data.tar.gz: be45f5cceabe3e3505a2006cf497dde93b49c569
3
+ metadata.gz: 4e0ef34cf4079f32b9f5a8472f55f8e7fe3186cf
4
+ data.tar.gz: 3e14c57b673789e26c1f3553ab478351ffc21cb3
5
5
  SHA512:
6
- metadata.gz: 6cba40a7c1a3dc390b036c6f370196c740e7afa34a0c55d6979028e1b2ff1b3147bcbce1beddf17b76d22383627b8e1befebfd3b4e021552da977772df0c93c2
7
- data.tar.gz: 79a7ebe9b9b47c111d416f670fb9dcded28deda2f474a2288d724887a479af169a0c3e5293db4416b500fca2d93ab5ae2092362f682294b5b5222a4603c68b8b
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
- @context_object.send(@direct_execute_method) if @context_object && @direct_execute_method
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
@@ -1,3 +1,3 @@
1
1
  module Bcome
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -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
- full_command = context_command[:executed_command] + " bcome_context=\"#{context_breadcrumb}\""
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.0
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 00:00:00.000000000 Z
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.5.1
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.