sinatra 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sinatra might be problematic. Click here for more details.

@@ -64,7 +64,7 @@ You can also access named parameters via block parameters:
64
64
  end
65
65
 
66
66
  Route patterns may also include splat (or wildcard) parameters, accessible
67
- via the <tt>params[:splat]</tt> array.
67
+ via the <tt>params[:splat]</tt> array:
68
68
 
69
69
  get '/say/*/to/*' do
70
70
  # matches /say/hello/to/world
@@ -162,11 +162,11 @@ can easily define your own matchers:
162
162
 
163
163
  def initialize(except)
164
164
  @except = except
165
- @caputres = Match.new([])
165
+ @captures = Match.new([])
166
166
  end
167
167
 
168
168
  def match(str)
169
- @caputres unless @except === str
169
+ @captures unless @except === str
170
170
  end
171
171
  end
172
172
 
@@ -673,7 +673,7 @@ Templates may also be defined using the top-level <tt>template</tt> method:
673
673
 
674
674
  If a template named "layout" exists, it will be used each time a template
675
675
  is rendered. You can individually disable layouts by passing <tt>:layout => false</tt>
676
- or disable them by default via <tt>set :haml, :layout => false</tt>.
676
+ or disable them by default via <tt>set :haml, :layout => false</tt>:
677
677
 
678
678
  get '/' do
679
679
  haml :index, :layout => !request.xhr?
@@ -799,6 +799,13 @@ middleware of choice how you would any other middleware:
799
799
  session[:value] = params[:value]
800
800
  end
801
801
 
802
+ To improve security, the session data in the cookie is signed with a session
803
+ secret. A random secret is generate for you by Sinatra. However, since this
804
+ secret will change with every start of your application, you might want to
805
+ set the secret yourself, so all your application instances share it:
806
+
807
+ set :session_secret, 'super secret'
808
+
802
809
  === Halting
803
810
 
804
811
  To immediately stop a request within a filter or route use:
@@ -974,7 +981,7 @@ You can easily set the Cache-Control header with like this:
974
981
  "cache it!"
975
982
  end
976
983
 
977
- Pro tip: Set up caching in a before filter.
984
+ Pro tip: Set up caching in a before filter:
978
985
 
979
986
  before do
980
987
  cache_control :public, :must_revalidate, :max_age => 60
@@ -990,7 +997,7 @@ If you are using the +expires+ helper to set the corresponding header,
990
997
  To properly use caches, you should consider using +etag+ and +last_modified+.
991
998
  It is recommended to call those helpers *before* doing heavy lifting, as they
992
999
  will immediately flush a response if the client already has the current
993
- version in its cache.
1000
+ version in its cache:
994
1001
 
995
1002
  get '/article/:id' do
996
1003
  @article = Article.find params[:id]
@@ -1105,7 +1112,7 @@ The <tt>request.body</tt> is an IO or StringIO object:
1105
1112
  === Attachments
1106
1113
 
1107
1114
  You can use the +attachment+ helper to tell the browser the response should be
1108
- stored on disk rather than displayed in the browser.
1115
+ stored on disk rather than displayed in the browser:
1109
1116
 
1110
1117
  get '/' do
1111
1118
  attachment
@@ -1546,7 +1553,7 @@ with a <tt>config.ru</tt>.</b>
1546
1553
  Not only is Sinatra able to use other Rack middleware, any Sinatra application
1547
1554
  can in turn be added in front of any Rack endpoint as middleware itself. This
1548
1555
  endpoint could be another Sinatra application, or any other Rack-based
1549
- application (Rails/Ramaze/Camping/...).
1556
+ application (Rails/Ramaze/Camping/...):
1550
1557
 
1551
1558
  require 'sinatra/base'
1552
1559
 
@@ -1686,7 +1693,7 @@ The following Ruby versions are officially supported:
1686
1693
 
1687
1694
  [ Ruby 1.8.6 ]
1688
1695
  It is not recommended to use 1.8.6 for Sinatra. However, it will be
1689
- officially supported until Sinatra 1.3.0 is released. RDoc and CoffeScript
1696
+ officially supported until Sinatra 1.3.0 is released. RDoc and CoffeeScript
1690
1697
  templates are not supported by this Ruby version. 1.8.6 includes a major
1691
1698
  memory leak in its Hash implementation, which is triggered by Sinatra
1692
1699
  versions prior to 1.1.1. The current version explicitly prevents this leak
@@ -1703,14 +1710,15 @@ The following Ruby versions are officially supported:
1703
1710
  segmentation faults when using Sinatra.
1704
1711
 
1705
1712
  [ Rubinius ]
1706
- Rubinius is officially supported (Rubinius >= 1.2.2), with the exception
1707
- of Textile templates.
1713
+ Rubinius is officially supported (Rubinius >= 1.2.3), everything, including
1714
+ all template languages, works.
1708
1715
 
1709
1716
  [ JRuby ]
1710
- JRuby is officially supported (JRuby >= 1.5.6). No issues with third party
1717
+ JRuby is officially supported (JRuby >= 1.6.0). No issues with third party
1711
1718
  template libraries are known, however, if you choose to use JRuby, please
1712
- look into JRuby rack handlers, as the Thin web server is not (yet) supported
1713
- on JRuby.
1719
+ look into JRuby rack handlers, as the Thin web server is not fully supported
1720
+ on JRuby. JRuby's support for C extensions is still experimental, which only
1721
+ affects RDiscount at the moment.
1714
1722
 
1715
1723
  We also keep an eye on upcoming Ruby versions.
1716
1724
 
@@ -1718,14 +1726,16 @@ The following Ruby implementations are not officially supported but still are
1718
1726
  known to run Sinatra:
1719
1727
 
1720
1728
  * Older versions of JRuby and Rubinius
1721
- * MacRuby
1722
- * Maglev
1723
- * IronRuby
1729
+ * MacRuby, Maglev, IronRuby
1724
1730
  * Ruby 1.9.0 and 1.9.1
1725
1731
 
1726
1732
  Not being officially supported means if things only break there and not on a
1727
1733
  supported platform, we assume it's not our issue but theirs.
1728
1734
 
1735
+ We also run our CI against ruby-head (the upcoming 1.9.3), but we can't
1736
+ guarantee anything, since it is constantly moving. Expect 1.9.3p0 to be
1737
+ supported.
1738
+
1729
1739
  Sinatra should work on any operating system supported by the chosen Ruby
1730
1740
  implementation.
1731
1741
 
@@ -1790,6 +1800,11 @@ If you install gems as root, the last step should be
1790
1800
 
1791
1801
  sudo rake install
1792
1802
 
