govspeak 8.3.2 → 8.3.3
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/govspeak/post_processor.rb +1 -1
- data/lib/govspeak/presenters/contact_presenter.rb +1 -1
- data/lib/govspeak/version.rb +1 -1
- data/lib/govspeak.rb +3 -1
- data/test/govspeak_test.rb +42 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13c63623d2836910a9a3e9c634059dfece9e7eca7a889d142ba006a8b74443db
|
|
4
|
+
data.tar.gz: 3235a49df7e6860a9f2a20b0e55eb92e771df6a5f16bac6ad61776e28494111a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29f02ae12fd4b8388990109ba3c2fec681d85286bcf352fff8d571dd2918343410b1ca1df518a35dd8e9ef3e886e3a306ee185e619d0435b3670c57091da7bbd
|
|
7
|
+
data.tar.gz: 52094b3250537544d50761204701cb2ba5f32c94fd2bd2b32c81eb6ef5fbcfee1812f432f62133afcce2c02730401fd06db9e492ab67c2fea69680eaf525dfd2
|
data/CHANGELOG.md
CHANGED
|
@@ -59,7 +59,7 @@ module Govspeak
|
|
|
59
59
|
# Not showing United Kingdom country is a "feature" lifted and shifted
|
|
60
60
|
# from Whitehall:
|
|
61
61
|
# https://github.com/alphagov/whitehall/blob/c67d53d80f9856549c2da1941a10dbb9170be494/lib/address_formatter/formatter.rb#L17
|
|
62
|
-
|
|
62
|
+
key == "world_location" && value.strip == "United Kingdom" || value == ""
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
data/lib/govspeak/version.rb
CHANGED
data/lib/govspeak.rb
CHANGED
|
@@ -277,7 +277,9 @@ module Govspeak
|
|
|
277
277
|
|
|
278
278
|
extension("call-to-action", surrounded_by("$CTA")) do |body|
|
|
279
279
|
<<~BODY
|
|
280
|
-
<div class="call-to-action" markdown="1"
|
|
280
|
+
<div class="call-to-action" markdown="1">
|
|
281
|
+
#{body.strip}
|
|
282
|
+
</div>
|
|
281
283
|
BODY
|
|
282
284
|
end
|
|
283
285
|
|
data/test/govspeak_test.rb
CHANGED
|
@@ -425,6 +425,48 @@ Teston
|
|
|
425
425
|
assert_text_output "Click here to start the tool"
|
|
426
426
|
end
|
|
427
427
|
|
|
428
|
+
test_given_govspeak "
|
|
429
|
+
$CTA Click here to start the program $CTA
|
|
430
|
+
|
|
431
|
+
Here is some text" do
|
|
432
|
+
assert_html_output %(
|
|
433
|
+
<div class="call-to-action">
|
|
434
|
+
<p>Click here to start the program</p>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
<p>Here is some text</p>)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
test_given_govspeak "
|
|
441
|
+
Some text
|
|
442
|
+
|
|
443
|
+
$CTA Click there to start the program $CTA
|
|
444
|
+
|
|
445
|
+
Here is some text" do
|
|
446
|
+
assert_html_output %(
|
|
447
|
+
<p>Some text</p>
|
|
448
|
+
<div class="call-to-action">
|
|
449
|
+
<p>Click there to start the program</p>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<p>Here is some text</p>)
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
test_given_govspeak "
|
|
456
|
+
Some text
|
|
457
|
+
|
|
458
|
+
$CTAClick anywhere to start the program$CTA
|
|
459
|
+
|
|
460
|
+
Here is some text" do
|
|
461
|
+
assert_html_output %(
|
|
462
|
+
<p>Some text</p>
|
|
463
|
+
<div class="call-to-action">
|
|
464
|
+
<p>Click anywhere to start the program</p>
|
|
465
|
+
</div>
|
|
466
|
+
|
|
467
|
+
<p>Here is some text</p>)
|
|
468
|
+
end
|
|
469
|
+
|
|
428
470
|
test_given_govspeak "
|
|
429
471
|
Here is some text\n
|
|
430
472
|
|
|
@@ -453,7 +495,6 @@ Teston
|
|
|
453
495
|
$CTA" do
|
|
454
496
|
assert_html_output %(
|
|
455
497
|
<div class="call-to-action">
|
|
456
|
-
|
|
457
498
|
<p>This is a test:</p>
|
|
458
499
|
|
|
459
500
|
<ol class="steps">
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govspeak
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.3.
|
|
4
|
+
version: 8.3.3
|
|
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:
|
|
11
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionview
|
|
@@ -190,14 +190,14 @@ dependencies:
|
|
|
190
190
|
requirements:
|
|
191
191
|
- - '='
|
|
192
192
|
- !ruby/object:Gem::Version
|
|
193
|
-
version: 4.
|
|
193
|
+
version: 4.13.0
|
|
194
194
|
type: :development
|
|
195
195
|
prerelease: false
|
|
196
196
|
version_requirements: !ruby/object:Gem::Requirement
|
|
197
197
|
requirements:
|
|
198
198
|
- - '='
|
|
199
199
|
- !ruby/object:Gem::Version
|
|
200
|
-
version: 4.
|
|
200
|
+
version: 4.13.0
|
|
201
201
|
- !ruby/object:Gem::Dependency
|
|
202
202
|
name: simplecov
|
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -326,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
326
326
|
- !ruby/object:Gem::Version
|
|
327
327
|
version: '0'
|
|
328
328
|
requirements: []
|
|
329
|
-
rubygems_version: 3.
|
|
329
|
+
rubygems_version: 3.5.5
|
|
330
330
|
signing_key:
|
|
331
331
|
specification_version: 4
|
|
332
332
|
summary: Markup language for single domain
|