mislav-hanna 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -9,11 +9,11 @@ lib/hanna/template_files/index.haml
9
9
  lib/hanna/template_files/layout.haml
10
10
  lib/hanna/template_files/method_index.haml
11
11
  lib/hanna/template_files/method_list.haml
12
+ lib/hanna/template_files/method_search.js
12
13
  lib/hanna/template_files/page.haml
14
+ lib/hanna/template_files/prototype-1.6.0.3.js
13
15
  lib/hanna/template_files/sections.haml
14
16
  lib/hanna/template_files/styles.sass
15
- lib/hanna/template_files/prototype-1.6.0.3.js
16
- lib/hanna/template_files/method_search.js
17
17
  lib/hanna/template_helpers.rb
18
18
  lib/hanna/template_page_patch.rb
19
19
  lib/hanna.rb
data/README.markdown CHANGED
@@ -14,26 +14,31 @@ The template was created by [Mislav][] and since then has seen contributions fro
14
14
  start and made tons of fixes and enhancements to the template;
15
15
  2. [Hongli Lai](http://blog.phusion.nl/) with the search filter for methods.
16
16
 
17
+
17
18
  ## Usage
18
19
 
19
- The most basic usage is to specify Hanna as a template when invoking RDoc on the
20
- command-line:
20
+ There is a command-line tool installed with the Hanna gem:
21
+
22
+ hanna -h
23
+
24
+ This is a wrapper over `rdoc` and it forwards all the parameters to it. Manual usage
25
+ would require specifying Hanna as a template when invoking RDoc on the command-line:
21
26
 
22
- rdoc -o doc --inline-source -T hanna lib/*.rb
27
+ rdoc -o doc --inline-source --format=html -T hanna lib/*.rb
23
28
 
24
29
  Hanna requires the `--inline-source` (or `-S`) flag.
25
30
 
26
31
  An alternative is to set the `RDOCOPT` environment variable:
27
32
 
28
- RDOCOPT="-S -T hanna"
33
+ RDOCOPT="-S -f html -T hanna"
29
34
 
30
35
  This will make RDoc always use Hanna unless it is explicitly overridden.
31
36
 
32
- You can also use the command-line tool included in the Hanna gem:
37
+ Another neat trick is to put the following line in your .gemrc:
33
38
 
34
- hanna -h
39
+ rdoc: --inline-source --line-numbers --format=html --template=hanna
35
40
 
36
- This is a wrapper over rdoc and it forwards all the parameters to it.
41
+ This will make RubyGems use Hanna when generating documentation for installed gems.
37
42
 
38
43
  ### Rake task
39
44
 
@@ -75,6 +80,7 @@ to generate docs for "actionpack" and "activerecord" type:
75
80
 
76
81
  [sudo] hanna --gems actionpack activerecord
77
82
 
83
+
78
84
  ## You can help
79
85
 
80
86
  Don't like something? Think you can design better? (You probably can.)
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'echoe'
2
2
  require 'lib/hanna/rdoc_version'
3
3
 
4
4
  Echoe.new('hanna') do |p|
5
- p.version = '0.1.6'
5
+ p.version = '0.1.7'
6
6
 
7
7
  p.summary = "An RDoc template that scales"
8
8
  p.description = "Hanna is an RDoc implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind."
data/bin/hanna CHANGED
@@ -41,7 +41,7 @@ require 'rdoc/rdoc'
41
41
 
42
42
  options = []
43
43
 
44
- options << '-T' << 'hanna'
44
+ options << '-f' << 'html' << '-T' << 'hanna'
45
45
  options << '--inline-source' << '--charset=UTF-8'
46
46
 
47
47
  if ARGV.first == '--gems'
data/hanna.gemspec CHANGED
@@ -2,17 +2,19 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hanna}
5
- s.version = "0.1.6"
5
+ s.version = "0.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Mislav Marohni\304\207"]
9
- s.date = %q{2008-12-03}
9
+ s.date = %q{2009-02-17}
10
10
  s.default_executable = %q{hanna}
11
11
  s.description = %q{Hanna is an RDoc implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind.}
12
12
  s.email = %q{mislav.marohnic@gmail.com}
13
13
  s.executables = ["hanna"]
14
+ s.extra_rdoc_files = ["bin/hanna", "lib/hanna/hanna.rb", "lib/hanna/rdoc_version.rb", "lib/hanna/rdoctask.rb", "lib/hanna/template_files/class_index.haml", "lib/hanna/template_files/file_index.haml", "lib/hanna/template_files/index.haml", "lib/hanna/template_files/layout.haml", "lib/hanna/template_files/method_index.haml", "lib/hanna/template_files/method_list.haml", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/method_search.js", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/hanna.rb", "README.markdown"]
14
15
  s.files = ["bin/hanna", "hanna.gemspec", "lib/hanna/hanna.rb", "lib/hanna/rdoc_version.rb", "lib/hanna/rdoctask.rb", "lib/hanna/template_files/class_index.haml", "lib/hanna/template_files/file_index.haml", "lib/hanna/template_files/index.haml", "lib/hanna/template_files/layout.haml", "lib/hanna/template_files/method_index.haml", "lib/hanna/template_files/method_list.haml", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/method_search.js", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/hanna.rb", "Manifest", "Rakefile", "README.markdown"]
15
16
  s.homepage = %q{http://github.com/mislav/hanna}
17
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Hanna", "--main", "README.markdown"]
16
18
  s.require_paths = ["lib"]
17
19
  s.rubygems_version = %q{1.3.1}
18
20
  s.summary = %q{An RDoc template that scales}
@@ -22,20 +24,17 @@ Gem::Specification.new do |s|
22
24
  s.specification_version = 2
23
25
 
24
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
25
- s.add_runtime_dependency(%q<rdoc>, ["~> 2.2.0"])
27
+ s.add_runtime_dependency(%q<rdoc>, ["~> 2.3.0"])
26
28
  s.add_runtime_dependency(%q<haml>, ["~> 2.0.4"])
27
29
  s.add_runtime_dependency(%q<rake>, ["~> 0.8.2"])
28
- s.add_development_dependency(%q<echoe>, [">= 0"])
29
30
  else
30
- s.add_dependency(%q<rdoc>, ["~> 2.2.0"])
31
+ s.add_dependency(%q<rdoc>, ["~> 2.3.0"])
31
32
  s.add_dependency(%q<haml>, ["~> 2.0.4"])
32
33
  s.add_dependency(%q<rake>, ["~> 0.8.2"])
33
- s.add_dependency(%q<echoe>, [">= 0"])
34
34
  end
35
35
  else
36
- s.add_dependency(%q<rdoc>, ["~> 2.2.0"])
36
+ s.add_dependency(%q<rdoc>, ["~> 2.3.0"])
37
37
  s.add_dependency(%q<haml>, ["~> 2.0.4"])
38
38
  s.add_dependency(%q<rake>, ["~> 0.8.2"])
39
- s.add_dependency(%q<echoe>, [">= 0"])
40
39
  end
41
40
  end
data/lib/hanna/hanna.rb CHANGED
@@ -24,7 +24,7 @@ module RDoc::Generator::HTML::HANNA
24
24
  when 'sass'
25
25
  Sass::Engine.new(content)
26
26
  when 'haml'
27
- Haml::Engine.new(content, :format => :html4)
27
+ Haml::Engine.new(content, :format => :html4, :filename => names.join(','))
28
28
  else
29
29
  content
30
30
  end
@@ -2,7 +2,7 @@ module Hanna
2
2
  #
3
3
  # The version of RDoc that Hanna should use.
4
4
  #
5
- RDOC_VERSION = '2.2.0'
5
+ RDOC_VERSION = '2.3.0'
6
6
  RDOC_VERSION_REQUIREMENT = "~> #{RDOC_VERSION}"
7
7
 
8
8
  #
@@ -9,6 +9,7 @@ Rake::RDocTask.class_eval do
9
9
  # Create the tasks defined by this task lib.
10
10
  def define
11
11
  @template = 'hanna'
12
+ options << '--format=html'
12
13
 
13
14
  # inline source and UTF-8 are defaults:
14
15
  options << '--inline-source' unless options.include? '--inline-source' or options.include? '-S'
@@ -1,3 +1,3 @@
1
- %h1= values["list_title"]
1
+ %h1= values[:list_title]
2
2
  %ol#index-entries.classes
3
- = render_class_tree make_class_tree(values["entries"])
3
+ = render_class_tree make_class_tree(values[:entries])
@@ -1,11 +1,11 @@
1
- %h1= values["list_title"]
1
+ %h1= values[:list_title]
2
2
  - any_hidden = false
3
3
 
4
4
  %ol#index-entries{ :class => 'files' }
5
- - for entry in values["entries"]
6
- - hide = entry['name'] =~ /\.rb$/
5
+ - for entry in values[:entries]
6
+ - hide = entry[:name] =~ /\.rb$/
7
7
  - any_hidden = true if hide
8
- %li{ :class => hide ? 'other' : nil }= link_to entry['name'], entry['href']
8
+ %li{ :class => hide ? 'other' : nil }= link_to entry[:name], entry[:href]
9
9
 
10
10
  - if any_hidden
11
11
  %li
@@ -1,11 +1,11 @@
1
1
  !!! Frameset
2
2
  %html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
3
3
  %head
4
- %title= values["title"]
5
- %meta{ :content => "text/html; charset=#{values['charset']}", "http-equiv" => "Content-Type" }
4
+ %title= values[:title]
5
+ %meta{ :content => "text/html; charset=#{values[:charset]}", "http-equiv" => "Content-Type" }
6
6
  %frameset{ :cols => "20%, *", :border => "1", :frameborder => "1", :bordercolor => "gray" }
7
7
  %frameset{ :rows => "15%, 35%, 50%" }
8
8
  %frame{ :name => "Files", :title => "Files", :src => "fr_file_index.html" }
9
9
  %frame{ :name => "Classes", :src => "fr_class_index.html" }
10
10
  %frame{ :name => "Methods", :src => "fr_method_index.html" }
11
- %frame{ :name => "docwin", :src => values['initial_page'] }=""
11
+ %frame{ :name => "docwin", :src => values[:initial_page] }=""
@@ -1,10 +1,10 @@
1
1
  !!! strict
2
- - index = values['list_title']
2
+ - index = values[:list_title]
3
3
  %html{ :lang => "en" }
4
4
  %head
5
- %title= values['title']
6
- %meta{ 'http-equiv' => "Content-Type", :content => "text/html; charset=#{values['charset']}" }
7
- %link{ :rel => "stylesheet", :href => values["style_url"], :type => "text/css", :media => "screen" }
5
+ %title= values[:title]
6
+ %meta{ 'http-equiv' => "Content-Type", :content => "text/html; charset=#{values[:charset]}" }
7
+ %link{ :rel => "stylesheet", :href => values[:style_url], :type => "text/css", :media => "screen" }
8
8
  - unless index
9
9
  :javascript
10
10
  function popupCode(url) {
@@ -27,7 +27,7 @@
27
27
  - if index
28
28
  #index= yield
29
29
  - else
30
- #wrapper{ :class => values["classmod"] ? 'class' : 'file' }
30
+ #wrapper{ :class => values[:classmod] ? 'class' : 'file' }
31
31
  = yield
32
32
  #footer-push
33
33
  #footer
@@ -1,13 +1,13 @@
1
- %h1= values["list_title"]
1
+ %h1= values[:list_title]
2
2
 
3
3
  %script{:type => 'text/javascript'}
4
4
  = read("prototype-1.6.0.3.js")
5
- = build_javascript_search_index(values["entries"])
5
+ = build_javascript_search_index(values[:entries])
6
6
  = read("method_search.js")
7
7
  %form{:onsubmit => 'return performSearch()'}
8
8
  %input{:type => 'text', :id => 'search', :class => 'untouched', :value => 'Enter search terms...'}
9
9
  %ol#search-results{ :class => 'methods', :style => 'display: none' }
10
10
 
11
11
  %ol#index-entries{ :class => 'methods' }
12
- - for entry in values["entries"]
13
- %li= link_to_method entry['name'], entry['href']
12
+ - for entry in values[:entries]
13
+ %li= link_to_method entry[:name], entry[:href]
@@ -1,4 +1,4 @@
1
- - methods = methods_from_sections values["sections"]
1
+ - methods = methods_from_sections values[:sections]
2
2
  - unless methods.empty?
3
3
  #method-list
4
4
  %h2 Methods
@@ -7,28 +7,31 @@
7
7
  %h3= type
8
8
  %ol
9
9
  - for method in list
10
- %li= link_to method["name"], '#' + method["aref"]
10
+ - if method[:name].to_s.empty? && method[:callseq]
11
+ %li= link_to method[:callseq].gsub(/<br\s*\/?>/, "").split(/[\r\n]+/).map{ |s| s.split(/([({]+|\[\{|\s+(#?=>|&rarr;)\s+)/).first.sub(/^[A-Za-z0-9_:]+\./, "").sub(/\s+=\s+.*/, "=").strip }.uniq.join("<br />\n"), '#' + method[:aref]
12
+ - else
13
+ %li= link_to method[:name], '#' + method[:aref]
11
14
 
12
- - if values["requires"] or values["toc"] or values["includes"]
15
+ - if values[:requires] or values[:toc] or values[:includes]
13
16
  #context
14
- - if values["requires"]
17
+ - if values[:requires]
15
18
  #requires
16
19
  %h2 Required files
17
20
  %ol
18
- - for req in values["requires"]
19
- %li= link_to req["name"], req["aref"]
21
+ - for req in values[:requires]
22
+ %li= link_to req[:name], req[:aref]
20
23
 
21
- - if values["toc"]
24
+ - if values[:toc]
22
25
  #contents
23
26
  %h2 Contents
24
27
  %ol
25
- - for item in values["toc"]
26
- %li= link_to values["secname"], values["href"]
28
+ - for item in values[:toc]
29
+ %li= link_to values[:secname], values[:href]
27
30
 
28
- - if values["includes"]
31
+ - if values[:includes]
29
32
  #includes
30
33
  %h2 Included modules
31
34
  %ol
32
- - for inc in values["includes"]
33
- %li= link_to inc["name"], inc["aref"]
35
+ - for inc in values[:includes]
36
+ %li= link_to inc[:name], inc[:aref]
34
37
 
@@ -1,13 +1,13 @@
1
- - file_page = !values["classmod"]
2
- - title_in_description = values["description"] && values["description"] =~ /^\s*<h1>/m
1
+ - file_page = !values[:classmod]
2
+ - title_in_description = values[:description] && values[:description] =~ /^\s*<h1>/m
3
3
 
4
4
  .header
5
5
  - title = capture_haml do
6
6
  - if file_page
7
- = values["short_name"]
7
+ = values[:short_name]
8
8
  - else
9
- %span.type= values["classmod"]
10
- = values["full_name"]
9
+ %span.type= values[:classmod]
10
+ = values[:full_name]
11
11
  - if title_in_description
12
12
  .name= title
13
13
  - else
@@ -15,36 +15,36 @@
15
15
 
16
16
  - if file_page
17
17
  .paths
18
- = values["full_path"]
19
- - if values["cvsurl"]
20
- == (#{link_to 'view online', values["cvsurl"]})
18
+ = values[:full_path]
19
+ - if values[:cvsurl]
20
+ == (#{link_to 'view online', values[:cvsurl]})
21
21
  - else
22
22
  %ol.paths
23
- - values["infiles"].each_with_index do |file, index|
23
+ - values[:infiles].each_with_index do |file, index|
24
24
  %li{ :class => index > 0 ? 'other' : nil }
25
- = link_to file["full_path"], file["full_path_url"]
26
- - if file["cvsurl"]
27
- == (#{link_to 'view online', file["cvsurl"]})
28
- - if values["infiles"].size > 1
25
+ = link_to file[:full_path], file[:full_path_url]
26
+ - if file[:cvsurl]
27
+ == (#{link_to 'view online', file[:cvsurl]})
28
+ - if values[:infiles].size > 1
29
29
  %li
30
30
  %a.show{ :href => '#', :onclick => 'this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false' } show all
31
31
 
32
- - if values["parent"] then
32
+ - if values[:parent] then
33
33
  .parent
34
34
  Parent:
35
- %strong= link_to values["parent"], values["par_url"]
35
+ %strong= link_to values[:parent], values[:par_url]
36
36
 
37
- - if values["dtm_modified"]
37
+ - if values[:dtm_modified]
38
38
  .last-update
39
39
  Last Update:
40
- %span.datetime= values["dtm_modified"]
40
+ %span.datetime= values[:dtm_modified]
41
41
 
42
42
  #content
43
- - if values["diagram"]
44
- #diagram= values["diagram"]
43
+ - if values[:diagram]
44
+ #diagram= values[:diagram]
45
45
 
46
46
  #text
47
- - if values["description"]
48
- #description~ sanitize_code_blocks values["description"]
47
+ - if values[:description]
48
+ #description~ sanitize_code_blocks values[:description]
49
49
 
50
50
  = yield
@@ -1,83 +1,83 @@
1
- - for section in values["sections"]
1
+ - for section in values[:sections]
2
2
  #section
3
- - if section["sectitle"]
4
- %h2= link_to section["sectitle"], section["secsequence"]
5
- - if section["seccomment"]
6
- .section-comment= section["seccomment"]
3
+ - if section[:sectitle]
4
+ %h2= link_to section[:sectitle], section[:secsequence]
5
+ - if section[:seccomment]
6
+ .section-comment= section[:seccomment]
7
7
 
8
- - if section["classlist"]
8
+ - if section[:classlist]
9
9
  #class-list
10
10
  %h2 Classes and Modules
11
- = section["classlist"]
11
+ = section[:classlist]
12
12
 
13
- - if section["constants"]
13
+ - if section[:constants]
14
14
  #constants-list
15
15
  %h2 Constants
16
16
  .name-list
17
17
  %table{ :summary => "Constants" }
18
- - for const in section["constants"]
18
+ - for const in section[:constants]
19
19
  %tr.top-aligned-row.context-row
20
- %td.context-item-name= const["name"]
20
+ %td.context-item-name= const[:name]
21
21
  %td =
22
- %td.context-item-value= const["value"]
23
- - if const["desc"] then
22
+ %td.context-item-value= const[:value]
23
+ - if const[:desc] then
24
24
  %td &nbsp;
25
- %td.context-item-desc= const["desc"]
25
+ %td.context-item-desc= const[:desc]
26
26
 
27
- - if section["aliases"]
27
+ - if section[:aliases]
28
28
  #aliases-list
29
29
  %h2 External Aliases
30
30
  .name-list
31
31
  %table{ :summary => "External aliases" }
32
- - for alia in section["aliases"]
32
+ - for alia in section[:aliases]
33
33
  %tr.top-aligned-row.context-row
34
- %td.context-item-name= alia["old_name"]
34
+ %td.context-item-name= alia[:old_name]
35
35
  %td -&gt;
36
- %td.context-item-value= alia["new_name"]
37
- - if alia["desc"] then
36
+ %td.context-item-value= alia[:new_name]
37
+ - if alia[:desc] then
38
38
  %tr.top-aligned-row.context-row
39
39
  %td &nbsp;
40
40
  %td.context-item-desc{ :colspan => "2" }
41
- = alia["desc"]
41
+ = alia[:desc]
42
42
 
43
- - if section["attributes"]
43
+ - if section[:attributes]
44
44
  #attribute-list
45
45
  %h2.section-bar Attributes
46
46
  .name-list
47
47
  %table
48
- - for attr in section["attributes"]
48
+ - for attr in section[:attributes]
49
49
  %tr.top-aligned-row.context-row
50
- %td.context-item-name= attr["name"]
51
- %td.context-item-value= attr["rw"] ? "[#{attr['rw']}]" : '&nbsp;'
52
- %td.context-item-desc= attr["a_desc"]
50
+ %td.context-item-name= attr[:name]
51
+ %td.context-item-value= attr[:rw] ? "[#{attr[:rw]}]" : '&nbsp;'
52
+ %td.context-item-desc= attr[:a_desc]
53
53
 
54
- - if section["method_list"]
54
+ - if section[:method_list]
55
55
  #methods
56
- - for list in section["method_list"]
57
- - if list["methods"] then
58
- %h2== #{list["type"]} #{list["category"].downcase} methods
56
+ - for list in section[:method_list]
57
+ - if list[:methods] then
58
+ %h2== #{list[:type]} #{list[:category].downcase} methods
59
59
 
60
- - for method in list["methods"]
61
- .method{ :id => "method-#{method['aref']}", :class => "#{list['type']}-#{list['category']}".downcase }
62
- %a{ :name => method["aref"] }
60
+ - for method in list[:methods]
61
+ .method{ :id => "method-#{method[:aref]}", :class => "#{list[:type]}-#{list[:category]}".downcase }
62
+ %a{ :name => method[:aref] }
63
63
  .synopsis
64
64
  - method_html = capture_haml do
65
- - if method["callseq"]
66
- %span.name= method["callseq"]
65
+ - if method[:callseq]
66
+ %span.name= method[:callseq]
67
67
  - else
68
- %span.name= method["name"]
69
- %span.arguments= method["params"]
70
- - if method["codeurl"]
71
- %a.method-signature{ :href => method["codeurl"], :onclick => "popupCode(this.href); return false", :target => "Code" }
68
+ %span.name= method[:name]
69
+ %span.arguments= method[:params]
70
+ - if method[:codeurl]
71
+ %a.method-signature{ :href => method[:codeurl], :onclick => "popupCode(this.href); return false", :target => "Code" }
72
72
  = method_html
73
73
  - else
74
74
  = method_html
75
- - if method["m_desc"]
75
+ - if method[:m_desc]
76
76
  .description
77
- ~ sanitize_code_blocks method["m_desc"]
78
- - if method["sourcecode"]
77
+ ~ sanitize_code_blocks method[:m_desc]
78
+ - if method[:sourcecode]
79
79
  .source
80
- - name = "#{method['aref']}-source"
80
+ - name = "#{method[:aref]}-source"
81
81
  %a.source-toggle{ :href => "#", :onclick => "toggleCode('#{name}'); return false" }
82
82
  [show source]
83
- ~ "<pre id='#{name}'>#{method["sourcecode"]}</pre>"
83
+ ~ "<pre id='#{name}'>#{method[:sourcecode]}</pre>"
@@ -56,9 +56,9 @@ module Hanna
56
56
  def build_javascript_search_index(entries)
57
57
  result = "var search_index = [\n"
58
58
  entries.each do |entry|
59
- entry["name"] =~ /\A(.+) \((.+)\)\Z/
59
+ entry[:name] =~ /\A(.+) \((.+)\)\Z/
60
60
  method_name, module_name = $1, $2
61
- html = link_to_method(entry["name"], entry["href"])
61
+ html = link_to_method(entry[:name], entry[:href])
62
62
  result << " { method: '#{method_name.downcase}', " <<
63
63
  "module: '#{module_name.downcase}', " <<
64
64
  "html: '#{html}' },\n"
@@ -69,20 +69,20 @@ module Hanna
69
69
 
70
70
  def methods_from_sections(sections)
71
71
  sections.inject(Hash.new {|h, k| h[k] = []}) do |methods, section|
72
- section['method_list'].each do |ml|
73
- methods["#{ml['type']} #{ml['category']}".downcase].concat ml['methods']
74
- end if section['method_list']
72
+ section[:method_list].each do |ml|
73
+ methods["#{ml[:type]} #{ml[:category]}".downcase].concat ml[:methods]
74
+ end if section[:method_list]
75
75
  methods
76
76
  end
77
77
  end
78
78
 
79
79
  def make_class_tree(entries)
80
80
  entries.inject({}) do |tree, entry|
81
- if entry['href']
82
- leaf = entry['name'].split('::').inject(tree) do |branch, klass|
81
+ if entry[:href]
82
+ leaf = entry[:name].split('::').inject(tree) do |branch, klass|
83
83
  branch[klass] ||= {}
84
84
  end
85
- leaf['_href'] = entry['href']
85
+ leaf['_href'] = entry[:href]
86
86
  end
87
87
  tree
88
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mislav-hanna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Mislav Marohni\xC4\x87"
@@ -9,20 +9,22 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-03 00:00:00 -08:00
12
+ date: 2009-02-17 00:00:00 -08:00
13
13
  default_executable: hanna
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdoc
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
20
21
  - - ~>
21
22
  - !ruby/object:Gem::Version
22
- version: 2.2.0
23
+ version: 2.3.0
23
24
  version:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: haml
27
+ type: :runtime
26
28
  version_requirement:
27
29
  version_requirements: !ruby/object:Gem::Requirement
28
30
  requirements:
@@ -32,6 +34,7 @@ dependencies:
32
34
  version:
33
35
  - !ruby/object:Gem::Dependency
34
36
  name: rake
37
+ type: :runtime
35
38
  version_requirement:
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
@@ -39,23 +42,32 @@ dependencies:
39
42
  - !ruby/object:Gem::Version
40
43
  version: 0.8.2
41
44
  version:
42
- - !ruby/object:Gem::Dependency
43
- name: echoe
44
- version_requirement:
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: "0"
50
- version:
51
45
  description: Hanna is an RDoc implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind.
52
46
  email: mislav.marohnic@gmail.com
53
47
  executables:
54
48
  - hanna
55
49
  extensions: []
56
50
 
57
- extra_rdoc_files: []
58
-
51
+ extra_rdoc_files:
52
+ - bin/hanna
53
+ - lib/hanna/hanna.rb
54
+ - lib/hanna/rdoc_version.rb
55
+ - lib/hanna/rdoctask.rb
56
+ - lib/hanna/template_files/class_index.haml
57
+ - lib/hanna/template_files/file_index.haml
58
+ - lib/hanna/template_files/index.haml
59
+ - lib/hanna/template_files/layout.haml
60
+ - lib/hanna/template_files/method_index.haml
61
+ - lib/hanna/template_files/method_list.haml
62
+ - lib/hanna/template_files/page.haml
63
+ - lib/hanna/template_files/sections.haml
64
+ - lib/hanna/template_files/styles.sass
65
+ - lib/hanna/template_files/prototype-1.6.0.3.js
66
+ - lib/hanna/template_files/method_search.js
67
+ - lib/hanna/template_helpers.rb
68
+ - lib/hanna/template_page_patch.rb
69
+ - lib/hanna.rb
70
+ - README.markdown
59
71
  files:
60
72
  - bin/hanna
61
73
  - hanna.gemspec
@@ -82,8 +94,13 @@ files:
82
94
  has_rdoc: false
83
95
  homepage: http://github.com/mislav/hanna
84
96
  post_install_message:
85
- rdoc_options: []
86
-
97
+ rdoc_options:
98
+ - --line-numbers
99
+ - --inline-source
100
+ - --title
101
+ - Hanna
102
+ - --main
103
+ - README.markdown
87
104
  require_paths:
88
105
  - lib
89
106
  required_ruby_version: !ruby/object:Gem::Requirement