rogerdpack-hanna 0.1.7

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.
@@ -0,0 +1,38 @@
1
+ require 'hanna/template_helpers'
2
+
3
+ RDoc::TemplatePage.class_eval do
4
+
5
+ include Hanna::TemplateHelpers
6
+
7
+ # overwrite the original method
8
+ alias :old_write_html_on :write_html_on # suppresses the overwrite warning
9
+ def write_html_on(io, values)
10
+ result = @templates.reverse.inject(nil) do |previous, template|
11
+ case template
12
+ when Haml::Engine
13
+ silence_warnings do
14
+ template.to_html(binding, :values => values) { previous }
15
+ end
16
+ when Sass::Engine
17
+ silence_warnings { template.to_css }
18
+ when String
19
+ ERB.new(template).result(get_binding(values){ previous })
20
+ when nil
21
+ previous
22
+ else
23
+ raise "don't know how to handle a template of class '#{template.class.name}'"
24
+ end
25
+ end
26
+
27
+ io.write result
28
+ rescue
29
+ $stderr.puts "error while writing to #{io.inspect}"
30
+ raise
31
+ end
32
+
33
+ private
34
+
35
+ def get_binding(values = nil)
36
+ binding
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rogerdpack-hanna
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.7
5
+ platform: ruby
6
+ authors:
7
+ - "Mislav Marohni\xC4\x87"
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-02-17 00:00:00 -08:00
13
+ default_executable: hanna
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rdoc
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 2.3.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: haml
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.4
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rake
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.8.2
44
+ version:
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.
46
+ email: mislav.marohnic@gmail.com
47
+ executables:
48
+ - hanna
49
+ extensions: []
50
+
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
71
+ files:
72
+ - bin/hanna
73
+ - hanna.gemspec
74
+ - lib/hanna/hanna.rb
75
+ - lib/hanna/rdoc_version.rb
76
+ - lib/hanna/rdoctask.rb
77
+ - lib/hanna/template_files/class_index.haml
78
+ - lib/hanna/template_files/file_index.haml
79
+ - lib/hanna/template_files/index.haml
80
+ - lib/hanna/template_files/layout.haml
81
+ - lib/hanna/template_files/method_index.haml
82
+ - lib/hanna/template_files/method_list.haml
83
+ - lib/hanna/template_files/page.haml
84
+ - lib/hanna/template_files/sections.haml
85
+ - lib/hanna/template_files/styles.sass
86
+ - lib/hanna/template_files/prototype-1.6.0.3.js
87
+ - lib/hanna/template_files/method_search.js
88
+ - lib/hanna/template_helpers.rb
89
+ - lib/hanna/template_page_patch.rb
90
+ - lib/hanna.rb
91
+ - Manifest
92
+ - Rakefile
93
+ - README.markdown
94
+ has_rdoc: false
95
+ homepage: http://github.com/mislav/hanna
96
+ post_install_message:
97
+ rdoc_options:
98
+ - --line-numbers
99
+ - --inline-source
100
+ - --title
101
+ - Hanna
102
+ - --main
103
+ - README.markdown
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: "0"
111
+ version:
112
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: "1.2"
117
+ version:
118
+ requirements: []
119
+
120
+ rubyforge_project:
121
+ rubygems_version: 1.2.0
122
+ signing_key:
123
+ specification_version: 2
124
+ summary: An RDoc template that scales
125
+ test_files: []
126
+