kitchen-vagrant_sandbox 0.1.0 → 0.1.1

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: 67a4eb87f37ca0f562f17c7286764f6fc53c448f
4
- data.tar.gz: 04455b1a0b543b263b877b0bd657724c59246ce6
3
+ metadata.gz: 18e65c479b85ddd3fd8c31d4a3ce6b79043a2f6b
4
+ data.tar.gz: c9b7cecc0dcfcfb99af37d3cc6596e969370258e
5
5
  SHA512:
6
- metadata.gz: 06ee0ccffd5b2191631e320318dc5af20ce488febdddd08bfff10a6996f17e9b6c3bbd1eb199d4639f28ca16f4d5dc7e0e0d3ae2dacd65683a1f7b228e7a1b76
7
- data.tar.gz: f55026a89659badfff02b4087075a76829f28b4820abcfca321a66acc87d2f144096d511b3c40ece9219706a6a0a6e25545eef822e627414e85891b69e38e6ba
6
+ metadata.gz: e09f1aa8ddb78862b361a57b06bb7ed84d964d3fff25c6568c55733012cd4e26fb45d50d73812e5edbbf0af9318d908050167e618b354e89c50644985372aacc
7
+ data.tar.gz: bca2e8f5ef49d36e0e033cd3f9253e4ae41730096a00b4d40f5b5f3168d3729a7300235301764b1cb8cdbad5cf0d6985c362c4e60d672bad19c8e8aa1a6252ad
@@ -201,25 +201,24 @@ module Kitchen
201
201
  " Please upgrade to version #{MIN_VER} or higher from #{WEBSITE}."
202
202
  end
203
203
  end
204
+
205
+ def check_plugin_installed(plugin)
206
+ plugins = silently_run("vagrant plugin list").split("\n")
207
+ if ! plugins.find { |p| p =~ /^#{plugin}\b/ }
208
+ raise UserError, "Detected a Berksfile but the #{plugin}" +
209
+ " plugin was not found in Vagrant. Please run:" +
210
+ " `vagrant plugin install #{plugin}' and retry."
211
+ end
212
+ end
204
213
 
205
214
  def check_berkshelf_plugin
206
215
  if File.exists?(File.join(config[:kitchen_root], "Berksfile"))
207
- plugins = silently_run("vagrant plugin list").split("\n")
208
- if ! plugins.find { |p| p =~ /^vagrant-berkshelf\b/ }
209
- raise UserError, "Detected a Berksfile but the vagrant-berkshelf" +
210
- " plugin was not found in Vagrant. Please run:" +
211
- " `vagrant plugin install vagrant-berkshelf' and retry."
212
- end
216
+ check_plugin_installed("vagrant-berkshelf")
213
217
  end
214
218
  end
215
219
 
216
220
  def check_sandbox_plugin_installed
217
- unless silently_run('vagrant help', returns: 0..1) =~ /^\s{5}sandbox$/
218
- raise UserError, <<-EOS
219
- Vagrant sandbox plugin is not installed.
220
- You can install the plugin by `vagrant plugin install sahara`.
221
- EOS
222
- end
221
+ check_plugin_installed("sahara")
223
222
  end
224
223
 
225
224
  def sandbox_on?
@@ -23,6 +23,6 @@ module Kitchen
23
23
  module Driver
24
24
 
25
25
  # Version string for Vagrant Sandbox Kitchen driver
26
- VAGRANT_VERSION = "0.1.0"
26
+ VAGRANT_VERSION = "0.1.1"
27
27
  end
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vagrant_sandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.0.2
108
+ rubygems_version: 2.0.3
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Kitchen::Driver::VagrantSandbox - A Vagrant Driver with sandbox for Test