Skip to content

Commit ec11ec0

Browse files
committed
Ruby 4.X Edition
1 parent cf84cd8 commit ec11ec0

13 files changed

Lines changed: 195 additions & 114 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.4.7
1+
FROM ruby:4.0.2
22
ENV LANG=C.UTF-8
33
ENV ENABLE_SERVICE_WORKER=true
44

Dockerfile-alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.4.7-alpine
1+
FROM ruby:4.0.2-alpine
22

33
ENV LANG=C.UTF-8
44
ENV ENABLE_SERVICE_WORKER=true

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
source 'https://rubygems.org'
2-
ruby '3.4.8'
2+
ruby '4.0.2'
33

44
gem 'activesupport', require: false
55
gem 'html-pipeline'
66
gem 'nokogiri'
7-
gem 'pry-byebug'
87
gem 'rake'
98
gem 'terminal-table'
109
gem 'thor'
@@ -22,7 +21,7 @@ group :app do
2221
gem 'rack'
2322
gem 'rss'
2423
gem 'sinatra-contrib'
25-
gem 'sinatra'
24+
gem 'sinatra', '~> 3.2'
2625
gem 'sprockets-helpers'
2726
gem 'sprockets'
2827
gem 'thin'
@@ -35,6 +34,7 @@ end
3534

3635
group :development do
3736
gem 'better_errors'
37+
gem 'pry'
3838
end
3939

4040
group :docs do

Gemfile.lock

Lines changed: 80 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,47 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actionpack (7.2.3)
5-
actionview (= 7.2.3)
6-
activesupport (= 7.2.3)
7-
cgi
4+
actionpack (8.1.3)
5+
actionview (= 8.1.3)
6+
activesupport (= 8.1.3)
87
nokogiri (>= 1.8.5)
9-
racc
10-
rack (>= 2.2.4, < 3.3)
8+
rack (>= 2.2.4)
119
rack-session (>= 1.0.1)
1210
rack-test (>= 0.6.3)
1311
rails-dom-testing (~> 2.2)
1412
rails-html-sanitizer (~> 1.6)
1513
useragent (~> 0.16)
16-
actionview (7.2.3)
17-
activesupport (= 7.2.3)
14+
actionview (8.1.3)
15+
activesupport (= 8.1.3)
1816
builder (~> 3.1)
19-
cgi
2017
erubi (~> 1.11)
2118
rails-dom-testing (~> 2.2)
2219
rails-html-sanitizer (~> 1.6)
23-
activesupport (7.2.3)
20+
activesupport (8.1.3)
2421
base64
25-
benchmark (>= 0.3)
2622
bigdecimal
2723
concurrent-ruby (~> 1.0, >= 1.3.1)
2824
connection_pool (>= 2.2.5)
2925
drb
3026
i18n (>= 1.6, < 2)
27+
json
3128
logger (>= 1.4.2)
3229
minitest (>= 5.1)
3330
securerandom (>= 0.3)
3431
tzinfo (~> 2.0, >= 2.0.5)
35-
base64 (0.2.0)
36-
benchmark (0.3.0)
32+
uri (>= 0.13.1)
33+
base64 (0.3.0)
3734
better_errors (2.10.1)
3835
erubi (>= 1.0.0)
3936
rack (>= 0.9.0)
4037
rouge (>= 1.0.0)
41-
bigdecimal (3.1.9)
42-
browser (5.3.1)
38+
bigdecimal (4.1.2)
39+
browser (6.2.0)
4340
builder (3.3.0)
44-
byebug (12.0.0)
45-
cgi (0.5.1)
4641
chunky_png (1.4.0)
4742
coderay (1.1.3)
48-
concurrent-ruby (1.3.5)
49-
connection_pool (2.4.1)
43+
concurrent-ruby (1.3.6)
44+
connection_pool (3.0.2)
5045
crass (1.0.6)
5146
daemons (1.4.1)
5247
dartsass-sprockets (3.2.1)
@@ -58,57 +53,64 @@ GEM
5853
date (3.5.1)
5954
docile (1.4.1)
6055
drb (2.2.3)
61-
erb (6.0.1)
56+
erb (6.0.3)
6257
erubi (1.13.1)
6358
ethon (0.18.0)
6459
ffi (>= 1.15.0)
6560
logger
6661
eventmachine (1.2.7)
67-
execjs (2.9.1)
68-
exifr (1.4.0)
69-
ffi (1.17.3)
62+
execjs (2.10.1)
63+
exifr (1.5.1)
64+
ffi (1.17.4)
65+
ffi (1.17.4-x86_64-linux-gnu)
7066
fspath (3.1.2)
71-
google-protobuf (4.33.4)
67+
google-protobuf (4.34.1)
7268
bigdecimal
73-
rake (>= 13)
69+
rake (~> 13.3)
70+
google-protobuf (4.34.1-x86_64-linux-gnu)
71+
bigdecimal
72+
rake (~> 13.3)
7473
highline (3.1.2)
7574
reline
76-
html-pipeline (2.14.3)
77-
activesupport (>= 2)
78-
nokogiri (>= 1.4)
79-
i18n (1.14.7)
75+
html-pipeline (3.2.4)
76+
selma (~> 0.4)
77+
zeitwerk (~> 2.5)
78+
i18n (1.14.8)
8079
concurrent-ruby (~> 1.0)
81-
image_optim (0.31.3)
80+
image_optim (0.31.4)
8281
exifr (~> 1.2, >= 1.2.2)
8382
fspath (~> 3.0)
8483
image_size (>= 1.5, < 4)
8584
in_threads (~> 1.3)
8685
progress (~> 3.0, >= 3.0.1)
87-
image_optim_pack (0.10.1)
86+
image_optim_pack (0.13.1.20260418)
87+
fspath (>= 2.1, < 4)
88+
image_optim (~> 0.19)
89+
image_optim_pack (0.13.1.20260418-x86_64-linux)
8890
fspath (>= 2.1, < 4)
8991
image_optim (~> 0.19)
90-
image_size (3.3.0)
92+
image_size (3.4.0)
9193
in_threads (1.6.0)
92-
io-console (0.8.0)
93-
irb (1.16.0)
94+
io-console (0.8.2)
95+
irb (1.17.0)
9496
pp (>= 0.6.0)
97+
prism (>= 1.3.0)
9598
rdoc (>= 4.0.0)
9699
reline (>= 0.4.2)
97-
logger (1.6.6)
98-
loofah (2.25.0)
100+
json (2.19.4)
101+
logger (1.7.0)
102+
loofah (2.25.1)
99103
crass (~> 1.0.2)
100104
nokogiri (>= 1.12.0)
101105
method_source (1.1.0)
102-
mini_portile2 (2.8.9)
103-
minitest (6.0.2)
106+
minitest (6.0.5)
104107
drb (~> 2.0)
105108
prism (~> 1.5)
106-
multi_json (1.15.0)
107-
mustermann (3.0.3)
108-
ruby2_keywords (~> 0.0.1)
109-
newrelic_rpm (8.16.0)
110-
nokogiri (1.19.1)
111-
mini_portile2 (~> 2.8.2)
109+
multi_json (1.20.1)
110+
mustermann (3.1.1)
111+
newrelic_rpm (10.4.0)
112+
logger
113+
nokogiri (1.19.2-x86_64-linux-gnu)
112114
racc (~> 1.4)
113115
options (2.3.2)
114116
pp (0.6.3)
@@ -122,14 +124,11 @@ GEM
122124
pry (0.15.2)
123125
coderay (~> 1.1)
124126
method_source (~> 1.0)
125-
pry-byebug (3.11.0)
126-
byebug (~> 12.0)
127-
pry (>= 0.13, < 0.16)
128127
psych (5.3.1)
129128
date
130129
stringio
131130
racc (1.8.1)
132-
rack (2.2.22)
131+
rack (2.2.23)
133132
rack-protection (3.2.0)
134133
base64 (>= 0.1.0)
135134
rack (~> 2.2, >= 2.2.4)
@@ -145,39 +144,40 @@ GEM
145144
activesupport (>= 5.0.0)
146145
minitest
147146
nokogiri (>= 1.6)
148-
rails-html-sanitizer (1.6.2)
149-
loofah (~> 2.21)
147+
rails-html-sanitizer (1.7.0)
148+
loofah (~> 2.25)
150149
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
151-
railties (7.2.3)
152-
actionpack (= 7.2.3)
153-
activesupport (= 7.2.3)
154-
cgi
150+
railties (8.1.3)
151+
actionpack (= 8.1.3)
152+
activesupport (= 8.1.3)
155153
irb (~> 1.13)
156154
rackup (>= 1.0.0)
157155
rake (>= 12.2)
158156
thor (~> 1.0, >= 1.2.2)
159157
tsort (>= 0.2)
160158
zeitwerk (~> 2.6)
161-
rake (13.3.1)
162-
rdoc (7.1.0)
159+
rake (13.4.2)
160+
rdoc (7.2.0)
163161
erb
164162
psych (>= 4.0.0)
165163
tsort
166164
redcarpet (3.6.1)
167-
reline (0.6.0)
165+
reline (0.6.3)
168166
io-console (~> 0.5)
169-
rexml (3.3.9)
170-
rouge (1.11.1)
167+
rexml (3.4.4)
168+
rouge (4.7.0)
171169
rr (3.1.2)
172-
rss (0.3.1)
170+
rss (0.3.2)
173171
rexml
174-
ruby2_keywords (0.0.5)
175-
sass-embedded (1.97.3)
172+
sass-embedded (1.99.0)
176173
google-protobuf (~> 4.31)
177174
rake (>= 13)
175+
sass-embedded (1.99.0-x86_64-linux-gnu)
176+
google-protobuf (~> 4.31)
178177
sassc-embedded (1.80.8)
179178
sass-embedded (~> 1.80)
180-
securerandom (0.3.2)
179+
securerandom (0.4.1)
180+
selma (0.4.15-x86_64-linux)
181181
simplecov (0.22.0)
182182
docile (~> 1.1)
183183
simplecov-html (~> 0.11)
@@ -211,35 +211,37 @@ GEM
211211
unicode-display_width (>= 1.5, < 3.0)
212212
unicode_utils (~> 1.4)
213213
strings-ansi (0.2.0)
214-
terminal-table (3.0.2)
215-
unicode-display_width (>= 1.1.1, < 3)
216-
terser (1.2.6)
214+
terminal-table (4.0.0)
215+
unicode-display_width (>= 1.1.1, < 4)
216+
terser (1.2.7)
217217
execjs (>= 0.3.0, < 3)
218-
thin (1.8.2)
218+
thin (2.0.1)
219219
daemons (~> 1.0, >= 1.0.9)
220220
eventmachine (~> 1.0, >= 1.0.4)
221-
rack (>= 1, < 3)
222-
thor (1.4.0)
223-
tilt (2.6.0)
221+
logger
222+
rack (>= 1, < 4)
223+
thor (1.5.0)
224+
tilt (2.7.0)
224225
tsort (0.2.0)
225226
tty-pager (0.14.0)
226227
strings (~> 0.2.0)
227228
tty-screen (~> 0.8)
228-
tty-screen (0.8.1)
229+
tty-screen (0.8.2)
229230
typhoeus (1.6.0)
230231
ethon (>= 0.18.0)
231232
tzinfo (2.0.6)
232233
concurrent-ruby (~> 1.0)
233-
unicode-display_width (2.3.0)
234+
unicode-display_width (2.6.0)
234235
unicode_utils (1.4.0)
235236
unix_utils (0.0.15)
237+
uri (1.1.1)
236238
useragent (0.16.11)
237239
webrick (1.9.2)
238240
yajl-ruby (1.4.3)
239-
zeitwerk (2.7.4)
241+
zeitwerk (2.7.5)
240242

