mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
Updated to Ruby 4.0.0
link:https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released[Details]. For the most part, this is a minor update despite Ruby bumping to a major version. One breaking change is that you no longer can use `CGI` for parsing URLs. Here's the details: * Removed all `Pathname` requires since it's a core class now. 🎉 * Use `Rack::Utils.parse_query` instead of `CGI.parse`. * Passing a non-String -- or any object that can't cast to a string/path -- for a `Pathname`, results is a different error message now. * Includes minor/patch updates to supporting gems as well. Milestone: minor
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
3.4.8
|
||||
4.0.0
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# syntax = docker/dockerfile:1.4
|
||||
|
||||
ARG RUBY_VERSION=3.4.8
|
||||
ARG RUBY_VERSION=4.0.0
|
||||
|
||||
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
||||
|
||||
|
||||
+16
-8
@@ -155,6 +155,7 @@ GEM
|
||||
concurrent-ruby (~> 1.1)
|
||||
webrick (~> 1.7)
|
||||
websocket-driver (~> 0.7)
|
||||
ffi (1.17.2)
|
||||
ffi (1.17.2-aarch64-linux-gnu)
|
||||
ffi (1.17.2-aarch64-linux-musl)
|
||||
ffi (1.17.2-arm-linux-gnu)
|
||||
@@ -304,12 +305,16 @@ GEM
|
||||
mini_magick (5.3.1)
|
||||
logger
|
||||
mini_mime (1.1.5)
|
||||
mini_portile2 (2.8.9)
|
||||
mustermann (3.0.4)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
mustermann-contrib (3.0.4)
|
||||
hansi (~> 0.2.0)
|
||||
mustermann (= 3.0.4)
|
||||
nio4r (2.7.5)
|
||||
nokogiri (1.18.10)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.18.10-aarch64-linux-gnu)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.18.10-aarch64-linux-musl)
|
||||
@@ -368,9 +373,9 @@ GEM
|
||||
rack (>= 3)
|
||||
rainbow (3.1.1)
|
||||
rake (13.3.1)
|
||||
rbs (3.9.5)
|
||||
rbs (3.10.0)
|
||||
logger
|
||||
rdoc (7.0.2)
|
||||
rdoc (7.0.3)
|
||||
erb
|
||||
psych (>= 4.0.0)
|
||||
tsort
|
||||
@@ -441,7 +446,7 @@ GEM
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-support (3.13.6)
|
||||
rubocop (1.82.0)
|
||||
rubocop (1.82.1)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
@@ -701,6 +706,7 @@ CHECKSUMS
|
||||
etcher (3.5.0) sha256=20359b9092470809b65d12a50e756effae7f82cac98d312dd7097ec93f33d5c5
|
||||
faker (3.5.3) sha256=b961482dc0bb15ccb9a98ea7878b925669e9ae8f5e59b607da540b768137d765
|
||||
ferrum (0.17.1) sha256=51d591120fc593e5a13b5d9d6474389f5145bb92a91e36eab147b5d096c8cbe7
|
||||
ffi (1.17.2) sha256=297235842e5947cc3036ebe64077584bff583cd7a4e94e9a02fdec399ef46da6
|
||||
ffi (1.17.2-aarch64-linux-gnu) sha256=c910bd3cae70b76690418cce4572b7f6c208d271f323d692a067d59116211a1a
|
||||
ffi (1.17.2-aarch64-linux-musl) sha256=69e6556b091d45df83e6c3b19d3c54177c206910965155a6ec98de5e893c7b7c
|
||||
ffi (1.17.2-arm-linux-gnu) sha256=d4a438f2b40224ae42ec72f293b3ebe0ba2159f7d1bd47f8417e6af2f68dbaa5
|
||||
@@ -752,9 +758,11 @@ CHECKSUMS
|
||||
matrix (0.4.3) sha256=a0d5ab7ddcc1973ff690ab361b67f359acbb16958d1dc072b8b956a286564c5b
|
||||
mini_magick (5.3.1) sha256=29395dfd76badcabb6403ee5aff6f681e867074f8f28ce08d78661e9e4a351c4
|
||||
mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
|
||||
mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289
|
||||
mustermann (3.0.4) sha256=85fadcb6b3c6493a8b511b42426f904b7f27b282835502233dd154daab13aa22
|
||||
mustermann-contrib (3.0.4) sha256=aa39f90e5febbd2625ed437dbb91f379fb441e1f0627f66b699031665bdea687
|
||||
nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
|
||||
nokogiri (1.18.10) sha256=d5cc0731008aa3b3a87b361203ea3d19b2069628cb55e46ac7d84a0445e69cc1
|
||||
nokogiri (1.18.10-aarch64-linux-gnu) sha256=7fb87235d729c74a2be635376d82b1d459230cc17c50300f8e4fcaabc6195344
|
||||
nokogiri (1.18.10-aarch64-linux-musl) sha256=7e74e58314297cc8a8f1b533f7212d1999dbe2639a9ee6d97b483ea2acc18944
|
||||
nokogiri (1.18.10-arm-linux-gnu) sha256=51f4f25ab5d5ba1012d6b16aad96b840a10b067b93f35af6a55a2c104a7ee322
|
||||
@@ -786,8 +794,8 @@ CHECKSUMS
|
||||
rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
|
||||
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
||||
rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
|
||||
rbs (3.9.5) sha256=eabaaf60aee84e38cbf94839c6e1b9cd145c7295fc3cc0e88c92e4069b1119b0
|
||||
rdoc (7.0.2) sha256=0773452ac7735507f50f5c428c4f94e33da656ac4b0d58151105903ea91245ad
|
||||
rbs (3.10.0) sha256=e75b5f1313c71c9ee0fcea68bf97d3e5fe8ec7a641d4b5cd18bbc28c94ddf298
|
||||
rdoc (7.0.3) sha256=dfe3d0981d19b7bba71d9dbaeb57c9f4e3a7a4103162148a559c4fc687ea81f9
|
||||
redis-client (0.26.2) sha256=1336fb5a7202d398b719531853c184b7c9cbdcace1f00f8356062b9dfba6779b
|
||||
reek (6.5.0) sha256=d26d3a492773b2bbc228888067a21afe33ac07954a17dbd64cdeae42c4c69be1
|
||||
refinements (13.6.0) sha256=3d53c7348be785af707a89ae3a39e2dc31937e6d457787a54be54498c3aae0f6
|
||||
@@ -809,7 +817,7 @@ CHECKSUMS
|
||||
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
|
||||
rspec-mocks (3.13.7) sha256=0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c
|
||||
rspec-support (3.13.6) sha256=2e8de3702427eab064c9352fe74488cc12a1bfae887ad8b91cba480ec9f8afb2
|
||||
rubocop (1.82.0) sha256=237b7dc24952d7ec469a9593c7a5283315515e2e7dc24ac91532819c254fc4ec
|
||||
rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273
|
||||
rubocop-ast (1.48.0) sha256=22df9bbf3f7a6eccde0fad54e68547ae1e2a704bf8719e7c83813a99c05d2e76
|
||||
rubocop-capybara (2.22.1) sha256=ced88caef23efea53f46e098ff352f8fc1068c649606ca75cb74650970f51c0c
|
||||
rubocop-disable_syntax (0.2.0) sha256=1e61645773b3fc2f74e995ec65f605f7db59437c274fdfd4f385f60bf86af73e
|
||||
@@ -854,7 +862,7 @@ CHECKSUMS
|
||||
zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.4.8
|
||||
ruby 4.0.0
|
||||
|
||||
BUNDLED WITH
|
||||
4.0.1
|
||||
4.0.2
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "cgi"
|
||||
require "dry/core"
|
||||
require "dry/monads"
|
||||
require "initable"
|
||||
require "rack"
|
||||
require "refinements/pathname"
|
||||
require "refinements/string"
|
||||
|
||||
@@ -22,7 +22,7 @@ module Terminus
|
||||
screen_repository: "repositories.screen"
|
||||
]
|
||||
|
||||
include Initable[struct: proc { Terminus::Structs::Screen.new }, cgi: CGI]
|
||||
include Initable[struct: proc { Terminus::Structs::Screen.new }, rack: Rack::Utils]
|
||||
include Dry::Monads[:result]
|
||||
|
||||
using Refinements::Pathname
|
||||
@@ -46,18 +46,16 @@ module Terminus
|
||||
|
||||
private
|
||||
|
||||
attr_reader :struct, :pattern, :cgi
|
||||
attr_reader :struct, :pattern, :rack
|
||||
|
||||
def pathname_from file_name, url
|
||||
Pathname "#{file_name.gsub pattern, Dry::Core::EMPTY_STRING}.#{type_for url}"
|
||||
end
|
||||
|
||||
def type_for uri
|
||||
cgi.parse(uri)
|
||||
.fetch("response-content-type", Dry::Core::EMPTY_ARRAY)
|
||||
.first
|
||||
.to_s
|
||||
.sub("image/", Dry::Core::EMPTY_STRING)
|
||||
rack.parse_query(uri)
|
||||
.fetch("response-content-type", Dry::Core::EMPTY_STRING)
|
||||
.sub("image/", Dry::Core::EMPTY_STRING)
|
||||
end
|
||||
|
||||
def find_screen pathname
|
||||
|
||||
@@ -43,10 +43,12 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= tag.div **HTMX[
|
||||
get: routes.path(:playlist_items, playlist_id: playlist.id),
|
||||
trigger: :load
|
||||
] %>
|
||||
<%= tag.div(
|
||||
**HTMX[
|
||||
get: routes.path(:playlist_items, playlist_id: playlist.id),
|
||||
trigger: :load
|
||||
]
|
||||
) %>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "dry/types"
|
||||
require "pathname"
|
||||
require "versionaire"
|
||||
|
||||
module Terminus
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#! /usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "pathname"
|
||||
|
||||
$VERBOSE = true
|
||||
|
||||
jemalloc_path = Dir["/usr/lib/*/libjemalloc.so.2"]
|
||||
|
||||
@@ -52,7 +52,7 @@ RSpec.describe Terminus::Types do
|
||||
|
||||
it "fails when object can't be coerced" do
|
||||
expectation = proc { type.call nil }
|
||||
expect(&expectation).to raise_error(Dry::Types::CoercionError, /no implicit conversion/)
|
||||
expect(&expectation).to raise_error(Dry::Types::CoercionError, /requires a String/)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user