sinatra-contrib 3.2.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ideas.md +1 -1
- data/lib/sinatra/capture.rb +1 -1
- data/lib/sinatra/contrib/version.rb +1 -1
- data/lib/sinatra/cookies.rb +5 -5
- data/lib/sinatra/haml_helpers.rb +1 -1
- data/lib/sinatra/link_header.rb +6 -4
- data/lib/sinatra/reloader.rb +2 -2
- data/lib/sinatra/runner.rb +1 -1
- data/lib/sinatra/webdav.rb +1 -1
- data/sinatra-contrib.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3847278bcdd943f86243445ea0959559d9c0f148b2320e07f4474400af3d69c9
|
4
|
+
data.tar.gz: 6430fb1432cfa954fcffbadf3edcae9b8c622c69cc118c3cd21e9489f489a3af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01dc3a37a746bdd1229776b7da8de2920e5ced4ddd3d571aaece41b45828975f42916ab165225a221c9265f24a07975aa9290ae08685d7149d0716314d9b28db
|
7
|
+
data.tar.gz: b5dd64828094ab97e66af29e9be9aab13f9d42cd598f796d6917502e2ce0aaa00ccf7970c9f09ccb5fa20d10fbc5da136cb1a88e4268e0530cf2cb7811216ce7
|
data/README.md
CHANGED
@@ -69,7 +69,7 @@ consider using an alternative like [rerun](https://github.com/alexch/rerun) or
|
|
69
69
|
* [`sinatra/test_helpers`][sinatra-test-helpers]: Helper methods to ease testing your Sinatra
|
70
70
|
application. Partly extracted from Sinatra. Testing framework agnostic
|
71
71
|
|
72
|
-
* `sinatra/quiet_logger`: Extension to exclude specific
|
72
|
+
* `sinatra/quiet_logger`: Extension to exclude specific paths from access log.
|
73
73
|
It works by patching Rack::CommonLogger
|
74
74
|
|
75
75
|
## Installation
|
data/ideas.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
end
|
11
11
|
|
12
12
|
* `sinatra-smart-cache`: update cache header only if arguments are more
|
13
|
-
restrictive than
|
13
|
+
restrictive than current value, set caching headers that way for most helper
|
14
14
|
methods (i.e. `send_file`)
|
15
15
|
|
16
16
|
* Some verbose logging extension: Log what filters, routes, error handlers,
|
data/lib/sinatra/capture.rb
CHANGED
data/lib/sinatra/cookies.rb
CHANGED
@@ -60,7 +60,7 @@ module Sinatra
|
|
60
60
|
attr_reader :options
|
61
61
|
|
62
62
|
def initialize(app)
|
63
|
-
@
|
63
|
+
@response_array = nil
|
64
64
|
@response_hash = {}
|
65
65
|
@response = app.response
|
66
66
|
@request = app.request
|
@@ -309,12 +309,12 @@ module Sinatra
|
|
309
309
|
end
|
310
310
|
|
311
311
|
def parse_response
|
312
|
-
|
313
|
-
return if @
|
312
|
+
cookies_from_response = Array(@response['Set-Cookie'])
|
313
|
+
return if @response_array == cookies_from_response
|
314
314
|
|
315
315
|
hash = {}
|
316
316
|
|
317
|
-
|
317
|
+
cookies_from_response.each do |line|
|
318
318
|
key, value = line.split(';', 2).first.to_s.split('=', 2)
|
319
319
|
next if key.nil?
|
320
320
|
|
@@ -328,7 +328,7 @@ module Sinatra
|
|
328
328
|
end
|
329
329
|
|
330
330
|
@response_hash.replace hash
|
331
|
-
@
|
331
|
+
@response_array = cookies_from_response
|
332
332
|
end
|
333
333
|
|
334
334
|
def request_cookies
|
data/lib/sinatra/haml_helpers.rb
CHANGED
data/lib/sinatra/link_header.rb
CHANGED
@@ -88,11 +88,13 @@ module Sinatra
|
|
88
88
|
http_pattern = ['<%s>', *options].join ';'
|
89
89
|
link = (response['Link'] ||= '')
|
90
90
|
|
91
|
+
link = response['Link'] = +link
|
92
|
+
|
91
93
|
urls.map do |url|
|
92
|
-
link << "
|
94
|
+
link << "," unless link.empty?
|
93
95
|
link << (http_pattern % url)
|
94
96
|
html_pattern % url
|
95
|
-
end.join
|
97
|
+
end.join
|
96
98
|
end
|
97
99
|
|
98
100
|
##
|
@@ -117,10 +119,10 @@ module Sinatra
|
|
117
119
|
yield if block_given?
|
118
120
|
return '' unless response.include? 'Link'
|
119
121
|
|
120
|
-
response['Link'].split("
|
122
|
+
response['Link'].split(",").map do |line|
|
121
123
|
url, *opts = line.split(';').map(&:strip)
|
122
124
|
"<link href=\"#{url[1..-2]}\" #{opts.join ' '} />"
|
123
|
-
end.join
|
125
|
+
end.join
|
124
126
|
end
|
125
127
|
|
126
128
|
def self.registered(_base)
|
data/lib/sinatra/reloader.rb
CHANGED
@@ -395,12 +395,12 @@ module Sinatra
|
|
395
395
|
# attr_reader :register_path warn on -w (private attribute)
|
396
396
|
def register_path; @register_path ||= nil; end
|
397
397
|
|
398
|
-
# Indicates an
|
398
|
+
# Indicates an extension is being registered.
|
399
399
|
def start_registering_extension
|
400
400
|
@register_path = caller_files[2]
|
401
401
|
end
|
402
402
|
|
403
|
-
# Indicates the
|
403
|
+
# Indicates the extension has already been registered.
|
404
404
|
def stop_registering_extension
|
405
405
|
@register_path = nil
|
406
406
|
end
|
data/lib/sinatra/runner.rb
CHANGED
data/lib/sinatra/webdav.rb
CHANGED
data/sinatra-contrib.gemspec
CHANGED
@@ -35,7 +35,7 @@ RubyGems 2.0 or newer is required to protect against public gem pushes. You can
|
|
35
35
|
'rubygems_mfa_required' => 'true'
|
36
36
|
}
|
37
37
|
|
38
|
-
s.required_ruby_version = '>= 2.
|
38
|
+
s.required_ruby_version = '>= 2.7.8'
|
39
39
|
|
40
40
|
s.add_dependency 'multi_json', '>= 0.0.2'
|
41
41
|
s.add_dependency 'mustermann', '~> 3.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-contrib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/sinatra/sinatra/graphs/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 4.1.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 4.1.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sinatra
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 4.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 4.1.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: tilt
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,14 +131,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements:
|
132
132
|
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version: 2.
|
134
|
+
version: 2.7.8
|
135
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.5.
|
141
|
+
rubygems_version: 3.5.22
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Collection of useful Sinatra extensions.
|