Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP950 Upgrade to Rails 6 #1240

Merged
merged 14 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'govuk_notify_rails', '~> 2.1.2'
gem 'loofah', '>= 2.2.3'
gem 'pg'
gem 'puma', '~> 4.3'
gem 'rails', '~> 5.2.3'
gem 'rails', '~> 6.0.2'
gem 'regexp-examples'
gem 'sass-rails', '~> 6.0'
gem 'savon', '~> 2.12.0'
Expand Down Expand Up @@ -52,12 +52,13 @@ gem 'jwt'

# background processing
gem 'redis-namespace'
gem 'sidekiq'
gem 'sidekiq', '~> 5.2.7'
gem 'sidekiq-status'
gem 'sidekiq_alive'

# Transformer that converts ES6 code into vanilla ES5 using babel via asset pipeline
gem 'sprockets', '>= 3.0.0'
# Default to 3.7.2 as https://github.com/sass/sassc-rails/issues/122 sassc loading is causing a segmentation error
gem 'sprockets', '~> 3.7.2'
gem 'sprockets-es6'

# URL and path parsing
Expand Down
156 changes: 86 additions & 70 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,89 @@ GEM
specs:
aasm (5.0.6)
concurrent-ruby (~> 1.0)
actioncable (5.2.3)
actionpack (= 5.2.3)
actioncable (6.0.2.1)
actionpack (= 6.0.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
actionmailbox (6.0.2.1)
actionpack (= 6.0.2.1)
activejob (= 6.0.2.1)
activerecord (= 6.0.2.1)
activestorage (= 6.0.2.1)
activesupport (= 6.0.2.1)
mail (>= 2.7.1)
actionmailer (6.0.2.1)
actionpack (= 6.0.2.1)
actionview (= 6.0.2.1)
activejob (= 6.0.2.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
actionpack (6.0.2.1)
actionview (= 6.0.2.1)
activesupport (= 6.0.2.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.2.1)
actionpack (= 6.0.2.1)
activerecord (= 6.0.2.1)
activestorage (= 6.0.2.1)
activesupport (= 6.0.2.1)
nokogiri (>= 1.8.5)
actionview (6.0.2.1)
activesupport (= 6.0.2.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.10.10)
actionpack (>= 4.1, < 6.1)
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.3)
activesupport (= 5.2.3)
activejob (6.0.2.1)
activesupport (= 6.0.2.1)
globalid (>= 0.3.6)
activemodel (5.2.3)
activesupport (= 5.2.3)
activemodel (6.0.2.1)
activesupport (= 6.0.2.1)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
activerecord (6.0.2.1)
activemodel (= 6.0.2.1)
activesupport (= 6.0.2.1)
activestorage (6.0.2.1)
actionpack (= 6.0.2.1)
activejob (= 6.0.2.1)
activerecord (= 6.0.2.1)
marcel (~> 0.3.1)
activesupport (5.2.3)
activesupport (6.0.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
akami (1.3.1)
gyoku (>= 0.4.0)
nokogiri
arel (9.0.0)
ast (2.4.0)
awesome_print (1.8.0)
aws-eventstream (1.0.3)
aws-partitions (1.241.0)
aws-sdk-core (3.79.0)
aws-partitions (1.269.0)
aws-sdk-core (3.89.1)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.25.0)
aws-sdk-kms (1.28.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.56.0)
aws-sdk-core (~> 3, >= 3.77.0)
aws-sdk-s3 (1.60.1)
aws-sdk-core (~> 3, >= 3.83.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
Expand Down Expand Up @@ -119,7 +132,7 @@ GEM
xpath (~> 3.2)
case_transform (0.2)
activesupport
chartkick (3.3.0)
chartkick (3.3.1)
childprocess (3.0.0)
chronic_duration (0.10.6)
numerizer (~> 0.1.1)
Expand Down Expand Up @@ -176,7 +189,7 @@ GEM
rainbow
rubocop (~> 0.79.0)
smart_properties
errbase (0.1.1)
errbase (0.2.0)
erubi (1.9.0)
execjs (2.7.0)
factory_bot (5.1.1)
Expand All @@ -186,9 +199,9 @@ GEM
railties (>= 4.2.0)
faker (2.10.2)
i18n (>= 1.6, < 2)
faraday (0.15.4)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
ffi (1.11.3)
ffi (1.12.1)
geckoboard-ruby (0.4.0)
gherkin (5.1.0)
globalid (0.4.2)
Expand Down Expand Up @@ -257,7 +270,7 @@ GEM
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mime-types (3.3)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.4)
Expand All @@ -280,8 +293,8 @@ GEM
notifications-ruby-client (5.1.2)
jwt (>= 1.5, < 3)
numerizer (0.1.1)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
oauth2 (1.4.2)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
Expand Down Expand Up @@ -317,7 +330,7 @@ GEM
nio4r (~> 2.0)
pundit (2.1.0)
activesupport (>= 3.0.0)
rack (2.1.2)
rack (2.2.2)
rack-pjax (1.1.0)
nokogiri (~> 1.5)
rack (>= 1.1)
Expand All @@ -327,27 +340,29 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
rails (6.0.2.1)
actioncable (= 6.0.2.1)
actionmailbox (= 6.0.2.1)
actionmailer (= 6.0.2.1)
actionpack (= 6.0.2.1)
actiontext (= 6.0.2.1)
actionview (= 6.0.2.1)
activejob (= 6.0.2.1)
activemodel (= 6.0.2.1)
activerecord (= 6.0.2.1)
activestorage (= 6.0.2.1)
activesupport (= 6.0.2.1)
bundler (>= 1.3.0)
railties (= 5.2.3)
railties (= 6.0.2.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-i18n (5.1.3)
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 5.0, < 6)
railties (>= 6.0.0, < 7)
rails_admin (2.0.1)
activemodel-serializers-xml (>= 1.0)
builder (~> 3.1)
Expand All @@ -360,16 +375,16 @@ GEM
rails (>= 5.0, < 7)
remotipart (~> 1.3)
sassc-rails (>= 1.3, < 3)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
railties (6.0.2.1)
actionpack (= 6.0.2.1)
activesupport (= 6.0.2.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.1.3)
redis-namespace (1.7.0)
Expand All @@ -380,12 +395,12 @@ GEM
responders (3.0.0)
actionpack (>= 5.0)
railties (>= 5.0)
rspec-core (3.9.0)
rspec-support (~> 3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (3.9.0)
Expand All @@ -396,7 +411,7 @@ GEM
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.0)
rspec-support (3.9.2)
rubocop (0.79.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
Expand All @@ -407,12 +422,12 @@ GEM
rubocop-performance (1.5.2)
rubocop (>= 0.71.0)
ruby-progressbar (1.10.1)
ruby-saml (1.9.0)
ruby-saml (1.11.0)
nokogiri (>= 1.5.10)
ruby2_keywords (0.0.1)
rubyzip (2.0.0)
ruby2_keywords (0.0.2)
rubyzip (2.1.0)
safe_yaml (1.0.5)
safely_block (0.2.2)
safely_block (0.3.0)
errbase (>= 0.1.1)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
Expand Down Expand Up @@ -519,6 +534,7 @@ GEM
activesupport
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.2.2)

PLATFORMS
ruby
Expand Down Expand Up @@ -566,7 +582,7 @@ DEPENDENCIES
pry-byebug
puma (~> 4.3)
pundit
rails (~> 5.2.3)
rails (~> 6.0.2)
rails_admin (~> 2.0)
redis-namespace
regexp-examples
Expand All @@ -579,7 +595,7 @@ DEPENDENCIES
selenium-webdriver
sentry-raven
shoulda-matchers (~> 4.3)
sidekiq
sidekiq (~> 5.2.7)
sidekiq-status
sidekiq_alive
simple_command (~> 0.1.0)
Expand All @@ -588,7 +604,7 @@ DEPENDENCIES
slack-notifier
spring
spring-watcher-listen (~> 2.0.0)
sprockets (>= 3.0.0)
sprockets (~> 3.7.2)
sprockets-es6
timecop
tzinfo-data
Expand All @@ -603,4 +619,4 @@ RUBY VERSION
ruby 2.6.3p62

BUNDLED WITH
2.0.2
2.1.4
2 changes: 1 addition & 1 deletion app/controllers/concerns/flowable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def first_module_of_parent_name_space
end

def parent_name_space_module
self.class.parent
self.class.module_parent
end

def path?(string)
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def current_journey
return journey_type if respond_to?(:journey_type)

journeys = %i[admin providers citizens]
parent = controller.class.parent.to_s.downcase.to_sym
parent = controller.class.module_parent.to_s.downcase.to_sym
return :unknown unless journeys.include?(parent)

parent
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/layouts_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def parent_layout(layout)
@parent_layouts_used << layout.to_sym

@view_flow.set(:layout, output_buffer)
output = render(file: "layouts/#{layout}")
output = render(template: "layouts/#{layout}")
self.output_buffer = ActionView::OutputBuffer.new(output)
end
end
4 changes: 2 additions & 2 deletions app/jobs/govuk_notify_mailer_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class GovukNotifyMailerJob < ActionMailer::DeliveryJob
def perform(mailer, mail_method, delivery_method, *args)
class GovukNotifyMailerJob < ActionMailer::MailDeliveryJob
def perform(mailer, mail_method, delivery_method, args: nil)
email_args, govuk_message_id = extract_govuk_message_id(args)
GovukEmails::EmailMonitor.call(
mailer: mailer,
Expand Down
2 changes: 2 additions & 0 deletions app/mailers/citizen_completed_means_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class CitizenCompletedMeansMailer < GovukNotifyRails::Mailer
self.delivery_job = GovukNotifyMailerJob

require_relative 'concerns/notify_template_methods'
include NotifyTemplateMethods

Expand Down
Loading