knife-solo_data_bag 0.4.0 → 1.0.0.beta.1

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.
data/.gitignore CHANGED
@@ -4,6 +4,7 @@
4
4
  .config
5
5
  .yardoc
6
6
  Gemfile.lock
7
+ Guardfile
7
8
  InstalledFiles
8
9
  _yardoc
9
10
  coverage
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ knife-solo_data_bag
data/.travis.yml CHANGED
@@ -4,7 +4,6 @@ rvm:
4
4
  - 1.9.3
5
5
 
6
6
  gemfile:
7
- - ./gemfiles/Gemfile.chef.0.10.10
8
- - ./gemfiles/Gemfile.chef.10.12.0
9
- - ./gemfiles/Gemfile.chef.10.14.0
10
- - ./gemfiles/Gemfile.chef.10.16.0
7
+ - ./gemfiles/Gemfile.chef.11.6.2
8
+ - ./gemfiles/Gemfile.chef.11.8.0
9
+ - ./gemfiles/Gemfile.chef.11.8.2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  ## head
2
+ * Only supports > chef 11.4. Use pre-1.0.0 versions for older chef support
2
3
 
3
4
  # 0.4.0 (05/30/2013)
4
5
  * Add support for creating a data bag item from a json file (--json-file) ([@joeyates](https://github.com/joeyates))
data/README.md CHANGED
@@ -85,10 +85,7 @@ setting in knife.rb.
85
85
  This plugin has been tested on the following:
86
86
 
87
87
  Chef:
88
- * 0.10.10
89
- * 10.12.x
90
- * 10.14.x
91
- * 10.16.x
88
+ * > 11.4.0
92
89
 
93
90
  Ruby:
94
91
  * 1.9.2
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'chef', '= 0.10.10'
3
+ gem 'chef', '~> 11.4.4'
4
4
 
5
5
  gemspec :path => "../"
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'chef', '~> 10.12.0'
3
+ gem 'chef', '~> 11.6.2'
4
4
 
5
5
  gemspec :path => "../"
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'chef', '~> 10.14.0'
3
+ gem 'chef', '~> 11.8.0'
4
4
 
5
5
  gemspec :path => "../"
@@ -1,5 +1,5 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'chef', '~> 10.16.0'
3
+ gem 'chef', '~> 11.8.2'
4
4
 
5
5
  gemspec :path => "../"
@@ -14,8 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "knife-solo_data_bag"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Knife::SoloDataBag::VERSION
17
- gem.add_development_dependency 'chef', '~> 0.10.10'
18
17
  gem.add_development_dependency 'rake'
19
- gem.add_development_dependency 'rspec', '~> 2.10.0'
18
+ gem.add_development_dependency 'rspec', '~> 2.13.0'
20
19
  gem.add_development_dependency 'fakefs', '~> 0.4.0'
21
20
  end
@@ -2,6 +2,8 @@ module KnifeSoloDataBag
2
2
 
3
3
  class SoloDataBagCreate < Chef::Knife
4
4
 
5
+ require 'chef/data_bag'
6
+ require 'chef/encrypted_data_bag_item'
5
7
  require 'chef/knife/helpers'
6
8
  require 'fileutils'
7
9
 
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module SoloDataBag
3
- VERSION = '0.4.0'
3
+ VERSION = '1.0.0.beta.1'
4
4
  end
5
5
  end
@@ -46,7 +46,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
46
46
 
47
47
  it 'should create the data bag item' do
48
48
  @knife.run
49
- JSON.parse(File.read(@item_path)).raw_data.should == @input_data
49
+ JSON.parse(File.read(@item_path))['raw_data'].should == @input_data
50
50
  end
51
51
 
52
52
  context 'with --data-bag-path' do
@@ -71,7 +71,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
71
71
 
72
72
  it 'should create the encrypted data bag item' do
73
73
  @knife.run
74
- content = JSON.parse(File.read(@item_path)).raw_data
74
+ content = JSON.parse(File.read(@item_path))['raw_data']
75
75
  @input_data.keys.reject{|i| i == 'id'}.each do |k|
76
76
  content.should have_key k
77
77
  content[k].should_not == @input_data[k]
@@ -91,7 +91,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
91
91
 
92
92
  it 'should create the encrypted data bag item' do
93
93
  @knife.run
94
- content = JSON.parse(File.read(@item_path)).raw_data
94
+ content = JSON.parse(File.read(@item_path))['raw_data']
95
95
  @input_data.keys.reject{|i| i == 'id'}.each do |k|
96
96
  content.should have_key k
97
97
  content[k].should_not == @input_data[k]
@@ -112,7 +112,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
112
112
 
113
113
  it 'creates the encrypted data bag item' do
114
114
  @knife.run
115
- content = JSON.parse(File.read(@item_path)).raw_data
115
+ content = JSON.parse(File.read(@item_path))['raw_data']
116
116
  @input_data.keys.reject{|i| i == 'id'}.each do |k|
117
117
  content.should have_key k
118
118
  content[k].should_not == @input_data[k]
@@ -133,7 +133,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
133
133
 
134
134
  it 'should create the data bag item' do
135
135
  @knife.run
136
- JSON.parse(File.read(@item_path)).raw_data.should == @input_data
136
+ JSON.parse(File.read(@item_path))['raw_data'].should == @input_data
137
137
  end
138
138
 
139
139
  context 'when encrypting with -s or --secret' do
@@ -144,7 +144,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
144
144
 
145
145
  it 'should create the encrypted data bag item' do
146
146
  @knife.run
147
- content = JSON.parse(File.read(@item_path)).raw_data
147
+ content = JSON.parse(File.read(@item_path))['raw_data']
148
148
  @input_data.keys.reject{|i| i == 'id'}.each do |k|
149
149
  content.should have_key k
150
150
  content[k].should_not == @input_data[k]
@@ -164,7 +164,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
164
164
 
165
165
  it 'should create the encrypted data bag item' do
166
166
  @knife.run
167
- content = JSON.parse(File.read(@item_path)).raw_data
167
+ content = JSON.parse(File.read(@item_path))['raw_data']
168
168
  @input_data.keys.reject{|i| i == 'id'}.each do |k|
169
169
  content.should have_key k
170
170
  content[k].should_not == @input_data[k]
@@ -185,7 +185,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
185
185
 
186
186
  it 'creates the encrypted data bag item' do
187
187
  @knife.run
188
- content = JSON.parse(File.read(@item_path)).raw_data
188
+ content = JSON.parse(File.read(@item_path))['raw_data']
189
189
  @input_data.keys.reject{|i| i == 'id'}.each do |k|
190
190
  content.should have_key k
191
191
  content[k].should_not == @input_data[k]
@@ -207,7 +207,7 @@ describe KnifeSoloDataBag::SoloDataBagCreate do
207
207
 
208
208
  it 'creates the data bag item' do
209
209
  @knife.run
210
- JSON.parse(File.read(@item_path)).raw_data.should == @input_data
210
+ JSON.parse(File.read(@item_path))['raw_data'].should == @input_data
211
211
  end
212
212
  end
213
213
 
@@ -55,7 +55,7 @@ describe KnifeSoloDataBag::SoloDataBagEdit do
55
55
 
56
56
  it 'should edit the data bag item' do
57
57
  @knife.run
58
- JSON.parse(File.read(@item_path)).raw_data.should == @updated_data
58
+ JSON.parse(File.read(@item_path))['raw_data'].should == @updated_data
59
59
  end
60
60
 
61
61
  it 'should write pretty json' do
@@ -83,7 +83,7 @@ describe KnifeSoloDataBag::SoloDataBagEdit do
83
83
 
84
84
  it 'uses the data bag path from the override' do
85
85
  @knife.run
86
- data = JSON.parse(File.read(@override_item_path)).raw_data
86
+ data = JSON.parse(File.read(@override_item_path))['raw_data']
87
87
  data.should == @updated_data
88
88
  end
89
89
  end
@@ -98,7 +98,7 @@ describe KnifeSoloDataBag::SoloDataBagEdit do
98
98
 
99
99
  it 'should edit the encrypted data bag item' do
100
100
  @knife.run
101
- content = JSON.parse(File.read(@item_path)).raw_data
101
+ content = JSON.parse(File.read(@item_path))['raw_data']
102
102
  content['who'].should_not == @orig_data['who']
103
103
  content['who'].should_not be_nil
104
104
  end
@@ -118,7 +118,7 @@ describe KnifeSoloDataBag::SoloDataBagEdit do
118
118
 
119
119
  it 'should edit the encrypted data bag item' do
120
120
  @knife.run
121
- content = JSON.parse(File.read(@item_path)).raw_data
121
+ content = JSON.parse(File.read(@item_path))['raw_data']
122
122
  content['who'].should_not == @orig_data['who']
123
123
  content['who'].should_not be_nil
124
124
  end
@@ -140,7 +140,7 @@ describe KnifeSoloDataBag::SoloDataBagEdit do
140
140
 
141
141
  it 'should edit the encrypted data bag item' do
142
142
  @knife.run
143
- content = JSON.parse(File.read(@item_path)).raw_data
143
+ content = JSON.parse(File.read(@item_path))['raw_data']
144
144
  content['who'].should_not == @orig_data['who']
145
145
  content['who'].should_not be_nil
146
146
  end
metadata CHANGED
@@ -1,32 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-solo_data_bag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
5
- prerelease:
4
+ version: 1.0.0.beta.1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Tommy Bishop
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-31 00:00:00.000000000 Z
12
+ date: 2014-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: chef
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 0.10.10
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 0.10.10
30
14
  - !ruby/object:Gem::Dependency
31
15
  name: rake
32
16
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +34,7 @@ dependencies:
50
34
  requirements:
51
35
  - - ~>
52
36
  - !ruby/object:Gem::Version
53
- version: 2.10.0
37
+ version: 2.13.0
54
38
  type: :development
55
39
  prerelease: false
56
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +42,7 @@ dependencies:
58
42
  requirements:
59
43
  - - ~>
60
44
  - !ruby/object:Gem::Version
61
- version: 2.10.0
45
+ version: 2.13.0
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: fakefs
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +68,17 @@ extra_rdoc_files: []
84
68
  files:
85
69
  - .gitignore
86
70
  - .rspec
71
+ - .ruby-gemset
87
72
  - .travis.yml
88
73
  - CHANGELOG.md
89
74
  - Gemfile
90
75
  - LICENSE
91
76
  - README.md
92
77
  - Rakefile
93
- - gemfiles/Gemfile.chef.0.10.10
94
- - gemfiles/Gemfile.chef.10.12.0
95
- - gemfiles/Gemfile.chef.10.14.0
96
- - gemfiles/Gemfile.chef.10.16.0
78
+ - gemfiles/Gemfile.chef.11.4.4
79
+ - gemfiles/Gemfile.chef.11.6.2
80
+ - gemfiles/Gemfile.chef.11.8.0
81
+ - gemfiles/Gemfile.chef.11.8.2
97
82
  - knife-solo_data_bag.gemspec
98
83
  - lib/chef/knife/helpers.rb
99
84
  - lib/chef/knife/solo_data_bag_create.rb
@@ -123,21 +108,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
- segments:
127
- - 0
128
- hash: -422012811052713416
129
111
  required_rubygems_version: !ruby/object:Gem::Requirement
130
112
  none: false
131
113
  requirements:
132
- - - ! '>='
114
+ - - ! '>'
133
115
  - !ruby/object:Gem::Version
134
- version: '0'
135
- segments:
136
- - 0
137
- hash: -422012811052713416
116
+ version: 1.3.1
138
117
  requirements: []
139
118
  rubyforge_project:
140
- rubygems_version: 1.8.24
119
+ rubygems_version: 1.8.23
141
120
  signing_key:
142
121
  specification_version: 3
143
122
  summary: A knife plugin for working with data bags and chef solo