knife-essentials 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/list_essentials.rb +2 -2
- data/lib/chef_fs.rb +2 -4
- data/lib/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +1 -0
- data/lib/chef_fs/file_system/chef_server_root_dir.rb +1 -0
- data/lib/chef_fs/path_utils.rb +1 -1
- data/lib/chef_fs/version.rb +1 -1
- data/spec/chef_fs/file_pattern_spec.rb +2 -2
- data/spec/chef_fs/file_system/cookbooks_dir_spec.rb +1 -0
- data/spec/integration/list_spec.rb +2 -2
- data/spec/support/knife_support.rb +7 -2
- metadata +2 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'chef_fs/knife'
|
2
2
|
require 'chef_fs/file_system'
|
3
|
+
require 'highline'
|
3
4
|
|
4
5
|
class Chef
|
5
6
|
class Knife
|
@@ -117,8 +118,7 @@ class Chef
|
|
117
118
|
if config[:one_column] || !stdout.isatty
|
118
119
|
columns = 0
|
119
120
|
else
|
120
|
-
|
121
|
-
columns = Integer(`tput cols`)
|
121
|
+
columns = HighLine::SystemExtensions.terminal_size[0]
|
122
122
|
end
|
123
123
|
current_line = ''
|
124
124
|
results.each do |result|
|
data/lib/chef_fs.rb
CHANGED
data/lib/chef_fs/path_utils.rb
CHANGED
data/lib/chef_fs/version.rb
CHANGED
@@ -157,7 +157,7 @@ describe ChefFS::FilePattern do
|
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
160
|
-
context 'with simple pattern "a\*\b"' do
|
160
|
+
context 'with simple pattern "a\*\b"', :pending => (Chef::Platform.windows?) do
|
161
161
|
let(:pattern) { ChefFS::FilePattern.new('a\*\b') }
|
162
162
|
it 'match?' do
|
163
163
|
pattern.match?('a*b').should be_true
|
@@ -264,7 +264,7 @@ describe ChefFS::FilePattern do
|
|
264
264
|
end
|
265
265
|
end
|
266
266
|
|
267
|
-
context 'with star pattern "/abc/d[a-z][0-9]f/ghi"' do
|
267
|
+
context 'with star pattern "/abc/d[a-z][0-9]f/ghi"', :pending => (Chef::Platform.windows?) do
|
268
268
|
let(:pattern) { ChefFS::FilePattern.new('/abc/d[a-z][0-9]f/ghi') }
|
269
269
|
it 'match?' do
|
270
270
|
pattern.match?('/abc/de1f/ghi').should be_true
|
@@ -565,6 +565,7 @@ describe ChefFS::FileSystem::CookbooksDir do
|
|
565
565
|
nonexistent_child.dir?.should be_false
|
566
566
|
end
|
567
567
|
it 'read returns NotFoundError' do
|
568
|
+
should_list_cookbooks
|
568
569
|
expect { nonexistent_child.read }.to raise_error(ChefFS::FileSystem::NotFoundError)
|
569
570
|
end
|
570
571
|
end
|
@@ -344,7 +344,7 @@ EOM
|
|
344
344
|
end
|
345
345
|
end
|
346
346
|
|
347
|
-
when_the_repository 'has a cookbooks directory and a symlinked cookbooks directory' do
|
347
|
+
when_the_repository 'has a cookbooks directory and a symlinked cookbooks directory', :pending => (Chef::Platform.windows?) do
|
348
348
|
directory 'cookbooks'
|
349
349
|
symlink 'symlinked', 'cookbooks'
|
350
350
|
|
@@ -379,7 +379,7 @@ EOM
|
|
379
379
|
end
|
380
380
|
end
|
381
381
|
|
382
|
-
when_the_repository 'has a real_cookbooks directory and a cookbooks symlink to it' do
|
382
|
+
when_the_repository 'has a real_cookbooks directory and a cookbooks symlink to it', :pending => (Chef::Platform.windows?) do
|
383
383
|
directory 'real_cookbooks'
|
384
384
|
symlink 'cookbooks', 'real_cookbooks'
|
385
385
|
|
@@ -105,11 +105,16 @@ module KnifeSupport
|
|
105
105
|
else
|
106
106
|
stderr_actual.should == expected[:stderr]
|
107
107
|
end
|
108
|
+
stdout_actual = @stdout
|
109
|
+
if Chef::Platform.windows?
|
110
|
+
stderr_actual = stderr_actual.gsub("\r\n", "\n")
|
111
|
+
stdout_actual = stdout_actual.gsub("\r\n", "\n")
|
112
|
+
end
|
108
113
|
@exit_code.should == expected[:exit_code]
|
109
114
|
if expected[:stdout].is_a?(Regexp)
|
110
|
-
|
115
|
+
stdout_actual.should =~ expected[:stdout]
|
111
116
|
else
|
112
|
-
|
117
|
+
stdout_actual.should == expected[:stdout]
|
113
118
|
end
|
114
119
|
end
|
115
120
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-essentials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef-zero
|