utopia-project 0.28.1 → 0.30.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: d0591e6fd134a4db7b7d5cb2aa3544d95d0c4d735b2a8bbcc8641680ed0a989c
4
- data.tar.gz: 18dff4e63c0f516141956f096fe4fb01126f96b25241d2f98350265ec98a03a3
3
+ metadata.gz: e612f6bb7f73ee5ae451c51be1d67936b1789bf189fa8de35f371524e56b1985
4
+ data.tar.gz: f09d2b33fc0c5b5dbf01de0bd663fb1500ef299231e6dd5fff5bfc18bbc439f9
5
5
  SHA512:
6
- metadata.gz: 7a3a2f447e0aaec0d45e16a2be94984d6f86563205a7f0eed7cd47473364dead009b7fcaf2f520fa81949803a17731f16ee4ed53e2bc51cc60767448429fd440
7
- data.tar.gz: b01389c251adf4568196d36c58f5e0de345062e4dc4b19c7966dc57305492f27f57e93e09260b1a4bdd6d9e088a33e9b70c912dd50354d6d852b34182e444ae0
6
+ metadata.gz: fc14c8c05a5ffaa8be42329b5279af0135fd5f4d2159f184cac6aceb88b2d007913ba1c9f1e3dc831e2fea84589b40e07641186641f1ccc882e8f5d269f95c7a
7
+ data.tar.gz: 8d506cdcd2134bc4e2a5790fea2b1a3871cfe4f7255b27d63be67eeb76458748f3da0572cf8eba7d20c9b932edfe6b89873dc1e38c32a68740ea4526b72c1319
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,12 +1,12 @@
1
- Please see the [project changes](#{documentation_url}/changes/index) for all releases.
1
+ Please see the [project changes](#{documentation_url}changes/index) for all releases.
2
2
 
3
3
  <?r
4
4
  project.releases.first(10).each do |release|
5
5
  ?>
6
6
  ### #{release.name}
7
7
 
8
- <?r release.summary do |title| ?>
9
- - [#{title}](#{release.href(documentation_url, anchor: title)})
8
+ <?r release.changes do |change| ?>
9
+ - [#{change.to_markdown}](#{release.href(documentation_url, anchor: change.id)})
10
10
  <?r
11
11
  end
12
12
  end
@@ -13,7 +13,7 @@ require 'decode'
13
13
  require 'thread/local'
14
14
 
15
15
  require_relative 'document'
16
- require_relative 'changes_document'
16
+ require_relative 'releases_document'
17
17
 
18
18
  require_relative 'guide'
19
19
  require_relative 'linkify'
@@ -192,15 +192,15 @@ module Utopia
192
192
  readme_document&.title || "Project"
193
193
  end
194
194
 
195
- def changes_document
196
- if path = self.path_for('changes.md')
197
- ChangesDocument.new(File.read(path), self)
195
+ def releases_document
196
+ if path = self.path_for('releases.md')
197
+ ReleasesDocument.new(File.read(path), self)
198
198
  end
199
199
  end
200
200
 
201
201
  def releases
202
- if changes_document = self.changes_document
203
- changes_document.releases
202
+ if releases_document = self.releases_document
203
+ releases_document.releases
204
204
  end
205
205
  end
206
206
  end
@@ -7,7 +7,27 @@ require_relative 'document'
7
7
 
8
8
  module Utopia
9
9
  module Project
10
- class ChangesDocument < Document
10
+ class ReleasesDocument < Document
11
+ class Summary
12
+ def initialize(node)
13
+ @node = node
14
+ end
15
+
16
+ attr :node
17
+
18
+ def id
19
+ @node.to_plaintext.chomp.downcase.gsub(/\s+/, "-")
20
+ end
21
+
22
+ def to_markdown
23
+ @node.dup.extract_children.to_markdown
24
+ end
25
+
26
+ def to_html
27
+ @node.dup.extract_children.to_html
28
+ end
29
+ end
30
+
11
31
  class Release
12
32
  def initialize(node)
13
33
  @node = node
@@ -25,7 +45,7 @@ module Utopia
25
45
  end
26
46
 
27
47
  if node.header_level == @node.header_level + 1
28
- yield node
48
+ yield Summary.new(node)
29
49
  end
30
50
  end
31
51
 
@@ -37,16 +57,8 @@ module Utopia
37
57
  @node.to_plaintext.chomp
38
58
  end
39
59
 
40
- def summary
41
- return to_enum(:summary) unless block_given?
42
-
43
- changes.each do |node|
44
- yield node.to_plaintext.chomp
45
- end
46
- end
47
-
48
60
  def href(base = "/", anchor:)
49
- "#{base}changes/index##{anchor.downcase.gsub(/\s+/, "-")}"
61
+ "#{base}releases/index##{anchor.downcase.gsub(/\s+/, "-")}"
50
62
  end
51
63
  end
52
64
 
@@ -54,7 +66,7 @@ module Utopia
54
66
  return to_enum(:release_names) unless block_given?
55
67
 
56
68
  self.root.each do |node|
57
- if node.type == :header and node.header_level == 1
69
+ if node.type == :header and node.header_level == 2
58
70
  yield node.to_plaintext.chomp
59
71
  end
60
72
  end
@@ -62,7 +74,7 @@ module Utopia
62
74
 
63
75
  def release(name)
64
76
  self.root.each do |node|
65
- if node.type == :header and node.header_level == 1 and node.to_plaintext.chomp == name
77
+ if node.type == :header and node.header_level == 2 and node.to_plaintext.chomp == name
66
78
  return Release.new(node)
67
79
  end
68
80
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Utopia
7
7
  module Project
8
- VERSION = "0.28.1"
8
+ VERSION = "0.30.0"
9
9
  end
10
10
  end
@@ -1,4 +1,4 @@
1
- <p>Please browse the <a href="changes/index">changes</a> for all releases.</p>
1
+ <p>Please browse the <a href="releases/index">releases</a> for more details.</p>
2
2
 
3
3
  <?r
4
4
  base = self[:base]
@@ -9,8 +9,8 @@
9
9
  <h3>#{release.name}</h3>
10
10
 
11
11
  <ul>
12
- <?r release.summary do |title| ?>
13
- <li><a href="#{release.href(anchor: title)}">#{title}</a></li>
12
+ <?r release.changes do |change| ?>
13
+ <li><a href="#{release.href(anchor: change.id)}">#{MarkupString.raw(change.to_html)}</a></li>
14
14
  <?r end ?>
15
15
  </ul>
16
16
  </section>
@@ -6,5 +6,5 @@
6
6
  prepend Actions
7
7
 
8
8
  on 'index' do
9
- @document = @base.changes_document
9
+ @document = @base.releases_document
10
10
  end
@@ -6,7 +6,7 @@
6
6
  ?>
7
7
  <content:heading>Project</content:heading>
8
8
 
9
- <p>This project does not have a <code>changes.md</code> file.</p>
9
+ <p>This project does not have a <code>releases.md</code> file.</p>
10
10
  <?r
11
11
  end
12
12
  ?>
data/readme.md CHANGED
@@ -29,9 +29,19 @@ Please see the [project documentation](https://socketry.github.io/utopia-project
29
29
 
30
30
  ## Releases
31
31
 
32
+ Please see the [project changes](https://socketry.github.io/utopia-project/changes/index) for all releases.
33
+
34
+ ### v0.30.0
35
+
36
+ - [Rename `changes.md` to `releases.md`](https://socketry.github.io/utopia-project/releases/index#rename-changes.md-to-releases.md)
37
+
38
+ ### v0.29.0
39
+
40
+ - [Improve `changes.md` document organization](https://socketry.github.io/utopia-project/releases/index#improve-changes.md-document-organization)
41
+
32
42
  ### v0.28.0
33
43
 
34
- - [Introduce Changes Document](https://socketry.github.io/utopia-project/changes/index#introduce-changes-document)
44
+ - [Introduce `changes.md` document](https://socketry.github.io/utopia-project/releases/index#introduce-changes.md-document)
35
45
 
36
46
  ## See Also
37
47
 
data/releases.md ADDED
@@ -0,0 +1,21 @@
1
+ # Changes
2
+
3
+ This document outlines major changes and new features in each release of the project.
4
+
5
+ ## v0.30.0
6
+
7
+ ### Rename `changes.md` to `releases.md`
8
+
9
+ The `changes.md` document has been renamed to `releases.md` to better reflect its purpose.
10
+
11
+ ## v0.29.0
12
+
13
+ ### Improve `changes.md` document organization
14
+
15
+ Previously, level 1 headings were considered releases. This was changed to level 2 headings to allow for a level 1 heading to be used as the title of the document.
16
+
17
+ ## v0.28.0
18
+
19
+ ### Introduce `changes.md` document
20
+
21
+ A new changes document, if present, will be used to display changes in the release notes. The changes document should be named `changes.md` and should be placed in the root of the project. The changes document should be written in markdown format.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.1
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -40,7 +40,7 @@ cert_chain:
40
40
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
41
41
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
42
42
  -----END CERTIFICATE-----
43
- date: 2024-08-18 00:00:00.000000000 Z
43
+ date: 2024-08-23 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: decode
@@ -136,14 +136,13 @@ files:
136
136
  - bake/utopia/project/readme/releases.xrb
137
137
  - bake/utopia/project/readme/update.rb
138
138
  - bake/utopia/project/readme/usage.xrb
139
- - changes.md
140
139
  - lib/utopia/project.rb
141
140
  - lib/utopia/project/base.md
142
141
  - lib/utopia/project/base.rb
143
- - lib/utopia/project/changes_document.rb
144
142
  - lib/utopia/project/document.rb
145
143
  - lib/utopia/project/guide.rb
146
144
  - lib/utopia/project/linkify.rb
145
+ - lib/utopia/project/releases_document.rb
147
146
  - lib/utopia/project/renderer.rb
148
147
  - lib/utopia/project/version.rb
149
148
  - license.md
@@ -155,8 +154,6 @@ files:
155
154
  - pages/_thumbnail.xnode
156
155
  - pages/_usage.xnode
157
156
  - pages/_youtube-video.xnode
158
- - pages/changes/controller.rb
159
- - pages/changes/index.xnode
160
157
  - pages/controller.rb
161
158
  - pages/errors/exception.xnode
162
159
  - pages/errors/file-not-found.xnode
@@ -165,6 +162,8 @@ files:
165
162
  - pages/guides/show.xnode
166
163
  - pages/index.xnode
167
164
  - pages/links.yaml
165
+ - pages/releases/controller.rb
166
+ - pages/releases/index.xnode
168
167
  - pages/source/_discuss.xnode
169
168
  - pages/source/_pragmas.xnode
170
169
  - pages/source/_signature.xnode
@@ -255,6 +254,7 @@ files:
255
254
  - public/_static/site.css
256
255
  - public/robots.txt
257
256
  - readme.md
257
+ - releases.md
258
258
  - template/Gemfile
259
259
  - template/config.ru
260
260
  - template/preload.rb
metadata.gz.sig CHANGED
Binary file
data/changes.md DELETED
@@ -1,5 +0,0 @@
1
- # v0.28.0
2
-
3
- ## Introduce Changes Document
4
-
5
- A new changes document, if present, will be used to display changes in the release notes. The changes document should be named `changes.md` and should be placed in the root of the project. The changes document should be written in markdown format.