picnic 0.6.0 → 0.6.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.
- data/CHANGELOG.txt +8 -0
- data/lib/picnic/authentication.rb +4 -3
- data/lib/picnic/postambles.rb +21 -9
- data/lib/picnic/version.rb +1 -1
- metadata +2 -2
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
|
-
|
114
|
-
|
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'
|
data/lib/picnic/postambles.rb
CHANGED
@@ -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
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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
|
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
|
-
|
155
|
-
|
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
|
data/lib/picnic/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2008-02-28 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|