Skip to content

Commit 2da05d7

Browse files
committed
Specs all passing
1 parent b3e55ed commit 2da05d7

37 files changed

Lines changed: 198 additions & 178 deletions

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.6
1+
3.1.2

Gemfile

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
source 'https://rubygems.org'
2-
ruby '~> 2.7.3'
2+
ruby '3.1.2'
33

4-
gem 'rake'
5-
gem 'thor'
6-
gem 'pry', '~> 0.14.0'
7-
gem 'activesupport', '~> 5.2', require: false
8-
gem 'yajl-ruby', require: false
4+
gem 'activesupport', require: false
95
gem 'html-pipeline'
10-
gem 'typhoeus'
116
gem 'nokogiri'
7+
gem 'pry-byebug'
8+
gem 'rake'
129
gem 'terminal-table'
10+
gem 'thor'
11+
gem 'typhoeus'
12+
gem 'yajl-ruby', require: false
1313

1414
group :app do
15+
gem 'browser'
16+
gem 'chunky_png'
17+
gem 'coffee-script'
18+
gem 'erubi'
19+
gem 'image_optim_pack', platforms: :ruby
20+
gem 'image_optim'
21+
gem 'rack-ssl-enforcer'
1522
gem 'rack'
16-
gem 'sinatra'
23+
gem 'rss'
24+
gem 'sass'
1725
gem 'sinatra-contrib'
18-
gem 'rack-ssl-enforcer'
19-
gem 'thin'
20-
gem 'sprockets'
26+
gem 'sinatra'
2127
gem 'sprockets-helpers'
22-
gem 'erubi'
23-
gem 'browser'
24-
gem 'sass'
25-
gem 'coffee-script'
26-
gem 'chunky_png'
2728
gem 'sprockets-sass'
28-
gem 'image_optim'
29-
gem 'image_optim_pack', platforms: :ruby
29+
gem 'sprockets'
30+
gem 'thin'
3031
end
3132

3233
group :production do
33-
gem 'uglifier'
3434
gem 'newrelic_rpm'
35+
gem 'uglifier'
3536
end
3637

3738
group :development do
3839
gem 'better_errors'
3940
end
4041

4142
group :docs do
42-
gem 'redcarpet'
43+
gem 'net-sftp', require: false
4344
gem 'progress_bar', require: false
44-
gem 'unix_utils', require: false
45+
gem 'redcarpet'
4546
gem 'tty-pager', require: false
46-
gem 'net-sftp', '>= 2.1.3.rc2', require: false
47+
gem 'unix_utils', require: false
4748
end
4849

4950
group :test do
5051
gem 'minitest'
51-
gem 'rr', require: false
5252
gem 'rack-test', require: false
53+
gem 'rr', require: false
5354
end
5455

5556
if ENV['SELENIUM'] == '1'

Gemfile.lock

