sinatra 1.4.6 → 2.0.0
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.
- checksums.yaml +4 -4
- data/AUTHORS.md +5 -2
- data/{CHANGES → CHANGELOG.md} +126 -46
- data/CONTRIBUTING.md +100 -0
- data/Gemfile +12 -17
- data/LICENSE +5 -2
- data/MAINTENANCE.md +42 -0
- data/README.de.md +711 -466
- data/README.es.md +206 -171
- data/README.fr.md +370 -344
- data/README.hu.md +44 -10
- data/README.ja.md +300 -210
- data/README.ko.md +230 -191
- data/README.md +675 -528
- data/README.pt-br.md +149 -115
- data/README.pt-pt.md +65 -65
- data/README.ru.md +198 -97
- data/README.zh.md +1943 -1237
- data/Rakefile +72 -49
- data/SECURITY.md +35 -0
- data/lib/sinatra/base.rb +141 -207
- data/lib/sinatra/indifferent_hash.rb +150 -0
- data/lib/sinatra/main.rb +1 -0
- data/lib/sinatra/show_exceptions.rb +70 -56
- data/lib/sinatra/version.rb +1 -1
- data/sinatra.gemspec +19 -7
- metadata +32 -163
- data/test/asciidoctor_test.rb +0 -72
- data/test/base_test.rb +0 -167
- data/test/builder_test.rb +0 -91
- data/test/coffee_test.rb +0 -96
- data/test/compile_test.rb +0 -183
- data/test/contest.rb +0 -91
- data/test/creole_test.rb +0 -65
- data/test/delegator_test.rb +0 -160
- data/test/encoding_test.rb +0 -20
- data/test/erb_test.rb +0 -116
- data/test/extensions_test.rb +0 -98
- data/test/filter_test.rb +0 -487
- data/test/haml_test.rb +0 -109
- data/test/helper.rb +0 -132
- data/test/helpers_test.rb +0 -1917
- data/test/integration/app.rb +0 -79
- data/test/integration_helper.rb +0 -236
- data/test/integration_test.rb +0 -104
- data/test/less_test.rb +0 -69
- data/test/liquid_test.rb +0 -77
- data/test/mapped_error_test.rb +0 -285
- data/test/markaby_test.rb +0 -80
- data/test/markdown_test.rb +0 -85
- data/test/mediawiki_test.rb +0 -68
- data/test/middleware_test.rb +0 -68
- data/test/nokogiri_test.rb +0 -67
- data/test/public/favicon.ico +0 -0
- data/test/rabl_test.rb +0 -89
- data/test/rack_test.rb +0 -45
- data/test/radius_test.rb +0 -59
- data/test/rdoc_test.rb +0 -66
- data/test/readme_test.rb +0 -130
- data/test/request_test.rb +0 -100
- data/test/response_test.rb +0 -63
- data/test/result_test.rb +0 -76
- data/test/route_added_hook_test.rb +0 -59
- data/test/routing_test.rb +0 -1412
- data/test/sass_test.rb +0 -115
- data/test/scss_test.rb +0 -88
- data/test/server_test.rb +0 -56
- data/test/settings_test.rb +0 -582
- data/test/sinatra_test.rb +0 -12
- data/test/slim_test.rb +0 -102
- data/test/static_test.rb +0 -236
- data/test/streaming_test.rb +0 -149
- data/test/stylus_test.rb +0 -90
- data/test/templates_test.rb +0 -382
- data/test/textile_test.rb +0 -65
- data/test/views/a/in_a.str +0 -1
- data/test/views/ascii.erb +0 -2
- data/test/views/b/in_b.str +0 -1
- data/test/views/calc.html.erb +0 -1
- data/test/views/error.builder +0 -3
- data/test/views/error.erb +0 -3
- data/test/views/error.haml +0 -3
- data/test/views/error.sass +0 -2
- data/test/views/explicitly_nested.str +0 -1
- data/test/views/foo/hello.test +0 -1
- data/test/views/hello.asciidoc +0 -1
- data/test/views/hello.builder +0 -1
- data/test/views/hello.coffee +0 -1
- data/test/views/hello.creole +0 -1
- data/test/views/hello.erb +0 -1
- data/test/views/hello.haml +0 -1
- data/test/views/hello.less +0 -5
- data/test/views/hello.liquid +0 -1
- data/test/views/hello.mab +0 -1
- data/test/views/hello.md +0 -1
- data/test/views/hello.mediawiki +0 -1
- data/test/views/hello.nokogiri +0 -1
- data/test/views/hello.rabl +0 -2
- data/test/views/hello.radius +0 -1
- data/test/views/hello.rdoc +0 -1
- data/test/views/hello.sass +0 -2
- data/test/views/hello.scss +0 -3
- data/test/views/hello.slim +0 -1
- data/test/views/hello.str +0 -1
- data/test/views/hello.styl +0 -2
- data/test/views/hello.test +0 -1
- data/test/views/hello.textile +0 -1
- data/test/views/hello.wlang +0 -1
- data/test/views/hello.yajl +0 -1
- data/test/views/layout2.builder +0 -3
- data/test/views/layout2.erb +0 -2
- data/test/views/layout2.haml +0 -2
- data/test/views/layout2.liquid +0 -2
- data/test/views/layout2.mab +0 -2
- data/test/views/layout2.nokogiri +0 -3
- data/test/views/layout2.rabl +0 -3
- data/test/views/layout2.radius +0 -2
- data/test/views/layout2.slim +0 -3
- data/test/views/layout2.str +0 -2
- data/test/views/layout2.test +0 -1
- data/test/views/layout2.wlang +0 -2
- data/test/views/nested.str +0 -1
- data/test/views/utf8.erb +0 -2
- data/test/wlang_test.rb +0 -87
- 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,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rack/show_exceptions'
|
2
4
|
|
3
5
|
module Sinatra
|
4
6
|
# Sinatra::ShowExceptions catches all exceptions raised from the app it
|
@@ -13,8 +15,7 @@ module Sinatra
|
|
13
15
|
def @@eats_errors.puts(*) end
|
14
16
|
|
15
17
|
def initialize(app)
|
16
|
-
@app
|
17
|
-
@template = ERB.new(TEMPLATE)
|
18
|
+
@app = app
|
18
19
|
end
|
19
20
|
|
20
21
|
def call(env)
|
@@ -24,45 +25,51 @@ module Sinatra
|
|
24
25
|
|
25
26
|
if prefers_plain_text?(env)
|
26
27
|
content_type = "text/plain"
|
27
|
-
|
28
|
+
exception = dump_exception(e)
|
28
29
|
else
|
29
30
|
content_type = "text/html"
|
30
|
-
|
31
|
+
exception = pretty(env, e)
|
31
32
|
end
|
32
33
|
|
33
34
|
env["rack.errors"] = errors
|
34
35
|
|
35
36
|
# Post 893a2c50 in rack/rack, the #pretty method above, implemented in
|
36
37
|
# Rack::ShowExceptions, returns a String instead of an array.
|
37
|
-
body = Array(
|
38
|
+
body = Array(exception)
|
38
39
|
|
39
40
|
[
|
40
41
|
500,
|
41
|
-
|
42
|
-
|
43
|
-
|
42
|
+
{
|
43
|
+
"Content-Type" => content_type,
|
44
|
+
"Content-Length" => body.join.bytesize.to_s
|
45
|
+
},
|
46
|
+
body
|
44
47
|
]
|
45
48
|
end
|
46
49
|
|
47
50
|
private
|
48
51
|
|
52
|
+
def bad_request?(e)
|
53
|
+
Sinatra::BadRequest === e
|
54
|
+
end
|
55
|
+
|
49
56
|
def prefers_plain_text?(env)
|
50
57
|
!(Request.new(env).preferred_type("text/plain","text/html") == "text/html") &&
|
51
|
-
[/curl/].index{|item| item =~ env["HTTP_USER_AGENT"]}
|
58
|
+
[/curl/].index { |item| item =~ env["HTTP_USER_AGENT"] }
|
52
59
|
end
|
53
60
|
|
54
61
|
def frame_class(frame)
|
55
|
-
if frame.filename =~ /
|
62
|
+
if frame.filename =~ %r{lib/sinatra.*\.rb}
|
56
63
|
"framework"
|
57
64
|
elsif (defined?(Gem) && frame.filename.include?(Gem.dir)) ||
|
58
|
-
frame.filename =~
|
65
|
+
frame.filename =~ %r{/bin/(\w+)\z}
|
59
66
|
"system"
|
60
67
|
else
|
61
68
|
"app"
|
62
69
|
end
|
63
70
|
end
|
64
71
|
|
65
|
-
TEMPLATE = <<-HTML # :nodoc:
|
72
|
+
TEMPLATE = ERB.new <<-HTML # :nodoc:
|
66
73
|
<!DOCTYPE html>
|
67
74
|
<html>
|
68
75
|
<head>
|
@@ -207,8 +214,10 @@ TEMPLATE = <<-HTML # :nodoc:
|
|
207
214
|
<p><a href="#" id="expando"
|
208
215
|
onclick="toggleBacktrace(); return false">(expand)</a></p>
|
209
216
|
<p id="nav"><strong>JUMP TO:</strong>
|
210
|
-
|
211
|
-
|
217
|
+
<% unless bad_request?(exception) %>
|
218
|
+
<a href="#get-info">GET</a>
|
219
|
+
<a href="#post-info">POST</a>
|
220
|
+
<% end %>
|
212
221
|
<a href="#cookie-info">COOKIES</a>
|
213
222
|
<a href="#env-info">ENV</a>
|
214
223
|
</p>
|
@@ -261,47 +270,49 @@ TEMPLATE = <<-HTML # :nodoc:
|
|
261
270
|
</ul>
|
262
271
|
</div> <!-- /BACKTRACE -->
|
263
272
|
|
264
|
-
|
265
|
-
<
|
266
|
-
|
267
|
-
|
268
|
-
<
|
269
|
-
<
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
<
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
<
|
287
|
-
|
288
|
-
|
289
|
-
<
|
290
|
-
<
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
<
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
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 %>
|
305
316
|
|
306
317
|
<div id="cookies">
|
307
318
|
<h3 id="cookie-info">COOKIES</h3>
|
@@ -349,3 +360,6 @@ enabled the <code>show_exceptions</code> setting.</p>
|
|
349
360
|
HTML
|
350
361
|
end
|
351
362
|
end
|
363
|
+
|
364
|
+
Rack::ShowExceptions.send :remove_const, "TEMPLATE"
|
365
|
+
Rack::ShowExceptions.const_set "TEMPLATE", Sinatra::ShowExceptions::TEMPLATE
|
data/lib/sinatra/version.rb
CHANGED
data/sinatra.gemspec
CHANGED
@@ -1,19 +1,31 @@
|
|
1
|
-
|
2
|
-
require 'sinatra/version'
|
1
|
+
version = File.read(File.expand_path("../VERSION", __FILE__)).strip
|
3
2
|
|
4
|
-
Gem::Specification.new 'sinatra',
|
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 =
|
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.
|
17
|
-
|
18
|
-
s.add_dependency 'rack
|
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:
|
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:
|
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: '
|
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: '
|
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: '
|
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: '
|
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.
|
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.
|
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
|
@@ -82,9 +90,11 @@ extra_rdoc_files:
|
|
82
90
|
files:
|
83
91
|
- ".yardopts"
|
84
92
|
- AUTHORS.md
|
85
|
-
-
|
93
|
+
- CHANGELOG.md
|
94
|
+
- CONTRIBUTING.md
|
86
95
|
- Gemfile
|
87
96
|
- LICENSE
|
97
|
+
- MAINTENANCE.md
|
88
98
|
- README.de.md
|
89
99
|
- README.es.md
|
90
100
|
- README.fr.md
|
@@ -97,6 +107,7 @@ files:
|
|
97
107
|
- README.ru.md
|
98
108
|
- README.zh.md
|
99
109
|
- Rakefile
|
110
|
+
- SECURITY.md
|
100
111
|
- examples/chat.rb
|
101
112
|
- examples/simple.rb
|
102
113
|
- examples/stream.ru
|
@@ -104,108 +115,11 @@ files:
|
|
104
115
|
- lib/sinatra/base.rb
|
105
116
|
- lib/sinatra/images/404.png
|
106
117
|
- lib/sinatra/images/500.png
|
118
|
+
- lib/sinatra/indifferent_hash.rb
|
107
119
|
- lib/sinatra/main.rb
|
108
120
|
- lib/sinatra/show_exceptions.rb
|
109
121
|
- lib/sinatra/version.rb
|
110
122
|
- sinatra.gemspec
|
111
|
-
- test/asciidoctor_test.rb
|
112
|
-
- test/base_test.rb
|
113
|
-
- test/builder_test.rb
|
114
|
-
- test/coffee_test.rb
|
115
|
-
- test/compile_test.rb
|
116
|
-
- test/contest.rb
|
117
|
-
- test/creole_test.rb
|
118
|
-
- test/delegator_test.rb
|
119
|
-
- test/encoding_test.rb
|
120
|
-
- test/erb_test.rb
|
121
|
-
- test/extensions_test.rb
|
122
|
-
- test/filter_test.rb
|
123
|
-
- test/haml_test.rb
|
124
|
-
- test/helper.rb
|
125
|
-
- test/helpers_test.rb
|
126
|
-
- test/integration/app.rb
|
127
|
-
- test/integration_helper.rb
|
128
|
-
- test/integration_test.rb
|
129
|
-
- test/less_test.rb
|
130
|
-
- test/liquid_test.rb
|
131
|
-
- test/mapped_error_test.rb
|
132
|
-
- test/markaby_test.rb
|
133
|
-
- test/markdown_test.rb
|
134
|
-
- test/mediawiki_test.rb
|
135
|
-
- test/middleware_test.rb
|
136
|
-
- test/nokogiri_test.rb
|
137
|
-
- test/public/favicon.ico
|
138
|
-
- test/rabl_test.rb
|
139
|
-
- test/rack_test.rb
|
140
|
-
- test/radius_test.rb
|
141
|
-
- test/rdoc_test.rb
|
142
|
-
- test/readme_test.rb
|
143
|
-
- test/request_test.rb
|
144
|
-
- test/response_test.rb
|
145
|
-
- test/result_test.rb
|
146
|
-
- test/route_added_hook_test.rb
|
147
|
-
- test/routing_test.rb
|
148
|
-
- test/sass_test.rb
|
149
|
-
- test/scss_test.rb
|
150
|
-
- test/server_test.rb
|
151
|
-
- test/settings_test.rb
|
152
|
-
- test/sinatra_test.rb
|
153
|
-
- test/slim_test.rb
|
154
|
-
- test/static_test.rb
|
155
|
-
- test/streaming_test.rb
|
156
|
-
- test/stylus_test.rb
|
157
|
-
- test/templates_test.rb
|
158
|
-
- test/textile_test.rb
|
159
|
-
- test/views/a/in_a.str
|
160
|
-
- test/views/ascii.erb
|
161
|
-
- test/views/b/in_b.str
|
162
|
-
- test/views/calc.html.erb
|
163
|
-
- test/views/error.builder
|
164
|
-
- test/views/error.erb
|
165
|
-
- test/views/error.haml
|
166
|
-
- test/views/error.sass
|
167
|
-
- test/views/explicitly_nested.str
|
168
|
-
- test/views/foo/hello.test
|
169
|
-
- test/views/hello.asciidoc
|
170
|
-
- test/views/hello.builder
|
171
|
-
- test/views/hello.coffee
|
172
|
-
- test/views/hello.creole
|
173
|
-
- test/views/hello.erb
|
174
|
-
- test/views/hello.haml
|
175
|
-
- test/views/hello.less
|
176
|
-
- test/views/hello.liquid
|
177
|
-
- test/views/hello.mab
|
178
|
-
- test/views/hello.md
|
179
|
-
- test/views/hello.mediawiki
|
180
|
-
- test/views/hello.nokogiri
|
181
|
-
- test/views/hello.rabl
|
182
|
-
- test/views/hello.radius
|
183
|
-
- test/views/hello.rdoc
|
184
|
-
- test/views/hello.sass
|
185
|
-
- test/views/hello.scss
|
186
|
-
- test/views/hello.slim
|
187
|
-
- test/views/hello.str
|
188
|
-
- test/views/hello.styl
|
189
|
-
- test/views/hello.test
|
190
|
-
- test/views/hello.textile
|
191
|
-
- test/views/hello.wlang
|
192
|
-
- test/views/hello.yajl
|
193
|
-
- test/views/layout2.builder
|
194
|
-
- test/views/layout2.erb
|
195
|
-
- test/views/layout2.haml
|
196
|
-
- test/views/layout2.liquid
|
197
|
-
- test/views/layout2.mab
|
198
|
-
- test/views/layout2.nokogiri
|
199
|
-
- test/views/layout2.rabl
|
200
|
-
- test/views/layout2.radius
|
201
|
-
- test/views/layout2.slim
|
202
|
-
- test/views/layout2.str
|
203
|
-
- test/views/layout2.test
|
204
|
-
- test/views/layout2.wlang
|
205
|
-
- test/views/nested.str
|
206
|
-
- test/views/utf8.erb
|
207
|
-
- test/wlang_test.rb
|
208
|
-
- test/yajl_test.rb
|
209
123
|
homepage: http://www.sinatrarb.com/
|
210
124
|
licenses:
|
211
125
|
- MIT
|
@@ -225,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
225
139
|
requirements:
|
226
140
|
- - ">="
|
227
141
|
- !ruby/object:Gem::Version
|
228
|
-
version:
|
142
|
+
version: 2.2.0
|
229
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
144
|
requirements:
|
231
145
|
- - ">="
|
@@ -233,53 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
147
|
version: '0'
|
234
148
|
requirements: []
|
235
149
|
rubyforge_project:
|
236
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.6.11
|
237
151
|
signing_key:
|
238
152
|
specification_version: 4
|
239
153
|
summary: Classy web-development dressed in a DSL
|
240
|
-
test_files:
|
241
|
-
- test/asciidoctor_test.rb
|
242
|
-
- test/base_test.rb
|
243
|
-
- test/builder_test.rb
|
244
|
-
- test/coffee_test.rb
|
245
|
-
- test/compile_test.rb
|
246
|
-
- test/creole_test.rb
|
247
|
-
- test/delegator_test.rb
|
248
|
-
- test/encoding_test.rb
|
249
|
-
- test/erb_test.rb
|
250
|
-
- test/extensions_test.rb
|
251
|
-
- test/filter_test.rb
|
252
|
-
- test/haml_test.rb
|
253
|
-
- test/helpers_test.rb
|
254
|
-
- test/integration_test.rb
|
255
|
-
- test/less_test.rb
|
256
|
-
- test/liquid_test.rb
|
257
|
-
- test/mapped_error_test.rb
|
258
|
-
- test/markaby_test.rb
|
259
|
-
- test/markdown_test.rb
|
260
|
-
- test/mediawiki_test.rb
|
261
|
-
- test/middleware_test.rb
|
262
|
-
- test/nokogiri_test.rb
|
263
|
-
- test/rabl_test.rb
|
264
|
-
- test/rack_test.rb
|
265
|
-
- test/radius_test.rb
|
266
|
-
- test/rdoc_test.rb
|
267
|
-
- test/readme_test.rb
|
268
|
-
- test/request_test.rb
|
269
|
-
- test/response_test.rb
|
270
|
-
- test/result_test.rb
|
271
|
-
- test/route_added_hook_test.rb
|
272
|
-
- test/routing_test.rb
|
273
|
-
- test/sass_test.rb
|
274
|
-
- test/scss_test.rb
|
275
|
-
- test/server_test.rb
|
276
|
-
- test/settings_test.rb
|
277
|
-
- test/sinatra_test.rb
|
278
|
-
- test/slim_test.rb
|
279
|
-
- test/static_test.rb
|
280
|
-
- test/streaming_test.rb
|
281
|
-
- test/stylus_test.rb
|
282
|
-
- test/templates_test.rb
|
283
|
-
- test/textile_test.rb
|
284
|
-
- test/wlang_test.rb
|
285
|
-
- test/yajl_test.rb
|
154
|
+
test_files: []
|