vagrant-berkshelf 4.0.1 → 4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c61e87ce0b69fd6674f2b48dce071d01c1496656
4
- data.tar.gz: a6785183831c2affa91f1072f605c883f64c2aac
3
+ metadata.gz: a4e3d407e177686e548c0032ea30e25eb7b91bc2
4
+ data.tar.gz: 645273f25a4a346055111516602f2070d5eb4b3c
5
5
  SHA512:
6
- metadata.gz: 96a14944bb147f7efa91ef76297f6e755fe1787e67c4baa4a5159f6a2f5b22ae437f3ba34471ce4c0d224f8967cb939d244f6f03e3d32064aa6fe9d59869d3c7
7
- data.tar.gz: 8838114aef207fe47db28da4650141baa9f6451be9c5d1717a87315e3506aef001fc1b714dcb8dae5b52eb636b3e244d1d597f831a8517cdf4691fbf9d856d5a
6
+ metadata.gz: 87e6a5e45f3887ebc686ff4b4b03d29987769ba154512a1a31b70854f6e5fc618f675ae41d23888da2c1e59919a642d1f8168191e991916bcc8508bc7a325b93
7
+ data.tar.gz: 3381607d856c46ae77153255619bfaf27cbe9cfc8567bab36f32d5a880ac249f85364f1745f543c08359ded750a4db533fa52769088a557c417ab7c729c5ac90
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 4.0.2
2
+
3
+ * Bug Fixes
4
+ * Don't check Berkshelf version if plugin is disabled
5
+
1
6
  # 4.0.1
2
7
 
3
8
  * Bug Fixes
@@ -7,6 +7,11 @@ module VagrantPlugins
7
7
  BERKS_REQUIREMENT = "~> 3.2"
8
8
 
9
9
  def call(env)
10
+ if !berkshelf_enabled?(env)
11
+ @logger.info "Berkshelf disabled, skipping"
12
+ return @app.call(env)
13
+ end
14
+
10
15
  check_berks_bin!(env)
11
16
  berkshelf_version_check!(env)
12
17
 
@@ -57,7 +57,7 @@ module VagrantPlugins
57
57
  tmpfile.rewind
58
58
  yield tmpfile.path
59
59
  ensure
60
- if defined?(tmpfile)
60
+ if defined?(tmpfile) && !tmpfile.nil?
61
61
  tmpfile.close
62
62
  tmpfile.unlink
63
63
  end
@@ -70,7 +70,7 @@ module VagrantPlugins
70
70
  path = File.expand_path(ENV['BERKSHELF_CONFIG'] || '~/.berkshelf/config.json')
71
71
 
72
72
  if File.exist?(path)
73
- JSON.parse(File.read(), symbolize_names: true)
73
+ JSON.parse(File.read(path), symbolize_names: true)
74
74
  else
75
75
  {}
76
76
  end
@@ -86,7 +86,7 @@ module VagrantPlugins
86
86
  env[:machine].ui.info "Uploading cookbooks to #{provisioner.config.chef_server_url}"
87
87
  berks("upload",
88
88
  config: config,
89
- berksfile: provisioner.config.berkshelf.berksfile_path,
89
+ berksfile: env[:machine].config.berkshelf.berksfile_path,
90
90
  force: true,
91
91
  freeze: false,
92
92
  )
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Berkshelf
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-berkshelf
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-02 00:00:00.000000000 Z
13
+ date: 2014-12-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: spork