bcome 0.1.5 → 0.1.6

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: a2563970b64cb6c9cc08b200084f38350f707c2a
4
- data.tar.gz: 4a3123f6bd33d1f6da3e76910ec85effb331416b
3
+ metadata.gz: 3a6174a45ea4309da7ce8053c8eef32a601725e4
4
+ data.tar.gz: a9ee6b5a1181437c27b0e7ac4255e29c1a4d4d71
5
5
  SHA512:
6
- metadata.gz: 97e59e2e60beb96ee703077056a0831dba7dfab77664edc5720725520689aa51985c5869ded748f9a3be7596a909484b9822a0ae9c663c9999a1eae1680ae3f1
7
- data.tar.gz: 928047d4c77bd3325af27fd43e504f23e526cf1ca673ee88ca314930026ca11454b50580d8d6989a6d07bde900c817692bc4b4dae2f9c5e18a6d7d3669e07e6d
6
+ metadata.gz: bec1eeb5d226b4fc6c75e6e3bd37c4ab2d16fb47b7a810898e347e4de009b8df8d74ab307bb67fe10515e6e107c7376155fe48fa7a1b2c249781dbbce511888d
7
+ data.tar.gz: a7ba04ed80315c990352fadf8484cf5aff31b9bafa7e42214dfdc422dd92c2ff97ec1b3283485e941fcd93385b8efddbf8a37002fec61cb2542f16a2c710ccbd
data/bin/boot.rb CHANGED
@@ -114,9 +114,7 @@ if quick_contexts.any?
114
114
  end
115
115
 
116
116
  B_PIN = @context_object
117
- RECIPES = ::Bcome::Orchestrator::Loader.new(@context_object.machines)
118
117
  B_PIN.init
119
118
  else
120
- RECIPES = ::Bcome::Orchestrator::Loader.new(ESTATE.machines)
121
119
  ESTATE.init
122
120
  end
data/lib/bcome/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bcome
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -10,13 +10,13 @@ module ::Bcome::Orchestrator
10
10
  return
11
11
  end
12
12
 
13
- def by_identifier(identifier)
14
- all_recipes = RECIPES.recipes
13
+ def by_identifier(identifier, stack_level_instance)
14
+ all_recipes = stack_level_instance.recipes
15
15
  return all_recipes.select{|recipe| recipe.recipe_identifier == identifier }.first
16
16
  end
17
17
 
18
- def as_menu_items
19
- ::RECIPES.recipes.collect {|recipe| { :command => recipe.recipe_identifier, :description => "(Command recipe): #{recipe.description}" } }
18
+ def as_menu_items(stack_level_instance)
19
+ stack_level_instance.recipes.collect {|recipe| { :command => recipe.recipe_identifier, :description => "(Command recipe): #{recipe.description}" } }
20
20
  end
21
21
 
22
22
  end
data/lib/render_irb.rb CHANGED
@@ -13,8 +13,8 @@ class ::Bcome::RenderIrb
13
13
  print "\n"
14
14
  end
15
15
 
16
- def menu(menu_items)
17
- recipe_menu_items = ::Bcome::Orchestrator::Recipe.as_menu_items
16
+ def menu(menu_items, stack_level_instance)
17
+ recipe_menu_items = ::Bcome::Orchestrator::Recipe.as_menu_items(stack_level_instance)
18
18
  menu_items += recipe_menu_items if recipe_menu_items.any?
19
19
 
20
20
  menu_str = "\n** Commands **\n\n"
data/lib/stack/base.rb CHANGED
@@ -16,10 +16,14 @@ module ::Bcome::Stack
16
16
  @node ||= construct_node
17
17
  end
18
18
 
19
+ def recipes
20
+ []
21
+ end
22
+
19
23
  def method_missing(method_sym, *arguments, &block)
20
24
  if command_for_context = command_for_context(method_sym)
21
25
  execute_command_for_context(command_for_context)
22
- elsif recipe = ::Bcome::Orchestrator::Recipe.by_identifier(method_sym.to_s)
26
+ elsif recipe = ::Bcome::Orchestrator::Recipe.by_identifier(method_sym.to_s, self)
23
27
  puts "Executing Command Recipe #{recipe.recipe_identifier}".informational
24
28
  puts "Description: #{recipe.description}".command
25
29
  recipe.execute!(machines)
@@ -76,7 +80,7 @@ module ::Bcome::Stack
76
80
  alias :cd :workon
77
81
 
78
82
  def menu
79
- ::RENDER.menu(menu_items)
83
+ ::RENDER.menu(menu_items, self)
80
84
  end
81
85
 
82
86
  def menu_items
@@ -40,6 +40,10 @@ module ::Bcome::Stack
40
40
  ]
41
41
  end
42
42
 
43
+ def recipes
44
+ @recipes ||= ::Bcome::Orchestrator::Loader.new(machines).recipes
45
+ end
46
+
43
47
  def do_load_resources
44
48
  if dynamic_network_lookup?
45
49
  return collection_klass.collection_from_fog_data(self, servers)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Roderick (Webzakimbo)