govuk_admin_template 6.9.1 → 6.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govuk_admin_template/version.rb +1 -1
- metadata +3 -6
- data/lib/tasks/jasmine.rake +0 -4
- data/lib/tasks/lint.rake +0 -6
- data/lib/tasks/sass/check.rake +0 -52
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29eb8926a645b99d811437c15b008bfa7f4ca1ee2203d6923571c9a2c994a311
|
|
4
|
+
data.tar.gz: 49b87aab449542d6dca6fd181aa526b2cad5643bd3752ea7f73b5dcde1434be7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc12a3a13ebcb6f5bf62c47ba860e23b95811f04cea1c1ac1c5efd76ae7a8307a9db031bcb9cd2063b7d43a1302856c8c0ea06ea52daffdadb21816d193e05bc
|
|
7
|
+
data.tar.gz: 95fe3e1b8ae9398c28595c52a51f877030232596ba7c84ab8cd01a41c539688fdb4a32015809085a10246ece40857e98cdbb1447cd35df00086d3ac98bcc83c2
|
data/CHANGELOG.md
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_admin_template
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.9.
|
|
4
|
+
version: 6.9.2
|
|
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: 2022-
|
|
11
|
+
date: 2022-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootstrap-sass
|
|
@@ -184,9 +184,6 @@ files:
|
|
|
184
184
|
- lib/govuk_admin_template/simple_form.rb
|
|
185
185
|
- lib/govuk_admin_template/version.rb
|
|
186
186
|
- lib/govuk_admin_template/view_helpers.rb
|
|
187
|
-
- lib/tasks/jasmine.rake
|
|
188
|
-
- lib/tasks/lint.rake
|
|
189
|
-
- lib/tasks/sass/check.rake
|
|
190
187
|
homepage: https://github.com/alphagov/govuk_admin_template
|
|
191
188
|
licenses: []
|
|
192
189
|
metadata: {}
|
|
@@ -205,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
205
202
|
- !ruby/object:Gem::Version
|
|
206
203
|
version: '0'
|
|
207
204
|
requirements: []
|
|
208
|
-
rubygems_version: 3.3.
|
|
205
|
+
rubygems_version: 3.3.11
|
|
209
206
|
signing_key:
|
|
210
207
|
specification_version: 4
|
|
211
208
|
summary: Styles, scripts and templates for GOV.UK admin applications
|
data/lib/tasks/jasmine.rake
DELETED
data/lib/tasks/lint.rake
DELETED
data/lib/tasks/sass/check.rake
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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
|