Skip to content

Commit

Permalink
Merge branch 'main' into error-handling-update
Browse files Browse the repository at this point in the history
  • Loading branch information
martikat authored Jan 6, 2025
2 parents 7f8564e + 1d9d81b commit d0f46d1
Show file tree
Hide file tree
Showing 8 changed files with 322 additions and 155 deletions.
180 changes: 90 additions & 90 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8.5)
actionpack (= 7.0.8.5)
activesupport (= 7.0.8.5)
actioncable (7.0.8.7)
actionpack (= 7.0.8.7)
activesupport (= 7.0.8.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.5)
actionpack (= 7.0.8.5)
activejob (= 7.0.8.5)
activerecord (= 7.0.8.5)
activestorage (= 7.0.8.5)
activesupport (= 7.0.8.5)
actionmailbox (7.0.8.7)
actionpack (= 7.0.8.7)
activejob (= 7.0.8.7)
activerecord (= 7.0.8.7)
activestorage (= 7.0.8.7)
activesupport (= 7.0.8.7)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.5)
actionpack (= 7.0.8.5)
actionview (= 7.0.8.5)
activejob (= 7.0.8.5)
activesupport (= 7.0.8.5)
actionmailer (7.0.8.7)
actionpack (= 7.0.8.7)
actionview (= 7.0.8.7)
activejob (= 7.0.8.7)
activesupport (= 7.0.8.7)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.5)
actionview (= 7.0.8.5)
activesupport (= 7.0.8.5)
actionpack (7.0.8.7)
actionview (= 7.0.8.7)
activesupport (= 7.0.8.7)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8.5)
actionpack (= 7.0.8.5)
activerecord (= 7.0.8.5)
activestorage (= 7.0.8.5)
activesupport (= 7.0.8.5)
actiontext (7.0.8.7)
actionpack (= 7.0.8.7)
activerecord (= 7.0.8.7)
activestorage (= 7.0.8.7)
activesupport (= 7.0.8.7)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.5)
activesupport (= 7.0.8.5)
actionview (7.0.8.7)
activesupport (= 7.0.8.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8.5)
activesupport (= 7.0.8.5)
activejob (7.0.8.7)
activesupport (= 7.0.8.7)
globalid (>= 0.3.6)
activemodel (7.0.8.5)
activesupport (= 7.0.8.5)
activerecord (7.0.8.5)
activemodel (= 7.0.8.5)
activesupport (= 7.0.8.5)
activestorage (7.0.8.5)
actionpack (= 7.0.8.5)
activejob (= 7.0.8.5)
activerecord (= 7.0.8.5)
activesupport (= 7.0.8.5)
activemodel (7.0.8.7)
activesupport (= 7.0.8.7)
activerecord (7.0.8.7)
activemodel (= 7.0.8.7)
activesupport (= 7.0.8.7)
activestorage (7.0.8.7)
actionpack (= 7.0.8.7)
activejob (= 7.0.8.7)
activerecord (= 7.0.8.7)
activesupport (= 7.0.8.7)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.5)
activesupport (7.0.8.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -105,8 +105,8 @@ GEM
racc
builder (3.3.0)
byebug (11.1.3)
canonical-rails (0.2.15)
actionview (>= 4.1, <= 7.2)
canonical-rails (0.2.16)
actionview (>= 4.1, < 7.3)
capybara (3.36.0)
addressable
matrix
Expand Down Expand Up @@ -183,7 +183,7 @@ GEM
warden (~> 1.2.3)
devise-security (0.18.0)
devise (>= 4.3.0)
diff-lcs (1.5.0)
diff-lcs (1.5.1)
docile (1.4.0)
domain_name (0.6.20240107)
dotenv (2.7.6)
Expand Down Expand Up @@ -213,7 +213,7 @@ GEM
zeitwerk (~> 2.6)
dumb_delegator (0.8.1)
equalizer (0.0.11)
erubi (1.13.0)
erubi (1.13.1)
factory_bot (6.2.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.2.0)
Expand Down Expand Up @@ -255,7 +255,7 @@ GEM
i18n (1.14.6)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
jsbundling-rails (1.2.2)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
Expand All @@ -264,7 +264,7 @@ GEM
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.23.1)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -280,8 +280,8 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.1)
mini_portile2 (2.8.8)
minitest (5.25.4)
msgpack (1.7.2)
multi_json (1.15.0)
multi_test (0.1.2)
Expand All @@ -295,16 +295,16 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.16.7)
nokogiri (1.18.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.7-aarch64-linux)
nokogiri (1.18.1-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
nokogiri (1.18.1-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
orm_adapter (0.5.0)
pagy (8.4.5)
Expand Down Expand Up @@ -334,32 +334,32 @@ GEM
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.10)
rack-test (2.1.0)
rack-test (2.2.0)
rack (>= 1.3)
rails (7.0.8.5)
actioncable (= 7.0.8.5)
actionmailbox (= 7.0.8.5)
actionmailer (= 7.0.8.5)
actionpack (= 7.0.8.5)
actiontext (= 7.0.8.5)
actionview (= 7.0.8.5)
activejob (= 7.0.8.5)
activemodel (= 7.0.8.5)
activerecord (= 7.0.8.5)
activestorage (= 7.0.8.5)
activesupport (= 7.0.8.5)
rails (7.0.8.7)
actioncable (= 7.0.8.7)
actionmailbox (= 7.0.8.7)
actionmailer (= 7.0.8.7)
actionpack (= 7.0.8.7)
actiontext (= 7.0.8.7)
actionview (= 7.0.8.7)
activejob (= 7.0.8.7)
activemodel (= 7.0.8.7)
activerecord (= 7.0.8.7)
activestorage (= 7.0.8.7)
activesupport (= 7.0.8.7)
bundler (>= 1.15.0)
railties (= 7.0.8.5)
railties (= 7.0.8.7)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8.5)
actionpack (= 7.0.8.5)
activesupport (= 7.0.8.5)
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)
railties (7.0.8.7)
actionpack (= 7.0.8.7)
activesupport (= 7.0.8.7)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -377,27 +377,27 @@ GEM
rexml (3.3.9)
rladr (1.2.0)
rouge (4.2.0)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.2)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-rails (5.1.0)
actionpack (>= 5.2)
activesupport (>= 5.2)
railties (>= 5.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.3)
rspec-support (~> 3.13.0)
rspec-rails (7.1.0)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.2)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand Down Expand Up @@ -475,7 +475,7 @@ GEM
sys-uname (1.2.2)
ffi (~> 1.1)
temple (0.8.2)
thor (1.3.1)
thor (1.3.2)
thread_safe (0.3.6)
tilt (2.0.10)
timeout (0.4.1)
Expand Down Expand Up @@ -517,7 +517,7 @@ GEM
backports (>= 3.18)
rainbow
yard
zeitwerk (2.6.15)
zeitwerk (2.7.1)

PLATFORMS
aarch64-linux-musl
Expand Down
2 changes: 1 addition & 1 deletion app/views/markup/_image_card.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.about-module-box-panel
p.govuk-body-l
= text
.about-module-box-panel style="min-height: 150px; background-image: url(#{image})"
.about-module-box-panel title=title style="min-height: 150px; background-image: url(#{image})"
7 changes: 3 additions & 4 deletions config/initializers/markdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,17 @@ def two_thirds

# @example
# {image_card}
# This is the title
# This is the body copy
#
# //path/to/image
# {/image_card}
#
# @return [CustomPreprocessor]
def image_card
pattern = build_regexp('image_card')
@output = output.gsub(pattern) do
text, image = split_content Regexp.last_match(1)

image_card_template.render(nil, text: text, image: image)
title, text, image = *Regexp.last_match(1).strip.split("\n")
image_card_template.render(nil, title: title, text: text, image: image)
end
self
end
Expand Down
Loading

0 comments on commit d0f46d1

Please sign in to comment.