veewee 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,21 +69,25 @@ module Veewee
69
69
  def set_definition(definition_name)
70
70
  @definition=env.definitions[definition_name]
71
71
 
72
- # We check for windows as em-winrm is not available on ruby1.9
73
- is_windows = @definition.os_type_id.start_with?('Windows')
74
-
75
- # On windows systems
76
- if is_windows
77
- # Check if winrm is available
78
- if gem_available?('em-winrm')
79
- require 'veewee/provider/core/box/winrm'
80
- require 'veewee/provider/core/helper/winrm'
81
- require 'veewee/provider/core/box/wincp'
82
-
83
- self.class.send(:include, ::Veewee::Provider::Core::Helper::Winrm)
84
- else
85
- raise Veewee::Error, "\nTo build a windows basebox you need to install the gem 'em-winrm' first"
72
+ unless @definition.nil?
73
+ # We check for windows as em-winrm is not available on ruby1.9
74
+ is_windows = @definition.os_type_id.start_with?('Windows')
75
+
76
+ # On windows systems
77
+ if is_windows
78
+ # Check if winrm is available
79
+ if gem_available?('em-winrm')
80
+ require 'veewee/provider/core/box/winrm'
81
+ require 'veewee/provider/core/helper/winrm'
82
+ require 'veewee/provider/core/box/wincp'
83
+
84
+ self.class.send(:include, ::Veewee::Provider::Core::Helper::Winrm)
85
+ else
86
+ raise Veewee::Error, "\nTo build a windows basebox you need to install the gem 'em-winrm' first"
87
+ end
86
88
  end
89
+ else
90
+ raise Veewee::Error, "definition '#{definition_name}' does not exist. Are you sure you are in the top directory?"
87
91
  end
88
92
 
89
93
  return self
@@ -5,6 +5,8 @@ module Veewee
5
5
 
6
6
  def build(options={})
7
7
 
8
+ download_vbox_guest_additions_iso(options)
9
+
8
10
  super(options)
9
11
 
10
12
  unless definition.floppy_files.nil?
@@ -13,7 +15,6 @@ module Veewee
13
15
  end
14
16
  end
15
17
 
16
- download_vbox_guest_additions_iso(options)
17
18
  end
18
19
 
19
20
  end
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  # Only set the version constant if it wasn't set before
6
6
  unless defined?(Veewee::VERSION)
7
- ::Veewee::VERSION="0.3.5"
7
+ ::Veewee::VERSION="0.3.6"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veewee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -1271,7 +1271,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1271
1271
  version: '0'
1272
1272
  segments:
1273
1273
  - 0
1274
- hash: -1661245043997941021
1274
+ hash: -971087462415518129
1275
1275
  required_rubygems_version: !ruby/object:Gem::Requirement
1276
1276
  none: false
1277
1277
  requirements: