vagrant-librarian-chef 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00f7e7254040996cf4d3b0ac0199a51d9f099d21
|
4
|
+
data.tar.gz: da9cf5d32d649532a5a2e5fa286c88ffbf51f4dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8edd1b1483d55b266713a02ea420c77050bea37cb19876fb9c7344bd5756cbd89981559f679d49a083849fc771e04a3babe3dffd3a04931b10c7e4af3f1204e8
|
7
|
+
data.tar.gz: 7c4a84c08da63f960b909bba6c27f56ad984050c5657e12541ae394df4d7738fa52708ff04924aa1bea3909bc513658f79571bbba6cb178d3bf63dd44cb6e1b0
|
@@ -13,18 +13,30 @@ module VagrantPlugins
|
|
13
13
|
|
14
14
|
def call(env)
|
15
15
|
config = env[:global_config].librarian_chef
|
16
|
-
|
17
|
-
|
16
|
+
|
17
|
+
project_path = get_project_path(env, config)
|
18
|
+
if project_path
|
18
19
|
env[:ui].info "Installing Chef cookbooks with Librarian-Chef..."
|
19
20
|
environment = Librarian::Chef::Environment.new({
|
20
|
-
:project_path =>
|
21
|
+
:project_path => project_path
|
21
22
|
})
|
22
23
|
Librarian::Action::Ensure.new(environment).run
|
23
24
|
Librarian::Action::Resolve.new(environment).run
|
24
25
|
Librarian::Action::Install.new(environment).run
|
26
|
+
else
|
27
|
+
env[:ui].info "Couldn't find Cheffile at #{config.cheffile_path}."
|
25
28
|
end
|
26
29
|
@app.call(env)
|
27
30
|
end
|
31
|
+
|
32
|
+
def get_project_path(env, config)
|
33
|
+
# look for a Cheffile in the configured cheffile_dir
|
34
|
+
if FileTest.exist? config.cheffile_path
|
35
|
+
return config.cheffile_dir
|
36
|
+
elsif FileTest.exist? File.join(env[:root_path], config.cheffile_path)
|
37
|
+
return File.join(env[:root_path], config.cheffile_dir)
|
38
|
+
end
|
39
|
+
end
|
28
40
|
end
|
29
41
|
end
|
30
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-librarian-chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Cuadra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: librarian-chef
|
@@ -111,3 +111,4 @@ signing_key:
|
|
111
111
|
specification_version: 4
|
112
112
|
summary: A Vagrant plugin to install Chef cookbooks using Librarian-Chef.
|
113
113
|
test_files: []
|
114
|
+
has_rdoc:
|