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.
@@ -32,7 +32,6 @@ class Chef::Knife::Exec < Chef::Knife
32
32
  end
33
33
 
34
34
  def run
35
- late_load_deps
36
35
  scripts = Array(name_args)
37
36
  context = Object.new
38
37
  Shef::Extensions.extend_context_object(context)
@@ -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
- q.search(@name_args[0], query, config[:sort], start, rows) do |item|
91
- formatted_item = format_for_display(item)
92
- if formatted_item.respond_to?(:has_key?) && !formatted_item.has_key?('id')
93
- formatted_item['id'] = item.has_key?('id') ? item['id'] : item.name
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
- display[:rows] << formatted_item
96
- display[:total] += 1
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
@@ -17,7 +17,7 @@
17
17
 
18
18
  class Chef
19
19
  CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__)))
20
- VERSION = '0.10.0.beta.0'
20
+ VERSION = '0.10.0.beta.1'
21
21
  end
22
22
 
23
23
  # NOTE: the Chef::Version class is defined in version_class.rb
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.0
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-28 00:00:00 -07:00
13
+ date: 2011-03-29 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency