Skip to content

Commit

Permalink
Merge pull request #85 from DFE-Digital/1532-os-api
Browse files Browse the repository at this point in the history
Use Ordnance Survey API
  • Loading branch information
slawosz authored Dec 8, 2023
2 parents 257881c + e8196de commit 44e3f3f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aks_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

runs-on: ubuntu-latest
env:
GOOGLE_MAP_API_KEY: someapikey
ORDNANCE_SURVEY_API_KEY: someapikey

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN yarn install --frozen-lockfile --check-files
# Copy all files to /app (except what is defined in .dockerignore)
COPY . .

ENV GOOGLE_MAP_API_KEY="just-for-assets"
ENV ORDNANCE_SURVEY_API_KEY="just-for-assets"
# Precompile assets
RUN RAILS_ENV=production SECRET_KEY_BASE=required-to-run-but-not-used \
bundle exec rails assets:precompile
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ get-cluster-credentials: set-azure-account

aks-console: get-cluster-credentials
$(if $(PULL_REQUEST_NUMBER), $(eval export APP_ID=review-$(PULL_REQUEST_NUMBER)) , $(eval export APP_ID=$(CONFIG_LONG)))
kubectl -n ${NAMESPACE} exec -ti --tty deployment/teaching-school-hub-finder-${APP_ID} -- /bin/sh -c "cd /app && bundle exec rails c"
kubectl -n ${NAMESPACE} exec -ti --tty deployment/cpd-tsh-${APP_ID} -- /bin/sh -c "cd /app && bundle exec rails c"

aks-ssh: get-cluster-credentials
$(if $(PULL_REQUEST_NUMBER), $(eval export APP_ID=review-$(PULL_REQUEST_NUMBER)) , $(eval export APP_ID=$(CONFIG_LONG)))
Expand Down
2 changes: 1 addition & 1 deletion app/lib/local_authority/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def search_centre
end

def geo_result
@geo_result ||= Geocoder.search("#{@query}, UK", params: {limit: 1, polygon_geojson: 1, countrycodes: 'gb'}).first
@geo_result ||= Geocoder.search("#{@query}, UK").first
end

def search_polygon
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/geocoder.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Geocoder.configure(lookup: :google, api_key: ENV.fetch('GOOGLE_MAP_API_KEY'))
Geocoder.configure(lookup: :uk_ordnance_survey_names, api_key: ENV.fetch('ORDNANCE_SURVEY_API_KEY'))

0 comments on commit 44e3f3f

Please sign in to comment.