Skip to content

Commit

Permalink
Merge pull request #1899 from alphagov/fix-deprecation-warnings
Browse files Browse the repository at this point in the history
Fix deprecation warnings when running tests
  • Loading branch information
andysellick authored Feb 15, 2021
2 parents fdcf482 + 23687fc commit 4af2c16
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## Unreleased

* Fix deprecation warnings when running tests ([PR #1899](https://github.com/alphagov/govuk_publishing_components/pull/1899))
* Update `govuk-frontend` base SCSS imports ([PR #1922](https://github.com/alphagov/govuk_publishing_components/pull/1922))
* Remove redundant import in accordion component ([PR #1923](https://github.com/alphagov/govuk_publishing_components/pull/1923))
* Fix toggle click tracking on step-by-steps ([PR #1925](https://github.com/alphagov/govuk_publishing_components/pull/1925))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def initialize(path, name)
stylesheets = Dir["#{path}/app/assets/stylesheets/**/*.scss"]
javascripts = Dir["#{path}/app/assets/javascripts/**/*.js"]

find_components = /(?<=govuk_publishing_components\/components\/)[\/a-zA-Z_-]+(?=['"])/
find_components = /(?<=govuk_publishing_components\/components\/)[a-zA-Z_-]+(?=['"])/

@find_all_stylesheets = /@import ["']{1}govuk_publishing_components\/all_components/
find_stylesheets = /(?<=@import ["']{1}govuk_publishing_components\/components\/)(?!print\/)+[a-zA-Z_-]+(?=['"])/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"aria-hidden": true,
data: data_attributes do %>
<% if attachment.document? %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_document.svg" %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_document" %>
<% elsif attachment.spreadsheet? %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet.svg" %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet" %>
<% else %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_generic.svg" %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_generic" %>
<% end %>
<% end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div id='wrapper'>
<%= yield %>
</div>
<%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet.svg" %>
<%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet" %>
<%= render "govuk_publishing_components/components/feedback" %>
</body>
</html>
2 changes: 1 addition & 1 deletion spec/dummy/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
config.assets.quiet = true

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# config.i18n.raise_on_missing_translations = true

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
config.active_support.deprecation = :stderr

# Raises error for missing translations
config.action_view.raise_on_missing_translations = true
config.i18n.raise_on_missing_translations = true

config.assets.digest = false

Expand Down

0 comments on commit 4af2c16

Please sign in to comment.