Skip to content

Commit

Permalink
Added a default port.
Browse files Browse the repository at this point in the history
Put 3000 as the default port for users more familiar with a normal rails development server
  • Loading branch information
workmad3 committed May 16, 2012
1 parent 93368b5 commit e18b638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/guard/unicorn.rb
Expand Up @@ -7,6 +7,7 @@ class Unicorn < Guard
# Sensible defaults for Rails projects # Sensible defaults for Rails projects
DEFAULT_PID_PATH = File.join("tmp", "pids", "unicorn.pid") DEFAULT_PID_PATH = File.join("tmp", "pids", "unicorn.pid")
DEFAULT_CONFIG_PATH = File.join("config", "unicorn.rb") DEFAULT_CONFIG_PATH = File.join("config", "unicorn.rb")
DEFAULT_PORT = 3000


# Initialize a Guard. # Initialize a Guard.
# @param [Array<Guard::Watcher>] watchers the Guard file watchers # @param [Array<Guard::Watcher>] watchers the Guard file watchers
Expand All @@ -22,7 +23,7 @@ def initialize(watchers = [], options = {})
@pid_file = options.fetch(:pid_file, DEFAULT_PID_PATH) @pid_file = options.fetch(:pid_file, DEFAULT_PID_PATH)
@config_file = options.fetch(:config_file, DEFAULT_CONFIG_PATH) @config_file = options.fetch(:config_file, DEFAULT_CONFIG_PATH)
@preloading = options.fetch(:preloading, false) @preloading = options.fetch(:preloading, false)
@port = options.fetch(:port, 8080) @port = options.fetch(:port, DEFAULT_PORT)


super super
end end
Expand Down

0 comments on commit e18b638

Please sign in to comment.