heel 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/CHANGES +5 -0
  2. data/lib/heel/server.rb +14 -9
  3. data/lib/heel/version.rb +1 -1
  4. metadata +1 -1
data/CHANGES CHANGED
@@ -1,5 +1,10 @@
1
1
  = Changelog
2
2
 
3
+ == Version 0.3.1 - 2007-08-11
4
+
5
+ * fix failure to find pid file [Bug #13530]
6
+ * remember to stop releasing software in the wee hours of the morning
7
+
3
8
  === Version 0.3.0
4
9
 
5
10
  * update with Launchy requirement 0.3.0
@@ -183,23 +183,28 @@ module Heel
183
183
  merge_options
184
184
  setup_heel_dir
185
185
 
186
- document_root = options.document_root
187
- background_me = options.daemonize
186
+ # capture method/variables into a local context so they can be used inside the Configurator block
187
+ c_document_root = options.document_root
188
+ c_background_me = options.daemonize
189
+ c_default_dir = default_directory
190
+ c_pid_file = pid_file
191
+ c_log_file = log_file
192
+
188
193
  stats = ::Mongrel::StatisticsFilter.new(:sample_rate => 1)
189
- config = ::Mongrel::Configurator.new :host => options.address, :port => options.port, :pid_file => pid_file do
190
- if background_me then
191
- if File.exists?(pid_file) then
192
- log "ERROR: PID File #{pid_file} already exists. Heel may already be running."
193
- log "ERROR: Check the Log file #{log_file}"
194
+ config = ::Mongrel::Configurator.new(:host => options.address, :port => options.port, :pid_file => c_pid_file) do
195
+ if c_background_me then
196
+ if File.exists?(c_pid_file) then
197
+ log "ERROR: PID File #{c_pid_file} already exists. Heel may already be running."
198
+ log "ERROR: Check the Log file #{c_log_file}"
194
199
  log "ERROR: Heel will not start until the .pid file is cleared."
195
200
  exit 1
196
201
  end
197
- daemonize({:cwd => default_directory, :log_file => log_file})
202
+ daemonize({:cwd => c_default_dir, :log_file => c_log_file})
198
203
  end
199
204
 
200
205
  listener do
201
206
  uri "/", :handler => stats
202
- uri "/", :handler => Heel::DirHandler.new({:document_root => document_root})
207
+ uri "/", :handler => Heel::DirHandler.new({:document_root => c_document_root})
203
208
  uri "/", :handler => Heel::ErrorHandler.new
204
209
  uri "/icons", :handler => Heel::DirHandler.new({ :document_root =>
205
210
  File.join(APP_RESOURCE_DIR, "famfamfam", "icons")})
@@ -4,7 +4,7 @@ module Heel
4
4
  class Version
5
5
  MAJOR = 0
6
6
  MINOR = 3
7
- BUILD = 0
7
+ BUILD = 1
8
8
 
9
9
  class << self
10
10
  def to_a
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: heel
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
6
+ version: 0.3.1
7
7
  date: 2007-08-30 00:00:00 -06:00
8
8
  summary: A mongrel based static file webserver.
9
9
  require_paths: