sinatra 2.1.0 → 4.1.1
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.
- checksums.yaml +4 -4
- data/AUTHORS.md +14 -8
- data/CHANGELOG.md +251 -2
- data/CONTRIBUTING.md +11 -11
- data/Gemfile +55 -69
- data/MAINTENANCE.md +3 -16
- data/README.md +262 -529
- data/Rakefile +82 -79
- data/SECURITY.md +1 -1
- data/VERSION +1 -1
- data/examples/chat.rb +25 -12
- data/examples/lifecycle_events.rb +20 -0
- data/examples/simple.rb +2 -0
- data/examples/stream.ru +2 -2
- data/lib/sinatra/base.rb +531 -384
- data/lib/sinatra/indifferent_hash.rb +48 -40
- data/lib/sinatra/main.rb +18 -16
- data/lib/sinatra/middleware/logger.rb +21 -0
- data/lib/sinatra/show_exceptions.rb +17 -15
- data/lib/sinatra/version.rb +3 -1
- data/lib/sinatra.rb +2 -0
- data/sinatra.gemspec +40 -41
- metadata +60 -43
- data/README.de.md +0 -3239
- data/README.es.md +0 -3202
- data/README.fr.md +0 -3111
- data/README.hu.md +0 -728
- data/README.ja.md +0 -2814
- data/README.ko.md +0 -2967
- data/README.malayalam.md +0 -3141
- data/README.pt-br.md +0 -3787
- data/README.pt-pt.md +0 -791
- data/README.ru.md +0 -3207
- data/README.zh.md +0 -2934
- data/examples/rainbows.conf +0 -3
- data/examples/rainbows.rb +0 -20
@@ -1,11 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
$stderr.puts <<EOF if !Hash.method_defined?(:slice) && !$LOAD_PATH.grep(%r{gems/activesupport}).empty? && ENV['SINATRA_ACTIVESUPPORT_WARNING'] != 'false'
|
3
|
-
WARNING: If you plan to load any of ActiveSupport's core extensions to Hash, be
|
4
|
-
sure to do so *before* loading Sinatra::Application or Sinatra::Base. If not,
|
5
|
-
you may disregard this warning.
|
6
|
-
|
7
|
-
Set SINATRA_ACTIVESUPPORT_WARNING=false in the environment to hide this warning.
|
8
|
-
EOF
|
9
2
|
|
10
3
|
module Sinatra
|
11
4
|
# A poor man's ActiveSupport::HashWithIndifferentAccess, with all the Rails-y
|
@@ -28,7 +21,8 @@ module Sinatra
|
|
28
21
|
# writing interface (calling e.g. <tt>[]=</tt>, <tt>merge</tt>). This mapping
|
29
22
|
# belongs to the public interface. For example, given:
|
30
23
|
#
|
31
|
-
# hash = Sinatra::IndifferentHash.new
|
24
|
+
# hash = Sinatra::IndifferentHash.new
|
25
|
+
# hash[:a] = 1
|
32
26
|
#
|
33
27
|
# You are guaranteed that the key is returned as a string:
|
34
28
|
#
|
@@ -36,7 +30,8 @@ module Sinatra
|
|
36
30
|
#
|
37
31
|
# Technically other types of keys are accepted:
|
38
32
|
#
|
39
|
-
# hash = Sinatra::IndifferentHash
|
33
|
+
# hash = Sinatra::IndifferentHash
|
34
|
+
# hash[:a] = 1
|
40
35
|
# hash[0] = 0
|
41
36
|
# hash # => { "a"=>1, 0=>0 }
|
42
37
|
#
|
@@ -48,12 +43,6 @@ module Sinatra
|
|
48
43
|
new.merge!(Hash[*args])
|
49
44
|
end
|
50
45
|
|
51
|
-
def initialize(*args)
|
52
|
-
args.map!(&method(:convert_value))
|
53
|
-
|
54
|
-
super(*args)
|
55
|
-
end
|
56
|
-
|
57
46
|
def default(*args)
|
58
47
|
args.map!(&method(:convert_key))
|
59
48
|
|
@@ -86,7 +75,7 @@ module Sinatra
|
|
86
75
|
super(convert_key(key), convert_value(value))
|
87
76
|
end
|
88
77
|
|
89
|
-
|
78
|
+
alias store []=
|
90
79
|
|
91
80
|
def key(value)
|
92
81
|
super(convert_value(value))
|
@@ -96,35 +85,36 @@ module Sinatra
|
|
96
85
|
super(convert_key(key))
|
97
86
|
end
|
98
87
|
|
99
|
-
|
100
|
-
|
101
|
-
|
88
|
+
alias has_key? key?
|
89
|
+
alias include? key?
|
90
|
+
alias member? key?
|
102
91
|
|
103
92
|
def value?(value)
|
104
93
|
super(convert_value(value))
|
105
94
|
end
|
106
95
|
|
107
|
-
|
96
|
+
alias has_value? value?
|
108
97
|
|
109
98
|
def delete(key)
|
110
99
|
super(convert_key(key))
|
111
100
|
end
|
112
101
|
|
102
|
+
# Added in Ruby 2.3
|
113
103
|
def dig(key, *other_keys)
|
114
104
|
super(convert_key(key), *other_keys)
|
115
|
-
end
|
105
|
+
end
|
116
106
|
|
117
107
|
def fetch_values(*keys)
|
118
108
|
keys.map!(&method(:convert_key))
|
119
109
|
|
120
110
|
super(*keys)
|
121
|
-
end
|
111
|
+
end
|
122
112
|
|
123
113
|
def slice(*keys)
|
124
114
|
keys.map!(&method(:convert_key))
|
125
115
|
|
126
116
|
self.class[super(*keys)]
|
127
|
-
end
|
117
|
+
end
|
128
118
|
|
129
119
|
def values_at(*keys)
|
130
120
|
keys.map!(&method(:convert_key))
|
@@ -148,7 +138,7 @@ module Sinatra
|
|
148
138
|
self
|
149
139
|
end
|
150
140
|
|
151
|
-
|
141
|
+
alias update merge!
|
152
142
|
|
153
143
|
def merge(*other_hashes, &block)
|
154
144
|
dup.merge!(*other_hashes, &block)
|
@@ -158,28 +148,46 @@ module Sinatra
|
|
158
148
|
super(other_hash.is_a?(self.class) ? other_hash : self.class[other_hash])
|
159
149
|
end
|
160
150
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
end
|
151
|
+
def transform_values(&block)
|
152
|
+
dup.transform_values!(&block)
|
153
|
+
end
|
165
154
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
end
|
155
|
+
def transform_values!
|
156
|
+
super
|
157
|
+
super(&method(:convert_value))
|
170
158
|
end
|
171
159
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
end
|
160
|
+
def transform_keys(&block)
|
161
|
+
dup.transform_keys!(&block)
|
162
|
+
end
|
176
163
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
164
|
+
def transform_keys!
|
165
|
+
super
|
166
|
+
super(&method(:convert_key))
|
167
|
+
end
|
168
|
+
|
169
|
+
def select(*args, &block)
|
170
|
+
return to_enum(:select) unless block_given?
|
171
|
+
|
172
|
+
dup.tap { |hash| hash.select!(*args, &block) }
|
173
|
+
end
|
174
|
+
|
175
|
+
def reject(*args, &block)
|
176
|
+
return to_enum(:reject) unless block_given?
|
177
|
+
|
178
|
+
dup.tap { |hash| hash.reject!(*args, &block) }
|
181
179
|
end
|
182
180
|
|
181
|
+
def compact
|
182
|
+
dup.tap(&:compact!)
|
183
|
+
end
|
184
|
+
|
185
|
+
def except(*keys)
|
186
|
+
keys.map!(&method(:convert_key))
|
187
|
+
|
188
|
+
self.class[super(*keys)]
|
189
|
+
end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0")
|
190
|
+
|
183
191
|
private
|
184
192
|
|
185
193
|
def convert_key(key)
|
data/lib/sinatra/main.rb
CHANGED
@@ -1,47 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Sinatra
|
2
|
-
|
4
|
+
PARAMS_CONFIG = {}
|
3
5
|
|
4
6
|
if ARGV.any?
|
5
7
|
require 'optparse'
|
6
|
-
parser = OptionParser.new
|
7
|
-
op.on('-p port', 'set the port (default is 4567)') { |val|
|
8
|
-
op.on('-s server', 'specify rack server/handler') { |val|
|
9
|
-
op.on('-q', 'turn on quiet mode (default is off)') {
|
10
|
-
op.on('-x', 'turn on the mutex lock (default is off)') {
|
8
|
+
parser = OptionParser.new do |op|
|
9
|
+
op.on('-p port', 'set the port (default is 4567)') { |val| PARAMS_CONFIG[:port] = Integer(val) }
|
10
|
+
op.on('-s server', 'specify rack server/handler') { |val| PARAMS_CONFIG[:server] = val }
|
11
|
+
op.on('-q', 'turn on quiet mode (default is off)') { PARAMS_CONFIG[:quiet] = true }
|
12
|
+
op.on('-x', 'turn on the mutex lock (default is off)') { PARAMS_CONFIG[:lock] = true }
|
11
13
|
op.on('-e env', 'set the environment (default is development)') do |val|
|
12
14
|
ENV['RACK_ENV'] = val
|
13
|
-
|
15
|
+
PARAMS_CONFIG[:environment] = val.to_sym
|
14
16
|
end
|
15
17
|
op.on('-o addr', "set the host (default is (env == 'development' ? 'localhost' : '0.0.0.0'))") do |val|
|
16
|
-
|
18
|
+
PARAMS_CONFIG[:bind] = val
|
17
19
|
end
|
18
|
-
|
20
|
+
end
|
19
21
|
begin
|
20
22
|
parser.parse!(ARGV.dup)
|
21
|
-
rescue =>
|
22
|
-
|
23
|
+
rescue StandardError => e
|
24
|
+
PARAMS_CONFIG[:optparse_error] = e
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
26
28
|
require 'sinatra/base'
|
27
29
|
|
28
30
|
class Application < Base
|
29
|
-
|
30
31
|
# we assume that the first file that requires 'sinatra' is the
|
31
32
|
# app_file. all other path related options are calculated based
|
32
33
|
# on this path by default.
|
33
34
|
set :app_file, caller_files.first || $0
|
34
35
|
|
35
|
-
set :run,
|
36
|
+
set :run, proc { File.expand_path($0) == File.expand_path(app_file) }
|
36
37
|
|
37
38
|
if run? && ARGV.any?
|
38
|
-
error =
|
39
|
+
error = PARAMS_CONFIG.delete(:optparse_error)
|
39
40
|
raise error if error
|
40
|
-
|
41
|
+
|
42
|
+
PARAMS_CONFIG.each { |k, v| set k, v }
|
41
43
|
end
|
42
44
|
end
|
43
45
|
|
44
|
-
remove_const(:
|
46
|
+
remove_const(:PARAMS_CONFIG)
|
45
47
|
at_exit { Application.run! if $!.nil? && Application.run? }
|
46
48
|
end
|
47
49
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'logger'
|
4
|
+
|
5
|
+
module Sinatra
|
6
|
+
module Middleware
|
7
|
+
class Logger
|
8
|
+
def initialize(app, level = ::Logger::INFO)
|
9
|
+
@app, @level = app, level
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(env)
|
13
|
+
logger = ::Logger.new(env[Rack::RACK_ERRORS])
|
14
|
+
logger.level = @level
|
15
|
+
|
16
|
+
env[Rack::RACK_LOGGER] = logger
|
17
|
+
@app.call(env)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -12,6 +12,7 @@ module Sinatra
|
|
12
12
|
class ShowExceptions < Rack::ShowExceptions
|
13
13
|
@@eats_errors = Object.new
|
14
14
|
def @@eats_errors.flush(*) end
|
15
|
+
|
15
16
|
def @@eats_errors.puts(*) end
|
16
17
|
|
17
18
|
def initialize(app)
|
@@ -21,23 +22,24 @@ module Sinatra
|
|
21
22
|
def call(env)
|
22
23
|
@app.call(env)
|
23
24
|
rescue Exception => e
|
24
|
-
errors
|
25
|
+
errors = env['rack.errors']
|
26
|
+
env['rack.errors'] = @@eats_errors
|
25
27
|
|
26
28
|
if prefers_plain_text?(env)
|
27
|
-
content_type =
|
29
|
+
content_type = 'text/plain'
|
28
30
|
body = dump_exception(e)
|
29
31
|
else
|
30
|
-
content_type =
|
32
|
+
content_type = 'text/html'
|
31
33
|
body = pretty(env, e)
|
32
34
|
end
|
33
35
|
|
34
|
-
env[
|
36
|
+
env['rack.errors'] = errors
|
35
37
|
|
36
38
|
[
|
37
39
|
500,
|
38
40
|
{
|
39
|
-
|
40
|
-
|
41
|
+
'content-type' => content_type,
|
42
|
+
'content-length' => body.bytesize.to_s
|
41
43
|
},
|
42
44
|
[body]
|
43
45
|
]
|
@@ -49,27 +51,27 @@ module Sinatra
|
|
49
51
|
|
50
52
|
private
|
51
53
|
|
52
|
-
def bad_request?(
|
53
|
-
Sinatra::BadRequest ===
|
54
|
+
def bad_request?(exception)
|
55
|
+
Sinatra::BadRequest === exception
|
54
56
|
end
|
55
57
|
|
56
58
|
def prefers_plain_text?(env)
|
57
|
-
|
58
|
-
|
59
|
+
Request.new(env).preferred_type('text/plain', 'text/html') != 'text/html' &&
|
60
|
+
[/curl/].index { |item| item =~ env['HTTP_USER_AGENT'] }
|
59
61
|
end
|
60
62
|
|
61
63
|
def frame_class(frame)
|
62
64
|
if frame.filename =~ %r{lib/sinatra.*\.rb}
|
63
|
-
|
65
|
+
'framework'
|
64
66
|
elsif (defined?(Gem) && frame.filename.include?(Gem.dir)) ||
|
65
67
|
frame.filename =~ %r{/bin/(\w+)\z}
|
66
|
-
|
68
|
+
'system'
|
67
69
|
else
|
68
|
-
|
70
|
+
'app'
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
72
|
-
TEMPLATE = ERB.new <<-HTML # :nodoc:
|
74
|
+
TEMPLATE = ERB.new <<-HTML # :nodoc:
|
73
75
|
<!DOCTYPE html>
|
74
76
|
<html>
|
75
77
|
<head>
|
@@ -357,6 +359,6 @@ enabled the <code>show_exceptions</code> setting.</p>
|
|
357
359
|
</div> <!-- /WRAP -->
|
358
360
|
</body>
|
359
361
|
</html>
|
360
|
-
HTML
|
362
|
+
HTML
|
361
363
|
end
|
362
364
|
end
|
data/lib/sinatra/version.rb
CHANGED
data/lib/sinatra.rb
CHANGED
data/sinatra.gemspec
CHANGED
@@ -1,55 +1,54 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
version = File.read(File.expand_path('VERSION', __dir__)).strip
|
2
4
|
|
3
5
|
Gem::Specification.new 'sinatra', version do |s|
|
4
|
-
s.description =
|
5
|
-
s.summary =
|
6
|
-
s.authors = [
|
7
|
-
s.email =
|
8
|
-
s.homepage =
|
6
|
+
s.description = 'Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort.'
|
7
|
+
s.summary = 'Classy web-development dressed in a DSL'
|
8
|
+
s.authors = ['Blake Mizerany', 'Ryan Tomayko', 'Simon Rozet', 'Konstantin Haase']
|
9
|
+
s.email = 'sinatrarb@googlegroups.com'
|
10
|
+
s.homepage = 'http://sinatrarb.com/'
|
9
11
|
s.license = 'MIT'
|
10
12
|
s.files = Dir['README*.md', 'lib/**/*', 'examples/*'] + [
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
s.extra_rdoc_files =
|
24
|
-
s.rdoc_options = %w[--line-numbers --
|
13
|
+
'.yardopts',
|
14
|
+
'AUTHORS.md',
|
15
|
+
'CHANGELOG.md',
|
16
|
+
'CONTRIBUTING.md',
|
17
|
+
'Gemfile',
|
18
|
+
'LICENSE',
|
19
|
+
'MAINTENANCE.md',
|
20
|
+
'Rakefile',
|
21
|
+
'SECURITY.md',
|
22
|
+
'sinatra.gemspec',
|
23
|
+
'VERSION'
|
24
|
+
]
|
25
|
+
s.extra_rdoc_files = %w[README.md LICENSE]
|
26
|
+
s.rdoc_options = %w[--line-numbers --title Sinatra --main README.rdoc --encoding=UTF-8]
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
'source_code_uri' => 'https://github.com/sinatra/sinatra',
|
29
|
-
'changelog_uri' => 'https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md',
|
30
|
-
'homepage_uri' => 'http://sinatrarb.com/',
|
31
|
-
'bug_tracker_uri' => 'https://github.com/sinatra/sinatra/issues',
|
32
|
-
'mailing_list_uri' => 'http://groups.google.com/group/sinatrarb',
|
33
|
-
'documentation_uri' => 'https://www.rubydoc.info/gems/sinatra'
|
34
|
-
}
|
35
|
-
else
|
36
|
-
msg = "RubyGems 2.0 or newer is required to protect against public "\
|
37
|
-
"gem pushes. You can update your rubygems version by running:\n\n"\
|
38
|
-
"gem install rubygems-update\n"\
|
39
|
-
"update_rubygems\n"\
|
40
|
-
"gem update --system"
|
41
|
-
raise <<-EOF
|
28
|
+
unless s.respond_to?(:metadata)
|
29
|
+
raise <<-WARN
|
42
30
|
RubyGems 2.0 or newer is required to protect against public gem pushes. You can update your rubygems version by running:
|
43
31
|
gem install rubygems-update
|
44
32
|
update_rubygems:
|
45
33
|
gem update --system
|
46
|
-
|
34
|
+
WARN
|
47
35
|
end
|
48
36
|
|
49
|
-
s.
|
37
|
+
s.metadata = {
|
38
|
+
'source_code_uri' => 'https://github.com/sinatra/sinatra',
|
39
|
+
'changelog_uri' => 'https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md',
|
40
|
+
'homepage_uri' => 'http://sinatrarb.com/',
|
41
|
+
'bug_tracker_uri' => 'https://github.com/sinatra/sinatra/issues',
|
42
|
+
'mailing_list_uri' => 'http://groups.google.com/group/sinatrarb',
|
43
|
+
'documentation_uri' => 'https://www.rubydoc.info/gems/sinatra'
|
44
|
+
}
|
50
45
|
|
51
|
-
s.
|
52
|
-
|
46
|
+
s.required_ruby_version = '>= 2.7.8'
|
47
|
+
|
48
|
+
s.add_dependency 'logger', '>= 1.6.0'
|
49
|
+
s.add_dependency 'mustermann', '~> 3.0'
|
50
|
+
s.add_dependency 'rack', '>= 3.0.0', '< 4'
|
53
51
|
s.add_dependency 'rack-protection', version
|
54
|
-
s.add_dependency '
|
52
|
+
s.add_dependency 'rack-session', '>= 2.0.0', '< 3'
|
53
|
+
s.add_dependency 'tilt', '~> 2.0'
|
55
54
|
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: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
@@ -11,82 +11,111 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2024-11-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
17
|
+
name: logger
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- - "
|
20
|
+
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 1.6.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: 1.6.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: mustermann
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '3.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '3.0'
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: rack
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 3.0.0
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '4'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 3.0.0
|
61
|
+
- - "<"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '4'
|
44
64
|
- !ruby/object:Gem::Dependency
|
45
65
|
name: rack-protection
|
46
66
|
requirement: !ruby/object:Gem::Requirement
|
47
67
|
requirements:
|
48
68
|
- - '='
|
49
69
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
70
|
+
version: 4.1.1
|
51
71
|
type: :runtime
|
52
72
|
prerelease: false
|
53
73
|
version_requirements: !ruby/object:Gem::Requirement
|
54
74
|
requirements:
|
55
75
|
- - '='
|
56
76
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
77
|
+
version: 4.1.1
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
|
-
name:
|
79
|
+
name: rack-session
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 2.0.0
|
85
|
+
- - "<"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '3'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.0.0
|
95
|
+
- - "<"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '3'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: tilt
|
60
100
|
requirement: !ruby/object:Gem::Requirement
|
61
101
|
requirements:
|
62
102
|
- - "~>"
|
63
103
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
104
|
+
version: '2.0'
|
65
105
|
type: :runtime
|
66
106
|
prerelease: false
|
67
107
|
version_requirements: !ruby/object:Gem::Requirement
|
68
108
|
requirements:
|
69
109
|
- - "~>"
|
70
110
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
111
|
+
version: '2.0'
|
72
112
|
description: Sinatra is a DSL for quickly creating web applications in Ruby with minimal
|
73
113
|
effort.
|
74
114
|
email: sinatrarb@googlegroups.com
|
75
115
|
executables: []
|
76
116
|
extensions: []
|
77
117
|
extra_rdoc_files:
|
78
|
-
- README.de.md
|
79
|
-
- README.es.md
|
80
|
-
- README.fr.md
|
81
|
-
- README.hu.md
|
82
|
-
- README.ja.md
|
83
|
-
- README.ko.md
|
84
|
-
- README.malayalam.md
|
85
118
|
- README.md
|
86
|
-
- README.pt-br.md
|
87
|
-
- README.pt-pt.md
|
88
|
-
- README.ru.md
|
89
|
-
- README.zh.md
|
90
119
|
- LICENSE
|
91
120
|
files:
|
92
121
|
- ".yardopts"
|
@@ -96,24 +125,12 @@ files:
|
|
96
125
|
- Gemfile
|
97
126
|
- LICENSE
|
98
127
|
- MAINTENANCE.md
|
99
|
-
- README.de.md
|
100
|
-
- README.es.md
|
101
|
-
- README.fr.md
|
102
|
-
- README.hu.md
|
103
|
-
- README.ja.md
|
104
|
-
- README.ko.md
|
105
|
-
- README.malayalam.md
|
106
128
|
- README.md
|
107
|
-
- README.pt-br.md
|
108
|
-
- README.pt-pt.md
|
109
|
-
- README.ru.md
|
110
|
-
- README.zh.md
|
111
129
|
- Rakefile
|
112
130
|
- SECURITY.md
|
113
131
|
- VERSION
|
114
132
|
- examples/chat.rb
|
115
|
-
- examples/
|
116
|
-
- examples/rainbows.rb
|
133
|
+
- examples/lifecycle_events.rb
|
117
134
|
- examples/simple.rb
|
118
135
|
- examples/stream.ru
|
119
136
|
- lib/sinatra.rb
|
@@ -122,6 +139,7 @@ files:
|
|
122
139
|
- lib/sinatra/images/500.png
|
123
140
|
- lib/sinatra/indifferent_hash.rb
|
124
141
|
- lib/sinatra/main.rb
|
142
|
+
- lib/sinatra/middleware/logger.rb
|
125
143
|
- lib/sinatra/show_exceptions.rb
|
126
144
|
- lib/sinatra/version.rb
|
127
145
|
- sinatra.gemspec
|
@@ -130,7 +148,7 @@ licenses:
|
|
130
148
|
- MIT
|
131
149
|
metadata:
|
132
150
|
source_code_uri: https://github.com/sinatra/sinatra
|
133
|
-
changelog_uri: https://github.com/sinatra/sinatra/blob/
|
151
|
+
changelog_uri: https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md
|
134
152
|
homepage_uri: http://sinatrarb.com/
|
135
153
|
bug_tracker_uri: https://github.com/sinatra/sinatra/issues
|
136
154
|
mailing_list_uri: http://groups.google.com/group/sinatrarb
|
@@ -138,7 +156,6 @@ metadata:
|
|
138
156
|
post_install_message:
|
139
157
|
rdoc_options:
|
140
158
|
- "--line-numbers"
|
141
|
-
- "--inline-source"
|
142
159
|
- "--title"
|
143
160
|
- Sinatra
|
144
161
|
- "--main"
|
@@ -150,14 +167,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
167
|
requirements:
|
151
168
|
- - ">="
|
152
169
|
- !ruby/object:Gem::Version
|
153
|
-
version: 2.
|
170
|
+
version: 2.7.8
|
154
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
172
|
requirements:
|
156
173
|
- - ">="
|
157
174
|
- !ruby/object:Gem::Version
|
158
175
|
version: '0'
|
159
176
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
177
|
+
rubygems_version: 3.5.22
|
161
178
|
signing_key:
|
162
179
|
specification_version: 4
|
163
180
|
summary: Classy web-development dressed in a DSL
|