Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unused attribute reader, folding it into existing getter.

  • Loading branch information...
commit 857f5dacaea82815b7c72f7f7ffbeef27a4bb4b4 1 parent 6c87cb1
@kytrinyx kytrinyx authored
Showing with 6 additions and 2 deletions.
  1. +2 −2 lib/daemon_kit/initializer.rb
  2. +4 −0 spec/initializer_spec.rb
View
4 lib/daemon_kit/initializer.rb
@@ -245,7 +245,7 @@ class Configuration
attr_accessor :instance
# Path to the pid file, defaults to 'log/<daemon_name>.pid'
- attr_accessor :pid_file
+ attr_writer :pid_file
# The application name
configurable :daemon_name, :locked => true
@@ -325,7 +325,7 @@ def at_shutdown( proc = nil, &block )
@shutdown_hooks << ( proc || block )
end
- def pid_file( instance )
+ def pid_file( instance = nil )
@pid_file ||= "#{File.dirname(self.log_path)}/#{self.daemon_name}.#{instance}.pid"
end
View
4 spec/initializer_spec.rb
@@ -18,6 +18,10 @@
@configuration.log_level.should_not be_nil
end
+ it "should have a default pid file" do
+ @configuration.pid_file.should_not be_nil
+ end
+
it "should set a default umask" do
File.umask.should_not eq(0)
File.umask.should eq(18)
Please sign in to comment.
Something went wrong with that request. Please try again.