bellboy 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/bellboy/installer.rb +12 -3
  2. metadata +1 -1
@@ -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
- fail Berkshelf::InvalidChefAPILocation if site.nil?
37
+ if site.nil?
38
+ # Try the 'site' location
39
+ site = berksfile.locations.select { |loc| loc[:type] == :site }.first
38
40
 
39
- download_databags(source, site)
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("#{site[:value]}", databag, item)
91
+ location = File.join(site, databag, item)
83
92
 
84
93
  Bellboy.logger.log "Downloading data bag item #{databag}/#{item} from '#{location}'"
85
94
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bellboy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: