serve 0.9.10 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{History.txt → CHANGELOG.rdoc} +9 -0
- data/{License.txt → LICENSE} +1 -1
- data/{Quickstart.textile → QUICKSTART.rdoc} +61 -80
- data/{README.txt → README.rdoc} +10 -13
- data/Rakefile +11 -13
- data/VERSION +1 -0
- data/bin/serve +6 -0
- data/lib/serve.rb +2 -8
- data/lib/serve/application.rb +13 -6
- data/lib/serve/file_resolver.rb +48 -0
- data/lib/serve/handlers/dynamic_handler.rb +31 -21
- data/lib/serve/handlers/file_type_handler.rb +23 -32
- data/lib/serve/handlers/markdown_handler.rb +1 -1
- data/lib/serve/handlers/redirect_handler.rb +6 -5
- data/lib/serve/handlers/sass_handler.rb +4 -3
- data/lib/serve/rack.rb +57 -0
- data/lib/serve/rails.rb +4 -0
- data/lib/serve/rails/configuration.rb +69 -0
- data/lib/serve/rails/mount.rb +38 -0
- data/lib/serve/rails/routing.rb +25 -0
- data/lib/serve/rails/serve_controller.rb +52 -0
- data/lib/serve/response_cache.rb +170 -0
- data/lib/serve/version.rb +4 -9
- data/lib/serve/webrick/extensions.rb +80 -15
- data/lib/serve/webrick/server.rb +17 -0
- data/lib/serve/webrick/servlet.rb +19 -0
- data/rails/init.rb +6 -0
- data/spec/{serve_application_spec.rb → application_spec.rb} +5 -4
- data/spec/response_cache_spec.rb +248 -0
- data/spec/serve_spec.rb +1 -0
- data/spec/spec_helper.rb +10 -9
- metadata +51 -69
- data.tar.gz.sig +0 -0
- data/Manifest.txt +0 -44
- data/config/hoe.rb +0 -70
- data/config/requirements.rb +0 -17
- data/log/debug.log +0 -0
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/script/txt2html +0 -74
- data/setup.rb +0 -1585
- data/tasks/deployment.rake +0 -27
- data/tasks/environment.rake +0 -7
- data/tasks/rspec.rake +0 -21
- data/tasks/undefine.rake +0 -5
- data/tasks/website.rake +0 -17
- data/test_project/_layout.haml +0 -12
- data/test_project/erb/_footer.html.erb +0 -2
- data/test_project/erb/_layout.html.erb +0 -28
- data/test_project/erb/index.html.erb +0 -10
- data/test_project/haml/_footer.haml +0 -2
- data/test_project/haml/_layout.haml +0 -20
- data/test_project/haml/index.haml +0 -9
- data/test_project/test.haml +0 -3
- data/test_project/test.html.erb +0 -3
- data/test_project/view_helpers.rb +0 -5
- metadata.gz.sig +0 -0
data/tasks/deployment.rake
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
desc 'Release the website and new gem version'
|
2
|
-
task :deploy => [:check_version, :website, :release] do
|
3
|
-
puts "Remember to create SVN tag:"
|
4
|
-
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
-
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
-
puts "Suggested comment:"
|
7
|
-
puts "Tagging release #{CHANGES}"
|
8
|
-
end
|
9
|
-
|
10
|
-
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
-
task :local_deploy => [:website_generate, :install_gem]
|
12
|
-
|
13
|
-
task :check_version do
|
14
|
-
unless ENV['VERSION']
|
15
|
-
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
unless ENV['VERSION'] == VERS
|
19
|
-
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
-
exit
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
-
task :install_gem_no_doc => [:clean, :package] do
|
26
|
-
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
-
end
|
data/tasks/environment.rake
DELETED
data/tasks/rspec.rake
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'spec'
|
3
|
-
rescue LoadError
|
4
|
-
require 'rubygems'
|
5
|
-
require 'spec'
|
6
|
-
end
|
7
|
-
begin
|
8
|
-
require 'spec/rake/spectask'
|
9
|
-
rescue LoadError
|
10
|
-
puts <<-EOS
|
11
|
-
To use rspec for testing you must install rspec gem:
|
12
|
-
gem install rspec
|
13
|
-
EOS
|
14
|
-
exit(0)
|
15
|
-
end
|
16
|
-
|
17
|
-
desc "Run the specs under spec/models"
|
18
|
-
Spec::Rake::SpecTask.new do |t|
|
19
|
-
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
-
t.spec_files = FileList['spec/*_spec.rb']
|
21
|
-
end
|
data/tasks/undefine.rake
DELETED
data/tasks/website.rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
desc 'Generate website files'
|
2
|
-
task :website_generate => :ruby_env do
|
3
|
-
(Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
|
4
|
-
sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
desc 'Upload website files to rubyforge'
|
9
|
-
task :website_upload do
|
10
|
-
host = "#{rubyforge_username}@rubyforge.org"
|
11
|
-
remote_dir = "/var/www/gforge-projects/#{RUBYFORGE_PROJECT}/"
|
12
|
-
local_dir = 'website'
|
13
|
-
sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'Generate and upload website files'
|
17
|
-
task :website => [:website_generate, :website_upload, :publish_docs]
|
data/test_project/_layout.haml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title><%= @title %></title>
|
5
|
-
<style type="text/css">
|
6
|
-
#content {
|
7
|
-
float: left;
|
8
|
-
width: 70%;
|
9
|
-
}
|
10
|
-
#sidebar {
|
11
|
-
float: right;
|
12
|
-
width: 28%;
|
13
|
-
}
|
14
|
-
</style>
|
15
|
-
</head>
|
16
|
-
<body>
|
17
|
-
<div id="content">
|
18
|
-
<h1><%= @title %></h1>
|
19
|
-
<%= yield %>
|
20
|
-
</div>
|
21
|
-
<% if content_for?(:sidebar) %>
|
22
|
-
<div id="sidebar">
|
23
|
-
<%= yield :sidebar %>
|
24
|
-
</div>
|
25
|
-
<% end %>
|
26
|
-
<%= render :partial => "footer" %>
|
27
|
-
</body>
|
28
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
!!! Strict
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%title= @title
|
5
|
-
%style{:type=>"text/css"}
|
6
|
-
:sass
|
7
|
-
#content
|
8
|
-
float: left
|
9
|
-
width: 70%
|
10
|
-
#sidebar
|
11
|
-
float: right
|
12
|
-
width: 28%
|
13
|
-
%body
|
14
|
-
#content
|
15
|
-
%h1= @title
|
16
|
-
= yield
|
17
|
-
- if content_for?(:sidebar)
|
18
|
-
#sidebar
|
19
|
-
= yield :sidebar
|
20
|
-
= render :partial => "footer"
|
data/test_project/test.haml
DELETED
data/test_project/test.html.erb
DELETED
metadata.gz.sig
DELETED
Binary file
|