picnic 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 0.6.1 :: 2007-02-28
2
+
3
+ * Fixed bug introduced in 0.6.0 where webrick and mongrel postambles were
4
+ broken for apps that don't define any public directories.
5
+ * Each public directory mount is now logged during startup. Also resolved
6
+ some potential issues with the uri_path config option. Multiple /'s
7
+ in the path are now automatically removed.
8
+
1
9
  === 0.6.0 :: 2007-02-26
2
10
 
3
11
  * Added support for CAS authentication. See picnic/authentication.rb for
@@ -110,9 +110,10 @@ module Picnic #:nodoc:
110
110
  # contents.
111
111
  #
112
112
  module Cas
113
- require 'camping/db'
114
- require 'camping/session'
115
-
113
+ def self.include
114
+ require 'camping/db'
115
+ require 'camping/session'
116
+ end
116
117
 
117
118
  $: << File.dirname(File.expand_path(__FILE__))+"/../../../rubycas-client2/lib" # for development
118
119
  require 'rubycas-client'
@@ -51,12 +51,16 @@ module Picnic
51
51
  s.mount "#{Picnic::Conf.uri_path}", WEBrick::CampingHandler, self
52
52
 
53
53
  public_dirs = Picnic::Conf.public_dirs || Picnic::Conf.public_dir
54
- public_dirs = [public_dirs] unless public_dirs.kind_of? Array
55
-
56
- public_dirs.each do |d|
57
- s.mount "#{Picnic::Conf.uri_path}#{d[:path]}", WEBrick::HTTPServlet::FileHandler, d[:dir]
54
+ if public_dirs
55
+ public_dirs = [public_dirs] unless public_dirs.kind_of? Array
56
+
57
+ public_dirs.each do |d|
58
+ dir = d[:dir]
59
+ path = "#{Picnic::Conf.uri_path}/#{d[:path]}".gsub(/\/\/+/,'/')
60
+ $LOG.debug("Mounting public directory #{dir.inspect} to path #{path.inspect}.")
61
+ s.mount(path, WEBrick::HTTPServlet::FileHandler, dir)
62
+ end
58
63
  end
59
-
60
64
 
61
65
  # This lets Ctrl+C shut down your server
62
66
  trap(:INT) do
@@ -142,18 +146,26 @@ module Picnic
142
146
  $LOG.close if $DAEMONIZE
143
147
 
144
148
  public_dirs = Picnic::Conf.public_dirs || Picnic::Conf.public_dir
145
- public_dirs = [public_dirs] unless public_dirs.kind_of? Array
149
+ public_dirs = [public_dirs] unless
150
+ public_dirs.kind_of? Array || public_dirs.nil?
146
151
 
147
152
  begin
148
153
  app_mod = self
149
154
  mongrel = Mongrel::Configurator.new settings do
150
155
  daemonize :log_file => Picnic::Conf.log[:file], :cwd => $APP_PATH if $DAEMONIZE
151
- puts Picnic::Conf.uri_path
152
156
  listener :port => Picnic::Conf.port do
153
157
  uri Picnic::Conf.uri_path, :handler => Mongrel::Camping::CampingHandler.new(app_mod)
154
- public_dirs.each do |d|
155
- uri "#{Picnic::Conf.uri_path}#{d[:path]}", :handler => Mongrel::DirHandler.new(d[:dir])
158
+
159
+
160
+ if public_dirs
161
+ public_dirs.each do |d|
162
+ dir = d[:dir]
163
+ path = "#{Picnic::Conf.uri_path}/#{d[:path]}".gsub(/\/\/+/,'/')
164
+ $LOG.debug("Mounting public directory #{dir.inspect} to path #{path.inspect}.")
165
+ uri(path, :handler => Mongrel::DirHandler.new(dir))
166
+ end
156
167
  end
168
+
157
169
  setup_signals
158
170
  end
159
171
  end
@@ -2,7 +2,7 @@ module Picnic #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 6
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picnic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zukowski
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-26 00:00:00 -05:00
12
+ date: 2008-02-28 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency