knife-chop 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -3
- data/VERSION +1 -1
- data/knife-chop.gemspec +1 -0
- data/lib/chef/knife/chop/cookbook_upload.rb +8 -2
- data/lib/chef/knife/chop/data_bag_from_file.rb +3 -0
- data/lib/chef/knife/chop_base.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b077953c883233a9ed946bc175f3d8646ffaf022
|
4
|
+
data.tar.gz: 862a23a7b9276fe78f49498e895cdfd2ec6c35f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea2febe762e151a4731fb448986c501bc9b7441367fa1e241676b8241cc8450b26699f351fbd89c8173230e541b345cf2496b588176d3a1496b2a8d766a39a0
|
7
|
+
data.tar.gz: f270a79100f42ccfc1d776659024c5728c379a957e897d924e650100c81d18b435b50593ab619f4ebe2cabfd14684d9a0a867d58d74256cc5be411f3bd6de9c0
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
knife-chop (0.9.
|
4
|
+
knife-chop (0.9.1)
|
5
5
|
awesome_print (~> 1.2, >= 1.2.0)
|
6
6
|
chef (~> 12.0, >= 12.0)
|
7
7
|
colorize (~> 0.7, >= 0.7.1)
|
8
|
+
ffi-yajl (~> 1.2)
|
8
9
|
inifile (~> 3.0, >= 3.0.0)
|
9
10
|
json (~> 1.8, >= 1.8.1)
|
10
11
|
logging (~> 1.8, >= 1.8.2)
|
@@ -42,9 +43,9 @@ GEM
|
|
42
43
|
diff-lcs (1.2.5)
|
43
44
|
erubis (2.7.0)
|
44
45
|
ffi (1.9.6)
|
45
|
-
ffi-yajl (1.
|
46
|
+
ffi-yajl (1.2.0)
|
46
47
|
ffi (~> 1.5)
|
47
|
-
libyajl2 (~> 1.
|
48
|
+
libyajl2 (~> 1.0)
|
48
49
|
hashie (2.1.2)
|
49
50
|
highline (1.6.21)
|
50
51
|
inifile (3.0.0)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.1
|
data/knife-chop.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_dependency 'json', [">= 1.8.1", "~> 1.8"]
|
27
27
|
s.add_dependency 'mixlib-config', [">= 2.1.0", "~> 2.1"]
|
28
28
|
s.add_dependency 'safe_yaml', [">= 1.0.4", '~> 1.0']
|
29
|
+
s.add_dependency 'ffi-yajl', ['~> 1.2']
|
29
30
|
|
30
31
|
s.add_development_dependency 'rubygems-tasks', '~> 0'
|
31
32
|
|
@@ -34,7 +34,9 @@ end
|
|
34
34
|
|
35
35
|
class ::Chef::Knife::CookbookUpload
|
36
36
|
def run
|
37
|
-
|
37
|
+
unless Chef::VERSION.match(%r/^(11|12)\./)
|
38
|
+
raise StandardError.new("I was crafted from Chef::VERSION == '11.x'. Please verify that #{self.class.name}.run is still relevant in your version == '#{Chef::VERSION}'!")
|
39
|
+
end
|
38
40
|
# Sanity check before we load anything from the server
|
39
41
|
unless config[:all]
|
40
42
|
if @name_args.empty?
|
@@ -141,9 +143,13 @@ class ::Chef::Knife::CookbookUpload
|
|
141
143
|
end
|
142
144
|
end
|
143
145
|
|
146
|
+
if Chef::VERSION.split('\.')[0].to_i < 12
|
147
|
+
# DLDInternet monkey patch of original
|
144
148
|
def upload(cookbooks, justify_width)
|
145
149
|
cookbooks.each do |cb|
|
150
|
+
# BEGIN changes DLDInternet
|
146
151
|
ui.step("Uploading #{cb.name.to_s.ljust(justify_width + 10)} [#{cb.version}]")
|
152
|
+
# END changes DLDInternet
|
147
153
|
check_for_broken_links!(cb)
|
148
154
|
check_for_dependencies!(cb)
|
149
155
|
end
|
@@ -152,6 +158,6 @@ class ::Chef::Knife::CookbookUpload
|
|
152
158
|
ui.error e
|
153
159
|
raise
|
154
160
|
end
|
155
|
-
|
161
|
+
end
|
156
162
|
end
|
157
163
|
|
@@ -15,6 +15,7 @@ class ::Chef::Knife::DataBagFromFile
|
|
15
15
|
@location = 'data_bags'
|
16
16
|
end
|
17
17
|
|
18
|
+
if Chef::VERSION.split('\.')[0].to_i < 12
|
18
19
|
# DLDInternet monkey patch of original
|
19
20
|
def load_data_bag_items(data_bag, items = nil)
|
20
21
|
items ||= find_all_data_bag_items(data_bag)
|
@@ -35,5 +36,7 @@ class ::Chef::Knife::DataBagFromFile
|
|
35
36
|
ui.info("Updated data_bag_item[#{dbag.data_bag}::#{dbag.id}]")
|
36
37
|
# END changes DLDInternet
|
37
38
|
end
|
39
|
+
|
40
|
+
end
|
38
41
|
end
|
39
42
|
end
|
data/lib/chef/knife/chop_base.rb
CHANGED
@@ -507,6 +507,7 @@ class Chef
|
|
507
507
|
options = @config unless options
|
508
508
|
if options.key?(:inifile)
|
509
509
|
logStep "Parse INI file - #{options[:inifile]}"
|
510
|
+
options[:inifile] = File.expand_path(options[:inifile])
|
510
511
|
raise ChopError.new("Cannot find inifile (#{options[:inifile]})") unless File.exist?(options[:inifile])
|
511
512
|
raise ChopError.new("Recursive call to inifile == '#{options[:inifile]}'") if @inis.include?(options[:inifile])
|
512
513
|
ini = nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-chop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christo De Lange
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -170,6 +170,20 @@ dependencies:
|
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '1.0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: ffi-yajl
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '1.2'
|
180
|
+
type: :runtime
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - "~>"
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '1.2'
|
173
187
|
- !ruby/object:Gem::Dependency
|
174
188
|
name: rubygems-tasks
|
175
189
|
requirement: !ruby/object:Gem::Requirement
|