sinatra 1.4.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +111 -47
  3. data/CONTRIBUTING.md +1 -1
  4. data/Gemfile +41 -49
  5. data/LICENSE +4 -1
  6. data/MAINTENANCE.md +42 -0
  7. data/README.de.md +644 -436
  8. data/README.es.md +6 -6
  9. data/README.fr.md +9 -9
  10. data/README.hu.md +37 -3
  11. data/README.ja.md +103 -45
  12. data/README.ko.md +8 -8
  13. data/README.md +471 -363
  14. data/README.pt-br.md +3 -3
  15. data/README.pt-pt.md +2 -2
  16. data/README.ru.md +42 -64
  17. data/README.zh.md +8 -8
  18. data/Rakefile +72 -49
  19. data/SECURITY.md +35 -0
  20. data/lib/sinatra/base.rb +137 -195
  21. data/lib/sinatra/indifferent_hash.rb +150 -0
  22. data/lib/sinatra/main.rb +1 -0
  23. data/lib/sinatra/show_exceptions.rb +63 -55
  24. data/lib/sinatra/version.rb +1 -1
  25. data/sinatra.gemspec +19 -7
  26. metadata +30 -164
  27. data/lib/sinatra/ext.rb +0 -17
  28. data/test/asciidoctor_test.rb +0 -72
  29. data/test/base_test.rb +0 -167
  30. data/test/builder_test.rb +0 -91
  31. data/test/coffee_test.rb +0 -96
  32. data/test/compile_test.rb +0 -183
  33. data/test/contest.rb +0 -91
  34. data/test/creole_test.rb +0 -65
  35. data/test/delegator_test.rb +0 -160
  36. data/test/encoding_test.rb +0 -20
  37. data/test/erb_test.rb +0 -116
  38. data/test/extensions_test.rb +0 -98
  39. data/test/filter_test.rb +0 -487
  40. data/test/haml_test.rb +0 -109
  41. data/test/helper.rb +0 -132
  42. data/test/helpers_test.rb +0 -1917
  43. data/test/integration/app.rb +0 -79
  44. data/test/integration_helper.rb +0 -236
  45. data/test/integration_test.rb +0 -104
  46. data/test/less_test.rb +0 -69
  47. data/test/liquid_test.rb +0 -77
  48. data/test/mapped_error_test.rb +0 -285
  49. data/test/markaby_test.rb +0 -80
  50. data/test/markdown_test.rb +0 -85
  51. data/test/mediawiki_test.rb +0 -68
  52. data/test/middleware_test.rb +0 -68
  53. data/test/nokogiri_test.rb +0 -67
  54. data/test/public/favicon.ico +0 -0
  55. data/test/public/hello+world.txt +0 -1
  56. data/test/rabl_test.rb +0 -89
  57. data/test/rack_test.rb +0 -45
  58. data/test/radius_test.rb +0 -59
  59. data/test/rdoc_test.rb +0 -66
  60. data/test/readme_test.rb +0 -130
  61. data/test/request_test.rb +0 -100
  62. data/test/response_test.rb +0 -63
  63. data/test/result_test.rb +0 -76
  64. data/test/route_added_hook_test.rb +0 -59
  65. data/test/routing_test.rb +0 -1456
  66. data/test/sass_test.rb +0 -115
  67. data/test/scss_test.rb +0 -88
  68. data/test/server_test.rb +0 -56
  69. data/test/settings_test.rb +0 -582
  70. data/test/sinatra_test.rb +0 -12
  71. data/test/slim_test.rb +0 -102
  72. data/test/static_test.rb +0 -266
  73. data/test/streaming_test.rb +0 -149
  74. data/test/stylus_test.rb +0 -90
  75. data/test/templates_test.rb +0 -382
  76. data/test/textile_test.rb +0 -65
  77. data/test/views/a/in_a.str +0 -1
  78. data/test/views/ascii.erb +0 -2
  79. data/test/views/b/in_b.str +0 -1
  80. data/test/views/calc.html.erb +0 -1
  81. data/test/views/error.builder +0 -3
  82. data/test/views/error.erb +0 -3
  83. data/test/views/error.haml +0 -3
  84. data/test/views/error.sass +0 -2
  85. data/test/views/explicitly_nested.str +0 -1
  86. data/test/views/foo/hello.test +0 -1
  87. data/test/views/hello.asciidoc +0 -1
  88. data/test/views/hello.builder +0 -1
  89. data/test/views/hello.coffee +0 -1
  90. data/test/views/hello.creole +0 -1
  91. data/test/views/hello.erb +0 -1
  92. data/test/views/hello.haml +0 -1
  93. data/test/views/hello.less +0 -5
  94. data/test/views/hello.liquid +0 -1
  95. data/test/views/hello.mab +0 -1
  96. data/test/views/hello.md +0 -1
  97. data/test/views/hello.mediawiki +0 -1
  98. data/test/views/hello.nokogiri +0 -1
  99. data/test/views/hello.rabl +0 -2
  100. data/test/views/hello.radius +0 -1
  101. data/test/views/hello.rdoc +0 -1
  102. data/test/views/hello.sass +0 -2
  103. data/test/views/hello.scss +0 -3
  104. data/test/views/hello.slim +0 -1
  105. data/test/views/hello.str +0 -1
  106. data/test/views/hello.styl +0 -2
  107. data/test/views/hello.test +0 -1
  108. data/test/views/hello.textile +0 -1
  109. data/test/views/hello.wlang +0 -1
  110. data/test/views/hello.yajl +0 -1
  111. data/test/views/layout2.builder +0 -3
  112. data/test/views/layout2.erb +0 -2
  113. data/test/views/layout2.haml +0 -2
  114. data/test/views/layout2.liquid +0 -2
  115. data/test/views/layout2.mab +0 -2
  116. data/test/views/layout2.nokogiri +0 -3
  117. data/test/views/layout2.rabl +0 -3
  118. data/test/views/layout2.radius +0 -2
  119. data/test/views/layout2.slim +0 -3
  120. data/test/views/layout2.str +0 -2
  121. data/test/views/layout2.test +0 -1
  122. data/test/views/layout2.wlang +0 -2
  123. data/test/views/nested.str +0 -1
  124. data/test/views/utf8.erb +0 -2
  125. data/test/wlang_test.rb +0 -87
  126. data/test/yajl_test.rb +0 -86
@@ -0,0 +1,150 @@
1
+ # frozen_string_literal: true
2
+ module Sinatra
3
+ # A poor man's ActiveSupport::HashWithIndifferentAccess, with all the Rails-y
4
+ # stuff removed.
5
+ #
6
+ # Implements a hash where keys <tt>:foo</tt> and <tt>"foo"</tt> are
7
+ # considered to be the same.
8
+ #
9
+ # rgb = Sinatra::IndifferentHash.new
10
+ #
11
+ # rgb[:black] = '#000000' # symbol assignment
12
+ # rgb[:black] # => '#000000' # symbol retrieval
13
+ # rgb['black'] # => '#000000' # string retrieval
14
+ #
15
+ # rgb['white'] = '#FFFFFF' # string assignment
16
+ # rgb[:white] # => '#FFFFFF' # symbol retrieval
17
+ # rgb['white'] # => '#FFFFFF' # string retrieval
18
+ #
19
+ # Internally, symbols are mapped to strings when used as keys in the entire
20
+ # writing interface (calling e.g. <tt>[]=</tt>, <tt>merge</tt>). This mapping
21
+ # belongs to the public interface. For example, given:
22
+ #
23
+ # hash = Sinatra::IndifferentHash.new(:a=>1)
24
+ #
25
+ # You are guaranteed that the key is returned as a string:
26
+ #
27
+ # hash.keys # => ["a"]
28
+ #
29
+ # Technically other types of keys are accepted:
30
+ #
31
+ # hash = Sinatra::IndifferentHash.new(:a=>1)
32
+ # hash[0] = 0
33
+ # hash # => { "a"=>1, 0=>0 }
34
+ #
35
+ # But this class is intended for use cases where strings or symbols are the
36
+ # expected keys and it is convenient to understand both as the same. For
37
+ # example the +params+ hash in Sinatra.
38
+ class IndifferentHash < Hash
39
+ def self.[](*args)
40
+ new.merge!(Hash[*args])
41
+ end
42
+
43
+ def initialize(*args)
44
+ super(*args.map(&method(:convert_value)))
45
+ end
46
+
47
+ def default(*args)
48
+ super(*args.map(&method(:convert_key)))
49
+ end
50
+
51
+ def default=(value)
52
+ super(convert_value(value))
53
+ end
54
+
55
+ def assoc(key)
56
+ super(convert_key(key))
57
+ end
58
+
59
+ def rassoc(value)
60
+ super(convert_value(value))
61
+ end
62
+
63
+ def fetch(key, *args)
64
+ super(convert_key(key), *args.map(&method(:convert_value)))
65
+ end
66
+
67
+ def [](key)
68
+ super(convert_key(key))
69
+ end
70
+
71
+ def []=(key, value)
72
+ super(convert_key(key), convert_value(value))
73
+ end
74
+
75
+ alias_method :store, :[]=
76
+
77
+ def key(value)
78
+ super(convert_value(value))
79
+ end
80
+
81
+ def key?(key)
82
+ super(convert_key(key))
83
+ end
84
+
85
+ alias_method :has_key?, :key?
86
+ alias_method :include?, :key?
87
+ alias_method :member?, :key?
88
+
89
+ def value?(value)
90
+ super(convert_value(value))
91
+ end
92
+
93
+ alias_method :has_value?, :value?
94
+
95
+ def delete(key)
96
+ super(convert_key(key))
97
+ end
98
+
99
+ def dig(key, *other_keys)
100
+ super(convert_key(key), *other_keys)
101
+ end if method_defined?(:dig) # Added in Ruby 2.3
102
+
103
+ def fetch_values(*keys)
104
+ super(*keys.map(&method(:convert_key)))
105
+ end if method_defined?(:fetch_values) # Added in Ruby 2.3
106
+
107
+ def values_at(*keys)
108
+ super(*keys.map(&method(:convert_key)))
109
+ end
110
+
111
+ def merge!(other_hash)
112
+ return super if other_hash.is_a?(self.class)
113
+
114
+ other_hash.each_pair do |key, value|
115
+ key = convert_key(key)
116
+ value = yield(key, self[key], value) if block_given? && key?(key)
117
+ self[key] = convert_value(value)
118
+ end
119
+
120
+ self
121
+ end
122
+
123
+ alias_method :update, :merge!
124
+
125
+ def merge(other_hash, &block)
126
+ dup.merge!(other_hash, &block)
127
+ end
128
+
129
+ def replace(other_hash)
130
+ super(other_hash.is_a?(self.class) ? other_hash : self.class[other_hash])
131
+ end
132
+
133
+ private
134
+
135
+ def convert_key(key)
136
+ key.is_a?(Symbol) ? key.to_s : key
137
+ end
138
+
139
+ def convert_value(value)
140
+ case value
141
+ when Hash
142
+ value.is_a?(self.class) ? value : self.class[value]
143
+ when Array
144
+ value.map(&method(:convert_value))
145
+ else
146
+ value
147
+ end
148
+ end
149
+ end
150
+ end
data/lib/sinatra/main.rb CHANGED
@@ -17,6 +17,7 @@ module Sinatra
17
17
  op.on('-o addr', "set the host (default is #{bind})") { |val| set :bind, val }
18
18
  op.on('-e env', 'set the environment (default is development)') { |val| set :environment, val.to_sym }
19
19
  op.on('-s server', 'specify rack server/handler (default is thin)') { |val| set :server, val }
20
+ op.on('-q', 'turn on quiet mode (default is off)') { set :quiet, true }
20
21
  op.on('-x', 'turn on the mutex lock (default is off)') { set :lock, true }
21
22
  }.parse!(ARGV.dup)
22
23
  end
@@ -1,8 +1,6 @@
1
- begin
2
- require 'rack/show_exceptions'
3
- rescue LoadError
4
- require 'rack/showexceptions'
5
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'rack/show_exceptions'
6
4
 
7
5
  module Sinatra
8
6
  # Sinatra::ShowExceptions catches all exceptions raised from the app it
@@ -17,8 +15,7 @@ module Sinatra
17
15
  def @@eats_errors.puts(*) end
18
16
 
19
17
  def initialize(app)
20
- @app = app
21
- @template = ERB.new(TEMPLATE)
18
+ @app = app
22
19
  end
23
20
 
24
21
  def call(env)
@@ -44,7 +41,7 @@ module Sinatra
44
41
  500,
45
42
  {
46
43
  "Content-Type" => content_type,
47
- "Content-Length" => Rack::Utils.bytesize(body.join).to_s
44
+ "Content-Length" => body.join.bytesize.to_s
48
45
  },
49
46
  body
50
47
  ]
@@ -52,23 +49,27 @@ module Sinatra
52
49
 
53
50
  private
54
51
 
52
+ def bad_request?(e)
53
+ Sinatra::BadRequest === e
54
+ end
55
+
55
56
  def prefers_plain_text?(env)
56
57
  !(Request.new(env).preferred_type("text/plain","text/html") == "text/html") &&
57
- [/curl/].index{|item| item =~ env["HTTP_USER_AGENT"]}
58
+ [/curl/].index { |item| item =~ env["HTTP_USER_AGENT"] }
58
59
  end
59
60
 
60
61
  def frame_class(frame)
61
- if frame.filename =~ /lib\/sinatra.*\.rb/
62
+ if frame.filename =~ %r{lib/sinatra.*\.rb}
62
63
  "framework"
63
64
  elsif (defined?(Gem) && frame.filename.include?(Gem.dir)) ||
64
- frame.filename =~ /\/bin\/(\w+)$/
65
+ frame.filename =~ %r{/bin/(\w+)\z}
65
66
  "system"
66
67
  else
67
68
  "app"
68
69
  end
69
70
  end
70
71
 
71
- TEMPLATE = <<-HTML # :nodoc:
72
+ TEMPLATE = ERB.new <<-HTML # :nodoc:
72
73
  <!DOCTYPE html>
73
74
  <html>
74
75
  <head>
@@ -213,8 +214,10 @@ TEMPLATE = <<-HTML # :nodoc:
213
214
  <p><a href="#" id="expando"
214
215
  onclick="toggleBacktrace(); return false">(expand)</a></p>
215
216
  <p id="nav"><strong>JUMP TO:</strong>
216
- <a href="#get-info">GET</a>
217
- <a href="#post-info">POST</a>
217
+ <% unless bad_request?(exception) %>
218
+ <a href="#get-info">GET</a>
219
+ <a href="#post-info">POST</a>
220
+ <% end %>
218
221
  <a href="#cookie-info">COOKIES</a>
219
222
  <a href="#env-info">ENV</a>
220
223
  </p>
@@ -267,47 +270,49 @@ TEMPLATE = <<-HTML # :nodoc:
267
270
  </ul>
268
271
  </div> <!-- /BACKTRACE -->
269
272
 
270
- <div id="get">
271
- <h3 id="get-info">GET</h3>
272
- <% if req.GET and not req.GET.empty? %>
273
- <table class="req">
274
- <tr>
275
- <th>Variable</th>
276
- <th>Value</th>
277
- </tr>
278
- <% req.GET.sort_by { |k, v| k.to_s }.each { |key, val| %>
279
- <tr>
280
- <td><%=h key %></td>
281
- <td class="code"><div><%=h val.inspect %></div></td>
282
- </tr>
283
- <% } %>
284
- </table>
285
- <% else %>
286
- <p class="no-data">No GET data.</p>
287
- <% end %>
288
- <div class="clear"></div>
289
- </div> <!-- /GET -->
290
-
291
- <div id="post">
292
- <h3 id="post-info">POST</h3>
293
- <% if req.POST and not req.POST.empty? %>
294
- <table class="req">
295
- <tr>
296
- <th>Variable</th>
297
- <th>Value</th>
298
- </tr>
299
- <% req.POST.sort_by { |k, v| k.to_s }.each { |key, val| %>
300
- <tr>
301
- <td><%=h key %></td>
302
- <td class="code"><div><%=h val.inspect %></div></td>
303
- </tr>
304
- <% } %>
305
- </table>
306
- <% else %>
307
- <p class="no-data">No POST data.</p>
308
- <% end %>
309
- <div class="clear"></div>
310
- </div> <!-- /POST -->
273
+ <% unless bad_request?(exception) %>
274
+ <div id="get">
275
+ <h3 id="get-info">GET</h3>
276
+ <% if req.GET and not req.GET.empty? %>
277
+ <table class="req">
278
+ <tr>
279
+ <th>Variable</th>
280
+ <th>Value</th>
281
+ </tr>
282
+ <% req.GET.sort_by { |k, v| k.to_s }.each { |key, val| %>
283
+ <tr>
284
+ <td><%=h key %></td>
285
+ <td class="code"><div><%=h val.inspect %></div></td>
286
+ </tr>
287
+ <% } %>
288
+ </table>
289
+ <% else %>
290
+ <p class="no-data">No GET data.</p>
291
+ <% end %>
292
+ <div class="clear"></div>
293
+ </div> <!-- /GET -->
294
+
295
+ <div id="post">
296
+ <h3 id="post-info">POST</h3>
297
+ <% if req.POST and not req.POST.empty? %>
298
+ <table class="req">
299
+ <tr>
300
+ <th>Variable</th>
301
+ <th>Value</th>
302
+ </tr>
303
+ <% req.POST.sort_by { |k, v| k.to_s }.each { |key, val| %>
304
+ <tr>
305
+ <td><%=h key %></td>
306
+ <td class="code"><div><%=h val.inspect %></div></td>
307
+ </tr>
308
+ <% } %>
309
+ </table>
310
+ <% else %>
311
+ <p class="no-data">No POST data.</p>
312
+ <% end %>
313
+ <div class="clear"></div>
314
+ </div> <!-- /POST -->
315
+ <% end %>
311
316
 
312
317
  <div id="cookies">
313
318
  <h3 id="cookie-info">COOKIES</h3>
@@ -355,3 +360,6 @@ enabled the <code>show_exceptions</code> setting.</p>
355
360
  HTML
356
361
  end
357
362
  end
363
+
364
+ Rack::ShowExceptions.send :remove_const, "TEMPLATE"
365
+ Rack::ShowExceptions.const_set "TEMPLATE", Sinatra::ShowExceptions::TEMPLATE
@@ -1,3 +1,3 @@
1
1
  module Sinatra
2
- VERSION = '1.4.8'
2
+ VERSION = '2.0.0'
3
3
  end
data/sinatra.gemspec CHANGED
@@ -1,19 +1,31 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
2
- require 'sinatra/version'
1
+ version = File.read(File.expand_path("../VERSION", __FILE__)).strip
3
2
 
4
- Gem::Specification.new 'sinatra', Sinatra::VERSION do |s|
3
+ Gem::Specification.new 'sinatra', version do |s|
5
4
  s.description = "Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort."
6
5
  s.summary = "Classy web-development dressed in a DSL"
7
6
  s.authors = ["Blake Mizerany", "Ryan Tomayko", "Simon Rozet", "Konstantin Haase"]
8
7
  s.email = "sinatrarb@googlegroups.com"
9
8
  s.homepage = "http://www.sinatrarb.com/"
10
9
  s.license = 'MIT'
11
- s.files = `git ls-files`.split("\n") - %w[.gitignore .travis.yml]
10
+ s.files = Dir['README*.md', 'lib/**/*', 'examples/*'] + [
11
+ ".yardopts",
12
+ "AUTHORS.md",
13
+ "CHANGELOG.md",
14
+ "CONTRIBUTING.md",
15
+ "Gemfile",
16
+ "LICENSE",
17
+ "MAINTENANCE.md",
18
+ "Rakefile",
19
+ "SECURITY.md",
20
+ "sinatra.gemspec"]
12
21
  s.test_files = s.files.select { |p| p =~ /^test\/.*_test.rb/ }
13
22
  s.extra_rdoc_files = s.files.select { |p| p =~ /^README/ } << 'LICENSE'
14
23
  s.rdoc_options = %w[--line-numbers --inline-source --title Sinatra --main README.rdoc --encoding=UTF-8]
15
24
 
16
- s.add_dependency 'rack', '~> 1.5'
17
- s.add_dependency 'tilt', '>= 1.3', '< 3'
18
- s.add_dependency 'rack-protection', '~> 1.4'
25
+ s.required_ruby_version = '>= 2.2.0'
26
+
27
+ s.add_dependency 'rack', '~> 2.0'
28
+ s.add_dependency 'tilt', '~> 2.0'
29
+ s.add_dependency 'rack-protection', version
30
+ s.add_dependency 'mustermann', '~> 1.0'
19
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Mizerany
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-01-30 00:00:00.000000000 Z
14
+ date: 2017-05-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rack
@@ -19,48 +19,56 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.5'
22
+ version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '1.5'
29
+ version: '2.0'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: tilt
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: '1.3'
37
- - - "<"
34
+ - - "~>"
38
35
  - !ruby/object:Gem::Version
39
- version: '3'
36
+ version: '2.0'
40
37
  type: :runtime
41
38
  prerelease: false
42
39
  version_requirements: !ruby/object:Gem::Requirement
43
40
  requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '1.3'
47
- - - "<"
41
+ - - "~>"
48
42
  - !ruby/object:Gem::Version
49
- version: '3'
43
+ version: '2.0'
50
44
  - !ruby/object:Gem::Dependency
51
45
  name: rack-protection
46
+ requirement: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - '='
49
+ - !ruby/object:Gem::Version
50
+ version: 2.0.0
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - '='
56
+ - !ruby/object:Gem::Version
57
+ version: 2.0.0
58
+ - !ruby/object:Gem::Dependency
59
+ name: mustermann
52
60
  requirement: !ruby/object:Gem::Requirement
53
61
  requirements:
54
62
  - - "~>"
55
63
  - !ruby/object:Gem::Version
56
- version: '1.4'
64
+ version: '1.0'
57
65
  type: :runtime
58
66
  prerelease: false
59
67
  version_requirements: !ruby/object:Gem::Requirement
60
68
  requirements:
61
69
  - - "~>"
62
70
  - !ruby/object:Gem::Version
63
- version: '1.4'
71
+ version: '1.0'
64
72
  description: Sinatra is a DSL for quickly creating web applications in Ruby with minimal
65
73
  effort.
66
74
  email: sinatrarb@googlegroups.com
@@ -86,6 +94,7 @@ files:
86
94
  - CONTRIBUTING.md
87
95
  - Gemfile
88
96
  - LICENSE
97
+ - MAINTENANCE.md
89
98
  - README.de.md
90
99
  - README.es.md
91
100
  - README.fr.md
@@ -98,117 +107,19 @@ files:
98
107
  - README.ru.md
99
108
  - README.zh.md
100
109
  - Rakefile
110
+ - SECURITY.md
101
111
  - examples/chat.rb
102
112
  - examples/simple.rb
103
113
  - examples/stream.ru
104
114
  - lib/sinatra.rb
105
115
  - lib/sinatra/base.rb
106
- - lib/sinatra/ext.rb
107
116
  - lib/sinatra/images/404.png
108
117
  - lib/sinatra/images/500.png
118
+ - lib/sinatra/indifferent_hash.rb
109
119
  - lib/sinatra/main.rb
110
120
  - lib/sinatra/show_exceptions.rb
111
121
  - lib/sinatra/version.rb
112
122
  - sinatra.gemspec
113
- - test/asciidoctor_test.rb
114
- - test/base_test.rb
115
- - test/builder_test.rb
116
- - test/coffee_test.rb
117
- - test/compile_test.rb
118
- - test/contest.rb
119
- - test/creole_test.rb
120
- - test/delegator_test.rb
121
- - test/encoding_test.rb
122
- - test/erb_test.rb
123
- - test/extensions_test.rb
124
- - test/filter_test.rb
125
- - test/haml_test.rb
126
- - test/helper.rb
127
- - test/helpers_test.rb
128
- - test/integration/app.rb
129
- - test/integration_helper.rb
130
- - test/integration_test.rb
131
- - test/less_test.rb
132
- - test/liquid_test.rb
133
- - test/mapped_error_test.rb
134
- - test/markaby_test.rb
135
- - test/markdown_test.rb
136
- - test/mediawiki_test.rb
137
- - test/middleware_test.rb
138
- - test/nokogiri_test.rb
139
- - test/public/favicon.ico
140
- - test/public/hello+world.txt
141
- - test/rabl_test.rb
142
- - test/rack_test.rb
143
- - test/radius_test.rb
144
- - test/rdoc_test.rb
145
- - test/readme_test.rb
146
- - test/request_test.rb
147
- - test/response_test.rb
148
- - test/result_test.rb
149
- - test/route_added_hook_test.rb
150
- - test/routing_test.rb
151
- - test/sass_test.rb
152
- - test/scss_test.rb
153
- - test/server_test.rb
154
- - test/settings_test.rb
155
- - test/sinatra_test.rb
156
- - test/slim_test.rb
157
- - test/static_test.rb
158
- - test/streaming_test.rb
159
- - test/stylus_test.rb
160
- - test/templates_test.rb
161
- - test/textile_test.rb
162
- - test/views/a/in_a.str
163
- - test/views/ascii.erb
164
- - test/views/b/in_b.str
165
- - test/views/calc.html.erb
166
- - test/views/error.builder
167
- - test/views/error.erb
168
- - test/views/error.haml
169
- - test/views/error.sass
170
- - test/views/explicitly_nested.str
171
- - test/views/foo/hello.test
172
- - test/views/hello.asciidoc
173
- - test/views/hello.builder
174
- - test/views/hello.coffee
175
- - test/views/hello.creole
176
- - test/views/hello.erb
177
- - test/views/hello.haml
178
- - test/views/hello.less
179
- - test/views/hello.liquid
180
- - test/views/hello.mab
181
- - test/views/hello.md
182
- - test/views/hello.mediawiki
183
- - test/views/hello.nokogiri
184
- - test/views/hello.rabl
185
- - test/views/hello.radius
186
- - test/views/hello.rdoc
187
- - test/views/hello.sass
188
- - test/views/hello.scss
189
- - test/views/hello.slim
190
- - test/views/hello.str
191
- - test/views/hello.styl
192
- - test/views/hello.test
193
- - test/views/hello.textile
194
- - test/views/hello.wlang
195
- - test/views/hello.yajl
196
- - test/views/layout2.builder
197
- - test/views/layout2.erb
198
- - test/views/layout2.haml
199
- - test/views/layout2.liquid
200
- - test/views/layout2.mab
201
- - test/views/layout2.nokogiri
202
- - test/views/layout2.rabl
203
- - test/views/layout2.radius
204
- - test/views/layout2.slim
205
- - test/views/layout2.str
206
- - test/views/layout2.test
207
- - test/views/layout2.wlang
208
- - test/views/nested.str
209
- - test/views/utf8.erb
210
- - test/wlang_test.rb
211
- - test/yajl_test.rb
212
123
  homepage: http://www.sinatrarb.com/
213
124
  licenses:
214
125
  - MIT
@@ -228,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
139
  requirements:
229
140
  - - ">="
230
141
  - !ruby/object:Gem::Version
231
- version: '0'
142
+ version: 2.2.0
232
143
  required_rubygems_version: !ruby/object:Gem::Requirement
233
144
  requirements:
234
145
  - - ">="
@@ -236,53 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
147
  version: '0'
237
148
  requirements: []
238
149
  rubyforge_project:
239
- rubygems_version: 2.6.8
150
+ rubygems_version: 2.6.11
240
151
  signing_key:
241
152
  specification_version: 4
242
153
  summary: Classy web-development dressed in a DSL
243
- test_files:
244
- - test/asciidoctor_test.rb
245
- - test/base_test.rb
246
- - test/builder_test.rb
247
- - test/coffee_test.rb
248
- - test/compile_test.rb
249
- - test/creole_test.rb
250
- - test/delegator_test.rb
251
- - test/encoding_test.rb
252
- - test/erb_test.rb
253
- - test/extensions_test.rb
254
- - test/filter_test.rb
255
- - test/haml_test.rb
256
- - test/helpers_test.rb
257
- - test/integration_test.rb
258
- - test/less_test.rb
259
- - test/liquid_test.rb
260
- - test/mapped_error_test.rb
261
- - test/markaby_test.rb
262
- - test/markdown_test.rb
263
- - test/mediawiki_test.rb
264
- - test/middleware_test.rb
265
- - test/nokogiri_test.rb
266
- - test/rabl_test.rb
267
- - test/rack_test.rb
268
- - test/radius_test.rb
269
- - test/rdoc_test.rb
270
- - test/readme_test.rb
271
- - test/request_test.rb
272
- - test/response_test.rb
273
- - test/result_test.rb
274
- - test/route_added_hook_test.rb
275
- - test/routing_test.rb
276
- - test/sass_test.rb
277
- - test/scss_test.rb
278
- - test/server_test.rb
279
- - test/settings_test.rb
280
- - test/sinatra_test.rb
281
- - test/slim_test.rb
282
- - test/static_test.rb
283
- - test/streaming_test.rb
284
- - test/stylus_test.rb
285
- - test/templates_test.rb
286
- - test/textile_test.rb
287
- - test/wlang_test.rb
288
- - test/yajl_test.rb
154
+ test_files: []
data/lib/sinatra/ext.rb DELETED
@@ -1,17 +0,0 @@
1
- # This can be removed once rack/rack@2fd9df71 is released
2
- module Sinatra
3
- module Ext
4
- def self.get_handler(str)
5
- begin
6
- ::Object.const_get("Object", false)
7
- def self._const_get(str, inherit = true)
8
- Rack::Handler.const_get(str, inherit)
9
- end
10
- rescue
11
- def self._const_get(str, inherit = true)
12
- Rack::Handler.const_get(str)
13
- end
14
- end
15
- end
16
- end
17
- end