1803
+ == Versioning
1804
+
1805
+ Sinatra follows {Semantic Versioning}[http://semver.org/], both SemVer and
1806
+ SemVerTag.
1807
+
1793
1808
  == Further Reading
1794
1809
 
1795
1810
  * {Project Website}[http://www.sinatrarb.com/] - Additional documentation,
@@ -1800,3 +1815,4 @@ If you install gems as root, the last step should be
1800
1815
  * {Twitter}[http://twitter.com/sinatra]
1801
1816
  * {Mailing List}[http://groups.google.com/group/sinatrarb/topics]
1802
1817
  * {IRC: #sinatra}[irc://chat.freenode.net/#sinatra] on http://freenode.net
1818
+
@@ -162,11 +162,11 @@ Rack body对象或者HTTP状态码:
162
162
 
163
163
  def initialize(except)
164
164
  @except = except
165
- @caputres = Match.new([])
165
+ @captures = Match.new([])
166
166
  end
167
167
 
168
168
  def match(str)
169
- @caputres unless @except === str
169
+ @captures unless @except === str
170
170
  end
171
171
  end
172
172
 
data/Rakefile CHANGED
@@ -80,6 +80,21 @@ task :thanks, [:release,:backports] do |t, a|
80
80
  "(based on commits included in #{a.release}, but not in #{a.backports})"
81
81
  end
82
82
 
83
+ task :authors, [:format, :sep] do |t, a|
84
+ a.with_defaults :format => "%s (%d)", :sep => ', '
85
+ authors = Hash.new { |h,k| h[k] = 0 }
86
+ blake = "Blake Mizerany"
87
+ mapping = {
88
+ "blake.mizerany@gmail.com" => blake, "bmizerany" => blake,
89
+ "a_user@mac.com" => blake, "ichverstehe" => "Harry Vangberg",
90
+ "Wu Jiang (nouse)" => "Wu Jiang" }
91
+ `git shortlog -s`.lines.map do |line|
92
+ num, name = line.split("\t", 2).map(&:strip)
93
+ authors[mapping[name] || name] += num.to_i
94
+ end
95
+ puts authors.sort_by { |n,c| -c }.map { |e| a.format % e }.join(a.sep)
96
+ end
97
+
83
98
  # PACKAGING ============================================================
84
99
 
85
100
  if defined?(Gem)
@@ -144,8 +159,8 @@ if defined?(Gem)
144
159
  sh <<-SH
145
160
  gem install #{package('.gem')} --local &&
146
161
  gem push #{package('.gem')} &&
147
- git add sinatra.gemspec &&
148
- git commit --allow-empty -m '#{source_version} release' &&
162
+ git commit --allow-empty -a -m '#{source_version} release' &&
163
+ git tag -s v#{source_version} -m '#{source_version} release' &&
149
164
  git tag -s #{source_version} -m '#{source_version} release' &&
150
165
  git push && (git push sinatra || true) &&
151
166
  git push --tags && (git push sinatra --tags || true)
@@ -7,7 +7,7 @@ require 'sinatra/showexceptions'
7
7
  require 'tilt'
8
8
 
9
9
  module Sinatra
10
- VERSION = '1.2.0'
10
+ VERSION = '1.2.1'
11
11
 
12
12
  # The request object. See Rack::Request for more info:
13
13
  # http://rack.rubyforge.org/doc/classes/Rack/Request.html
@@ -542,7 +542,7 @@ module Sinatra
542
542
  # render layout
543
543
  if layout
544
544
  options = options.merge(:views => views, :layout => false, :eat_errors => eat_errors, :scope => scope)
545
- catch(:layout_missing) { output = render(layout_engine, layout, options, locals) { output }}
545
+ catch(:layout_missing) { return render(layout_engine, layout, options, locals) { output } }
546
546
  end
547
547
 
548
548
  output.extend(ContentTyped).content_type = content_type if content_type
@@ -1192,7 +1192,7 @@ module Sinatra
1192
1192
  end
1193
1193
 
1194
1194
  def quit!(server, handler_name)
1195
- ## Use thins' hard #stop! if available, otherwise just #stop
1195
+ # Use Thin's hard #stop! if available, otherwise just #stop.
1196
1196
  server.respond_to?(:stop!) ? server.stop! : server.stop
1197
1197
  puts "\n== Sinatra has ended his set (crowd applauds)" unless handler_name =~/cgi/i
1198
1198
  end
@@ -1218,19 +1218,27 @@ module Sinatra
1218
1218
  @prototype ||= new
1219
1219
  end
1220
1220
 
1221
+ # Create a new instance without middleware in front of it.
1222
+ alias new! new unless method_defined? :new!
1223
+
1221
1224
  # Create a new instance of the class fronted by its middleware
1222
1225
  # pipeline. The object is guaranteed to respond to #call but may not be
1223
1226
  # an instance of the class new was called on.
1224
1227
  def new(*args, &bk)
1228
+ build(*args, &bk).to_app
1229
+ end
1230
+
1231
+ # Creates a Rack::Builder instance with all the middleware set up and
1232
+ # an instance of this class as end point.
1233
+ def build(*args, &bk)
1225
1234
  builder = Rack::Builder.new
1226
- builder.use Rack::Session::Cookie if sessions?
1235
+ setup_sessions builder
1227
1236
  builder.use Rack::CommonLogger if logging?
1228
1237
  builder.use Rack::MethodOverride if method_override?
1229
1238
  builder.use ShowExceptions if show_exceptions?
1230
1239
  middleware.each { |c,a,b| builder.use(c, *a, &b) }
1231
-
1232
- builder.run super
1233
- builder.to_app
1240
+ builder.run new!(*args, &bk)
1241
+ builder
1234
1242
  end
1235
1243
 
1236
1244
  def call(env)
@@ -1238,6 +1246,11 @@ module Sinatra
1238
1246
  end
1239
1247
 
1240
1248
  private
1249
+ def setup_sessions(builder)
1250
+ return unless sessions?
1251
+ builder.use Rack::Session::Cookie, :secret => session_secret
1252
+ end
1253
+
1241
1254
  def detect_rack_handler
1242
1255
  servers = Array(server)
1243
1256
  servers.each do |server_name|
@@ -1334,6 +1347,9 @@ module Sinatra
1334
1347
  set :default_encoding, "utf-8"
1335
1348
  set :add_charset, [/^text\//, 'application/javascript', 'application/xml', 'application/xhtml+xml']
1336
1349
 
1350
+ # explicitly generating this eagerly to play nice with preforking
1351
+ set :session_secret, '%x' % rand(2**255)
1352
+
1337
1353
  class << self
1338
1354
  alias_method :methodoverride?, :method_override?
1339
1355
  alias_method :methodoverride=, :method_override=
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = 'sinatra'
6
- s.version = '1.2.0'
7
- s.date = '2011-03-03'
6
+ s.version = '1.2.1'
7
+ s.date = '2011-03-17'
8
8
 
9
9
  s.description = "Classy web-development dressed in a DSL"
10
10
  s.summary = "Classy web-development dressed in a DSL"
@@ -71,7 +71,7 @@ class BaseTest < Test::Unit::TestCase
71
71
  end
72
72
 
73
73
  it 'exposes the downstream app' do
74
- middleware = TestMiddleware.new(app)
74
+ middleware = TestMiddleware.new!(app)
75
75
  assert_same app, middleware.app
76
76
  end
77
77
 
@@ -25,6 +25,12 @@ class Sinatra::Base
25
25
  include Test::Unit::Assertions
26
26
  end
27
27
 
28
+ class Rack::Builder
29
+ def include?(middleware)
30
+ @ins.any? { |m| p m ; middleware === m }
31
+ end
32
+ end
33
+
28
34
  Sinatra::Base.set :environment, :test
29
35
 
30
36
  class Test::Unit::TestCase
@@ -255,6 +255,35 @@ class HelpersTest < Test::Unit::TestCase
255
255
  follow_redirect!
256
256
  assert_equal 'hi bar', body
257
257
  end
258
+
259
+ it 'inserts session middleware' do
260
+ mock_app do
261
+ enable :sessions
262
+ get '/' do
263
+ assert env['rack.session']
264
+ assert env['rack.session.options']
265
+ 'ok'
266
+ end
267
+ end
268
+
269
+ get '/'
270
+ assert_body 'ok'
271
+ end
272
+
273
+ it 'sets a default session secret' do
274
+ mock_app do
275
+ enable :sessions
276
+ get '/' do
277
+ secret = env['rack.session.options'][:secret]
278
+ assert secret
279
+ assert_equal secret, settings.session_secret
280
+ 'ok'
281
+ end
282
+ end
283
+
284
+ get '/'
285
+ assert_body 'ok'
286
+ end
258
287
  end
259
288
 
260
289
  describe 'mime_type' do
@@ -38,7 +38,7 @@ class RequestTest < Test::Unit::TestCase
38
38
  'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
39
39
  'rack.input' => StringIO.new('foo=bar')
40
40
  )
41
- params = Sinatra::Base.new.send(:indifferent_hash).replace(request.params)
41
+ params = Sinatra::Base.new!.send(:indifferent_hash).replace(request.params)
42
42
  dumped = Marshal.dump(request.params)
43
43
  assert_equal 'bar', Marshal.load(dumped)['foo']
44
44
  end
@@ -778,16 +778,11 @@ class RoutingTest < Test::Unit::TestCase
778
778
  end
779
779
 
780
780
  it 'raises an ArgumentError with block arity > 1 and too many values' do
781
- if RUBY_ENGINE == "rbx"
782
- $stderr.puts "\npending test: #{__method__}, #{__FILE__}:#{__LINE__} "
783
- next
784
- end
785
-
786
- mock_app {
781
+ mock_app do
787
782
  get '/:foo/:bar/:baz' do |foo, bar|
788
783
  'quux'
789
784
  end
790
- }
785
+ end
791
786
 
792
787
  assert_raise(ArgumentError) { get '/a/b/c' }
793
788
  end
@@ -949,4 +944,15 @@ class RoutingTest < Test::Unit::TestCase
949
944
  assert ok?
950
945
  assert_equal 'bar in baseclass', body
951
946
  end
947
+
948
+ it "adds hostname condition when it is in options" do
949
+ mock_app {
950
+ get '/foo', :host => 'host' do
951
+ 'foo'
952
+ end
953
+ }
954
+
955
+ get '/foo'
956
+ assert not_found?
957
+ end
952
958
  end
@@ -112,7 +112,7 @@ class SettingsTest < Test::Unit::TestCase
112
112
  end
113
113
 
114
114
  it 'is accessible from instances via #settings' do
115
- assert_equal :foo, @base.new.settings.environment
115
+ assert_equal :foo, @base.new!.settings.environment
116
116
  end
117
117
 
118
118
  it 'is accessible from class via #settings' do
@@ -12,6 +12,6 @@ class SinatraTest < Test::Unit::TestCase
12
12
  end
13
13
 
14
14
  it "responds to #template_cache" do
15
- assert_kind_of Tilt::Cache, Sinatra::Base.new.template_cache
15
+ assert_kind_of Tilt::Cache, Sinatra::Base.new!.template_cache
16
16
  end
17
17
  end
@@ -224,6 +224,14 @@ class TemplatesTest < Test::Unit::TestCase
224
224
  assert_equal "Hello <%= 'World' %>!", body
225
225
  end
226
226
 
227
+ it "does not leak the content type to the template" do
228
+ render_app :str => { :layout_engine => :erb } do
229
+ settings.template(:layout) { 'Hello <%= yield %>!' }
230
+ render :str, "<%= 'World' %>", :content_type => :txt
231
+ end
232
+ assert_equal "text/html;charset=utf-8", headers['Content-Type']
233
+ end
234
+
227
235
  it "is possible to register another template" do
228
236
  Tilt.register "html.erb", Tilt[:erb]
229
237
  render_app { render :erb, :calc }
metadata CHANGED
@@ -1,79 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
4
  prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 0
10
- version: 1.2.0
5
+ version: 1.2.1
11
6
  platform: ruby
12
7
  authors:
13
- - Blake Mizerany
14
- - Ryan Tomayko
15
- - Simon Rozet
16
- - Konstantin Haase
8
+ - Blake Mizerany
9
+ - Ryan Tomayko
10
+ - Simon Rozet
11
+ - Konstantin Haase
17
12
  autorequire:
18
13
  bindir: bin
19
14
  cert_chain: []
20
15
 
21
- date: 2011-03-03 00:00:00 +01:00
16
+ date: 2011-03-17 00:00:00 +01:00
22
17
  default_executable:
23
18
  dependencies:
24
- - !ruby/object:Gem::Dependency
25
- name: rack
26
- prerelease: false
27
- requirement: &id001 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- hash: 13
33
- segments:
34
- - 1
35
- - 1
36
- version: "1.1"
37
- type: :runtime
38
- version_requirements: *id001
39
- - !ruby/object:Gem::Dependency
40
- name: tilt
41
- prerelease: false
42
- requirement: &id002 !ruby/object:Gem::Requirement
43
- none: false
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- hash: 27
48
- segments:
49
- - 1
50
- - 2
51
- - 2
52
- version: 1.2.2
53
- - - <
54
- - !ruby/object:Gem::Version
55
- hash: 3
56
- segments:
57
- - 2
58
- - 0
59
- version: "2.0"
60
- type: :runtime
61
- version_requirements: *id002
62
- - !ruby/object:Gem::Dependency
63
- name: shotgun
64
- prerelease: false
65
- requirement: &id003 !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ~>
69
- - !ruby/object:Gem::Version
70
- hash: 7
71
- segments:
72
- - 0
73
- - 6
74
- version: "0.6"
75
- type: :development
76
- version_requirements: *id003
19
+ - !ruby/object:Gem::Dependency
20
+ name: rack
21
+ prerelease: false
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: "1.1"
28
+ type: :runtime
29
+ version_requirements: *id001
30
+ - !ruby/object:Gem::Dependency
31
+ name: tilt
32
+ prerelease: false
33
+ requirement: &id002 !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 1.2.2
39
+ - - <
40
+ - !ruby/object:Gem::Version
41
+ version: "2.0"
42
+ type: :runtime
43
+ version_requirements: *id002
44
+ - !ruby/object:Gem::Dependency
45
+ name: shotgun
46
+ prerelease: false
47
+ requirement: &id003 !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ~>
51
+ - !ruby/object:Gem::Version
52
+ version: "0.6"
53
+ type: :development
54
+ version_requirements: *id003
77
55
  description: Classy web-development dressed in a DSL
78
56
  email: sinatrarb@googlegroups.com
79
57
  executables: []
@@ -81,185 +59,179 @@ executables: []
81
59
  extensions: []
82
60
 
83
61
  extra_rdoc_files:
84
- - README.rdoc
85
- - README.de.rdoc
86
- - README.jp.rdoc
87
- - README.fr.rdoc
88
- - README.es.rdoc
89
- - README.hu.rdoc
90
- - README.zh.rdoc
91
- - LICENSE
62
+ - README.rdoc
63
+ - README.de.rdoc
64
+ - README.jp.rdoc
65
+ - README.fr.rdoc
66
+ - README.es.rdoc
67
+ - README.hu.rdoc
68
+ - README.zh.rdoc
69
+ - LICENSE
92
70
  files:
93
- - AUTHORS
94
- - CHANGES
95
- - Gemfile
96
- - LICENSE
97
- - README.de.rdoc
98
- - README.es.rdoc
99
- - README.fr.rdoc
100
- - README.hu.rdoc
101
- - README.jp.rdoc
102
- - README.pt-br.rdoc
103
- - README.rdoc
104
- - README.ru.rdoc
105
- - README.zh.rdoc
106
- - Rakefile
107
- - lib/sinatra.rb
108
- - lib/sinatra/base.rb
109
- - lib/sinatra/images/404.png
110
- - lib/sinatra/images/500.png
111
- - lib/sinatra/main.rb
112
- - lib/sinatra/showexceptions.rb
113
- - sinatra.gemspec
114
- - test/base_test.rb
115
- - test/builder_test.rb
116
- - test/coffee_test.rb
117
- - test/contest.rb
118
- - test/encoding_test.rb
119
- - test/erb_test.rb
120
- - test/erubis_test.rb
121
- - test/extensions_test.rb
122
- - test/filter_test.rb
123
- - test/haml_test.rb
124
- - test/hello.mab
125
- - test/helper.rb
126
- - test/helpers_test.rb
127
- - test/less_test.rb
128
- - test/liquid_test.rb
129
- - test/mapped_error_test.rb
130
- - test/markaby_test.rb
131
- - test/markdown_test.rb
132
- - test/middleware_test.rb
133
- - test/nokogiri_test.rb
134
- - test/public/favicon.ico
135
- - test/radius_test.rb
136
- - test/rdoc_test.rb
137
- - test/request_test.rb
138
- - test/response_test.rb
139
- - test/result_test.rb
140
- - test/route_added_hook_test.rb
141
- - test/routing_test.rb
142
- - test/sass_test.rb
143
- - test/scss_test.rb
144
- - test/server_test.rb
145
- - test/settings_test.rb
146
- - test/sinatra_test.rb
147
- - test/slim_test.rb
148
- - test/static_test.rb
149
- - test/templates_test.rb
150
- - test/textile_test.rb
151
- - test/views/a/in_a.str
152
- - test/views/ascii.erb
153
- - test/views/b/in_b.str
154
- - test/views/calc.html.erb
155
- - test/views/error.builder
156
- - test/views/error.erb
157
- - test/views/error.erubis
158
- - test/views/error.haml
159
- - test/views/error.sass
160
- - test/views/explicitly_nested.str
161
- - test/views/foo/hello.test
162
- - test/views/hello.builder
163
- - test/views/hello.coffee
164
- - test/views/hello.erb
165
- - test/views/hello.erubis
166
- - test/views/hello.haml
167
- - test/views/hello.less
168
- - test/views/hello.liquid
169
- - test/views/hello.mab
170
- - test/views/hello.md
171
- - test/views/hello.nokogiri
172
- - test/views/hello.radius
173
- - test/views/hello.rdoc
174
- - test/views/hello.sass
175
- - test/views/hello.scss
176
- - test/views/hello.slim
177
- - test/views/hello.str
178
- - test/views/hello.test
179
- - test/views/hello.textile
180
- - test/views/layout2.builder
181
- - test/views/layout2.erb
182
- - test/views/layout2.erubis
183
- - test/views/layout2.haml
184
- - test/views/layout2.liquid
185
- - test/views/layout2.mab
186
- - test/views/layout2.nokogiri
187
- - test/views/layout2.radius
188
- - test/views/layout2.slim
189
- - test/views/layout2.str
190
- - test/views/layout2.test
191
- - test/views/nested.str
192
- - test/views/utf8.erb
71
+ - AUTHORS
72
+ - CHANGES
73
+ - Gemfile
74
+ - LICENSE
75
+ - README.de.rdoc
76
+ - README.es.rdoc
77
+ - README.fr.rdoc
78
+ - README.hu.rdoc
79
+ - README.jp.rdoc
80
+ - README.pt-br.rdoc
81
+ - README.rdoc
82
+ - README.ru.rdoc
83
+ - README.zh.rdoc
84
+ - Rakefile
85
+ - lib/sinatra.rb
86
+ - lib/sinatra/base.rb
87
+ - lib/sinatra/images/404.png
88
+ - lib/sinatra/images/500.png
89
+ - lib/sinatra/main.rb
90
+ - lib/sinatra/showexceptions.rb
91
+ - sinatra.gemspec
92
+ - test/base_test.rb
93
+ - test/builder_test.rb
94
+ - test/coffee_test.rb
95
+ - test/contest.rb
96
+ - test/encoding_test.rb
97
+ - test/erb_test.rb
98
+ - test/erubis_test.rb
99
+ - test/extensions_test.rb
100
+ - test/filter_test.rb
101
+ - test/haml_test.rb
102
+ - test/hello.mab
103
+ - test/helper.rb
104
+ - test/helpers_test.rb
105
+ - test/less_test.rb
106
+ - test/liquid_test.rb
107
+ - test/mapped_error_test.rb
108
+ - test/markaby_test.rb
109
+ - test/markdown_test.rb
110
+ - test/middleware_test.rb
111
+ - test/nokogiri_test.rb
112
+ - test/public/favicon.ico
113
+ - test/radius_test.rb
114
+ - test/rdoc_test.rb
115
+ - test/request_test.rb
116
+ - test/response_test.rb
117
+ - test/result_test.rb
118
+ - test/route_added_hook_test.rb
119
+ - test/routing_test.rb
120
+ - test/sass_test.rb
121
+ - test/scss_test.rb
122
+ - test/server_test.rb
123
+ - test/settings_test.rb
124
+ - test/sinatra_test.rb
125
+ - test/slim_test.rb
126
+ - test/static_test.rb
127
+ - test/templates_test.rb
128
+ - test/textile_test.rb
129
+ - test/views/a/in_a.str
130
+ - test/views/ascii.erb
131
+ - test/views/b/in_b.str
132
+ - test/views/calc.html.erb
133
+ - test/views/error.builder
134
+ - test/views/error.erb
135
+ - test/views/error.erubis
136
+ - test/views/error.haml
137
+ - test/views/error.sass
138
+ - test/views/explicitly_nested.str
139
+ - test/views/foo/hello.test
140
+ - test/views/hello.builder
141
+ - test/views/hello.coffee
142
+ - test/views/hello.erb
143
+ - test/views/hello.erubis
144
+ - test/views/hello.haml
145
+ - test/views/hello.less
146
+ - test/views/hello.liquid
147
+ - test/views/hello.mab
148
+ - test/views/hello.md
149
+ - test/views/hello.nokogiri
150
+ - test/views/hello.radius
151
+ - test/views/hello.rdoc
152
+ - test/views/hello.sass
153
+ - test/views/hello.scss
154
+ - test/views/hello.slim
155
+ - test/views/hello.str
156
+ - test/views/hello.test
157
+ - test/views/hello.textile
158
+ - test/views/layout2.builder
159
+ - test/views/layout2.erb
160
+ - test/views/layout2.erubis
161
+ - test/views/layout2.haml
162
+ - test/views/layout2.liquid
163
+ - test/views/layout2.mab
164
+ - test/views/layout2.nokogiri
165
+ - test/views/layout2.radius
166
+ - test/views/layout2.slim
167
+ - test/views/layout2.str
168
+ - test/views/layout2.test
169
+ - test/views/nested.str
170
+ - test/views/utf8.erb
193
171
  has_rdoc: true
194
172
  homepage: http://sinatra.rubyforge.org
195
173
  licenses: []
196
174
 
197
175
  post_install_message:
198
176
  rdoc_options:
199
- - --line-numbers
200
- - --inline-source
201
- - --title
202
- - Sinatra
203
- - --main
204
- - README.rdoc
177
+ - --line-numbers
178
+ - --inline-source
179
+ - --title
180
+ - Sinatra
181
+ - --main
182
+ - README.rdoc
205
183
  require_paths:
206
- - lib
184
+ - lib
207
185
  required_ruby_version: !ruby/object:Gem::Requirement
208
186
  none: false
209
187
  requirements:
210
- - - ">="
211
- - !ruby/object:Gem::Version
212
- hash: 3
213
- segments:
214
- - 0
215
- version: "0"
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: "0"
216
191
  required_rubygems_version: !ruby/object:Gem::Requirement
217
192
  none: false
218
193
  requirements:
219
- - - ">="
220
- - !ruby/object:Gem::Version
221
- hash: 3
222
- segments:
223
- - 0
224
- version: "0"
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: "0"
225
197
  requirements: []
226
198
 
227
199
  rubyforge_project: sinatra
228
- rubygems_version: 1.5.2
200
+ rubygems_version: 1.5.1
229
201
  signing_key:
230
202
  specification_version: 2
231
203
  summary: Classy web-development dressed in a DSL
232
204
  test_files:
233
- - test/base_test.rb
234
- - test/builder_test.rb
235
- - test/coffee_test.rb
236
- - test/encoding_test.rb
237
- - test/erb_test.rb
238
- - test/erubis_test.rb
239
- - test/extensions_test.rb
240
- - test/filter_test.rb
241
- - test/haml_test.rb
242
- - test/helpers_test.rb
243
- - test/less_test.rb
244
- - test/liquid_test.rb
245
- - test/mapped_error_test.rb
246
- - test/markaby_test.rb
247
- - test/markdown_test.rb
248
- - test/middleware_test.rb
249
- - test/nokogiri_test.rb
250
- - test/radius_test.rb
251
- - test/rdoc_test.rb
252
- - test/request_test.rb
253
- - test/response_test.rb
254
- - test/result_test.rb
255
- - test/route_added_hook_test.rb
256
- - test/routing_test.rb
257
- - test/sass_test.rb
258
- - test/scss_test.rb
259
- - test/server_test.rb
260
- - test/settings_test.rb
261
- - test/sinatra_test.rb
262
- - test/slim_test.rb
263
- - test/static_test.rb
264
- - test/templates_test.rb
265
- - test/textile_test.rb
205
+ - test/base_test.rb
206
+ - test/builder_test.rb
207
+ - test/coffee_test.rb
208
+ - test/encoding_test.rb
209
+ - test/erb_test.rb
210
+ - test/erubis_test.rb
211
+ - test/extensions_test.rb
212
+ - test/filter_test.rb
213
+ - test/haml_test.rb
214
+ - test/helpers_test.rb
215
+ - test/less_test.rb
216
+ - test/liquid_test.rb
217
+ - test/mapped_error_test.rb
218
+ - test/markaby_test.rb
219
+ - test/markdown_test.rb
220
+ - test/middleware_test.rb
221
+ - test/nokogiri_test.rb
222
+ - test/radius_test.rb
223
+ - test/rdoc_test.rb
224
+ - test/request_test.rb
225
+ - test/response_test.rb
226
+ - test/result_test.rb
227
+ - test/route_added_hook_test.rb
228
+ - test/routing_test.rb
229
+ - test/sass_test.rb
230
+ - test/scss_test.rb
231
+ - test/server_test.rb
232
+ - test/settings_test.rb
233
+ - test/sinatra_test.rb
234
+ - test/slim_test.rb
235
+ - test/static_test.rb
236
+ - test/templates_test.rb
237
+ - test/textile_test.rb