knife-table 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,2 +1,5 @@
1
+ ## v0.0.2
2
+ * Load data bag via DataBagItem class not DataBag
3
+
1
4
  ## v0.0.1
2
5
  * Initial commit
data/knife-table.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'knife-table'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.summary = 'Help chef set and serve the table'
5
5
  s.author = 'Chris Roberts'
6
6
  s.email = 'chrisroberts.code@gmail.com'
@@ -227,8 +227,11 @@ module KnifeTable
227
227
  end
228
228
 
229
229
  def upload_data_bags(bag)
230
- data_bag_load = loader(:data_bags).load_from('data_bags', bag.split.first, bag.split.last)
231
- data_bag_load.save
230
+ data_bag_load = loader(:data_bags).load_from('data_bags', bag.split('/').first, bag.split('/').last)
231
+ dbag = Chef::DataBagItem.new
232
+ dbag.data_bag(bag.split('/').first)
233
+ dbag.raw_data = data_bag_load
234
+ dbag.save
232
235
  end
233
236
 
234
237
  private
@@ -322,7 +325,7 @@ module KnifeTable
322
325
  if(type == :roles)
323
326
  @role_loader ||= Chef::Knife::Core::ObjectLoader.new(Chef::Role, ui)
324
327
  elsif(type == :data_bags)
325
- @role_loader ||= Chef::Knife::Core::ObjectLoader.new(Chef::DataBag, ui)
328
+ @databag_loader ||= Chef::Knife::Core::ObjectLoader.new(Chef::DataBagItem, ui)
326
329
  else
327
330
  raise 'Unsupported load type'
328
331
  end
@@ -1,3 +1,3 @@
1
1
  module KnifeTable
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-05 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: knife-spork
16
- requirement: &16438040 !ruby/object:Gem::Requirement
16
+ requirement: &20490380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16438040
24
+ version_requirements: *20490380
25
25
  description: Chef's table
26
26
  email: chrisroberts.code@gmail.com
27
27
  executables: []
@@ -29,6 +29,7 @@ extensions: []
29
29
  extra_rdoc_files: []
30
30
  files:
31
31
  - CHANGELOG.md
32
+ - knife-table-0.0.2.gem
32
33
  - README.md
33
34
  - knife-table.gemspec
34
35
  - lib/knife-table/version.rb