summaryrefslogtreecommitdiff
path: root/lib/chef/resource/service.rb
diff options
context:
space:
mode:
authorAJ Christensen <aj@junglist.gen.nz>2008-10-01 12:05:26 +1300
committerAJ Christensen <aj@junglist.gen.nz>2008-10-01 12:05:26 +1300
commit6b5af924ce79493d28eaaced5df5706261f6015c (patch)
treec1785d7f395d05d09ba8cdc3bfc7ee44ab056d33 /lib/chef/resource/service.rb
parente252ac8bb242056cd26094163d13861184a79800 (diff)
downloadchef-6b5af924ce79493d28eaaced5df5706261f6015c.tar.gz
Specifications for the Service resource, and necessary adjustments to the actual code to make specs pass.
Diffstat (limited to 'lib/chef/resource/service.rb')
-rw-r--r--lib/chef/resource/service.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 29f4632f5f..6444bccd9f 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -27,12 +27,12 @@ class Chef
@enabled = nil
@running = nil
@pattern = nil
- @start = nil
- @stop = nil
- @status = nil
- @restart = nil
+ @start_command = nil
+ @stop_command = nil
+ @status_command = nil
+ @restart_command = nil
@action = "none"
- @supports = { :has_restart => false, :has_status => false }
+ @supports = { :restart => false, :status => false }
@allowed_actions.push(:enable, :disable, :start, :stop)
end
@@ -49,41 +49,41 @@ class Chef
set_or_return(
:pattern,
arg,
- :kind_of => [ Regex ]
+ :kind_of => [ Regexp ]
)
end
# command to call to start service
- def start(arg=nil)
+ def start_command(arg=nil)
set_or_return(
- :start,
+ :start_command,
arg,
:kind_of => [ String ]
)
end
# command to call to stop service
- def stop(arg=nil)
+ def stop_command(arg=nil)
set_or_return(
- :stop,
+ :stop_command,
arg,
:kind_of => [ String ]
)
end
# command to call to get status of service
- def status(arg=nil)
+ def status_command(arg=nil)
set_or_return(
- :status,
+ :status_command,
arg,
:kind_of => [ String ]
)
end
# command to call to restart service
- def restart(arg=nil)
+ def restart_command(arg=nil)
set_or_return(
- :restart,
+ :restart_command,
arg,
:kind_of => [ String ]
)