241243
PLATFORMS
242-
ruby
244+
x86_64-linux
243245

244246
DEPENDENCIES
245247
activesupport
@@ -255,7 +257,7 @@ DEPENDENCIES
255257
newrelic_rpm
256258
nokogiri
257259
progress_bar
258-
pry-byebug
260+
pry
259261
rack
260262
rack-ssl-enforcer
261263
rack-test
@@ -264,7 +266,7 @@ DEPENDENCIES
264266
rr
265267
rss
266268
simplecov
267-
sinatra
269+
sinatra (~> 3.2)
268270
sinatra-contrib
269271
sprockets
270272
sprockets-helpers
@@ -278,7 +280,7 @@ DEPENDENCIES
278280
yajl-ruby
279281

280282
RUBY VERSION
281-
ruby 3.4.8p72
283+
ruby 4.0.2
282284

283285
BUNDLED WITH
284-
2.4.6
286+
4.0.10

lib/app.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ class App < Sinatra::Application
6262
end
6363

6464
configure :development do
65-
register Sinatra::Reloader
66-
6765
use BetterErrors::Middleware
6866
BetterErrors.application_root = File.expand_path('..', __FILE__)
6967
BetterErrors.editor = :sublime

lib/docs.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,16 @@ def self.install_report(*names)
153153
const_get("#{name}_subscriber".camelize).subscribe_to(self)
154154
end
155155
end
156+
157+
def self.pry
158+
require 'pry'
159+
160+
Pry.config.input = STDIN
161+
Pry.config.output = STDOUT
162+
Pry.config.pager = false
163+
Pry.config.color = true
164+
Pry.config.quiet = false
165+
166+
Pry.start(binding)
167+
end
156168
end

lib/docs/core/filter.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
2-
32
module Docs
4-
class Filter < ::HTML::Pipeline::Filter
3+
class Filter
54
def css(*args)
65
doc.css(*args)
76
end

0 commit comments

Comments
 (0)