govuk_admin_template 6.5.0 → 6.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d86be33dcfe4d5e60d28927748432c2d57b0e662
4
- data.tar.gz: 1810515c1fa36b087e9a14babfa9feb47f493449
2
+ SHA256:
3
+ metadata.gz: 256beb3158d9b5c21fd691e4735b7f5ae2a13a33ff7bb099739221d8a0ea75ae
4
+ data.tar.gz: d3ea4f5b011ea36a0558f3801224e31f1247dde9517d0fc6465a3bce84e6a2b8
5
5
  SHA512:
6
- metadata.gz: 46d3e4f8a377826b713455f8a631f0732caa67ab960f9cd6a1425ade73b0a055a919f98fd6ff1695c5f3448cbfdf4e88a15d632a3b5ecadcb572b52a1aa42ec1
7
- data.tar.gz: 23a00887c2dadd977b65a2568cf11d4deb49581eea9db9f1844fd5c7f1f86a2a87609032706394b5859f4690d0776dd2c21a0ecb2016dff048a595380f723dd4
6
+ metadata.gz: de110db68d29507ccd8a10ce61e539f2e9d98767aca8b2ea9b6516389a7256a0c2a82487d546dcd25e8abee815943edeef93a7ae60d1bc34ad0016d8e2a42852
7
+ data.tar.gz: b5221547b9fc6c2c12cef314f3f3571788776592ba6dd5741dbb0243e2784a7a8c76a3dba1ddb8adcca0340a4f0e777628f85092539a0054574764441dc246a2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,21 @@
1
- # Unreleased
1
+ # 6.8.1
2
+
3
+ * Ensure labels have sufficient colour contrast
4
+
5
+ # 6.8.0
6
+
7
+ * Replace the development dependency govuk-lint with rubocop-govuk
8
+ * Fix colour contrast issues flagged by WAVE Web Accessibility Evaluation Tool
9
+ * Ensure govspeak guidance can be navigated to via keyboard tabbing
10
+
11
+ # 6.7.0
12
+
13
+ * Update bootstrap-sass dependency to 3.4.1 (from 3.3.5.1)
14
+
15
+ # 6.6.0
16
+
17
+ * Use the external URL for Signon
18
+ * Explicitly declare a dependency on `plek`
2
19
 
3
20
  # 6.5.0
4
21
 
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # GOV.UK Admin Template
1
+ # GOV.UK Admin Template (DEPRECATED)
2
+
3
+ > **NOTE**: This project is deprecated. New GOV.UK admin applications should be built using the [layout component in govuk_publishing_components](https://govuk-publishing-components.herokuapp.com/component-guide/layout_for_admin). Projects outside of GDS can use the [GOV.UK Design System](https://design-system.service.gov.uk/) directly to build interfaces.
4
+
5
+ ---
2
6
 
3
7
  Styles, scripts and templates wrapped up in a gem for getting up and running with [Bootstrap](http://getbootstrap.com) based backend admin apps.
4
8
 
@@ -276,13 +276,13 @@ a.list-group-item {
276
276
 
277
277
  .link-muted,
278
278
  .link-muted:visited {
279
- color: $gray-light;
279
+ color: $gray-dark;
280
280
  text-decoration: underline;
281
281
  }
282
282
 
283
283
  .link-muted:hover,
284
284
  .link-muted:focus {
285
- color: $gray;
285
+ color: #000;
286
286
  }
287
287
 
288
288
  .link-inherit,
@@ -304,7 +304,7 @@ a.list-group-item {
304
304
  font-size: 65%;
305
305
  font-weight: normal;
306
306
  line-height: 1.5;
307
- color: $gray-light;
307
+ color: $gray;
308
308
  display: block;
309
309
  }
310
310
 
@@ -360,7 +360,7 @@ a.list-group-item {
360
360
  }
361
361
 
362
362
  .no-content {
363
- color: lighten($gray-light, 20%); // Large text needs a lighter colour for balance
363
+ color: $gray;
364
364
  @extend %large-and-spaced;
365
365
  }
366
366
 
@@ -1,3 +1,7 @@
1
+ $black: #000;
2
+ $gray-dark: #444;
3
+ $blue: #1d70b8;
4
+
1
5
  /*
2
6
  Bootstrap 3.2 made gray-light darker for accessibility and contrast:
3
7
  https://github.com/twbs/bootstrap/releases/tag/v3.2.0
@@ -5,4 +9,41 @@
5
9
  This assumed gray-light was on a light background. We aren't always
6
10
  using it in that way. Reset to the original value #999.
7
11
  */
8
- $gray-light: lighten(#000, 60%);
12
+
13
+ $gray-light: lighten($black, 60%);
14
+
15
+ /*
16
+ Updates a bunch of copy that used to be gray to black for things like labels.
17
+ */
18
+ $text-color: $black;
19
+
20
+ /*
21
+ Updates the input to black so it contrasts with the light gray background.
22
+ */
23
+ $input-color: $black;
24
+
25
+ /*
26
+ Updates muted text to gray so it contrasts with the light gray background.
27
+ */
28
+ $text-muted: $gray-dark;
29
+
30
+ /*
31
+ Updates text in the breadcrumbs to use a darker gray to fix contrast issues.
32
+ */
33
+ $breadcrumb-active-color: $gray-dark;
34
+
35
+ /*
36
+ Updates the spans in headers to use a darker gray to fix contrast issues.
37
+ */
38
+ $headings-small-color: $gray-dark;
39
+
40
+ /*
41
+ Updates the disabled pagination links to use a darker gray to fix contrast issues.
42
+ */
43
+ $pagination-disabled-color: $gray-dark;
44
+
45
+ /*
46
+ Updates the default link to colour to a the same colour used in the
47
+ GOVUK design system. This fixes some contrast issues.
48
+ */
49
+ $link-color: $blue;
@@ -1,5 +1,18 @@
1
1
  @import 'govuk_admin_template/buttons'; // overrides bootstrap buttons
2
2
 
3
+ $govuk-tag-dark-grey: #383f43;
4
+ $govuk-tag-light-gray: #eeefef;
5
+ $govuk-tag-mid-blue: #1d70b8;
6
+ $govuk-tag-white: #fff;
7
+ $govuk-tag-dark-green: #005a30;
8
+ $govuk-tag-light-green: #cce2d8;
9
+ $govuk-tag-dark-blue: #144e81;
10
+ $govuk-tag-light-blue: #d2e2f1;
11
+ $govuk-tag-dark-yellow: #594d00;
12
+ $govuk-tag-light-yellow: #fff7bf;
13
+ $govuk-tag-dark-red: #942514;
14
+ $govuk-tag-light-red: #f6d7d2;
15
+
3
16
  /*
4
17
  The admin gem's navbar has a bottom margin, for correct spacing
5
18
  when the page-header class isn't used. To account for this reduce
@@ -19,8 +32,40 @@
19
32
  .lead {
20
33
  font-weight: normal;
21
34
  color: #555;
35
+ }
36
+
37
+ // Overrides the lables to use same colour scheme as the GOVUK design system
38
+
39
+ .label-default {
40
+ color: $govuk-tag-dark-grey;
41
+ background: $govuk-tag-light-gray;
42
+ }
43
+
44
+ .label-primary {
45
+ color: $govuk-tag-white;
46
+ background: $govuk-tag-mid-blue;
47
+ }
48
+
49
+ .label-success {
50
+ color: $govuk-tag-dark-green;
51
+ background: $govuk-tag-light-green;
52
+ }
53
+
54
+ .label-info {
55
+ color: $govuk-tag-dark-blue;
56
+ background: $govuk-tag-light-blue;
57
+ }
58
+
59
+ .label-warning {
60
+ color: $govuk-tag-dark-yellow;
61
+ background: $govuk-tag-light-yellow;
62
+ }
63
+
64
+ .label-danger {
65
+ color: $govuk-tag-dark-red;
66
+ background: $govuk-tag-light-red;
67
+ }
22
68
 
23
- &.text-muted {
24
- color: $gray-light;
25
- }
69
+ .label {
70
+ font-size: 80%;
26
71
  }
@@ -20,7 +20,7 @@
20
20
  font-size: 11px;
21
21
  font-weight: bold;
22
22
  line-height: $line-height-computed;
23
- color: $gray-light;
23
+ color: $gray;
24
24
  text-transform: uppercase;
25
25
  }
26
26
 
@@ -30,6 +30,11 @@
30
30
  }
31
31
  }
32
32
 
33
+ .nav-tabs .badge {
34
+ color: #fff;
35
+ background: #666;
36
+ }
37
+
33
38
  .nav-list > li > a,
34
39
  .nav-list .nav-header {
35
40
  margin-left: -15px;
@@ -116,3 +116,8 @@ header .navbar-header {
116
116
  background-color: $dev-color;
117
117
  color: #000;
118
118
  }
119
+
120
+ .sidebar-nav .badge {
121
+ color: #fff;
122
+ background: #666;
123
+ }
@@ -1,7 +1,7 @@
1
1
  module GovukAdminTemplate
2
2
  class StyleGuideController < ApplicationController
3
3
  def index
4
- @normal_link_href = "#{request.original_url}##{Time.now.utc.to_i}"
4
+ @normal_link_href = "#{request.original_url}##{Time.zone.now.utc.to_i}"
5
5
  @visited_link_href = request.original_url
6
6
  end
7
7
  end
@@ -5,7 +5,7 @@
5
5
  <h2>Formatting help</h2>
6
6
  <%= yield :format_specific_help %>
7
7
  <h3>
8
- <a data-toggle="collapse" data-target="#govspeak-headings">
8
+ <a data-toggle="collapse" href="#govspeak-headings">
9
9
  Headings
10
10
  </a>
11
11
  </h3>
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
 
20
20
  <h3>
21
- <a data-toggle="collapse" data-target="#govspeak-links">
21
+ <a data-toggle="collapse" href="#govspeak-links">
22
22
  Links
23
23
  </a>
24
24
  </h3>
@@ -54,7 +54,7 @@
54
54
  </div>
55
55
 
56
56
  <h3>
57
- <a data-toggle="collapse" data-target="#govspeak-bullets">
57
+ <a data-toggle="collapse" href="#govspeak-bullets">
58
58
  Bullets
59
59
  </a>
60
60
  </h3>
@@ -67,7 +67,7 @@
67
67
  </div>
68
68
 
69
69
  <h3>
70
- <a data-toggle="collapse" data-target="#govspeak-numbered-list">
70
+ <a data-toggle="collapse" href="#govspeak-numbered-list">
71
71
  Numbered list
72
72
  </a>
73
73
  </h3>
@@ -81,7 +81,7 @@
81
81
  </div>
82
82
 
83
83
  <h3>
84
- <a data-toggle="collapse" data-target="#govspeak-priority-list">
84
+ <a data-toggle="collapse" href="#govspeak-priority-list">
85
85
  Priority list
86
86
  </a>
87
87
  </h3>
@@ -98,7 +98,7 @@
98
98
  </div>
99
99
 
100
100
  <h3>
101
- <a data-toggle="collapse" data-target="#govspeak-legislative-list">
101
+ <a data-toggle="collapse" href="#govspeak-legislative-list">
102
102
  Legislative list
103
103
  </a>
104
104
  </h3>
@@ -120,7 +120,7 @@
120
120
  </div>
121
121
 
122
122
  <h3>
123
- <a data-toggle="collapse" data-target="#govspeak-tables">
123
+ <a data-toggle="collapse" href="#govspeak-tables">
124
124
  Tables
125
125
  </a>
126
126
  </h3>
@@ -139,7 +139,7 @@
139
139
  </div>
140
140
 
141
141
  <h3>
142
- <a data-toggle="collapse" data-target="#govspeak-cta">
142
+ <a data-toggle="collapse" href="#govspeak-cta">
143
143
  Call to action
144
144
  </a>
145
145
  </h3>
@@ -150,21 +150,18 @@
150
150
  </div>
151
151
 
152
152
  <h3>
153
- <a data-toggle="collapse" data-target="#govspeak-abbreviations-and-acronyms">
153
+ <a data-toggle="collapse" href="#govspeak-abbreviations-and-acronyms">
154
154
  Abbreviations and acronyms
155
155
  </a>
156
156
  </h3>
157
157
  <div class="collapse" id="govspeak-abbreviations-and-acronyms">
158
- <pre>Example content containing DWP and EU acronyms.
159
-
160
- *[EU]: European Union
161
- *[DWP]: Department for Work and Pensions</pre>
158
+ <pre>*[DWP]: Department for Work and Pensions</pre>
162
159
  <p>Text found in content which matches what’s in the brackets <code>[ ]</code> (eg DWP), will have the full text (Department for Work and Pensions) available to screenreaders and when hovering: <abbr title="Department for Work and Pensions">DWP</abbr>. The markdown code will not be displayed.</p>
163
160
  <p>List abbreviation markdown at the end.</p>
164
161
  </div>
165
162
 
166
163
  <h3>
167
- <a data-toggle="collapse" data-target="#govspeak-blockquotes">
164
+ <a data-toggle="collapse" href="#govspeak-blockquotes">
168
165
  Blockquotes
169
166
  </a>
170
167
  </h3>
@@ -178,7 +175,7 @@
178
175
  </div>
179
176
 
180
177
  <h3>
181
- <a data-toggle="collapse" data-target="#govspeak-addresses">
178
+ <a data-toggle="collapse" href="#govspeak-addresses">
182
179
  Addresses
183
180
  </a>
184
181
  </h3>
@@ -192,7 +189,7 @@
192
189
  </div>
193
190
 
194
191
  <h3>
195
- <a data-toggle="collapse" data-target="#govspeak-footnotes">
192
+ <a data-toggle="collapse" href="#govspeak-footnotes">
196
193
  Footnotes
197
194
  </a>
198
195
  </h3>
@@ -76,7 +76,7 @@
76
76
 
77
77
  <% if GovukAdminTemplate::Config.show_signout %>
78
78
  <div class="navbar-text pull-right">
79
- <%= link_to current_user.name, Plek.current.find('signon') %>
79
+ <%= link_to current_user.name, Plek.new.external_url_for('signon') %>
80
80
  &bull; <%= link_to 'Sign out', '/auth/gds/sign_out' %>
81
81
  </div>
82
82
  <% end %>
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  GovukAdminTemplate::Engine.routes.draw do
2
- root :to => 'govuk_admin_template/style_guide#index'
2
+ root to: "govuk_admin_template/style_guide#index"
3
3
  end
@@ -6,7 +6,7 @@ module GovukAdminTemplate
6
6
  module Config
7
7
  # Name of your application
8
8
  mattr_accessor :app_title
9
- @@app_title = "GOV.UK"
9
+ @app_title = "GOV.UK"
10
10
 
11
11
  # Show flash-messages
12
12
  # Default: false
@@ -1,37 +1,40 @@
1
1
  module GovukAdminTemplate
2
2
  class Engine < ::Rails::Engine
3
- require 'bootstrap-sass'
4
- require 'jquery-rails'
5
-
6
- initializer 'govuk_admin_template.assets.precompile' do |app|
7
- app.config.assets.precompile += %w(lte-ie8.js govuk-admin-template.js)
8
- app.config.assets.precompile += %w(govuk_admin_template/favicon-development.png govuk_admin_template/favicon-test.png govuk_admin_template/favicon-integration.png
9
- govuk_admin_template/favicon-preview.png govuk_admin_template/favicon-production.png govuk_admin_template/favicon.png)
10
-
3
+ require "bootstrap-sass"
4
+ require "jquery-rails"
5
+
6
+ initializer "govuk_admin_template.assets.precompile" do |app|
7
+ app.config.assets.precompile += %w[lte-ie8.js govuk-admin-template.js]
8
+ app.config.assets.precompile += %w[govuk_admin_template/favicon-development.png
9
+ govuk_admin_template/favicon-test.png
10
+ govuk_admin_template/favicon-integration.png
11
+ govuk_admin_template/favicon-preview.png
12
+ govuk_admin_template/favicon-production.png
13
+ govuk_admin_template/favicon.png]
11
14
  end
12
15
 
13
16
  # User friendly GOV.UK date formats, based on:
14
17
  # https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style#dates
15
18
  # https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style#times
16
- initializer 'govuk_admin_template.date_formats' do |app|
19
+ initializer "govuk_admin_template.date_formats" do |_app|
17
20
  # 1 January 2013
18
- Date::DATE_FORMATS[:govuk_date] = '%-e %B %Y'
21
+ Date::DATE_FORMATS[:govuk_date] = "%-e %B %Y"
19
22
 
20
23
  # 1 Jan 2013
21
- Date::DATE_FORMATS[:govuk_date_short] = '%-e %b %Y'
24
+ Date::DATE_FORMATS[:govuk_date_short] = "%-e %b %Y"
22
25
 
23
26
  # 1:15pm, 1 January 2013
24
- Time::DATE_FORMATS[:govuk_date] = '%-I:%M%P, %-e %B %Y'
27
+ Time::DATE_FORMATS[:govuk_date] = "%-I:%M%P, %-e %B %Y"
25
28
 
26
29
  # 1:15pm, 1 Jan 2013
27
- Time::DATE_FORMATS[:govuk_date_short] = '%-I:%M%P, %-e %b %Y'
30
+ Time::DATE_FORMATS[:govuk_date_short] = "%-I:%M%P, %-e %b %Y"
28
31
 
29
32
  # 1:15pm
30
- Time::DATE_FORMATS[:govuk_time] = '%-I:%M%P'
33
+ Time::DATE_FORMATS[:govuk_time] = "%-I:%M%P"
31
34
  end
32
35
 
33
36
  initializer "govuk_admin_template.view_helpers" do
34
- ActionView::Base.send :include, ViewHelpers
37
+ ActionView::Base.include ViewHelpers
35
38
  end
36
39
  end
37
40
  end
@@ -38,40 +38,40 @@ module GovukAdminTemplate
38
38
  b.use :error, wrap_with: { tag: :span, class: :error }
39
39
  end
40
40
 
41
- config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
41
+ config.wrappers :bootstrap, tag: "div", class: "form-group", error_class: "has-error" do |b|
42
42
  b.use :html5
43
43
  b.use :placeholder
44
- b.use :label, class: 'control-label'
45
- b.wrapper tag: 'div' do |ba|
44
+ b.use :label, class: "control-label"
45
+ b.wrapper tag: "div" do |ba|
46
46
  ba.use :input
47
- ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
48
- ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
47
+ ba.use :error, wrap_with: { tag: "span", class: "help-inline" }
48
+ ba.use :hint, wrap_with: { tag: "p", class: "help-block" }
49
49
  end
50
50
  end
51
51
 
52
- config.wrappers :prepend, tag: 'div', class: "form-group", error_class: 'has-error' do |b|
52
+ config.wrappers :prepend, tag: "div", class: "form-group", error_class: "has-error" do |b|
53
53
  b.use :html5
54
54
  b.use :placeholder
55
55
  b.use :label
56
- b.wrapper tag: 'div', class: 'controls' do |input|
57
- input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
56
+ b.wrapper tag: "div", class: "controls" do |input|
57
+ input.wrapper tag: "div", class: "input-prepend" do |prepend|
58
58
  prepend.use :input
59
59
  end
60
- input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
61
- input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
60
+ input.use :hint, wrap_with: { tag: "span", class: "help-block" }
61
+ input.use :error, wrap_with: { tag: "span", class: "help-inline" }
62
62
  end
63
63
  end
64
64
 
65
- config.wrappers :append, tag: 'div', class: "form-group", error_class: 'has-error' do |b|
65
+ config.wrappers :append, tag: "div", class: "form-group", error_class: "has-error" do |b|
66
66
  b.use :html5
67
67
  b.use :placeholder
68
68
  b.use :label
69
- b.wrapper tag: 'div', class: 'controls' do |input|
70
- input.wrapper tag: 'div', class: 'input-append' do |append|
69
+ b.wrapper tag: "div", class: "controls" do |input|
70
+ input.wrapper tag: "div", class: "input-append" do |append|
71
71
  append.use :input
72
72
  end
73
- input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
74
- input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
73
+ input.use :hint, wrap_with: { tag: "span", class: "help-block" }
74
+ input.use :error, wrap_with: { tag: "span", class: "help-inline" }
75
75
  end
76
76
  end
77
77
 
@@ -85,13 +85,13 @@ module GovukAdminTemplate
85
85
  config.boolean_style = :inline
86
86
 
87
87
  # Default class for buttons
88
- config.button_class = 'btn'
88
+ config.button_class = "btn"
89
89
 
90
90
  # Default tag used for error notification helper.
91
91
  config.error_notification_tag = :div
92
92
 
93
93
  # CSS class to add for error notification helper.
94
- config.error_notification_class = 'alert alert-danger'
94
+ config.error_notification_class = "alert alert-danger"
95
95
 
96
96
  # Tell browsers whether to use default HTML5 validations (novalidate option).
97
97
  # Default is enabled.
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "6.5.0".freeze
2
+ VERSION = "6.8.1".freeze
3
3
  end
@@ -5,7 +5,8 @@ module GovukAdminTemplate
5
5
 
6
6
  flash.each do |type, message|
7
7
  next unless type.to_sym.in?(%i[success info warning danger])
8
- html << content_tag(:div, message, class: "alert alert-#{type}")
8
+
9
+ html << tag.div(message, class: "alert alert-#{type}")
9
10
  end
10
11
 
11
12
  html.join.html_safe
@@ -8,11 +8,11 @@ module GovukAdminTemplate
8
8
  mattr_accessor :environment_style, :environment_label
9
9
 
10
10
  def self.environment_style
11
- @@environment_style || self.default_environment_style
11
+ @@environment_style || default_environment_style
12
12
  end
13
13
 
14
14
  def self.environment_label
15
- @@environment_label || self.environment_style.try(:titleize)
15
+ @@environment_label || environment_style.try(:titleize)
16
16
  end
17
17
 
18
18
  # In development we can't consistently set an environment
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc "Lint files"
4
+ task "lint" => :environment do
5
+ sh "rubocop --format clang"
6
+ end
@@ -0,0 +1,52 @@
1
+ UNGUARDED_URL_USAGE = /\surl\(/.freeze
2
+ ABSOLUTE_ASSET_USAGE = /(?:image-path|image-url|asset-path|asset-url)\(["']\/assets/.freeze
3
+
4
+ namespace :sass do
5
+ desc "Check all SCSS for 404-creating problems, takes place of govuk-lint"
6
+ task check: :environment do
7
+ scss_files = File.expand_path(
8
+ "../../app/assets/stylesheets/**/*.scss", __dir__
9
+ )
10
+
11
+ matching_lines = Dir[scss_files].each_with_object([]) do |scss_file, matching|
12
+ File.readlines(scss_file).each_with_index do |line, number|
13
+ matching << "Unguarded url usage: #{scss_file}:#{number + 1}" if line =~ UNGUARDED_URL_USAGE
14
+ matching << "Absolute /assets usage: #{scss_file}:#{number + 1}" if line =~ ABSOLUTE_ASSET_USAGE
15
+ end
16
+ end
17
+
18
+ if matching_lines.any?
19
+ raise <<~MSG
20
+
21
+ One or more problems exist:
22
+
23
+ Unguarded url usage
24
+ -------------------
25
+
26
+ Do not use instances of url(...) to refer to images within this gem.
27
+ Prefer the SASS function image-url. Unguarded url references won't work in
28
+ Rails 4 and up due to MD5 hashes in asset filenames. Your asset will 404 in
29
+ production Rails 4 apps.
30
+
31
+ Absolute /assets usage
32
+ ----------------------
33
+
34
+ When using any of the image/asset helpers, don't refer to /assets absolutely.
35
+ For example,
36
+
37
+ image-url('/assets/govuk_admin_template/header-crown.png')
38
+
39
+ should instead be
40
+
41
+ image-url('govuk_admin_template/header-crown.png')
42
+
43
+ If Sprockets can't find the image on precompilation, it won't rewrite the
44
+ URL and will pass it through unaltered. This usually means it will 404.
45
+
46
+ Problems:
47
+ #{matching_lines.join("\n ")}
48
+
49
+ MSG
50
+ end
51
+ end
52
+ end
metadata CHANGED
@@ -1,15 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_admin_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.0
4
+ version: 6.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bootstrap-sass
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.4.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.4.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: jquery-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 4.3.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 4.3.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: plek
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 2.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 2.1.0
13
55
  - !ruby/object:Gem::Dependency
14
56
  name: rails
15
57
  requirement: !ruby/object:Gem::Requirement
@@ -25,103 +67,103 @@ dependencies:
25
67
  - !ruby/object:Gem::Version
26
68
  version: 3.2.0
27
69
  - !ruby/object:Gem::Dependency
28
- name: bootstrap-sass
70
+ name: capybara
29
71
  requirement: !ruby/object:Gem::Requirement
30
72
  requirements:
31
- - - '='
73
+ - - "~>"
32
74
  - !ruby/object:Gem::Version
33
- version: 3.3.5.1
34
- type: :runtime
75
+ version: '3'
76
+ type: :development
35
77
  prerelease: false
36
78
  version_requirements: !ruby/object:Gem::Requirement
37
79
  requirements:
38
- - - '='
80
+ - - "~>"
39
81
  - !ruby/object:Gem::Version
40
- version: 3.3.5.1
82
+ version: '3'
41
83
  - !ruby/object:Gem::Dependency
42
- name: jquery-rails
84
+ name: govuk_test
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
87
  - - "~>"
46
88
  - !ruby/object:Gem::Version
47
- version: 4.3.1
48
- type: :runtime
89
+ version: '2'
90
+ type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
94
  - - "~>"
53
95
  - !ruby/object:Gem::Version
54
- version: 4.3.1
96
+ version: '2'
55
97
  - !ruby/object:Gem::Dependency
56
- name: sass-rails
98
+ name: jasmine
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
- - - '='
101
+ - - "~>"
60
102
  - !ruby/object:Gem::Version
61
- version: 5.0.6
103
+ version: '3'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
- - - '='
108
+ - - "~>"
67
109
  - !ruby/object:Gem::Version
68
- version: 5.0.6
110
+ version: '3'
69
111
  - !ruby/object:Gem::Dependency
70
- name: rspec-rails
112
+ name: jasmine_selenium_runner
71
113
  requirement: !ruby/object:Gem::Requirement
72
114
  requirements:
73
115
  - - "~>"
74
116
  - !ruby/object:Gem::Version
75
- version: '3.5'
117
+ version: '3'
76
118
  type: :development
77
119
  prerelease: false
78
120
  version_requirements: !ruby/object:Gem::Requirement
79
121
  requirements:
80
122
  - - "~>"
81
123
  - !ruby/object:Gem::Version
82
- version: '3.5'
124
+ version: '3'
83
125
  - !ruby/object:Gem::Dependency
84
- name: capybara
126
+ name: rspec-rails
85
127
  requirement: !ruby/object:Gem::Requirement
86
128
  requirements:
87
- - - '='
129
+ - - "~>"
88
130
  - !ruby/object:Gem::Version
89
- version: 2.4.4
131
+ version: '3'
90
132
  type: :development
91
133
  prerelease: false
92
134
  version_requirements: !ruby/object:Gem::Requirement
93
135
  requirements:
94
- - - '='
136
+ - - "~>"
95
137
  - !ruby/object:Gem::Version
96
- version: 2.4.4
138
+ version: '3'
97
139
  - !ruby/object:Gem::Dependency
98
- name: jasmine
140
+ name: rubocop-govuk
99
141
  requirement: !ruby/object:Gem::Requirement
100
142
  requirements:
101
- - - '='
143
+ - - ">="
102
144
  - !ruby/object:Gem::Version
103
- version: 2.4.0
145
+ version: '0'
104
146
  type: :development
105
147
  prerelease: false
106
148
  version_requirements: !ruby/object:Gem::Requirement
107
149
  requirements:
108
- - - '='
150
+ - - ">="
109
151
  - !ruby/object:Gem::Version
110
- version: 2.4.0
152
+ version: '0'
111
153
  - !ruby/object:Gem::Dependency
112
- name: govuk-lint
154
+ name: sass-rails
113
155
  requirement: !ruby/object:Gem::Requirement
114
156
  requirements:
115
- - - '='
157
+ - - "~>"
116
158
  - !ruby/object:Gem::Version
117
- version: 1.2.1
159
+ version: '5'
118
160
  type: :development
119
161
  prerelease: false
120
162
  version_requirements: !ruby/object:Gem::Requirement
121
163
  requirements:
122
- - - '='
164
+ - - "~>"
123
165
  - !ruby/object:Gem::Version
124
- version: 1.2.1
166
+ version: '5'
125
167
  description: Styles, scripts and templates for GOV.UK admin applications
126
168
  email:
127
169
  - govuk-dev@digital.cabinet-office.gov.uk
@@ -184,6 +226,8 @@ files:
184
226
  - lib/govuk_admin_template/simple_form.rb
185
227
  - lib/govuk_admin_template/version.rb
186
228
  - lib/govuk_admin_template/view_helpers.rb
229
+ - lib/tasks/lint.rake
230
+ - lib/tasks/sass/check.rake
187
231
  homepage: https://github.com/alphagov/govuk_admin_template
188
232
  licenses: []
189
233
  metadata: {}
@@ -195,15 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
239
  requirements:
196
240
  - - ">="
197
241
  - !ruby/object:Gem::Version
198
- version: 1.9.3
242
+ version: 2.7.2
199
243
  required_rubygems_version: !ruby/object:Gem::Requirement
200
244
  requirements:
201
245
  - - ">="
202
246
  - !ruby/object:Gem::Version
203
247
  version: '0'
204
248
  requirements: []
205
- rubyforge_project:
206
- rubygems_version: 2.6.13
249
+ rubygems_version: 3.1.4
207
250
  signing_key:
208
251
  specification_version: 4
209
252
  summary: Styles, scripts and templates for GOV.UK admin applications