Browse Source

Update Ruby version and Gov UK frontend component gem

pull/21/head
baarkerlounger 3 years ago
parent
commit
35737e092b
  1. 4
      .env.example
  2. 2
      .ruby-version
  3. 4
      Dockerfile
  4. 2
      Gemfile
  5. 152
      Gemfile.lock
  6. 4
      app/views/layouts/application.html.erb
  7. 13
      app/views/test/index.html.erb

4
.env.example

@ -1,2 +1,2 @@
DB_USERNAME: postgres-user DB_USERNAME:postgres-user
DB_PASSWORD: postgres-password DB_PASSWORD:postgres-password

2
.ruby-version

@ -1 +1 @@
3.0.0 3.0.2

4
Dockerfile

@ -1,5 +1,5 @@
# Build compilation image # Build compilation image
FROM ruby:3.0.0-alpine as builder FROM ruby:3.0.2-alpine as builder
# The application runs from /app # The application runs from /app
WORKDIR /app WORKDIR /app
@ -45,7 +45,7 @@ RUN rm -rf node_modules log tmp && \
find /usr/local/bundle/gems -name "*.html" -delete find /usr/local/bundle/gems -name "*.html" -delete
# Build runtime image # Build runtime image
FROM ruby:3.0.0-alpine as production FROM ruby:3.0.2-alpine as production
# The application runs from /app # The application runs from /app
WORKDIR /app WORKDIR /app

2
Gemfile

@ -3,7 +3,7 @@
source "https://rubygems.org" source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" } git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.0.0" ruby "3.0.2"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem "rails", "~> 6.1.4" gem "rails", "~> 6.1.4"

152
Gemfile.lock

@ -1,6 +1,6 @@
GIT GIT
remote: https://github.com/rspec/rspec-core.git remote: https://github.com/rspec/rspec-core.git
revision: beca9ba93cb71db91e2f37c4cc1bdbacdecd1025 revision: 94dfb29265fbadb1216a0aaf97cd343396c942c3
branch: main branch: main
specs: specs:
rspec-core (3.11.0.pre) rspec-core (3.11.0.pre)
@ -26,7 +26,7 @@ GIT
GIT GIT
remote: https://github.com/rspec/rspec-rails.git remote: https://github.com/rspec/rspec-rails.git
revision: e68175d1d6f3e7a70afca7a76a133039e3efd1ec revision: d2a9e0e1b18d7d0d95b98dfa6b31eadd8d1b3985
branch: main branch: main
specs: specs:
rspec-rails (5.1.0.pre) rspec-rails (5.1.0.pre)
@ -48,60 +48,60 @@ GIT
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actioncable (6.1.4) actioncable (6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (>= 0.6.1) websocket-driver (>= 0.6.1)
actionmailbox (6.1.4) actionmailbox (6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
activejob (= 6.1.4) activejob (= 6.1.4.1)
activerecord (= 6.1.4) activerecord (= 6.1.4.1)
activestorage (= 6.1.4) activestorage (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
mail (>= 2.7.1) mail (>= 2.7.1)
actionmailer (6.1.4) actionmailer (6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
actionview (= 6.1.4) actionview (= 6.1.4.1)
activejob (= 6.1.4) activejob (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (6.1.4) actionpack (6.1.4.1)
actionview (= 6.1.4) actionview (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
rack (~> 2.0, >= 2.0.9) rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4) actiontext (6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
activerecord (= 6.1.4) activerecord (= 6.1.4.1)
activestorage (= 6.1.4) activestorage (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
nokogiri (>= 1.8.5) nokogiri (>= 1.8.5)
actionview (6.1.4) actionview (6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4) activejob (6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (6.1.4) activemodel (6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
activerecord (6.1.4) activerecord (6.1.4.1)
activemodel (= 6.1.4) activemodel (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
activestorage (6.1.4) activestorage (6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
activejob (= 6.1.4) activejob (= 6.1.4.1)
activerecord (= 6.1.4) activerecord (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
marcel (~> 1.0.0) marcel (~> 1.0.0)
mini_mime (>= 1.1.0) mini_mime (>= 1.1.0)
activesupport (6.1.4) activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
minitest (>= 5.1) minitest (>= 5.1)
@ -111,7 +111,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2) ast (2.4.2)
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.7.5) bootsnap (1.8.1)
msgpack (~> 1.0) msgpack (~> 1.0)
builder (3.2.4) builder (3.2.4)
byebug (11.1.3) byebug (11.1.3)
@ -134,14 +134,14 @@ GEM
dotenv (= 2.7.6) dotenv (= 2.7.6)
railties (>= 3.2) railties (>= 3.2)
erubi (1.10.0) erubi (1.10.0)
ffi (1.15.3) ffi (1.15.4)
globalid (0.4.2) globalid (0.5.2)
activesupport (>= 4.2.0) activesupport (>= 5.0)
govuk-components (1.2.0) govuk-components (2.1.0)
activemodel (>= 6.0) activemodel (>= 6.0)
railties (>= 6.0) railties (>= 6.0)
view_component (~> 2.20) view_component (~> 2.39.0)
govuk_design_system_formbuilder (2.7.2) govuk_design_system_formbuilder (2.7.3)
actionview (>= 6.0) actionview (>= 6.0)
activemodel (>= 6.0) activemodel (>= 6.0)
activesupport (>= 6.0) activesupport (>= 6.0)
@ -151,23 +151,23 @@ GEM
iniparse (1.5.0) iniparse (1.5.0)
jbuilder (2.11.2) jbuilder (2.11.2)
activesupport (>= 5.0.0) activesupport (>= 5.0.0)
listen (3.5.1) listen (3.7.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.10.0) loofah (2.12.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
marcel (1.0.1) marcel (1.0.1)
method_source (1.0.0) method_source (1.0.0)
mini_mime (1.1.0) mini_mime (1.1.1)
minitest (5.14.4) minitest (5.14.4)
msgpack (1.4.2) msgpack (1.4.2)
nio4r (2.5.7) nio4r (2.5.8)
nokogiri (1.11.7-x86_64-darwin) nokogiri (1.12.4-x86_64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.11.7-x86_64-linux) nokogiri (1.12.4-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
overcommit (0.58.0) overcommit (0.58.0)
childprocess (>= 0.6.3, < 5) childprocess (>= 0.6.3, < 5)
@ -184,39 +184,39 @@ GEM
byebug (~> 11.0) byebug (~> 11.0)
pry (~> 0.13.0) pry (~> 0.13.0)
public_suffix (4.0.6) public_suffix (4.0.6)
puma (5.3.2) puma (5.4.0)
nio4r (~> 2.0) nio4r (~> 2.0)
racc (1.5.2) racc (1.5.2)
rack (2.2.3) rack (2.2.3)
rack-mini-profiler (2.3.2) rack-mini-profiler (2.3.3)
rack (>= 1.2.0) rack (>= 1.2.0)
rack-proxy (0.7.0) rack-proxy (0.7.0)
rack rack
rack-test (1.1.0) rack-test (1.1.0)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
rails (6.1.4) rails (6.1.4.1)
actioncable (= 6.1.4) actioncable (= 6.1.4.1)
actionmailbox (= 6.1.4) actionmailbox (= 6.1.4.1)
actionmailer (= 6.1.4) actionmailer (= 6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
actiontext (= 6.1.4) actiontext (= 6.1.4.1)
actionview (= 6.1.4) actionview (= 6.1.4.1)
activejob (= 6.1.4) activejob (= 6.1.4.1)
activemodel (= 6.1.4) activemodel (= 6.1.4.1)
activerecord (= 6.1.4) activerecord (= 6.1.4.1)
activestorage (= 6.1.4) activestorage (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
bundler (>= 1.15.0) bundler (>= 1.15.0)
railties (= 6.1.4) railties (= 6.1.4.1)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0) rails-html-sanitizer (1.4.2)
loofah (~> 2.3) loofah (~> 2.3)
railties (6.1.4) railties (6.1.4.1)
actionpack (= 6.1.4) actionpack (= 6.1.4.1)
activesupport (= 6.1.4) activesupport (= 6.1.4.1)
method_source method_source
rake (>= 0.13) rake (>= 0.13)
thor (~> 1.0) thor (~> 1.0)
@ -244,7 +244,7 @@ GEM
rubocop-rails (~> 2.10.0) rubocop-rails (~> 2.10.0)
rubocop-rake (= 0.5.1) rubocop-rake (= 0.5.1)
rubocop-rspec (~> 2.3.0) rubocop-rspec (~> 2.3.0)
rubocop-performance (1.11.4) rubocop-performance (1.11.5)
rubocop (>= 1.7.0, < 2.0) rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0) rubocop-ast (>= 0.4.0)
rubocop-rails (2.10.1) rubocop-rails (2.10.1)
@ -282,7 +282,7 @@ GEM
tzinfo (2.0.4) tzinfo (2.0.4)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0) unicode-display_width (2.0.0)
view_component (2.35.0) view_component (2.39.0)
activesupport (>= 5.0.0, < 8.0) activesupport (>= 5.0.0, < 8.0)
method_source (~> 1.0) method_source (~> 1.0)
web-console (4.1.0) web-console (4.1.0)
@ -290,7 +290,7 @@ GEM
activemodel (>= 6.0.0) activemodel (>= 6.0.0)
bindex (>= 0.4.0) bindex (>= 0.4.0)
railties (>= 6.0.0) railties (>= 6.0.0)
webpacker (5.4.0) webpacker (5.4.2)
activesupport (>= 5.2) activesupport (>= 5.2)
rack-proxy (>= 0.6.1) rack-proxy (>= 0.6.1)
railties (>= 5.2) railties (>= 5.2)
@ -336,7 +336,7 @@ DEPENDENCIES
webpacker (~> 5.0) webpacker (~> 5.0)
RUBY VERSION RUBY VERSION
ruby 3.0.0p0 ruby 3.0.2p107
BUNDLED WITH BUNDLED WITH
2.2.3 2.2.22

4
app/views/layouts/application.html.erb

@ -55,8 +55,8 @@
</header> </header>
<aside class="govuk-width-container"> <aside class="govuk-width-container">
<%= render GovukComponent::PhaseBanner.new( <%= render GovukComponent::PhaseBannerComponent.new(
phase_tag: { text: 'Beta' }, tag: { text: 'Beta' },
text: "This is a new service – #{govuk_mail_to("test@mhclg.gov.uk", "give feedback or report a problem", subject: "Feedback about Lettings and Sales of Social Housing in England Data Collection")}".html_safe text: "This is a new service – #{govuk_mail_to("test@mhclg.gov.uk", "give feedback or report a problem", subject: "Feedback about Lettings and Sales of Social Housing in England Data Collection")}".html_safe
) %> ) %>
</aside> </aside>

13
app/views/test/index.html.erb

@ -1,21 +1,20 @@
<%= render GovukComponent::Accordion.new(id: 'abc123') do |component| <%= render GovukComponent::AccordionComponent.new(id: 'abc123') do |component|
component.slot(:section, component.section(
title: 'Home electronics', heading_text: 'Home electronics',
summary: 'Entertainment, communication and recreation', summary_text: 'Entertainment, communication and recreation',
expanded: true) do expanded: true) do
tag.p(class: 'govuk-body') do tag.p(class: 'govuk-body') do
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
end end
end end
component.slot(:section, component.section(heading_text: 'Appliances', summary_text: 'Laundry, cookers and vacuum cleaners') do
title: 'Appliances', summary: 'Laundry, cookers and vacuum cleaners') do
tag.p(class: 'govuk-body') do tag.p(class: 'govuk-body') do
"Ut et elementum tortor. Donec a tellus sed sem euismod congue" "Ut et elementum tortor. Donec a tellus sed sem euismod congue"
end end
end end
component.slot(:section, title: 'Toys') do component.section(heading_text: 'Toys') do
safe_join([ safe_join([
tag.p(class: 'govuk-body') do tag.p(class: 'govuk-body') do
"In et nunc vitae tortor sollicitudin ultrices. Vivamus a purus justo." "In et nunc vitae tortor sollicitudin ultrices. Vivamus a purus justo."

Loading…
Cancel
Save