bellboy 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bellboy/installer.rb +12 -3
- metadata +1 -1
data/lib/bellboy/installer.rb
CHANGED
@@ -34,9 +34,18 @@ module Bellboy
|
|
34
34
|
if File.exists?(File.join(source.cached_cookbook.path, @bellboyfile))
|
35
35
|
site = berksfile.locations.select { |loc| loc[:type] == :databags }.first
|
36
36
|
|
37
|
-
|
37
|
+
if site.nil?
|
38
|
+
# Try the 'site' location
|
39
|
+
site = berksfile.locations.select { |loc| loc[:type] == :site }.first
|
38
40
|
|
39
|
-
|
41
|
+
fail Berkshelf::InvalidChefAPILocation if site.nil?
|
42
|
+
|
43
|
+
location = "#{site[:value]}/databags"
|
44
|
+
else
|
45
|
+
location = site[:value]
|
46
|
+
end
|
47
|
+
|
48
|
+
download_databags(source, location)
|
40
49
|
end
|
41
50
|
|
42
51
|
end
|
@@ -79,7 +88,7 @@ module Bellboy
|
|
79
88
|
end
|
80
89
|
|
81
90
|
def download_item(site, databag, item, itempath)
|
82
|
-
location = File.join(
|
91
|
+
location = File.join(site, databag, item)
|
83
92
|
|
84
93
|
Bellboy.logger.log "Downloading data bag item #{databag}/#{item} from '#{location}'"
|
85
94
|
|