vagrant-mutate 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.3.1 (2014-08-17)
2
+ * Improve compatibility with newer qemu-img releases
3
+
1
4
  # 0.3.0 (2014-05-04)
2
5
  * Support Vagrant 1.5 with unversioned boxes (#47)
3
6
  * Drop support for Vagrant < 1.5
data/README.md CHANGED
@@ -11,9 +11,7 @@ Vagrant-mutate is a vagrant plugin to convert vagrant boxes to work with differe
11
11
 
12
12
  ## Compatibility
13
13
 
14
- Vagrant-mutate 0.3 and later requires Vagrant 1.5. If you are using an older vagrant, install vagrant-mutate version 0.2.6.
15
-
16
- Throughout its development vagrant-mutate has been tested against the following versions. It may work with other versions too.
14
+ Throughout its development vagrant-mutate has been tested against the following versions. It may work with other versions too. Note that Vagrant-mutate 0.3 and later requires Vagrant 1.5. If you are using an older vagrant, install vagrant-mutate version 0.2.6.
17
15
 
18
16
  * [vagrant](http://www.vagrantup.com) 1.3.5, 1.4.3, and 1.5.4
19
17
  * [vagrant-kvm](https://github.com/adrahon/vagrant-kvm) 0.1.4
@@ -11,7 +11,7 @@ module VagrantMutate
11
11
  options[:input_provider] = nil
12
12
 
13
13
  opts = OptionParser.new do |o|
14
- o.banner = 'Usage: vagrant mutate <box-name-or-file> <provider>'
14
+ o.banner = 'Usage: vagrant mutate <box-name-or-file-or-url> <provider>'
15
15
  o.on("--input_provider PROVIDER",
16
16
  "Specify provider for input box") do |p|
17
17
  options[:input_provider] = p
@@ -19,12 +19,11 @@ module VagrantMutate
19
19
  end
20
20
 
21
21
  def self.verify_qemu_version(env)
22
- usage = `qemu-img`
22
+ usage = `qemu-img --version`
23
23
  if usage =~ /(\d+\.\d+\.\d+)/
24
24
  installed_version = Gem::Version.new($1)
25
- # will need to change test once a version > 1.6 has a fix
26
- if installed_version < Gem::Version.new('1.2.0') or
27
- installed_version >= Gem::Version.new('1.6.0')
25
+ # less than 1.2 or equal to 1.6.x
26
+ if (installed_version < Gem::Version.new('1.2.0') or (installed_version >= Gem::Version.new('1.6.0') and installed_version < Gem::Version.new('1.7.0')))
28
27
 
29
28
  env.ui.warn "You have qemu #{installed_version} installed. "\
30
29
  "This version cannot read some virtualbox boxes. "\
@@ -1,3 +1,3 @@
1
1
  module VagrantMutate
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/test/test.rb CHANGED
@@ -10,6 +10,13 @@ def cleanup
10
10
  end
11
11
  end
12
12
 
13
+ def ensure_pkg_dir
14
+ pkg_dir = File.expand_path('../../pkg', __FILE__)
15
+ if not Dir.exists? pkg_dir
16
+ Dir.mkdir pkg_dir
17
+ end
18
+ end
19
+
13
20
  def build_plugin
14
21
  puts "\nBUILDING PLUGIN"
15
22
  pkg_dir = File.expand_path('../../pkg', __FILE__)
@@ -80,6 +87,7 @@ def test(input, outputs)
80
87
  end
81
88
 
82
89
  cleanup
90
+ ensure_pkg_dir
83
91
  build_plugin
84
92
  failures = test( 'virtualbox', ['kvm', 'libvirt'] )
85
93
  failures += test( 'libvirt', ['kvm'] )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-mutate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-18 00:00:00.000000000 Z
12
+ date: 2014-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler