utopia-project 0.10.0 → 0.12.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: b54d7f25350dab0e6b2ef5078f4dcfedf0420f7169785edea0b83e10363e1c7f
4
- data.tar.gz: f497a26763c3dbea3d9c39fb6f632a89891410a13f3d8ac152be4a2b1b1df4d6
3
+ metadata.gz: ed4ed23b57eeb76017604def95426994514086af256fa39cccb2be9a1c32110d
4
+ data.tar.gz: 77c47a198f7bda2e39fdb12d91aec5ae860172072dc5d75f1b8511dc2fc4c2c5
5
5
  SHA512:
6
- metadata.gz: 80431d065a3c9d5d4fa111626dd42cf243911d73198edf644acf8aed6399f9332567a08c28ff3f297f73477da652bd8ab8a11c168b748de1756a61b06021e6a8
7
- data.tar.gz: 3592b185830475bc40aa8a04b3a4ce1eb2645c90d673a597ca92fa33368a55fe74c67964c013f9d24593a0011c1e87361dceac7e4a4ee2c568aedc9659277ef0
6
+ metadata.gz: f5942678119f557444049a7191e288e951d3de941abb2b3317d873f384b08d3b7142ee14ff400379befce25dcbdf21f03fca8e39f881763c6851043b462a14b5
7
+ data.tar.gz: ca17f6313cc66db60779b050ca5765a95254881d0a7c4315448c59d5ed6d94d96f9bfe364d153057eec05be8cda45654cd175d9dd29c6273c154719fe245543d
@@ -24,7 +24,7 @@ def serve(port: nil, bind: nil)
24
24
  end
25
25
 
26
26
  if port
27
- opttions << "--port" << port
27
+ options << "--port" << port
28
28
  end
29
29
 
30
30
  system("falcon", "serve", "--config", config_path, "--preload", preload_path, *options)
@@ -20,7 +20,7 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  # THE SOFTWARE.
22
22
 
23
- require 'commonmarker'
23
+ require 'markly'
24
24
 
25
25
  module Utopia
26
26
  module Project
@@ -37,7 +37,7 @@ module Utopia
37
37
  end
38
38
 
39
39
  def root
40
- @root ||= resolve(CommonMarker.render_doc(@text, [:DEFAULT]))
40
+ @root ||= resolve(Markly.parse(@text))
41
41
  end
42
42
 
43
43
  def first_child
@@ -52,7 +52,7 @@ module Utopia
52
52
  header = child
53
53
 
54
54
  # We found the matched header:
55
- if header.first_child.string_content == name
55
+ if header.first_child.to_plaintext.include?(name)
56
56
  # Now subsequent children:
57
57
  current = header.next
58
58
  while current.type != :header and following = current.next
@@ -69,35 +69,36 @@ module Utopia
69
69
  end
70
70
 
71
71
  def to_html(node = self.root)
72
- Trenni::MarkupString.raw(node.to_html(:UNSAFE))
72
+ renderer = Markly::HTMLRenderer.new(ids: true, flags: Markly::UNSAFE)
73
+ Trenni::MarkupString.raw(renderer.render(node))
73
74
  end
74
75
 
75
76
  def paragraph_node(child)
76
- node = CommonMarker::Node.new(:paragraph)
77
+ node = Markly::Node.new(:paragraph)
77
78
  node.append_child(child)
78
79
  return node
79
80
  end
80
81
 
81
82
  def html_node(content, type = :html)
82
- node = CommonMarker::Node.new(:html)
83
+ node = Markly::Node.new(:html)
83
84
  node.string_content = content
84
85
  return node
85
86
  end
86
87
 
87
88
  def inline_html_node(content)
88
- node = CommonMarker::Node.new(:inline_html)
89
+ node = Markly::Node.new(:inline_html)
89
90
  node.string_content = content
90
91
  return node
91
92
  end
92
93
 
93
94
  def text_node(content)
94
- node = CommonMarker::Node.new(:text)
95
+ node = Markly::Node.new(:text)
95
96
  node.string_content = content
96
97
  return node
97
98
  end
98
99
 
99
100
  def link_node(title, url, child)
100
- node = CommonMarker::Node.new(:link)
101
+ node = Markly::Node.new(:link)
101
102
  node.title = title
102
103
  node.url = url.to_s
103
104
 
@@ -112,7 +113,7 @@ module Utopia
112
113
  "<code class=\"language-#{language}\">#{Trenni::Strings.to_html(content)}</code>"
113
114
  )
114
115
  else
115
- node = CommonMarker::Node.new(:code)
116
+ node = Markly::Node.new(:code)
116
117
  node.string_content = content
117
118
  return node
118
119
  end
@@ -41,8 +41,8 @@ module Utopia
41
41
 
42
42
  def link_to(definition, text)
43
43
  Trenni::Builder.fragment do |builder|
44
- builder.inline('a', href: @base.link_for(definition)) do
45
- builder.text(definition.qualified_name)
44
+ builder.inline('a', href: @base.link_for(definition), title: definition.qualified_name) do
45
+ builder.text(text)
46
46
  end
47
47
  end
48
48
  end
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Utopia
24
24
  module Project
25
- VERSION = "0.10.0"
25
+ VERSION = "0.12.0"
26
26
  end
27
27
  end
@@ -20,4 +20,4 @@
20
20
  end
21
21
  ?>)<?r
22
22
  end
23
- ?></nav>
23
+ ?></nav>
@@ -1,5 +1,3 @@
1
- <h2>Usage</h2>
2
-
3
1
  <p>Please browse the <a href="source/">source code index</a> or refer to the guides below.</p>
4
2
 
5
3
  <?r
@@ -18,4 +16,4 @@
18
16
  <?r end ?>
19
17
  <?r
20
18
  end
21
- ?>
19
+ ?>
@@ -11,8 +11,8 @@
11
11
  case title.type
12
12
  when :text
13
13
  ?><content:heading>#{title.string_content}</content:heading><?r
14
- when :img
15
- ?><header><img src="#{title.src}" /></header><?r
14
+ when :image
15
+ ?><header><img src="#{title.url}" /></header><?r
16
16
  else
17
17
  ?><content:heading>Project</content:heading><?r
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: utopia
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.14'
27
27
  - !ruby/object:Gem::Dependency
28
- name: commonmarker
28
+ name: markly
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decode
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +178,7 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
- description:
181
+ description:
182
182
  email:
183
183
  - samuel.williams@oriontransfer.co.nz
184
184
  executables: []
@@ -294,7 +294,7 @@ licenses:
294
294
  metadata:
295
295
  source_code_uri: https://github.com/socketry/utopia-project/
296
296
  funding_uri: https://github.com/sponsors/ioquatix/
297
- post_install_message:
297
+ post_install_message:
298
298
  rdoc_options: []
299
299
  require_paths:
300
300
  - lib
@@ -310,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
310
  version: '0'
311
311
  requirements: []
312
312
  rubygems_version: 3.1.2
313
- signing_key:
313
+ signing_key:
314
314
  specification_version: 4
315
315
  summary: A project documentation tool based on Utopia.
316
316
  test_files: []