bellboy 0.3.2 → 0.3.3

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.
Files changed (2) hide show
  1. data/lib/bellboy/uploader.rb +9 -9
  2. metadata +1 -1
@@ -48,18 +48,18 @@ module Bellboy
48
48
 
49
49
  # Process every sub-directory (but not current & parent, natch)
50
50
  unless dir == '.' || dir == '..'
51
- begin
52
- bag = conn.data_bag.create(name: dir) unless conn.data_bag.find(dir)
53
- if bag.nil?
54
- Bellboy.logger.verbose "Skipped creation of data bag #{dir}"
55
- else
56
- Bellboy.logger.verbose "Created new data bag #{dir}"
57
- end
58
- manifest = upload_databag_items(conn, File.join(path, dir), dir)
59
51
 
52
+ begin
53
+ conn.data_bag.create(name: dir)
54
+ rescue Ridley::Errors::HTTPConflict
55
+ Bellboy.logger.verbose "Skipped creation of data bag #{dir}"
60
56
  rescue Ridley::Errors::RidleyError => ex
61
57
  raise ChefConnectionError, ex
62
- end
58
+ else
59
+ Bellboy.logger.verbose "Created new data bag #{dir}"
60
+ end
61
+
62
+ manifest = upload_databag_items(conn, File.join(path, dir), dir)
63
63
 
64
64
  create_manifest_file(cookbook.path, dir, manifest)
65
65
  end
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.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: