Skip to content

Commit

Permalink
Remove all references to Mapit
Browse files Browse the repository at this point in the history
Mapit is no longer used, so we can remove these references.
  • Loading branch information
ChrisBAshton committed Jul 27, 2022
1 parent c8de5dc commit 52ee007
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 167 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@ Admin interface for managing Local Authorities' links including all their servic

For example, [this service](https://www.gov.uk/garden-waste-disposal) uses Local Links Manager to determine the URL of the garden waste disposal page on the Local Authority website which corresponds to the postcode a user has entered.

Note that Local Links Manager does not determine a user's Local Authority based on their postcode. We use [Mapit](https://github.com/alphagov/mapit) for that.
Note that Local Links Manager does not determine a user's Local Authority based on their postcode.

This app maps RESTful URLs onto a persistence layer. It doesn't face public users.

Expand Down
5 changes: 0 additions & 5 deletions app/lib/services.rb
@@ -1,12 +1,7 @@
require "redis"
require "gds_api/mapit"
require "gds_api/publishing_api"

module Services
def self.mapit
@mapit ||= GdsApi.mapit(disable_cache: Rails.env.test?)
end

def self.icinga_check(service_desc, code, message)
if Rails.env.production?
`/usr/local/bin/notify_passive_check #{service_desc.shellescape} #{code.shellescape} #{message.shellescape}`
Expand Down
4 changes: 1 addition & 3 deletions docs/importing-local-authorities-data.md
@@ -1,8 +1,6 @@
# Importing Local Authorities data

Before running the import rake tasks make sure you have Mapit running locally and have imported data into it.

Import all local authorities:
Import all local authorities from `data/local-authorities.csv`:

`bundle exec rake import:local_authorities:import_all`

Expand Down
Expand Up @@ -32,8 +32,6 @@
webhook_secret_token: Rails.application.secrets.link_checker_api_secret_token,
)

stub_request(:get, "/mapit/")

link_status_requester.call

expect(stub1).to have_been_requested
Expand Down Expand Up @@ -77,8 +75,6 @@
webhook_secret_token: Rails.application.secrets.link_checker_api_secret_token,
)

stub_request(:get, "/mapit/")

link_status_requester.check_authority_urls "ambridge"

expect(stub1).to have_been_requested
Expand Down
146 changes: 0 additions & 146 deletions spec/lib/local-links-manager/import/fixtures/mapit.json

This file was deleted.

8 changes: 0 additions & 8 deletions spec/support/webmock.rb
@@ -1,11 +1,3 @@
require "webmock/rspec"

WebMock.disable_net_connect!(allow_localhost: true)

RSpec.configure do |config|
config.before(:each) do
stub_request(:get, /mapit/)
.with(headers: { "Accept" => "*/*", "User-Agent" => "Ruby" })
.to_return(status: 200, body: "{}", headers: {})
end
end

0 comments on commit 52ee007

Please sign in to comment.