bcome 0.3.3 → 0.3.4

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: 014cefb974e62be9d8a7f59c5b3712375a58fdfc
4
- data.tar.gz: cf0d5ca26ed706988090518fdc0a11a9a0bf9f8a
3
+ metadata.gz: e5b0ebe228e2ae3369ca4014f664c632673b0a9e
4
+ data.tar.gz: 42cb66fcc2405cc00e45d39bbc4b21565f3ae23b
5
5
  SHA512:
6
- metadata.gz: 075d3d930d562803e00ff424009421e9b2536f33ff8f774e7a5deb41dc1fc28d53d32d3fcba3354666c78c770ea90916b37cc421c61ba553ca37325d70461e37
7
- data.tar.gz: d6d8baa2cf39f2c7ea621e210371c883d5f4725c99dc65aea3b4c4266783330d21a9789f2db94b00ef2ca6cc253ea6443c38ec184e77d178d20404dd42697328
6
+ metadata.gz: 2f6990c0d55e964ffd126a4d5ab7de6a41d440cb90e3674838a384ff9841b3d07b357c656d67aa14088439ef3aa3f9eb1e6e5ade4b142ae7ce82ac54b826e5d8
7
+ data.tar.gz: 4ff8bd98c95b1d727c016afc7f8b93210e06c3d4424eeef1c7f2bc340e6d000672f0e26f927b9c16c46c0009858dbe3a6993e9562458314f6baa901717dc113a
@@ -12,7 +12,7 @@ current_context = B_PIN.node
12
12
 
13
13
  raise "Demo script is for an Environment context" unless current_context.is_a?(Bcome::Node::Environment)
14
14
 
15
- puts "You have loaded into a context of type #{current_context.class}, named #{current_context.identifier}\n".magenta
15
+ puts "You have loaded into a context of type #{current_context.class}, named #{current_context.identifier}\n".cyan
16
16
 
17
17
  ## The 'machines' accessor
18
18
  puts "Iterating over servers found at the current context level\n".informational
@@ -25,24 +25,24 @@ machines.each {|machine|
25
25
  }
26
26
 
27
27
  ## Playing with a machine
28
- puts "\nDoing things with the machines:".magenta
28
+ puts "\nDoing things with the machines:".cyan
29
29
 
30
30
  raise "Cannot proceed with demo, no machines found" unless machines.any?
31
31
 
32
32
  machine = machines.first
33
33
 
34
34
  ## Command execution
35
- puts "\n\nExecuting a command on #{machine.identifier}".magenta
35
+ puts "\n\nExecuting a command on #{machine.identifier}".cyan
36
36
  command = machine.run("whoami")
37
37
 
38
38
  ## File upload
39
- puts "\n\nFile upload".magenta
39
+ puts "\n\nFile upload".cyan
40
40
  local_path = "~/Desktop/foo"
41
41
  remote_path = "/home/guillaume"
42
42
  machine.put(local_path, remote_path)
43
43
 
44
44
  ## File download
45
- puts "\n\nFile download".magenta
45
+ puts "\n\nFile download".cyan
46
46
  machine.get(remote_path)
47
47
 
48
48
  exit 0
@@ -29,12 +29,12 @@ platforms.each {|platform|
29
29
  environments = platform.environments
30
30
 
31
31
  environments.each {|environment|
32
- puts "Environment:".magenta + "\s#{environment.identifier}".informational
32
+ puts "Environment:".cyan + "\s#{environment.identifier}".informational
33
33
 
34
34
  # Machines within this enironment
35
35
  machines = environment.machines
36
36
  machines.each { |machine|
37
- puts "Identifier: ".magenta + "\s#{machine.identifier}"
37
+ puts "Identifier: ".cyan + "\s#{machine.identifier}"
38
38
  }
39
39
 
40
40
  }
@@ -23,12 +23,12 @@ puts "Platform has #{all_machines.size} machines".informational
23
23
  environments = platform.environments
24
24
 
25
25
  environments.each {|environment|
26
- puts "Environment:".magenta + "\s#{environment.identifier}".informational
26
+ puts "Environment:".cyan + "\s#{environment.identifier}".informational
27
27
 
28
28
  # Machines within this enironment
29
29
  machines = environment.machines
30
30
  machines.each { |machine|
31
- puts "Identifier: ".magenta + "\s#{machine.identifier}"
31
+ puts "Identifier: ".cyan + "\s#{machine.identifier}"
32
32
  }
33
33
 
34
34
  }
@@ -4,7 +4,7 @@ require 'net/scp'
4
4
  require 'net/ssh/proxy/command'
5
5
  require 'fog'
6
6
  require 'require_all'
7
- require 'parallel'
7
+ require 'pmap'
8
8
 
9
9
  require_all "#{File.dirname(__FILE__)}/../lib"
10
10
  require_all "#{File.dirname(__FILE__)}/../filters"
@@ -1,3 +1,3 @@
1
1
  module Bcome
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -17,9 +17,9 @@ module Bcome::Selections
17
17
  def run(raw_commands, bootstrap = false)
18
18
  return unless @objects
19
19
 
20
- Parallel.map(@objects) do |object|
20
+ @objects.pmap {|object|
21
21
  object.run(raw_commands, bootstrap)
22
- end
22
+ }
23
23
 
24
24
  return
25
25
  end
data/lib/ssh.rb CHANGED
@@ -23,7 +23,7 @@ class ::Bcome::Ssh
23
23
 
24
24
  ::Net::SSH.start(instance.ip_address, ssh_user, :proxy => proxy, :keys => ssh_keys, :paranoid => false) do |ssh|
25
25
  ssh_exec!(ssh, command)
26
- output_append("(#{instance.identifier})$".cyan + ">\s#{command.command} (#{command.pretty_result})\n")
26
+ output_append("\n(#{instance.identifier})$".cyan + ">\s#{command.command} (#{command.pretty_result})\n")
27
27
  output_append("#{command.output}")
28
28
  ssh.close
29
29
  end
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.3.3
4
+ version: 0.3.4
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-05-04 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -101,19 +101,19 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: 1.3.3
103
103
  - !ruby/object:Gem::Dependency
104
- name: parallel
104
+ name: pmap
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 1.8.0
109
+ version: 1.1.1
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - '='
115
115
  - !ruby/object:Gem::Version
116
- version: 1.8.0
116
+ version: 1.1.1
117
117
  description: Provides a console interface for traversing a hierarchy of platforms
118
118
  -> environment -> servers, and exposes common administration tools for the managemenent
119
119
  either of individual servers, or groups or servers. System is driven from simple