fivepointssolutions-serve 0.9.14 → 0.9.15
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/serve/rails.rb +1 -0
- data/lib/serve/rails/controllers/serve_controller.rb +5 -1
- data/rails/init.rb +0 -5
- metadata +2 -2
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
2
|
require 'jeweler'
|
3
3
|
Jeweler::Tasks.new do |s|
|
4
|
-
s.name = "serve"
|
4
|
+
s.name = "fivepointssolutions-serve"
|
5
5
|
s.summary = "Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. Serve is ideal for HTML prototyping and simple file sharing. If the haml, redcloth, and bluecloth gems are installed serve can handle Haml, Sass, Textile, and Markdown (in addition to HTML)."
|
6
6
|
s.email = "me@johnwlong.com"
|
7
7
|
s.files = FileList["[A-Z]*", "{bin,lib,rails,spec}/**/*"].exclude("tmp,**/tmp")
|
data/VERSION.yml
CHANGED
data/lib/serve/rails.rb
CHANGED
@@ -13,7 +13,7 @@ class ServeController < ActionController::Base
|
|
13
13
|
handler.process(request, response)
|
14
14
|
cache.cache_response(request.path, response)
|
15
15
|
else
|
16
|
-
|
16
|
+
not_found
|
17
17
|
end
|
18
18
|
end
|
19
19
|
@performed_render = true
|
@@ -40,4 +40,8 @@ class ServeController < ActionController::Base
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
def not_found
|
45
|
+
render :text => 'not found', :status => 404
|
46
|
+
end
|
43
47
|
end
|
data/rails/init.rb
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
require 'serve/rails'
|
2
2
|
|
3
|
-
serve_controllers_path = File.expand_path(File.dirname(__FILE__) + '/../lib/serve/rails/controllers')
|
4
|
-
ActiveSupport::Dependencies.load_paths << serve_controllers_path
|
5
|
-
ActiveSupport::Dependencies.explicitly_unloadable_constants << 'ServeController'
|
6
|
-
ActionController::Routing.controller_paths << serve_controllers_path
|
7
3
|
ActionController::Routing::RouteSet::Mapper.send :include, Serve::Rails::Routing::MapperExtensions
|
8
|
-
|
9
4
|
ActionController::AbstractResponse.module_eval do
|
10
5
|
attr_accessor :cache_timeout
|
11
6
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fivepointssolutions-serve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John W. Long
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-26 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|