govuk_markdown 0.4.0 → 1.0.0

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
2
  SHA256:
3
- metadata.gz: 587d477359637429b19f4b8657940ad42c53ef5d1e7566432c89ded9e08edad3
4
- data.tar.gz: c52c08b4ce188235ba63c2445e372320cfdaafcd2c7be44faf052e1fec80a05d
3
+ metadata.gz: 69f3f17dd960d5db6cb264a91912850a9e294f3a75c1c936044a58c6b36b7c04
4
+ data.tar.gz: 7d30fe596d4262f8f445c845a7985e9fa1d18740494ca12e0d644a17371e28f2
5
5
  SHA512:
6
- metadata.gz: c1c54cd75ccfab04de4b900c61802a3a36f9b0e525baa36303c5be7f0a859c1cbbf443467a130b5c322f00be3cd511915f03cd07ba272450a5530802d80c2467
7
- data.tar.gz: 1dc06a438f269eabf63de6bb2baa27ff221ffb019c2dcd990e7122dc8b27fbf77202cf80ced11ce2e204aeef5d090e5c742352b54c05b22126b7324404500fe5
6
+ metadata.gz: 0a2e32563c6b61b9d51b998a9fa57ed6d5ad5318f080efc4bda6ab27534d7a39f86686407989b5542be205f4e9d60bfd7b169cbceec25b0dd25c627ceb5a6a9b
7
+ data.tar.gz: abd0235bf969a13863c0dc415c1adefd606c70dda8f857ffd1d39c9126ea9d5334498194bebafa6a7b73b9e627f014cc64f31881989baca2bf973793c73f5207
data/CHANGELOG.md CHANGED
@@ -1,11 +1,18 @@
1
+ ## 1.0.0
2
+
3
+ * Increase minimum supported Ruby version to >= 2.7.0
4
+ * Update dependencies
5
+ * Fix RuboCop violations
6
+
1
7
  ## 0.4.0
2
8
 
3
- This release ensures all links get the `govuk-link` class, no matter which Markdown link syntax is used (#7).
9
+ * Ensure all links get the `govuk-link` class, no matter which Markdown link syntax is used (#7)
4
10
 
5
11
  ## 0.3.0
6
12
 
7
- This release adds support for tables (#3) and avoids the notorious emphasised `snake_cased_words` issue (#4).
13
+ * Add support for tables (#3)
14
+ * Don’t emphasise snake_cased_words (#4)
8
15
 
9
- ## 0.1.0 & 0.2.0
16
+ ## 0.1.0 and 0.2.0
10
17
 
11
- Initial release of the code, written by @benilovj and @fofr for the [Get help with tech project](https://github.com/DFE-Digital/get-help-with-tech/pull/171).
18
+ Initial release of the code, written by @benilovj and @fofr for the [Get help with technology service](https://github.com/DFE-Digital/get-help-with-tech/pull/171).
data/Gemfile.lock CHANGED
@@ -1,78 +1,78 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- govuk_markdown (0.4.0)
4
+ govuk_markdown (1.0.0)
5
5
  activesupport
6
6
  redcarpet
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.0.3.4)
11
+ activesupport (6.1.4)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (>= 0.7, < 2)
14
- minitest (~> 5.1)
15
- tzinfo (~> 1.1)
16
- zeitwerk (~> 2.2, >= 2.2.2)
17
- ast (2.4.1)
18
- concurrent-ruby (1.1.7)
13
+ i18n (>= 1.6, < 2)
14
+ minitest (>= 5.1)
15
+ tzinfo (~> 2.0)
16
+ zeitwerk (~> 2.3)
17
+ ast (2.4.2)
18
+ concurrent-ruby (1.1.9)
19
19
  diff-lcs (1.4.4)
20
- i18n (1.8.5)
20
+ i18n (1.8.10)
21
21
  concurrent-ruby (~> 1.0)
22
- minitest (5.14.2)
23
- parallel (1.19.2)
24
- parser (2.7.2.0)
22
+ minitest (5.14.4)
23
+ parallel (1.20.1)
24
+ parser (3.0.2.0)
25
25
  ast (~> 2.4.1)
26
26
  rack (2.2.3)
27
27
  rainbow (3.0.0)
28
- rake (13.0.1)
29
- redcarpet (3.5.0)
30
- regexp_parser (1.8.2)
31
- rexml (3.2.4)
28
+ rake (13.0.6)
29
+ redcarpet (3.5.1)
30
+ regexp_parser (2.1.1)
31
+ rexml (3.2.5)
32
32
  rspec (3.10.0)
33
33
  rspec-core (~> 3.10.0)
34
34
  rspec-expectations (~> 3.10.0)
35
35
  rspec-mocks (~> 3.10.0)
36
- rspec-core (3.10.0)
36
+ rspec-core (3.10.1)
37
37
  rspec-support (~> 3.10.0)
38
- rspec-expectations (3.10.0)
38
+ rspec-expectations (3.10.1)
39
39
  diff-lcs (>= 1.2.0, < 2.0)
40
40
  rspec-support (~> 3.10.0)
41
- rspec-mocks (3.10.0)
41
+ rspec-mocks (3.10.2)
42
42
  diff-lcs (>= 1.2.0, < 2.0)
43
43
  rspec-support (~> 3.10.0)
44
- rspec-support (3.10.0)
45
- rubocop (0.87.1)
44
+ rspec-support (3.10.2)
45
+ rubocop (1.15.0)
46
46
  parallel (~> 1.10)
47
- parser (>= 2.7.1.1)
47
+ parser (>= 3.0.0.0)
48
48
  rainbow (>= 2.2.2, < 4.0)
49
- regexp_parser (>= 1.7)
49
+ regexp_parser (>= 1.8, < 3.0)
50
50
  rexml
51
- rubocop-ast (>= 0.1.0, < 1.0)
51
+ rubocop-ast (>= 1.5.0, < 2.0)
52
52
  ruby-progressbar (~> 1.7)
53
- unicode-display_width (>= 1.4.0, < 2.0)
54
- rubocop-ast (0.8.0)
55
- parser (>= 2.7.1.5)
56
- rubocop-govuk (3.17.2)
57
- rubocop (= 0.87.1)
58
- rubocop-ast (= 0.8.0)
59
- rubocop-rails (= 2.8.1)
53
+ unicode-display_width (>= 1.4.0, < 3.0)
54
+ rubocop-ast (1.6.0)
55
+ parser (>= 3.0.1.1)
56
+ rubocop-govuk (4.0.0)
57
+ rubocop (~> 1.15.0)
58
+ rubocop-ast (~> 1.6.0)
59
+ rubocop-rails (~> 2.10.0)
60
60
  rubocop-rake (= 0.5.1)
61
- rubocop-rspec (= 1.42.0)
62
- rubocop-rails (2.8.1)
61
+ rubocop-rspec (~> 2.3.0)
62
+ rubocop-rails (2.10.1)
63
63
  activesupport (>= 4.2.0)
64
64
  rack (>= 1.1)
65
- rubocop (>= 0.87.0)
65
+ rubocop (>= 1.7.0, < 2.0)
66
66
  rubocop-rake (0.5.1)
67
67
  rubocop
68
- rubocop-rspec (1.42.0)
69
- rubocop (>= 0.87.0)
70
- ruby-progressbar (1.10.1)
71
- thread_safe (0.3.6)
72
- tzinfo (1.2.7)
73
- thread_safe (~> 0.1)
74
- unicode-display_width (1.7.0)
75
- zeitwerk (2.4.0)
68
+ rubocop-rspec (2.3.0)
69
+ rubocop (~> 1.0)
70
+ rubocop-ast (>= 1.1.0)
71
+ ruby-progressbar (1.11.0)
72
+ tzinfo (2.0.4)
73
+ concurrent-ruby (~> 1.0)
74
+ unicode-display_width (2.0.0)
75
+ zeitwerk (2.4.2)
76
76
 
77
77
  PLATFORMS
78
78
  ruby
data/README.md CHANGED
@@ -36,17 +36,18 @@ Will output:
36
36
 
37
37
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
38
38
 
39
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
39
+ To install this gem onto your local machine, run `bundle exec rake install`.
40
40
 
41
- You can regenerate the example HTML file from Markdown using:
42
-
43
- ```sh
44
- bundle exec rake generate_example
45
- ```
41
+ You can regenerate the example HTML file from Markdown using `bundle exec rake generate_example`.
46
42
 
47
43
  ## Release a new version
48
44
 
49
- Update the version in [lib/govuk_markdown/version.rb](lib/govuk_markdown/version.rb) and merge to main. This will automatically release a new version using GitHub actions.
45
+ 1. Update the version in [lib/govuk_markdown/version.rb](lib/govuk_markdown/version.rb)
46
+ 2. Run `bundle install`
47
+ 3. Update [CHANGELOG.md](CHANGELOG.md)
48
+ 4. Create a pull request
49
+
50
+ When changes are merged into the `main` branch, a new version will be released using a GitHub action.
50
51
 
51
52
  ## Contributing
52
53
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.summary = "Convert Markdown into GOV.UK styled HTML"
10
10
  spec.description = "Convert Markdown into GOV.UK styled HTML"
11
11
  spec.homepage = "https://github.com/DFE-Digital/govuk_markdown"
12
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
13
13
 
14
14
  spec.metadata["homepage_uri"] = spec.homepage
15
15
  spec.metadata["source_code_uri"] = spec.homepage
@@ -50,13 +50,14 @@ module GovukMarkdown
50
50
  end
51
51
 
52
52
  def list(contents, list_type)
53
- if list_type == :unordered
53
+ case list_type
54
+ when :unordered
54
55
  <<~HTML
55
56
  <ul class="govuk-list govuk-list--bullet">
56
57
  #{contents}
57
58
  </ul>
58
59
  HTML
59
- elsif list_type == :ordered
60
+ when :ordered
60
61
  <<~HTML
61
62
  <ol class="govuk-list govuk-list--number">
62
63
  #{contents}
@@ -1,3 +1,3 @@
1
1
  module GovukMarkdown
2
- VERSION = "0.4.0".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tijmen Brommet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-06 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -123,14 +123,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
- version: 2.3.0
126
+ version: 2.7.0
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.1.4
133
+ rubygems_version: 3.2.24
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Convert Markdown into GOV.UK styled HTML