chef 0.9.10.rc.2 → 0.9.10.rc.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,9 +95,11 @@ class Chef
95
95
  r = Array.new
96
96
  q = Chef::Search::Query.new
97
97
  @action_nodes = q.search(:node, @name_args[0])[0]
98
- r = @action_nodes.map do |item|
99
- format_for_display(item)[config[:attribute]]
98
+ @action_nodes.each do |item|
99
+ i = format_for_display(item)[config[:attribute]]
100
+ r.push(i) unless i.nil?
100
101
  end
102
+ r
101
103
  end
102
104
  (Chef::Log.fatal("No nodes returned from search!"); exit 10) if list.length == 0
103
105
  session_from_list(list)
@@ -39,7 +39,7 @@ class Chef
39
39
  Chef::Log.debug("Checking for mount point #{@current_resource.mount_point}")
40
40
 
41
41
  # only check for existence of non-remote devices
42
- if(@new_resource.device !~ /:/ && @new_resource.device !~ /\/\// && !::File.exists?(device_real) )
42
+ if (device_should_exist? && !::File.exists?(device_real) )
43
43
  raise Chef::Exceptions::Mount, "Device #{@new_resource.device} does not exist"
44
44
  elsif( !::File.exists?(@new_resource.mount_point) )
45
45
  raise Chef::Exceptions::Mount, "Mount point #{@new_resource.mount_point} does not exist"
@@ -164,7 +164,12 @@ class Chef
164
164
  end
165
165
  end
166
166
 
167
+ def device_should_exist?
168
+ @new_resource.device !~ /:/ && @new_resource.device !~ /\/\// && @new_resource.device != "tmpfs"
169
+ end
170
+
167
171
  private
172
+
168
173
  def device_fstab
169
174
  case @new_resource.device_type
170
175
  when :device
@@ -17,5 +17,5 @@
17
17
 
18
18
  class Chef
19
19
  CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__)))
20
- VERSION = '0.9.10.rc.2'
20
+ VERSION = '0.9.10.rc.3'
21
21
  end
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 9
8
8
  - 10
9
9
  - rc
10
- - 2
11
- version: 0.9.10.rc.2
10
+ - 3
11
+ version: 0.9.10.rc.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Adam Jacob
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-08 00:00:00 -07:00
19
+ date: 2010-10-12 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency