chef 0.10.0.beta.0 → 0.10.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/exec.rb +0 -1
- data/lib/chef/knife/search.rb +12 -6
- data/lib/chef/version.rb +1 -1
- metadata +2 -2
data/lib/chef/knife/exec.rb
CHANGED
data/lib/chef/knife/search.rb
CHANGED
@@ -87,13 +87,19 @@ class Chef
|
|
87
87
|
Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
|
88
88
|
rows = config[:rows] ? config[:rows] : 20
|
89
89
|
start = config[:start] ? config[:start] : 0
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
formatted_item
|
90
|
+
begin
|
91
|
+
q.search(@name_args[0], query, config[:sort], start, rows) do |item|
|
92
|
+
formatted_item = format_for_display(item)
|
93
|
+
if formatted_item.respond_to?(:has_key?) && !formatted_item.has_key?('id')
|
94
|
+
formatted_item['id'] = item.has_key?('id') ? item['id'] : item.name
|
95
|
+
end
|
96
|
+
display[:rows] << formatted_item
|
97
|
+
display[:total] += 1
|
94
98
|
end
|
95
|
-
|
96
|
-
|
99
|
+
rescue Net::HTTPServerException => e
|
100
|
+
msg = Chef::JSONCompat.from_json(e.response.body)["error"].first
|
101
|
+
ui.msg("knife search failed: #{msg}")
|
102
|
+
exit 1
|
97
103
|
end
|
98
104
|
|
99
105
|
if config[:id_only]
|
data/lib/chef/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 7
|
5
|
-
version: 0.10.0.beta.
|
5
|
+
version: 0.10.0.beta.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Adam Jacob
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-29 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|