Lines changed: 74 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,138 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (5.2.6)
4+
activesupport (7.0.4)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
6-
i18n (>= 0.7, < 2)
7-
minitest (~> 5.1)
8-
tzinfo (~> 1.1)
9-
backports (3.15.0)
6+
i18n (>= 1.6, < 2)
7+
minitest (>= 5.1)
8+
tzinfo (~> 2.0)
109
better_errors (2.9.1)
1110
coderay (>= 1.0.0)
1211
erubi (>= 1.0.0)
1312
rack (>= 0.9.0)
14-
browser (2.6.1)
15-
chunky_png (1.3.11)
13+
browser (5.3.1)
14+
byebug (11.1.3)
15+
chunky_png (1.4.0)
1616
coderay (1.1.3)
1717
coffee-script (2.4.1)
1818
coffee-script-source
1919
execjs
2020
coffee-script-source (1.12.2)
21-
concurrent-ruby (1.1.9)
22-
daemons (1.4.0)
23-
erubi (1.10.0)
24-
ethon (0.12.0)
25-
ffi (>= 1.3.0)
21+
concurrent-ruby (1.1.10)
22+
daemons (1.4.1)
23+
erubi (1.11.0)
24+
ethon (0.16.0)
25+
ffi (>= 1.15.0)
2626
eventmachine (1.2.7)
27-
execjs (2.7.0)
28-
exifr (1.3.6)
27+
execjs (2.8.1)
28+
exifr (1.3.10)
2929
ffi (1.15.5)
3030
fspath (3.1.2)
3131
highline (2.0.3)
32-
html-pipeline (2.12.0)
32+
html-pipeline (2.14.3)
3333
activesupport (>= 2)
3434
nokogiri (>= 1.4)
35-
i18n (1.8.10)
35+
i18n (1.12.0)
3636
concurrent-ruby (~> 1.0)
37-
image_optim (0.26.5)
37+
image_optim (0.31.1)
3838
exifr (~> 1.2, >= 1.2.2)
3939
fspath (~> 3.0)
40-
image_size (>= 1.5, < 3)
40+
image_size (>= 1.5, < 4)
4141
in_threads (~> 1.3)
4242
progress (~> 3.0, >= 3.0.1)
43-
image_optim_pack (0.6.0)
43+
image_optim_pack (0.9.1.20221104)
4444
fspath (>= 2.1, < 4)
4545
image_optim (~> 0.19)
46-
image_size (2.0.2)
47-
in_threads (1.5.3)
46+
image_size (3.2.0)
47+
in_threads (1.6.0)
4848
method_source (1.0.0)
4949
mini_portile2 (2.8.0)
50-
minitest (5.14.4)
51-
multi_json (1.13.1)
52-
mustermann (1.1.1)
50+
minitest (5.16.3)
51+
multi_json (1.15.0)
52+
mustermann (3.0.0)
5353
ruby2_keywords (~> 0.0.1)
54-
net-sftp (3.0.0.beta1)
55-
net-ssh (>= 5.0.0, < 6.0.0)
56-
net-ssh (5.2.0)
57-
newrelic_rpm (6.7.0.359)
54+
net-sftp (4.0.0)
55+
net-ssh (>= 5.0.0, < 8.0.0)
56+
net-ssh (7.0.1)
57+
newrelic_rpm (8.12.0)
5858
nokogiri (1.13.9)
5959
mini_portile2 (~> 2.8.0)
6060
racc (~> 1.4)
6161
options (2.3.2)
62-
progress (3.5.2)
63-
progress_bar (1.3.0)
62+
progress (3.6.0)
63+
progress_bar (1.3.3)
6464
highline (>= 1.6, < 3)
6565
options (~> 2.3.0)
6666
pry (0.14.1)
6767
coderay (~> 1.1)
6868
method_source (~> 1.0)
69+
pry-byebug (3.10.1)
70+
byebug (~> 11.0)
71+
pry (>= 0.13, < 0.15)
6972
racc (1.6.0)
70-
rack (2.2.3.1)
71-
rack-protection (2.0.7)
73+
rack (2.2.4)
74+
rack-protection (3.0.3)
7275
rack
7376
rack-ssl-enforcer (0.2.9)
74-
rack-test (1.1.0)
75-
rack (>= 1.0, < 3)
76-
rake (13.0.0)
77-
rb-fsevent (0.10.3)
78-
rb-inotify (0.10.0)
77+
rack-test (2.0.2)
78+
rack (>= 1.3)
79+
rake (13.0.6)
80+
rb-fsevent (0.11.2)
81+
rb-inotify (0.10.1)
7982
ffi (~> 1.0)
8083
redcarpet (3.5.1)
81-
rr (1.2.1)
84+
rexml (3.2.5)
85+
rr (3.1.0)
86+
rss (0.2.9)
87+
rexml
8288
ruby2_keywords (0.0.5)
8389
sass (3.7.4)
8490
sass-listen (~> 4.0.0)
8591
sass-listen (4.0.0)
8692
rb-fsevent (~> 0.9, >= 0.9.4)
8793
rb-inotify (~> 0.9, >= 0.9.7)
88-
sinatra (2.0.7)
89-
mustermann (~> 1.0)
90-
rack (~> 2.0)
91-
rack-protection (= 2.0.7)
94+
sinatra (3.0.3)
95+
mustermann (~> 3.0)
96+
rack (~> 2.2, >= 2.2.4)
97+
rack-protection (= 3.0.3)
9298
tilt (~> 2.0)
93-
sinatra-contrib (2.0.7)
94-
backports (>= 2.8.2)
99+
sinatra-contrib (3.0.3)
95100
multi_json
96-
mustermann (~> 1.0)
97-
rack-protection (= 2.0.7)
98-
sinatra (= 2.0.7)
101+
mustermann (~> 3.0)
102+
rack-protection (= 3.0.3)
103+
sinatra (= 3.0.3)
99104
tilt (~> 2.0)
100105
sprockets (3.7.2)
101106
concurrent-ruby (~> 1.0)
102107
rack (> 1, < 3)
103-
sprockets-helpers (1.2.1)
108+
sprockets-helpers (1.4.0)
104109
sprockets (>= 2.2)
105110
sprockets-sass (2.0.0.beta2)
106111
sprockets (>= 2.0, < 4.0)
107-
strings (0.1.6)
108-
strings-ansi (~> 0.1)
109-
unicode-display_width (~> 1.5)
112+
strings (0.2.1)
113+
strings-ansi (~> 0.2)
114+
unicode-display_width (>= 1.5, < 3.0)
110115
unicode_utils (~> 1.4)
111-
strings-ansi (0.1.0)
112-
terminal-table (1.8.0)
113-
unicode-display_width (~> 1.1, >= 1.1.1)
116+
strings-ansi (0.2.0)
117+
terminal-table (3.0.2)
118+
unicode-display_width (>= 1.1.1, < 3)
114119
thin (1.8.1)
115120
daemons (~> 1.0, >= 1.0.9)
116121
eventmachine (~> 1.0, >= 1.0.4)
117122
rack (>= 1, < 3)
118-
thor (0.20.3)
119-
thread_safe (0.3.6)
120-
tilt (2.0.10)
121-
tty-pager (0.12.1)
122-
strings (~> 0.1.4)
123-
tty-screen (~> 0.6)
124-
tty-which (~> 0.4)
125-
tty-screen (0.7.0)
126-
tty-which (0.4.1)
127-
typhoeus (1.3.1)
123+
thor (1.2.1)
124+
tilt (2.0.11)
125+
tty-pager (0.14.0)
126+
strings (~> 0.2.0)
127+
tty-screen (~> 0.8)
128+
tty-screen (0.8.1)
129+
typhoeus (1.4.0)
128130
ethon (>= 0.9.0)
129-
tzinfo (1.2.10)
130-
thread_safe (~> 0.1)
131+
tzinfo (2.0.5)
132+
concurrent-ruby (~> 1.0)
131133
uglifier (4.2.0)
132134
execjs (>= 0.3.0, < 3)
133-
unicode-display_width (1.6.0)
135+
unicode-display_width (2.3.0)
134136
unicode_utils (1.4.0)
135137
unix_utils (0.0.15)
136138
yajl-ruby (1.4.3)
@@ -139,7 +141,7 @@ PLATFORMS
139141
ruby
140142

