chef 0.8.10 → 0.8.14

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of chef might be problematic. Click here for more details.

Files changed (105) hide show
  1. data/bin/chef-client +2 -2
  2. data/bin/chef-solo +1 -2
  3. data/bin/knife +1 -2
  4. data/bin/shef +2 -5
  5. data/lib/chef.rb +11 -7
  6. data/lib/chef/application.rb +25 -20
  7. data/lib/chef/application/client.rb +12 -7
  8. data/lib/chef/application/knife.rb +7 -1
  9. data/lib/chef/application/solo.rb +1 -1
  10. data/lib/chef/applications.rb +4 -0
  11. data/lib/chef/cache/checksum.rb +7 -6
  12. data/lib/chef/certificate.rb +2 -2
  13. data/lib/chef/client.rb +28 -4
  14. data/lib/chef/config.rb +4 -3
  15. data/lib/chef/cookbook_loader.rb +6 -1
  16. data/lib/chef/daemon.rb +2 -0
  17. data/lib/chef/data_bag_item.rb +2 -1
  18. data/lib/chef/exceptions.rb +5 -0
  19. data/lib/chef/file_cache.rb +18 -18
  20. data/lib/chef/index_queue/indexable.rb +5 -3
  21. data/lib/chef/knife.rb +45 -13
  22. data/lib/chef/knife/client_list.rb +1 -1
  23. data/lib/chef/knife/client_show.rb +1 -1
  24. data/lib/chef/knife/configure.rb +47 -36
  25. data/lib/chef/knife/cookbook_list.rb +1 -1
  26. data/lib/chef/knife/cookbook_metadata.rb +22 -27
  27. data/lib/chef/knife/cookbook_metadata_from_file.rb +40 -0
  28. data/lib/chef/knife/cookbook_show.rb +2 -2
  29. data/lib/chef/knife/cookbook_site_download.rb +57 -0
  30. data/lib/chef/knife/cookbook_site_list.rb +55 -0
  31. data/lib/chef/knife/cookbook_site_search.rb +50 -0
  32. data/lib/chef/knife/cookbook_site_show.rb +56 -0
  33. data/lib/chef/knife/cookbook_site_vendor.rb +114 -0
  34. data/lib/chef/knife/cookbook_test.rb +103 -0
  35. data/lib/chef/knife/cookbook_upload.rb +29 -38
  36. data/lib/chef/knife/data_bag_edit.rb +1 -1
  37. data/lib/chef/knife/data_bag_list.rb +2 -2
  38. data/lib/chef/knife/data_bag_show.rb +1 -1
  39. data/lib/chef/knife/ec2_instance_data.rb +1 -1
  40. data/lib/chef/knife/index_rebuild.rb +2 -2
  41. data/lib/chef/knife/node_from_file.rb +1 -1
  42. data/lib/chef/knife/node_list.rb +2 -2
  43. data/lib/chef/knife/node_run_list_add.rb +1 -1
  44. data/lib/chef/knife/node_run_list_remove.rb +1 -1
  45. data/lib/chef/knife/node_show.rb +1 -1
  46. data/lib/chef/knife/rackspace_server_create.rb +156 -0
  47. data/lib/chef/knife/rackspace_server_delete.rb +57 -0
  48. data/lib/chef/knife/rackspace_server_list.rb +59 -0
  49. data/lib/chef/knife/role_from_file.rb +1 -1
  50. data/lib/chef/knife/role_list.rb +1 -1
  51. data/lib/chef/knife/role_show.rb +1 -1
  52. data/lib/chef/knife/search.rb +1 -1
  53. data/lib/chef/knife/ssh.rb +21 -4
  54. data/lib/chef/knife/terremark_server_create.rb +152 -0
  55. data/lib/chef/knife/terremark_server_delete.rb +87 -0
  56. data/lib/chef/knife/terremark_server_list.rb +77 -0
  57. data/lib/chef/mixin/command.rb +11 -9
  58. data/lib/chef/mixin/params_validate.rb +1 -1
  59. data/lib/chef/mixin/recipe_definition_dsl_core.rb +4 -1
  60. data/lib/chef/mixin/template.rb +6 -5
  61. data/lib/chef/mixin/xml_escape.rb +3 -3
  62. data/lib/chef/mixins.rb +16 -0
  63. data/lib/chef/node.rb +53 -52
  64. data/lib/chef/openid_registration.rb +0 -1
  65. data/lib/chef/platform.rb +171 -137
  66. data/lib/chef/provider.rb +2 -2
  67. data/lib/chef/provider/cron.rb +22 -22
  68. data/lib/chef/provider/deploy/revision.rb +5 -1
  69. data/lib/chef/provider/erl_call.rb +2 -2
  70. data/lib/chef/provider/file.rb +44 -23
  71. data/lib/chef/provider/group/dscl.rb +6 -4
  72. data/lib/chef/provider/mdadm.rb +0 -4
  73. data/lib/chef/provider/mount/mount.rb +20 -8
  74. data/lib/chef/provider/package.rb +1 -1
  75. data/lib/chef/provider/package/freebsd.rb +22 -18
  76. data/lib/chef/provider/package/rubygems.rb +7 -10
  77. data/lib/chef/provider/remote_directory.rb +15 -0
  78. data/lib/chef/provider/remote_file.rb +73 -50
  79. data/lib/chef/provider/script.rb +10 -8
  80. data/lib/chef/provider/service/windows.rb +129 -0
  81. data/lib/chef/provider/subversion.rb +1 -1
  82. data/lib/chef/provider/template.rb +51 -50
  83. data/lib/chef/providers.rb +80 -0
  84. data/lib/chef/recipe.rb +2 -4
  85. data/lib/chef/resource.rb +21 -7
  86. data/lib/chef/resource/cron.rb +14 -5
  87. data/lib/chef/resource/deploy.rb +52 -45
  88. data/lib/chef/resource/execute.rb +1 -1
  89. data/lib/chef/resource/file.rb +16 -8
  90. data/lib/chef/resource/mount.rb +1 -1
  91. data/lib/chef/resource/remote_directory.rb +19 -10
  92. data/lib/chef/resource/scm.rb +23 -16
  93. data/lib/chef/resource/service.rb +10 -1
  94. data/lib/chef/resources.rb +60 -0
  95. data/lib/chef/rest.rb +234 -189
  96. data/lib/chef/rest/auth_credentials.rb +78 -0
  97. data/lib/chef/{application/server.rb → rest/cookie_jar.rb} +18 -6
  98. data/lib/chef/rest/rest_request.rb +151 -0
  99. data/lib/chef/role.rb +38 -46
  100. data/lib/chef/streaming_cookbook_uploader.rb +8 -2
  101. data/lib/chef/tasks/chef_repo.rake +14 -4
  102. data/lib/chef/util/file_edit.rb +0 -1
  103. data/lib/chef/webui_user.rb +0 -1
  104. metadata +46 -9
  105. data/distro/suse/etc/init.d/chef-client +0 -121
@@ -0,0 +1,80 @@
1
+ #
2
+ # Author:: Daniel DeLeo (<dan@opscode.com>)
3
+ # Copyright:: Copyright (c) 2010 Opscode, Inc.
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'chef/provider/breakpoint'
20
+ require 'chef/provider/cron'
21
+ require 'chef/provider/deploy'
22
+ require 'chef/provider/directory'
23
+ require 'chef/provider/erl_call'
24
+ require 'chef/provider/execute'
25
+ require 'chef/provider/file'
26
+ require 'chef/provider/git'
27
+ require 'chef/provider/group'
28
+ require 'chef/provider/http_request'
29
+ require 'chef/provider/ifconfig'
30
+ require 'chef/provider/link'
31
+ require 'chef/provider/log'
32
+ require 'chef/provider/mdadm'
33
+ require 'chef/provider/mount'
34
+ require 'chef/provider/package'
35
+ require 'chef/provider/remote_directory'
36
+ require 'chef/provider/remote_file'
37
+ require 'chef/provider/route'
38
+ require 'chef/provider/ruby_block'
39
+ require 'chef/provider/script'
40
+ require 'chef/provider/service'
41
+ require 'chef/provider/subversion'
42
+ require 'chef/provider/template'
43
+ require 'chef/provider/user'
44
+
45
+ require 'chef/provider/package/apt'
46
+ require 'chef/provider/package/dpkg'
47
+ require 'chef/provider/package/easy_install'
48
+ require 'chef/provider/package/freebsd'
49
+ require 'chef/provider/package/macports'
50
+ require 'chef/provider/package/pacman'
51
+ require 'chef/provider/package/portage'
52
+ require 'chef/provider/package/rpm'
53
+ require 'chef/provider/package/rubygems'
54
+ require 'chef/provider/package/yum'
55
+ require 'chef/provider/package/zypper'
56
+
57
+ require 'chef/provider/service/arch'
58
+ require 'chef/provider/service/debian'
59
+ require 'chef/provider/service/freebsd'
60
+ require 'chef/provider/service/gentoo'
61
+ require 'chef/provider/service/init'
62
+ require 'chef/provider/service/redhat'
63
+ require 'chef/provider/service/simple'
64
+ require 'chef/provider/service/upstart'
65
+ require 'chef/provider/service/windows'
66
+
67
+ require 'chef/provider/user/dscl'
68
+ require 'chef/provider/user/pw'
69
+ require 'chef/provider/user/useradd'
70
+
71
+ require 'chef/provider/group/dscl'
72
+ require 'chef/provider/group/gpasswd'
73
+ require 'chef/provider/group/groupadd'
74
+ require 'chef/provider/group/pw'
75
+ require 'chef/provider/group/usermod'
76
+
77
+ require 'chef/provider/mount/mount'
78
+
79
+ require 'chef/provider/deploy/revision'
80
+ require 'chef/provider/deploy/timestamped'
@@ -17,15 +17,13 @@
17
17
  # limitations under the License.
