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

Missing link to detailed PPD documentation #118

Merged
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
This app presents the landing page experience for landregistry.data.gov.uk,
including the SPARQL Qonsole

## 1.7.6 - 2024-03-12

- (Jon) Reconfigured the old ppd doc routes to permanently redirect to `app/doc/ppd`
as well as set the `ppd_doc_path` variable to point to the same reconfigured
route; alongside adding tests querying the new route to ensure the route is
valid and contains the expected content as well as tests to verify the old
routes redirect with 301 permanent status

## 1.7.5 - 2023-11-23

- (Jon) Updated the `lr_common_styles` gem to the latest 1.9.3 patch release.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apk add --update \
nodejs \
tzdata \
&& rm -rf /var/cache/apk/* \
&& gem update --system \
&& gem update --system 3.4.22 \
&& gem install bundler:$BUNDLER_VERSION \
&& bundle config --global frozen 1

Expand Down
1 change: 0 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ def set_locale
def change_default_caching_policy
expires_in 5.minutes, public: true, must_revalidate: true if Rails.env.production?
end

end
2 changes: 1 addition & 1 deletion app/lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Version
MAJOR = 1
MINOR = 7
REVISION = 5
REVISION = 6
SUFFIX = nil
VERSION = "#{MAJOR}.#{MINOR}.#{REVISION}#{SUFFIX && ".#{SUFFIX}"}"
end
2 changes: 1 addition & 1 deletion config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if ENV['SENTRY_API_KEY']
Sentry.init do |config|
config.dsn = ENV['SENTRY_API_KEY']
config.environment = ENV['DEPLOYMENT_ENVIRONMENT'] || Rails.env
config.environment = ENV.fetch('DEPLOYMENT_ENVIRONMENT') { Rails.env }
config.enabled_environments = %w[production]
config.release = Version::VERSION
config.breadcrumbs_logger = %i[active_support_logger http_logger]
Expand Down
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
get 'landing/hpi', to: 'landing#hpi'
get 'doc/hpi', to: 'doc#hpi', as: 'hpi_doc'
get 'doc/ukhpi', to: redirect('/app/ukhpi/doc', status: 302)
get 'doc/ppd', to: 'doc#ppd', as: 'ppd_doc'
get 'app/doc/ppd', to: 'doc#ppd', as: 'ppd_doc'
get 'doc/ppd', to: redirect('/app/doc/ppd', status: 301)
get 'app/root/doc/ppd', to: redirect('app/doc/ppd', status: 301)
get 'doc/ukhpi-dsd', to: redirect('/app/ukhpi/doc/ukhpi-dsd', status: 302)
get 'doc/ukhpi-user-guide', to: redirect('/app/ukhpi/doc/ukhpi-user-guide', status: 302)
get 'doc/accessibility', to: 'doc#accessibility'
Expand Down
18 changes: 17 additions & 1 deletion test/integration/documentation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,24 @@ class DocumentationTest < ActionDispatch::IntegrationTest
assert_equal(302, response.status)
end

test 'PPD docs page' do
test 'older PPD doc link redirects with permanent 301 status' do
get '/doc/ppd'
assert_equal(301, response.status)
end

test 'old PPD doc link redirects with permanent 301 status' do
get '/app/root/doc/ppd'
assert_equal(301, response.status)
end

test 'ppd_doc_path variable links correctly' do
get ppd_doc_path
assert_response :success
end

test 'ppd doc loads correctly' do
get ppd_doc_path
assert_select 'h1', 'Price Paid Linked Data'
assert_select 'h2', 'What does the Price Paid Dataset consist of?'
end
end