141143
DEPENDENCIES
142-
activesupport (~> 5.2)
144+
activesupport
143145
better_errors
144146
browser
145147
chunky_png
@@ -149,17 +151,18 @@ DEPENDENCIES
149151
image_optim
150152
image_optim_pack
151153
minitest
152-
net-sftp (>= 2.1.3.rc2)
154+
net-sftp
153155
newrelic_rpm
154156
nokogiri
155157
progress_bar
156-
pry (~> 0.14.0)
158+
pry-byebug
157159
rack
158160
rack-ssl-enforcer
159161
rack-test
160162
rake
161163
redcarpet
162164
rr
165+
rss
163166
sass
164167
sinatra
165168
sinatra-contrib
@@ -176,7 +179,7 @@ DEPENDENCIES
176179
yajl-ruby
177180

178181
RUBY VERSION
179-
ruby 2.7.3p183
182+
ruby 3.1.2p20
180183

181184
BUNDLED WITH
182185
2.1.4

docs/maintainers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ The following people (used to) maintain DevDocs:
125125
- [Jed Fox](https://github.com/j-f1)
126126
- [Mrugesh Mohapatra](https://github.com/raisedadead)
127127
- [Oliver Eyton-Williams](https://github.com/ojeytonwilliams)
128+
- [Paul Sernatinger](https://github.com/oscillot)
128129
- [Simon Legner](https://github.com/simon04)
129130
- [Thibaut Courouble](https://github.com/thibaut)
130131

lib/app.rb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,22 @@ def redirect_via_js(path)
238238
end
239239

240240
def supports_js_redirection?
241-
browser.modern? && !memoized_cookies.empty?
241+
modern_browser?(browser) && !memoized_cookies.empty?
242+
end
243+
244+
# https://github.com/fnando/browser#detecting-modern-browsers
245+
# https://github.com/fnando/browser/blob/v2.6.1/lib/browser/browser.rb
246+
# This restores the old browser gem `#modern?` functionality as it was in 2.6.1
247+
# It's possible this isn't even really needed any longer, these versions are quite old now
248+
def modern_browser?(browser)
249+
[
250+
browser.webkit?,
251+
browser.firefox? && browser.version.to_i >= 17,
252+
browser.ie? && browser.version.to_i >= 9 && !browser.compatibility_view?,
253+
browser.edge? && !browser.compatibility_view?,
254+
browser.opera? && browser.version.to_i >= 12,
255+
browser.firefox? && browser.device.tablet? && browser.platform.android? && b.version.to_i >= 14
256+
].any?
242257
end
243258
end
244259

lib/docs/core/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def self.run(*args, &block)
1313
request.run
1414
end
1515

16-
def initialize(url, options = {})
16+
def initialize(url, **options)
1717
super url.to_s, DEFAULT_OPTIONS.merge(options)
1818
end
1919

0 commit comments

Comments
 (0)