18
18
  #
19
19
 
20
- require 'chef/resource'
21
- Dir[File.join(File.dirname(__FILE__), 'resource/**/*.rb')].sort.each { |lib| require lib }
20
+
21
+ require 'chef/mixin/recipe_definition_dsl_core'
22
22
  require 'chef/mixin/from_file'
23
23
  require 'chef/mixin/language'
24
24
  require 'chef/mixin/language_include_recipe'
25
- require 'chef/mixin/recipe_definition_dsl_core'
26
25
  require 'chef/resource_collection'
27
26
  require 'chef/cookbook_loader'
28
- require 'chef/rest'
29
27
 
30
28
  class Chef
31
29
  class Recipe
@@ -80,7 +80,7 @@ class Chef
80
80
  prior_resource = @collection.lookup(self.to_s)
81
81
  Chef::Log.debug("Setting #{self.to_s} to the state of the prior #{self.to_s}")
82
82
  prior_resource.instance_variables.each do |iv|
83
- unless iv == "@source_line" || iv == "@action"
83
+ unless iv.to_sym == :@source_line || iv.to_sym == :@action
84
84
  self.instance_variable_set(iv, prior_resource.instance_variable_get(iv))
85
85
  end
86
86
  end
@@ -162,10 +162,18 @@ class Chef
162
162
  if args.size > 1
163
163
  notifies_helper(*args)
164
164
  else
165
- resources_array = *args
166
- resources_array.each do |resource|
167
- resource.each do |key, value|
168
- notifies_helper(value[0], key, value[1])
165
+ # This syntax is so weird. surely people will just give us one hash?
166
+ notifications = args.flatten
167
+ notifications.each do |resources_notifications|
168
+ begin
169
+ resources_notifications.each do |resource, notification|
170
+ Chef::Log.error "resource KV: `#{resource.inspect}' => `#{notification.inspect}'"
171
+ notifies_helper(notification[0], resource, notification[1])
172
+ end
173
+ rescue NoMethodError
174
+ Chef::Log.fatal("encountered NME processing resource #{resources_notifications.inspect}")
175
+ Chef::Log.fatal("incoming args: #{args.inspect}")
176
+ raise
169
177
  end
170
178
  end
171
179
  end
@@ -193,7 +201,11 @@ class Chef
193
201
  end
194
202
 
195
203
  def is(*args)
196
- return *args
204
+ if args.size == 1
205
+ args.first
206
+ else
207
+ return *args
208
+ end
197
209
  end
198
210
 
199
211
  def to_s
@@ -216,7 +228,9 @@ class Chef
216
228
  def to_hash
217
229
  instance_vars = Hash.new
218
230
  self.instance_variables.each do |iv|
219
- instance_vars[iv.sub(/^@/,'').to_sym] = self.instance_variable_get(iv) unless iv == "@collection"
231
+ iv = iv.to_s
232
+ next if iv == "@collection"
233
+ instance_vars[iv.sub(/^@/,'').to_sym] = self.instance_variable_get(iv)
220
234
  end
221
235
  instance_vars
222
236
  end
@@ -47,7 +47,7 @@ class Chef
47
47
  converted_arg = arg
48
48
  end
49
49
  begin
50
- if Integer(arg) > 59 then raise RangeError end
50
+ if integerize(arg) > 59 then raise RangeError end
51
51
  rescue ArgumentError
52
52
  end
53
53
  set_or_return(
@@ -64,7 +64,7 @@ class Chef
64
64
  converted_arg = arg
65
65
  end
66
66
  begin
67
- if Integer(arg) > 23 then raise RangeError end
67
+ if integerize(arg) > 23 then raise RangeError end
68
68
  rescue ArgumentError
69
69
  end
70
70
  set_or_return(
@@ -81,7 +81,7 @@ class Chef
81
81
  converted_arg = arg
82
82
  end
83
83
  begin
84
- if Integer(arg) > 31 then raise RangeError end
84
+ if integerize(arg) > 31 then raise RangeError end
85
85
  rescue ArgumentError
86
86
  end
87
87
  set_or_return(
@@ -98,7 +98,7 @@ class Chef
98
98
  converted_arg = arg
99
99
  end
100
100
  begin
101
- if Integer(arg) > 12 then raise RangeError end
101
+ if integerize(arg) > 12 then raise RangeError end
102
102
  rescue ArgumentError
103
103
  end
104
104
  set_or_return(
@@ -115,7 +115,7 @@ class Chef
115
115
  converted_arg = arg
116
116
  end
117
117
  begin
118
- if Integer(arg) > 7 then raise RangeError end
118
+ if integerize(arg) > 7 then raise RangeError end
119
119
  rescue ArgumentError
120
120
  end
121
121
  set_or_return(
@@ -172,6 +172,15 @@ class Chef
172
172
  :kind_of => String
173
173
  )
174
174
  end
175
+
176
+ private
177
+
178
+ # On Ruby 1.8, Kernel#Integer will happily do this for you. On 1.9, no.
179
+ def integerize(integerish)
180
+ Integer(integerish)
181
+ rescue TypeError
182
+ 0
183
+ end
175
184
  end
176
185
  end
177
186
  end
@@ -6,9 +6,9 @@
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
- #
9
+ #
10
10
  # http://www.apache.org/licenses/LICENSE-2.0
11
- #
11
+ #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
14
14
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,20 +38,20 @@ require "chef/resource/scm"
38
38
 
39
39
  class Chef
40
40
  class Resource
41
-
41
+
42
42
  # Deploy: Deploy apps from a source control repository.
43
43
  #
44
44
  # Callbacks:
45
45
  # Callbacks can be a block or a string. If given a block, the code
46
46
  # is evaluated as an embedded recipe, and run at the specified
47
47
  # point in the deploy process. If given a string, the string is taken as
48
- # a path to a callback file/recipe. Paths are evaluated relative to the
48
+ # a path to a callback file/recipe. Paths are evaluated relative to the
49
49
  # release directory. Callback files can contain chef code (resources, etc.)
50
50
  #
51
51
  class Deploy < Chef::Resource
52
-
52
+
53
53
  provider_base Chef::Provider::Deploy
54
-
54
+
55
55
  def initialize(name, collection=nil, node=nil)
56
56
  super(name, collection, node)
57
57
  @resource_name = :deploy
@@ -74,26 +74,26 @@ class Chef
74
74
  @provider = Chef::Provider::Deploy::Timestamped
75
75
  @allowed_actions.push(:force_deploy, :deploy, :rollback)
76
76
  end
77
-
77
+
78
78
  # where the checked out/cloned code goes
79
79
  def destination
80
80
  @destination ||= shared_path + "/#{@repository_cache}"
81
81
  end
82
-
82
+
83
83
  # where shared stuff goes, i.e., logs, tmp, etc. goes here
84
84
  def shared_path
85
85
  @shared_path ||= @deploy_to + "/shared"
86
86
  end
87
-
87
+
88
88
  # where the deployed version of your code goes
89
89
  def current_path
90
90
  @current_path ||= @deploy_to + "/current"
91
91
  end
92
-
92
+
93
93
  def depth
94
94
  @shallow_clone ? "5" : nil
95
95
  end
96
-
96
+
97
97
  # note: deploy_to is your application "meta-root."
98
98
  def deploy_to(arg=nil)
99
99
  set_or_return(
@@ -102,7 +102,7 @@ class Chef
102
102
  :kind_of => [ String ]
103
103
  )
104
104
  end
105
-
105
+
106
106
  def repo(arg=nil)
107
107
  set_or_return(
108
108
  :repo,
@@ -111,7 +111,7 @@ class Chef
111
111
  )
112
112
  end
113
113
  alias :repository :repo
114
-
114
+
115
115
  def remote(arg=nil)
116
116
  set_or_return(
117
117
  :remote,
@@ -119,7 +119,7 @@ class Chef
119
119
  :kind_of => [ String ]
120
120
  )
121
121
  end
122
-
122
+
123
123
  def role(arg=nil)
124
124
  set_or_return(
125
125
  :role,
@@ -127,7 +127,7 @@ class Chef
127
127
  :kind_of => [ String ]
128
128
  )
129
129
  end
130
-
130
+
131
131
  def restart_command(arg=nil, &block)
132
132
  arg ||= block
133
133
  set_or_return(
@@ -137,7 +137,7 @@ class Chef
137
137
  )
138
138
  end
139
139
  alias :restart :restart_command
140
-
140
+
141
141
  def migrate(arg=nil)
142
142
  set_or_return(
143
143
  :migrate,
@@ -145,7 +145,7 @@ class Chef
145
145
  :kind_of => [ TrueClass, FalseClass ]
146
146
  )
147
147
  end
148
-
148
+
149
149
  def migration_command(arg=nil)
150
150
  set_or_return(
151
151
  :migration_command,
@@ -153,7 +153,7 @@ class Chef
153
153
  :kind_of => [ String ]
154
154
  )
155
155
  end
156
-
156
+
157
157
  def user(arg=nil)
158
158
  set_or_return(
159
159
  :user,
@@ -161,15 +161,15 @@ class Chef
161
161
  :kind_of => [ String ]
162
162
  )
163
163
  end
164
-
164
+
165
165
  def group(arg=nil)
166
166
  set_or_return(
167
167
  :group,
168
168
  arg,
169
169
  :kind_of => [ String ]
170
170
  )
171
- end
172
-
171
+ end
172
+
173
173
  def enable_submodules(arg=nil)
174
174
  set_or_return(
175
175
  :enable_submodules,
@@ -177,7 +177,7 @@ class Chef
177
177
  :kind_of => [ TrueClass, FalseClass ]
178
178
  )
179
179
  end
180
-
180
+
181
181
  def shallow_clone(arg=nil)
182
182
  set_or_return(
183
183
  :shallow_clone,
@@ -193,7 +193,7 @@ class Chef
193
193
  :kind_of => [ String ]
194
194
  )
195
195
  end
196
-
196
+
197
197
  def copy_exclude(arg=nil)
198
198
  set_or_return(
199
199
  :copy_exclude,
@@ -201,7 +201,7 @@ class Chef
201
201
  :kind_of => [ String ]
202
202
  )
203
203
  end
204
-
204
+
205
205
  def revision(arg=nil)
206
206
  set_or_return(
207
207
  :revision,
@@ -210,7 +210,7 @@ class Chef
210
210
  )
211
211
  end
212
212
  alias :branch :revision
213
-
213
+
214
214
  def git_ssh_wrapper(arg=nil)
215
215
  set_or_return(
216
216
  :git_ssh_wrapper,
@@ -219,7 +219,7 @@ class Chef
219
219
  )
220
220
  end
221
221
  alias :ssh_wrapper :git_ssh_wrapper
222
-
222
+
223
223
  def svn_username(arg=nil)
224
224
  set_or_return(
225
225
  :svn_username,
@@ -227,7 +227,7 @@ class Chef
227
227
  :kind_of => [ String ]
228
228
  )
229
229
  end
230
-
230
+
231
231
  def svn_password(arg=nil)
232
232
  set_or_return(
233
233
  :svn_password,
@@ -235,7 +235,7 @@ class Chef
235
235
  :kind_of => [ String ]
236
236
  )
237
237
  end
238
-
238
+
239
239
  def svn_arguments(arg=nil)
240
240
  set_or_return(
241
241
  :svn_arguments,
@@ -243,7 +243,14 @@ class Chef
243
243
  :kind_of => [ String ]
244
244
  )
245
245
  end
246
-
246
+
247
+ def svn_info_args(arg=nil)
248
+ set_or_return(
249
+ :svn_arguments,
250
+ arg,
251
+ :kind_of => [ String ])
252
+ end
253
+
247
254
  def scm_provider(arg=nil)
248
255
  klass = if arg.kind_of?(String) || arg.kind_of?(Symbol)
249
256
  lookup_provider_constant(arg)
@@ -256,7 +263,7 @@ class Chef
256
263
  :kind_of => [ Class ]
257
264
  )
258
265
  end
259
-
266
+
260
267
  def svn_force_export(arg=nil)
261
268
  set_or_return(
262
269
  :svn_force_export,
@@ -264,7 +271,7 @@ class Chef
264
271
  :kind_of => [ TrueClass, FalseClass ]
265
272
  )
266
273
  end
267
-
274
+
268
275
  def environment(arg=nil)
269
276
  if arg.is_a?(String)
270
277
  Chef::Log.info "Setting RAILS_ENV, RACK_ENV, and MERB_ENV to `#{arg}'"
@@ -277,8 +284,8 @@ class Chef
277
284
  :kind_of => [ Hash ]
278
285
  )
279
286
  end
280
-
281
- # An array of paths, relative to your app's root, to be purged from a
287
+
288
+ # An array of paths, relative to your app's root, to be purged from a
282
289
  # SCM clone/checkout before symlinking. Use this to get rid of files and
283
290
  # directories you want to be shared between releases.
284
291
  # Default: ["log", "tmp/pids", "public/system"]
@@ -289,12 +296,12 @@ class Chef
289
296
  :kind_of => Array
290
297
  )
291
298
  end
292
-
299
+
293
300
  # An array of paths, relative to your app's root, where you expect dirs to
294
301
  # exist before symlinking. This runs after #purge_before_symlink, so you
295
302
  # can use this to recreate dirs that you had previously purged.
296
- # For example, if you plan to use a shared directory for pids, and you
297
- # want it to be located in $APP_ROOT/tmp/pids, you could purge tmp,
303
+ # For example, if you plan to use a shared directory for pids, and you
304
+ # want it to be located in $APP_ROOT/tmp/pids, you could purge tmp,
298
305
  # then specify tmp here so that the tmp directory will exist when you
299
306
  # symlink the pids directory in to the current release.
300
307
  # Default: ["tmp", "public", "config"]
@@ -305,10 +312,10 @@ class Chef
305
312
  :kind_of => Array
306
313
  )
307
314
  end
308
-
315
+
309
316
  # A Hash of shared/dir/path => release/dir/path. This attribute determines
310
317
  # which files and dirs in the shared directory get symlinked to the current
311
- # release directory, and where they go. If you have a directory
318
+ # release directory, and where they go. If you have a directory
312
319
  # $shared/pids that you would like to symlink as $current_release/tmp/pids
313
320
  # you specify it as "pids" => "tmp/pids"
314
321
  # Default {"system" => "public/system", "pids" => "tmp/pids", "log" => "log"}
@@ -319,8 +326,8 @@ class Chef
319
326
  :kind_of => Hash
320
327
  )
321
328
  end
322
-
323
- # A Hash of shared/dir/path => release/dir/path. This attribute determines
329
+
330
+ # A Hash of shared/dir/path => release/dir/path. This attribute determines
324
331
  # which files in the shared directory get symlinked to the current release
325
332
  # directory and where they go. Unlike map_shared_files, these are symlinked
326
333
  # *before* any migration is run.
@@ -334,31 +341,31 @@ class Chef
334
341
  :kind_of => Hash
335
342
  )
336
343
  end
337
-
344
+
338
345
  # Callback fires before migration is run.
339
346
  def before_migrate(arg=nil, &block)
340
347
  arg ||= block
341
348
  set_or_return(:before_migrate, arg, :kind_of => [Proc, String])
342
349
  end
343
-
350
+
344
351
  # Callback fires before symlinking
345
352
  def before_symlink(arg=nil, &block)
346
353
  arg ||= block
347
354
  set_or_return(:before_symlink, arg, :kind_of => [Proc, String])
348
355
  end
349
-
356
+
350
357
  # Callback fires before restart
351
358
  def before_restart(arg=nil, &block)
352
359
  arg ||= block
353
360
  set_or_return(:before_restart, arg, :kind_of => [Proc, String])
354
361
  end
355
-
362
+
356
363
  # Callback fires after restart
357
364
  def after_restart(arg=nil, &block)
358
365
  arg ||= block
359
366
  set_or_return(:after_restart, arg, :kind_of => [Proc, String])
360
367
  end
361
-
368
+
362
369
  end
363
370
  end
364
371
  end