serverside 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -3
- data/Rakefile +1 -1
- data/bin/serverside +12 -2
- data/lib/serverside/caching.rb +1 -1
- data/lib/serverside/routing.rb +1 -0
- metadata +1 -2
data/CHANGELOG
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
|
1
|
+
*0.3.1*
|
2
|
+
|
3
|
+
* Removed application.rb file and fixed serverside script.
|
4
|
+
|
5
|
+
* Fixed bug in Caching.validate_stamp where the expiry stamp would be the file stamp + max_age - leading to stale resources.
|
6
|
+
|
7
|
+
*0.3.0*
|
2
8
|
|
3
9
|
* Disabled cluster_spec and parts of daemon_spec for now due to strange forking behavior.
|
4
10
|
|
@@ -20,13 +26,13 @@
|
|
20
26
|
|
21
27
|
* Added String.underscore method.
|
22
28
|
|
23
|
-
* Renamed ServerSide::Controller.process to response.
|
29
|
+
* Renamed ServerSide::Controller.process to response.
|
24
30
|
|
25
31
|
* Improved HTTP caching code to better conform to the HTTP spec. Also improved the validate_cache method to work without a block as well.
|
26
32
|
|
27
33
|
* Removed unit tests that were converted to specs.
|
28
34
|
|
29
|
-
* Router now
|
35
|
+
* Router now expects handlers to return non-nil if the request was handled. Otherwise, the request goes to the next handler with an appropriate rule.
|
30
36
|
|
31
37
|
* Improved spec coverage for caching.
|
32
38
|
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ require 'fileutils'
|
|
6
6
|
include FileUtils
|
7
7
|
|
8
8
|
NAME = "serverside"
|
9
|
-
VERS = "0.3.
|
9
|
+
VERS = "0.3.1"
|
10
10
|
CLEAN.include ['**/.*.sw?', 'pkg/*', '.config', 'doc/*', 'coverage/*']
|
11
11
|
RDOC_OPTS = ['--quiet', '--title', "ServerSide Documentation",
|
12
12
|
"--opname", "index.html",
|
data/bin/serverside
CHANGED
@@ -64,7 +64,7 @@ else
|
|
64
64
|
fn = File.join(path, 'serverside.rb')
|
65
65
|
require fn if File.file?(fn)
|
66
66
|
end
|
67
|
-
unless ServerSide::Router.
|
67
|
+
unless ServerSide::Router.routes_defined?
|
68
68
|
ServerSide::Router.default_route {serve_static('.'/@path)}
|
69
69
|
end
|
70
70
|
|
@@ -78,5 +78,15 @@ if $cmd == 'serve'
|
|
78
78
|
ServerSide::HTTP::Server.new($cmd_config[:host], $cmd_config[:ports].begin,
|
79
79
|
ServerSide::Router).start
|
80
80
|
else
|
81
|
-
|
81
|
+
daemon_class = Class.new(Daemon::Cluster) do
|
82
|
+
meta_def(:pid_fn) {Daemon::WorkingDirectory/'serverside.pid'}
|
83
|
+
meta_def(:server_loop) do |port|
|
84
|
+
ServerSide::HTTP::Server.new(
|
85
|
+
$cmd_config[:host], port, ServerSide::Router).start
|
86
|
+
end
|
87
|
+
meta_def(:ports) {$cmd_config[:ports]}
|
88
|
+
end
|
89
|
+
Daemon.control(daemon_class, $cmd)
|
90
|
+
|
91
|
+
# ServerSide::Application.daemonize($cmd_config, $cmd)
|
82
92
|
end
|
data/lib/serverside/caching.rb
CHANGED
@@ -75,7 +75,7 @@ module ServerSide
|
|
75
75
|
@response_headers[ETAG] = ETAG_QUOTE_FORMAT %
|
76
76
|
[etag || expiry_etag(stamp, max_age)]
|
77
77
|
@response_headers[LAST_MODIFIED] = stamp.httpdate
|
78
|
-
@response_headers[EXPIRES] = (
|
78
|
+
@response_headers[EXPIRES] = (Time.now + max_age).httpdate
|
79
79
|
@response_headers[CACHE_CONTROL] = cache_control if cache_control
|
80
80
|
@response_headers[VARY] = vary if vary
|
81
81
|
block ? block.call : nil
|
data/lib/serverside/routing.rb
CHANGED
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: serverside
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.3.
|
6
|
+
version: 0.3.1
|
7
7
|
date: 2006-11-27 00:00:00 +02:00
|
8
8
|
summary: Performance-oriented web framework.
|
9
9
|
require_paths:
|
@@ -33,7 +33,6 @@ files:
|
|
33
33
|
- README
|
34
34
|
- Rakefile
|
35
35
|
- bin/serverside
|
36
|
-
- doc/rdoc
|
37
36
|
- spec/core_ext_spec.rb
|
38
37
|
- spec/connection_spec.rb
|
39
38
|
- spec/caching_spec.rb
|