netvbox 0.0.1 → 0.0.2

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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in netvbox.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
1
  module NetVbox
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -14,6 +14,7 @@ module NetVbox
14
14
  threads << Thread.new(vm) {|vm| puts "#{vm.vm_info.vm_name} on #{vm.vm_info.ssh_connection_info.hostname}... #{vm.status}"}
15
15
  end
16
16
  threads.each(&:join)
17
+ puts 'There are no vms' if threads.empty?
17
18
  end
18
19
 
19
20
  def load_snapshots
@@ -37,10 +38,12 @@ module NetVbox
37
38
  end
38
39
 
39
40
  def list_vms
40
- @config_manager.get_all_vm_info.each do |vm_info|
41
+ all_vm_info = @config_manager.get_all_vm_info
42
+ all_vm_info.each do |vm_info|
41
43
  ssh_info = vm_info.ssh_connection_info
42
44
  puts "#{ssh_info.username}@#{ssh_info.hostname} - vm: #{vm_info.vm_name}, snapshot: #{vm_info.snapshot_name}"
43
45
  end
46
+ puts 'There are no vms' if all_vm_info.empty?
44
47
  end
45
48
 
46
49
  def add_vm(hostname, username, password, vm_name, snapshot_name)
data/netvbox.gemspec ADDED
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "netvbox/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'netvbox'
7
+ s.version = NetVbox::VERSION
8
+ s.homepage = 'https://github.com/dhsu/netvbox'
9
+ s.summary = 'Remote administration of VirtualBox VMs through ssh'
10
+ s.authors = ['Dennis Hsu']
11
+ s.email = ['hsu.dennis@gmail.com']
12
+
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ s.require_paths = ["lib"]
17
+
18
+ s.add_dependency "net-ssh"
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netvbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh
16
- requirement: &12295500 !ruby/object:Gem::Requirement
16
+ requirement: &18094100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,8 +21,8 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *12295500
25
- description: Remote administration of VirtualBox VMs through ssh
24
+ version_requirements: *18094100
25
+ description:
26
26
  email:
27
27
  - hsu.dennis@gmail.com
28
28
  executables:
@@ -30,13 +30,17 @@ executables:
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - Rakefile
36
+ - bin/netvbox
33
37
  - lib/netvbox.rb
38
+ - lib/netvbox/config_manager.rb
34
39
  - lib/netvbox/version.rb
35
- - lib/netvbox/vm_manager.rb
36
40
  - lib/netvbox/vm.rb
37
- - lib/netvbox/config_manager.rb
38
- - bin/netvbox
39
- homepage:
41
+ - lib/netvbox/vm_manager.rb
42
+ - netvbox.gemspec
43
+ homepage: https://github.com/dhsu/netvbox
40
44
  licenses: []
41
45
  post_install_message:
42
46
  rdoc_options: []