govuk_admin_template 6.9.0 → 6.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e75f271807c94207f7e9842d7ac03a4f5fc857533a8d2aeee7be6f0645e8d07
4
- data.tar.gz: 9e75c7162d072ed39a29ce90cd7037ca3aad8b3890a11f4ab93e9f28939cd480
3
+ metadata.gz: 31116fe6665d9390c1fcbcfd92d4553769020e0630928497506aaed67a733d6d
4
+ data.tar.gz: 989a96a1155ab43be812e34132dfee491c9f764bd5bf3281e00f5ae5bc238b52
5
5
  SHA512:
6
- metadata.gz: a11f7e71d2ec53e1f704714a5996478153077c9282c41850ee6256faa6a776bec444436824027d50a9cb1a2b3bcfb3703d52ccd799ac58c80de6118638a65758
7
- data.tar.gz: 748d12a8f4319a5cbfd4c716336141b315088add35e5ce8d57b9d9e710a0e0b80c48ae204a657997fcf4db2bf6b35edc0f17bccf71162399719c492dddf867ab
6
+ metadata.gz: c3309b4b10ae3325d88d9db6ab72588eeb06dfc811b8dbecf5e467d4a81c578501b7ad9268483572a3dab4fa0765ea6d30c7b9bd60b3c155b4789f20fbdf3c25
7
+ data.tar.gz: a20aa24bc3b1d3f3f9b0344a07185e3291c79dc1206f86c7f7d6eb8a22a4566f453b87c4b2693b59da6bd2fbd4422a7409f8bd4efdeb54a26314bb52f0eeeb50
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # 6.10.0
2
+
3
+ * Remove Priority list from govspeak help example
4
+
5
+ # 6.9.2
6
+
7
+ * Fix providing gem internal Rake tasks to applications embedding this gem as an engine.
8
+
9
+ # 6.9.1
10
+
11
+ * Fix broken Rails 6 compatibility: use `Date#to_formatted_s` instead of `Date#to_fs`
12
+
1
13
  # 6.9.0
2
14
 
3
15
  * Rails 7 compatibility: use `Time#to_fs` instead of deprecated use of `Time#to_s`
data/README.md CHANGED
@@ -274,6 +274,18 @@ yarn run jasmine:browser
274
274
  yarn run jasmine:ci
275
275
  ```
276
276
 
277
+ ### Testing against different Rails versions
278
+
279
+ The CI pipeline is configured to test this gem against multiple versions of Rails.
280
+
281
+ Each Rails version has a corresponding Gemfile located in the [gemfiles](gemfiles/) directory. And the CI pipeline defines a [matrix of Gemfiles](https://github.com/alphagov/govuk_admin_template/blob/8f53865fa3d33f741642783f9bfcaefc201c3751/.github/workflows/ci.yml#L13) to test against.
282
+
283
+ It's also possible to run tests against multiple Rails versions locally.
284
+
285
+ 1. Run `export BUNDLE_GEMFILE="gemfiles/rails_X.gemfile"` where `X` is the version to test against.
286
+ This tells Bundler which Gemfile to use.
287
+ 2. Run `bundle install` and then `bundle exec rake` as usual.
288
+
277
289
  ## Publishing
278
290
 
279
291
  Version bumps will automatically update RubyGems.org.
@@ -80,23 +80,6 @@
80
80
  (to indent, add 2 spaces)</pre>
81
81
  </div>
82
82
 
83
- <h3>
84
- <a data-toggle="collapse" href="#govspeak-priority-list">
85
- Priority list
86
- </a>
87
- </h3>
88
- <div class="collapse" id="govspeak-priority-list">
89
- <p>
90
- You can create a list which shows only the first n items (including attachments),
91
- with a link to open the others, eg to show the first item:
92
- </p>
93
-
94
- <pre>$PriorityList:1
95
- * item 1
96
- * item 2
97
- * item 3</pre>
98
- </div>
99
-
100
83
  <h3>
101
84
  <a data-toggle="collapse" href="#govspeak-legislative-list">
102
85
  Legislative list
@@ -192,13 +192,13 @@
192
192
  <blockquote>
193
193
  <dl class="remove-bottom-margin">
194
194
  <dt class="add-label-margin"><code>:govuk_date</code></dt>
195
- <dd><%= halloween.to_fs(:govuk_date) %><br />
196
- <%= halloween.to_time.to_fs(:govuk_date) %></dd>
195
+ <dd><%= halloween.to_formatted_s(:govuk_date) %><br />
196
+ <%= halloween.to_time.to_formatted_s(:govuk_date) %></dd>
197
197
  <dt class="add-top-margin add-label-margin"><code>:govuk_date_short</code></dt>
198
- <dd><%= halloween.to_fs(:govuk_date_short) %><br />
199
- <%= halloween.to_time.to_fs(:govuk_date_short) %></dd>
198
+ <dd><%= halloween.to_formatted_s(:govuk_date_short) %><br />
199
+ <%= halloween.to_time.to_formatted_s(:govuk_date_short) %></dd>
200
200
  <dt class="add-top-margin add-label-margin"><code>:govuk_time</code></dt>
201
- <dd><%= halloween.to_time.to_fs(:govuk_time) %></dd>
201
+ <dd><%= halloween.to_time.to_formatted_s(:govuk_time) %></dd>
202
202
  </dl>
203
203
  </blockquote>
204
204
  </section>
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "6.9.0".freeze
2
+ VERSION = "6.10.0".freeze
3
3
  end
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.0
4
+ version: 6.10.0
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-03-21 00:00:00.000000000 Z
11
+ date: 2022-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-sass
@@ -86,28 +86,28 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3'
89
+ version: '5'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3'
96
+ version: '5'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop-govuk
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 4.3.0
103
+ version: 4.6.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 4.3.0
110
+ version: 4.6.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: sassc-rails
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -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.9
205
+ rubygems_version: 3.3.19
209
206
  signing_key:
210
207
  specification_version: 4
211
208
  summary: Styles, scripts and templates for GOV.UK admin applications
@@ -1,4 +0,0 @@
1
- desc "Run Jasmine tests"
2
- task jasmine: :environment do
3
- sh "yarn run jasmine:ci"
4
- end
data/lib/tasks/lint.rake DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc "Lint files"
4
- task "lint" => :environment do
5
- sh "rubocop --format clang"
6
- end
@@ -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