sinatra 2.0.7 → 2.2.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.

@@ -43,43 +43,8 @@ module Sinatra
43
43
  ]
44
44
  end
45
45
 
46
- # Pulled from Rack::ShowExceptions in order to override TEMPLATE.
47
- # If Rack provides another way to override, this could be removed
48
- # in the future.
49
- def pretty(env, exception)
50
- req = Rack::Request.new(env)
51
-
52
- # This double assignment is to prevent an "unused variable" warning on
53
- # Ruby 1.9.3. Yes, it is dumb, but I don't like Ruby yelling at me.
54
- path = path = (req.script_name + req.path_info).squeeze("/")
55
-
56
- # This double assignment is to prevent an "unused variable" warning on
57
- # Ruby 1.9.3. Yes, it is dumb, but I don't like Ruby yelling at me.
58
- frames = frames = exception.backtrace.map { |line|
59
- frame = OpenStruct.new
60
- if line =~ /(.*?):(\d+)(:in `(.*)')?/
61
- frame.filename = $1
62
- frame.lineno = $2.to_i
63
- frame.function = $4
64
-
65
- begin
66
- lineno = frame.lineno-1
67
- lines = ::File.readlines(frame.filename)
68
- frame.pre_context_lineno = [lineno-CONTEXT, 0].max
69
- frame.pre_context = lines[frame.pre_context_lineno...lineno]
70
- frame.context_line = lines[lineno].chomp
71
- frame.post_context_lineno = [lineno+CONTEXT, lines.size].min
72
- frame.post_context = lines[lineno+1..frame.post_context_lineno]
73
- rescue
74
- end
75
-
76
- frame
77
- else
78
- nil
79
- end
80
- }.compact
81
-
82
- TEMPLATE.result(binding)
46
+ def template
47
+ TEMPLATE
83
48
  end
84
49
 
85
50
  private
@@ -1,3 +1,3 @@
1
1
  module Sinatra
2
- VERSION = '2.0.7'
2
+ VERSION = '2.2.0'
3
3
  end
data/sinatra.gemspec CHANGED
@@ -19,9 +19,8 @@ Gem::Specification.new 'sinatra', version do |s|
19
19
  "SECURITY.md",
20
20
  "sinatra.gemspec",
21
21
  "VERSION"]
22
- s.test_files = s.files.select { |p| p =~ /^test\/.*_test.rb/ }
23
- s.extra_rdoc_files = s.files.select { |p| p =~ /^README/ } << 'LICENSE'
24
- s.rdoc_options = %w[--line-numbers --inline-source --title Sinatra --main README.rdoc --encoding=UTF-8]
22
+ s.extra_rdoc_files = %w[README.md LICENSE]
23
+ s.rdoc_options = %w[--line-numbers --title Sinatra --main README.rdoc --encoding=UTF-8]
25
24
 
26
25
  if s.respond_to?(:metadata)
27
26
  s.metadata = {
@@ -33,11 +32,6 @@ Gem::Specification.new 'sinatra', version do |s|
33
32
  'documentation_uri' => 'https://www.rubydoc.info/gems/sinatra'
34
33
  }
35
34
  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
35
  raise <<-EOF
42
36
  RubyGems 2.0 or newer is required to protect against public gem pushes. You can update your rubygems version by running:
43
37
  gem install rubygems-update
@@ -46,9 +40,9 @@ RubyGems 2.0 or newer is required to protect against public gem pushes. You can
46
40
  EOF
47
41
  end
48
42
 
49
- s.required_ruby_version = '>= 2.2.0'
43
+ s.required_ruby_version = '>= 2.3.0'
50
44
 
51
- s.add_dependency 'rack', '~> 2.0'
45
+ s.add_dependency 'rack', '~> 2.2'
52
46
  s.add_dependency 'tilt', '~> 2.0'
53
47
  s.add_dependency 'rack-protection', version
54
48
  s.add_dependency 'mustermann', '~> 1.0'
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: 2.0.7
4
+ version: 2.2.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: 2019-08-22 00:00:00.000000000 Z
14
+ date: 2022-02-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rack
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: '2.0'
22
+ version: '2.2'
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: '2.0'
29
+ version: '2.2'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: tilt
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -47,14 +47,14 @@ dependencies:
47
47
  requirements:
48
48
  - - '='
49
49
  - !ruby/object:Gem::Version
50
- version: 2.0.7
50
+ version: 2.2.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - '='
56
56
  - !ruby/object:Gem::Version
57
- version: 2.0.7
57
+ version: 2.2.0
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mustermann
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -75,18 +75,7 @@ email: sinatrarb@googlegroups.com
75
75
  executables: []
76
76
  extensions: []
77
77
  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
78
  - README.md
86
- - README.pt-br.md
87
- - README.pt-pt.md
88
- - README.ru.md
89
- - README.zh.md
90
79
  - LICENSE
91
80
  files:
92
81
  - ".yardopts"
@@ -112,6 +101,8 @@ files:
112
101
  - SECURITY.md
113
102
  - VERSION
114
103
  - examples/chat.rb
104
+ - examples/rainbows.conf
105
+ - examples/rainbows.rb
115
106
  - examples/simple.rb
116
107
  - examples/stream.ru
117
108
  - lib/sinatra.rb
@@ -136,7 +127,6 @@ metadata:
136
127
  post_install_message:
137
128
  rdoc_options:
138
129
  - "--line-numbers"
139
- - "--inline-source"
140
130
  - "--title"
141
131
  - Sinatra
142
132
  - "--main"
@@ -148,15 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
138
  requirements:
149
139
  - - ">="
150
140
  - !ruby/object:Gem::Version
151
- version: 2.2.0
141
+ version: 2.3.0
152
142
  required_rubygems_version: !ruby/object:Gem::Requirement
153
143
  requirements:
154
144
  - - ">="
155
145
  - !ruby/object:Gem::Version
156
146
  version: '0'
157
147
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 2.7.3
148
+ rubygems_version: 3.1.2
160
149
  signing_key:
161
150
  specification_version: 4
162
151
  summary: Classy web-development dressed in a DSL