Skip to content

Commit

Permalink
Merge branch 'drop-1.8.6'
Browse files Browse the repository at this point in the history
Conflicts:
	Gemfile
	README.rdoc
  • Loading branch information
rkh committed Mar 19, 2011
2 parents e678806 + 66a7db6 commit ee2e348
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 28 deletions.
14 changes: 4 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Why use bundler?
# Well, not all development dependencies install on all rubies. Moreover, `gem
# Well, not all development dependencies install on all rubies. Moreover, `gem
# install sinatra --development` doesn't work, as it will also try to install
# development dependencies of our dependencies, and those are not conflict free.
# So, here we are, `bundle install`.
Expand All @@ -22,14 +22,8 @@ gem 'liquid', :group => 'liquid'
gem 'nokogiri', :group => 'nokogiri'
gem 'slim', :group => 'slim'
gem 'RedCloth', :group => 'redcloth'


if RUBY_VERSION > '1.8.6'
gem 'coffee-script', '>= 2.0', :group => 'coffee-script'
gem 'rdoc', :group => 'rdoc'
else
gem 'rack', '~> 1.1.0'
end
gem 'coffee-script', '>= 2.0', :group => 'coffee-script'
gem 'rdoc', :group => 'rdoc'

platforms :ruby do
gem 'rdiscount', :group => 'rdiscount'
Expand All @@ -43,6 +37,6 @@ end

platforms :mri_18 do
# bundler platforms are broken
next unless RUBY_ENGINE == 'ruby'
next if RUBY_ENGINE != 'ruby' or RUBY_VERSION > "1.8"
gem 'rcov', :group => 'rcov'
end
18 changes: 4 additions & 14 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -1273,8 +1273,7 @@ You can access those options via <tt>settings</tt>:
[public] folder public files are served from

[reload_templates] whether or not to reload templates between requests.
Enabled in development mode and on Ruby 1.8.6 (to
compensate a bug in Ruby causing a memory leak).
Enabled in development mode.

[root] project root folder.

Expand Down Expand Up @@ -1689,21 +1688,10 @@ Options are:
-s # specify rack server/handler (default is thin)
-x # turn on the mutex lock (default is off)

== Requirements

It is recommended to install Sinatra on Ruby 1.8.7, 1.9.2, JRuby or Rubinius.
== Requirement

The following Ruby versions are officially supported:

[ Ruby 1.8.6 ]
It is not recommended to use 1.8.6 for Sinatra. However, it will be
officially supported until Sinatra 1.3.0 is released. RDoc and CoffeeScript
templates are not supported by this Ruby version. 1.8.6 includes a major
memory leak in its Hash implementation, which is triggered by Sinatra
versions prior to 1.1.1. The current version explicitly prevents this leak
at the cost of performance. You will have to downgrade Rack to 1.1.x, as
Rack >= 1.2 no longer supports 1.8.6.

[ Ruby 1.8.7 ]
1.8.7 is fully supported, however, if nothing is keeping you from it, we
recommend upgrading to 1.9.2 or switching to JRuby or Rubinius.
Expand All @@ -1724,6 +1712,8 @@ The following Ruby versions are officially supported:
on JRuby. JRuby's support for C extensions is still experimental, which only
affects RDiscount at the moment.

<b>Ruby 1.8.6 is no longer supported.</b>

We also keep an eye on upcoming Ruby versions.

The following Ruby implementations are not officially supported but still are
Expand Down
5 changes: 2 additions & 3 deletions lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,7 @@ def static!
public_dir = File.expand_path(public_dir)

path = File.expand_path(public_dir + unescape(request.path_info))
return if path[0, public_dir.length] != public_dir
return unless File.file?(path)
return unless path.start_with?(public_dir) and File.file?(path)

env['sinatra.static_file'] = path
send_file path, :disposition => nil
Expand Down Expand Up @@ -1368,7 +1367,7 @@ class << self
set :app_file, nil
set :root, Proc.new { app_file && File.expand_path(File.dirname(app_file)) }
set :views, Proc.new { root && File.join(root, 'views') }
set :reload_templates, Proc.new { development? or RUBY_VERSION < '1.8.7' }
set :reload_templates, Proc.new { development? }
set :lock, false

set :public, Proc.new { root && File.join(root, 'public') }
Expand Down
2 changes: 1 addition & 1 deletion sinatra.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Gem::Specification.new do |s|
s.test_files = s.files.select {|path| path =~ /^test\/.*_test.rb/}

s.extra_rdoc_files = %w[README.rdoc README.de.rdoc README.jp.rdoc README.fr.rdoc README.es.rdoc README.hu.rdoc README.zh.rdoc LICENSE]
s.add_dependency 'rack', '~> 1.1'
s.add_dependency 'rack', '~> 1.2'
s.add_dependency 'tilt', '>= 1.2.2', '< 2.0'
s.add_development_dependency 'shotgun', '~> 0.6'

Expand Down

0 comments on commit ee2e348

Please sign in to comment.