vagrant-cookbooks 0.0.3 → 0.0.4

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: 69c9924793c206c38641744a75a49f7d4835242b
4
- data.tar.gz: 17337388f53565ba5e7a2369a56005d7d31a457f
3
+ metadata.gz: c0a151de3a3bbe04cf23fa4f5be31c19f2eb763e
4
+ data.tar.gz: bc31066a49677efec9349f11fe619cee64eccdca
5
5
  SHA512:
6
- metadata.gz: 36def71197655a55956868839ca97668ba7d826cc466aa2ac5668cd5699af7f9e5064d49f0a09fb33b620081544843031c01af3b8aba313f114e05dc89a70ef3
7
- data.tar.gz: f4fbd66dd28433112011cad62dbad17a43b9a6d9ef9ecea751492b8f33ebcf1496124ee88dc8df9869aa7c57a278eef7ab03c1eb393ace6ae12c89e371ac86eb
6
+ metadata.gz: e0783879d5ddfff6f82469969dc9f28fae0e3f2df1acdb7b296718dfc24792ffcf88154b488e6beba56cdbfdae39aaa635a39c26a10ffefcc36e8a5ec135a875
7
+ data.tar.gz: 66928c1339b4fc799cd1f2acb4a50f8adc4b97d36e61589057c7cf51502e8b3d83660e62233f77a651c508c08ffbfc8e916ad6032e95fd44380dc928a1984ade
data/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  Vagrant plugin for cloning down cookbooks before provisioning. It'll clone them
4
4
  to the path configured in `cookbooks_path` (if there are multiple it'll choose
5
- the first one).
5
+ the first one) from the repository configured in `git`(i.e `config.cookbooks.git = "git@github.com:Shopify/cookbooks"`).
@@ -31,7 +31,6 @@ module Vagrant
31
31
  end
32
32
 
33
33
  def finalize!
34
- @git = "git@github.com:Shopify/cookbooks" if @git == UNSET_VALUE
35
34
  @path = ".vagrant/cookbooks" if @path == UNSET_VALUE
36
35
  end
37
36
  end
@@ -45,6 +44,8 @@ module Vagrant
45
44
  end
46
45
 
47
46
  def call(env)
47
+ return @app.call(env) unless repository_is_set?
48
+
48
49
  if cookbooks?
49
50
  update_cookbooks
50
51
  else
@@ -56,6 +57,10 @@ module Vagrant
56
57
 
57
58
  private
58
59
 
60
+ def repository_is_set?
61
+ env[:machine].config.cookbooks.git != Config::UNSET_VALUE
62
+ end
63
+
59
64
  def on_cookbooks_branch?
60
65
  cookbooks_branch != "master"
61
66
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Cookbooks
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-cookbooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Eskildsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-01 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.2.2
78
+ rubygems_version: 2.2.3
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Clone cookbooks before provision