utopia-project 0.19.1 → 0.20.2

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: e8479ac4dc2baa64e5fe601e243bdc451a27a98683af099ef13e4168d93abbc9
4
- data.tar.gz: 1d342b29f3dfd70a50bccf60b7bf1c3eee37720a077150339eea0621f9cb540a
3
+ metadata.gz: a592172db272c2789de44f49c0b441741a3d269f19f849ef5718aaf3c5a7152e
4
+ data.tar.gz: 66078c8df37cbff16f1dc674d18b05efef27f910894d258647189f4944d83b40
5
5
  SHA512:
6
- metadata.gz: e1ec234ec399889c920da17113f1baab77b55ac935b1cf6842b1c81e45dc437a31bd90176cac228a482f3bc198fe635bba9bee77491940dfe1bfec6eb54e60e2
7
- data.tar.gz: 862859d180cae34afb36623166b3bd876375d857fd9a2af0d58bd20c8b8587533bbb56e37fa88f2330744103b7577cb03189d2bc7dd6ad0906637d3d315d80eb
6
+ metadata.gz: 1ce5ea33622890abb90b9192be7a546219f5e0b8f94cf193fe3640b1177f9c2a17ec0c0a3a037f52be677addfa255b6529a40059f1b063de9fd74e4e3224eae0
7
+ data.tar.gz: 01f392ac81d5d68117298bf3d803bc7d1f3171bde53a9c670e2eb9e737e7d09b24b122505b1fcfa970f526525232bd7e13c4a357730055594c262bfd3e7e7232
checksums.yaml.gz.sig CHANGED
Binary file
@@ -42,7 +42,7 @@ module Utopia
42
42
  instance = self.new
43
43
 
44
44
  source_files = Dir.glob(
45
- File.expand_path("lib/**/*.rb", instance.root)
45
+ File.expand_path("{lib,app}/**/*.rb", instance.root)
46
46
  )
47
47
 
48
48
  instance.update(source_files)
@@ -55,9 +55,11 @@ module Utopia
55
55
  if header.first_child.to_plaintext.include?(name)
56
56
  # Now subsequent children:
57
57
  current = header.next
58
- while current.type != :header and following = current.next
58
+
59
+ # Delete everything in the section until we encounter another header:
60
+ while current && current.type != :header
59
61
  current.delete
60
- current = following
62
+ current = current.next
61
63
  end
62
64
 
63
65
  return yield(header)
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Utopia
24
24
  module Project
25
- VERSION = "0.19.1"
25
+ VERSION = "0.20.2"
26
26
  end
27
27
  end
data/pages/_header.xnode CHANGED
@@ -12,7 +12,20 @@
12
12
  ?> &rsaquo; <span>#{path.last}</span><?r
13
13
  end
14
14
  end
15
-
15
+
16
+ if lexical_path = controller[:lexical_path]
17
+ current = []
18
+ lexical_path.each do |part|
19
+ current << part
20
+
21
+ ?> &rsaquo; <a href="/source/#{current.join('/')}/index">#{part}</a> <?r
22
+ end
23
+ end
24
+
25
+ if guide = controller[:guide]
26
+ ?> &rsaquo; <a href="/guides/#{guide.name}/index">#{guide.title}</a> <?r
27
+ end
28
+
16
29
  if localization.localized?
17
30
  ?> &bull; (<?r
18
31
  localization.all_locales.each.with_index do |locale, index|
@@ -8,11 +8,11 @@ end
8
8
  on '**/*/index' do |request, path|
9
9
  @base = Utopia::Project::Base.instance
10
10
 
11
- lexical_path = path.components.dup
11
+ @lexical_path = path.components.dup
12
12
  # Remove the last "index" part:
13
- lexical_path.pop
13
+ @lexical_path.pop
14
14
 
15
- @node, @symbol = @base.lookup(lexical_path)
15
+ @node, @symbol = @base.lookup(@lexical_path)
16
16
 
17
17
  unless @symbol
18
18
  fail! :not_found
@@ -12,7 +12,7 @@
12
12
  if documentation = symbol.documentation or symbol.container?
13
13
  ?><li>
14
14
  <?r if symbol.container? ?>
15
- <a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.long_form}</code></a>
15
+ <a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.short_form}</code></a>
16
16
 
17
17
  #{partial 'content:pragmas', symbol: symbol, class: 'inline'}
18
18
 
@@ -3,8 +3,12 @@
3
3
  base = self[:base]
4
4
  node = self[:node]
5
5
  symbol = self[:symbol]
6
+ document.attributes[:title] ||= symbol.qualified_name
6
7
  ?>
7
- <content:heading><code class="language-#{symbol.language.name}">#{symbol.qualified_name}</code></content:heading>
8
+
9
+ <h1>
10
+ <code class="language-#{symbol.language.name}">#{symbol.short_form}</code>
11
+ </h1>
8
12
 
9
13
  <?r
10
14
  if document = base.document_for(symbol)
@@ -13,33 +17,39 @@
13
17
  ?>#{base.format(text.join("\n"), symbol)}<?r
14
18
  end
15
19
  ?>
16
-
17
20
  #{partial 'content:signature', symbol: symbol}
18
-
19
21
  <?r
20
- nested = node.children.map{|name, child| base.best(child.values)}.select{|symbol| symbol.container?}
22
+ nested = node.children.map do |name, child|
23
+ base.best(child.values)
24
+ end.select do |symbol|
25
+ symbol.container?
26
+ end
21
27
 
22
28
  if nested.any?
23
29
  ?>
24
30
  <section>
25
- <h2>Nested</h2>
26
-
27
- <ul>
28
- <?r nested.each do |symbol| ?>
29
- <li><a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.qualified_name}</code></a></li>
30
- <?r end ?>
31
- </ul>
31
+ <h2>Nested</h2>
32
+
33
+ <ul>
34
+ <?r nested.each do |symbol| ?>
35
+ <li><a href="#{base.link_for(symbol)}"><code class="language-#{symbol.language.name}">#{symbol.nested_name}</code></a></li>
36
+ <?r end ?>
37
+ </ul>
32
38
  </section>
33
39
  <?r
34
40
  end
35
- ?>
36
41
 
42
+ definitions = node.children.map do |name, child|
43
+ child.values.select{|symbol| symbol.documentation and !symbol.container?}
44
+ end.flatten
45
+
46
+ if definitions.any?
47
+ ?>
37
48
  <section>
38
- <h2>Definitions</h2>
39
-
40
- <?r
41
- node.children.each do |name, child|
42
- child.values.each do |symbol|
49
+ <h2>Definitions</h2>
50
+
51
+ <?r
52
+ definitions.each do |symbol|
43
53
  if symbol.documentation and !symbol.container?
44
54
  ?><section id="#{base.id_for(symbol)}"><h3><code class="language-#{symbol.language.name}">#{symbol.long_form}</code></h3><?r
45
55
 
@@ -58,9 +68,10 @@
58
68
  ?></section><?r
59
69
  end
60
70
  end
71
+ ?>
72
+ </section>
73
+ <?r
61
74
  end
62
75
  ?>
63
- </section>
64
-
65
76
  <content:discuss/>
66
77
  </content:page>