diff --git a/Gemfile b/Gemfile index 60a9908e5..4df77bc5e 100644 --- a/Gemfile +++ b/Gemfile @@ -86,7 +86,6 @@ gem 'agreements', '~> 2.5.0' gem 'budget_planner', github: 'moneyadviceservice/budget_planner', ref: 'ae91831' gem 'cost_calculator_builder', github: 'moneyadviceservice/cost_calculator_builder', ref: 'a6a0ddf' gem 'cutback_calculator', '~> 0.13.0' -gem 'debt_advice_locator', github: 'moneyadviceservice/debt-advice-locator', ref: '878f1b1' gem 'debt_and_mental_health', '~> 1.6.0' gem 'debt_free_day_calculator', github: 'moneyadviceservice/debt_free_day_calculator', ref: 'cc7d907' gem 'debt_test', '~> 1.9.0' diff --git a/Gemfile.lock b/Gemfile.lock index a2437fe1c..12e25e065 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -51,28 +51,6 @@ GIT friendly_id (>= 5.1.0) rails (>= 4, < 5) -GIT - remote: https://github.com/moneyadviceservice/debt-advice-locator.git - revision: 878f1b1e5c765c15537328a78ccdd60d175b5dd9 - ref: 878f1b1 - specs: - debt_advice_locator (4.2.2) - active_attr - active_model_serializers (< 0.10.0) - addressable - bcrypt - coffee-rails - dough-ruby (~> 5) - draper (< 3) - geokit-rails - kaminari - mas-templating (~> 1.0.0) - rails (>= 4, < 5) - redcarpet - sass-rails (= 4.0.5) - uk_postcode - validate_url (= 1.0.0) - GIT remote: https://github.com/moneyadviceservice/debt_free_day_calculator.git revision: cc7d9078a2e0d5e023d13a151363ab90c7aac49e @@ -187,13 +165,6 @@ GEM erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_attr (0.16.0) - actionpack (>= 3.0.2, < 7.2) - activemodel (>= 3.0.2, < 7.2) - activesupport (>= 3.0.2, < 7.2) - active_model_serializers (0.9.13) - activemodel (>= 3.2) - concurrent-ruby (~> 1.0) activejob (4.2.11.37) activesupport (= 4.2.11.37) globalid (>= 0.3.0) @@ -271,13 +242,6 @@ GEM codeclimate-test-reporter (0.6.0) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.3) - coffee-rails (4.2.2) - coffee-script (>= 2.2.0) - railties (>= 4.0.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) concurrent-ruby (1.3.4) crack (0.4.5) rexml @@ -403,10 +367,6 @@ GEM thor (~> 0.19.1) friendly_id (5.5.1) activerecord (>= 4.0.0) - geokit (1.14.0) - geokit-rails (2.5.0) - geokit (~> 1.5) - rails (>= 3.0) gherkin (5.0.0) globalid (0.4.2) activesupport (>= 4.2.0) @@ -745,7 +705,6 @@ GEM thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - uk_postcode (2.1.8) underscore-rails (1.8.3) unf (0.1.4) unf_ext @@ -753,9 +712,6 @@ GEM unicode-display_width (1.8.0) uri (0.10.0) uri_template (0.7.0) - validate_url (1.0.0) - activemodel (>= 3.0.0) - addressable vcr (4.0.0) warden (1.2.7) rack (>= 1.0) @@ -807,7 +763,6 @@ DEPENDENCIES cucumber-rails cutback_calculator (~> 0.13.0) database_cleaner - debt_advice_locator! debt_and_mental_health (~> 1.6.0) debt_free_day_calculator! debt_test (~> 1.9.0) diff --git a/app/assets/javascripts/require_config.js.erb b/app/assets/javascripts/require_config.js.erb index 06f9d5f45..cf42e978a 100644 --- a/app/assets/javascripts/require_config.js.erb +++ b/app/assets/javascripts/require_config.js.erb @@ -91,7 +91,6 @@ costCalculatorBuilderConfig: requirejs_path('cost_calculator_builder/require_config'), pensionsCalculatorConfig: requirejs_path('pensions_calculator/require_config'), cutbackCalculatorConfig: requirejs_path('cutback_calculator/require_config'), - debtAdviceLocatorConfig: requirejs_path('debt_advice_locator/require_config'), debtFreeDayCalculatorConfig: requirejs_path('debt_free_day_calculator/require_config'), debtTestConfig: requirejs_path('debt_test/require_config'), rioConfig: requirejs_path('rio/require_config'), diff --git a/app/controllers/redirectors_controller.rb b/app/controllers/redirectors_controller.rb index cf8464769..6641ee0f2 100644 --- a/app/controllers/redirectors_controller.rb +++ b/app/controllers/redirectors_controller.rb @@ -20,8 +20,6 @@ def redirect private def url_for_tool(locale, tool_name) - if tool_name == :debt_advice_locator - "https://www.moneyhelper.org.uk/#{locale}/money-troubles/dealing-with-debt/debt-advice-locator" elsif tool_name == :loan_calculator "https://www.moneyhelper.org.uk/#{locale}/everyday-money/credit-and-purchases/loan-calculator" elsif tool_name == :credit_card_calculator diff --git a/bower.json.erb b/bower.json.erb index bfa9054b9..7711d7854 100644 --- a/bower.json.erb +++ b/bower.json.erb @@ -14,7 +14,6 @@ "bind-polyfill": "^1.0.0", "yeast": "1.17.0", "advice_plans": "<%= gem_path('advice_plans') %>", - "debt_advice_locator": "<%= gem_path('debt_advice_locator') %>", "debt_free_day_calculator": "<%= gem_path('debt_free_day_calculator') %>", "decision_trees": "<%= gem_path('decision_trees') %>", "dough": "<%= gem_path('dough-ruby') %>", diff --git a/config/initializers/debt_advice_locator.rb b/config/initializers/debt_advice_locator.rb deleted file mode 100644 index fc7b8aea3..000000000 --- a/config/initializers/debt_advice_locator.rb +++ /dev/null @@ -1 +0,0 @@ -DebtAdviceLocator.parent_controller = '::EmbeddedToolsController' diff --git a/config/routes.rb b/config/routes.rb index bd178ef6d..159339559 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -71,9 +71,6 @@ def not_implemented mount DebtFreeDayCalculator::Engine => '/tools/:tool_id', constraints: ToolMountPoint.for(:debt_free_day_calculator) - mount DebtAdviceLocator::Engine => '/tools/:tool_id', - constraints: ToolMountPoint.for(:debt_advice_locator) - mount DebtTest::Engine => '/tools/:tool_id', constraints: ToolMountPoint.for(:debt_test) @@ -109,8 +106,6 @@ def not_implemented get '/tools/:id', to: 'landing_pages#show', constraints: { id: /annuities/ } - get '/tools/redirect_to/:tool_name', to: 'redirectors#redirect' - resources :articles, only: 'show' do resource :amp, only: [:show], controller: :amp_articles resources :page_feedbacks, only: [:create] diff --git a/lib/tool_mount_point.rb b/lib/tool_mount_point.rb index 7ec61ff72..5d88ece13 100644 --- a/lib/tool_mount_point.rb +++ b/lib/tool_mount_point.rb @@ -5,7 +5,6 @@ require_relative '../lib/tool_mount_point/budget_planner' require_relative '../lib/tool_mount_point/cutback_calculator' require_relative '../lib/tool_mount_point/debt_and_mental_health' -require_relative '../lib/tool_mount_point/debt_advice_locator' require_relative '../lib/tool_mount_point/debt_free_day_calculator' require_relative '../lib/tool_mount_point/debt_test' require_relative '../lib/tool_mount_point/decision_trees' diff --git a/lib/tool_mount_point/debt_advice_locator.rb b/lib/tool_mount_point/debt_advice_locator.rb deleted file mode 100644 index 969969d57..000000000 --- a/lib/tool_mount_point/debt_advice_locator.rb +++ /dev/null @@ -1,6 +0,0 @@ -module ToolMountPoint - class DebtAdviceLocator < Base - EN_ID = 'debt-advice-locator'.freeze - CY_ID = 'canfyddwr-cyngor-ar-ddyledion'.freeze - end -end diff --git a/spec/controllers/redirectors_controller_spec.rb b/spec/controllers/redirectors_controller_spec.rb deleted file mode 100644 index 702351f23..000000000 --- a/spec/controllers/redirectors_controller_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -RSpec.describe RedirectorsController, type: :controller do - describe 'GET en/tools/redirect_to/:tool_name' do - context 'when tool exists' do - it 'sets an initial cookie and redirects' do - get :redirect, { locale: 'en', tool_name: 'debt_advice_locator' } - - expect(response.location).to eq( - 'https://www.moneyhelper.org.uk/en/money-troubles/dealing-with-debt/debt-advice-locator' - ) - expect(response.cookies['safari_initial_cookie']).to eq( - 'Safari initial cookie' - ) - end - end - - context 'when tool does not exists' do - it 'raises a 404, but still sets the cookie for efficiency' do - get :redirect, { locale: 'en', tool_name: 'something-completely-wrong' } - - expect(response.body).to include("Couldn't find tool named something-completely-wrong") - end - end - end -end diff --git a/spec/requests/tool_integration/debt_advice_locator_spec.rb b/spec/requests/tool_integration/debt_advice_locator_spec.rb deleted file mode 100644 index 70b0c4e3d..000000000 --- a/spec/requests/tool_integration/debt_advice_locator_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -RSpec.describe 'Debt advice locator', type: :request do - %W[ - /en/tools/#{ToolMountPoint::DebtAdviceLocator::EN_ID} - /cy/tools/#{ToolMountPoint::DebtAdviceLocator::CY_ID} - ].each do |path| - describe path do - before do - get path - end - - specify { expect(response).to be_ok } - end - end -end