Skip to content

Commit

Permalink
Add a new option (:app_file) to determine the file to reload when in …
Browse files Browse the repository at this point in the history
…development mode. Default is $0. This is for situations where $0 isn't the Sinatra application
  • Loading branch information
cschneid committed May 21, 2008
1 parent 07f2547 commit 47a48df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sinatra.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,8 @@ def self.default_options
:public => root + '/public',
:sessions => false,
:logging => true,
:raise_errors => false
:raise_errors => false,
:app_file => $0
}
load_default_options_from_command_line!
@default_options
Expand Down Expand Up @@ -1101,7 +1102,7 @@ def reload!
load_default_configuration!
@pipeline = nil
@reloading = true
Kernel.load $0
Kernel.load options.app_file
@reloading = false
end

Expand Down

0 comments on commit 47a48df

Please sign in to comment.