mislav-hanna 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,19 +1,19 @@
1
- hanna.gemspec
2
1
  bin/hanna
3
- README.markdown
4
- Manifest
5
- lib/hanna/template_page_patch.rb
2
+ hanna.gemspec
3
+ lib/hanna/hanna.rb
6
4
  lib/hanna/rdoc_version.rb
7
- lib/hanna/template_helpers.rb
8
- lib/hanna/template_files/method_list.haml
9
- lib/hanna/template_files/styles.sass
5
+ lib/hanna/rdoctask.rb
10
6
  lib/hanna/template_files/class_index.haml
11
- lib/hanna/template_files/layout.haml
7
+ lib/hanna/template_files/file_index.haml
12
8
  lib/hanna/template_files/index.haml
9
+ lib/hanna/template_files/layout.haml
10
+ lib/hanna/template_files/method_list.haml
13
11
  lib/hanna/template_files/page.haml
14
12
  lib/hanna/template_files/sections.haml
15
- lib/hanna/template_files/file_index.haml
16
- lib/hanna/rdoctask.rb
17
- lib/hanna/hanna.rb
13
+ lib/hanna/template_files/styles.sass
14
+ lib/hanna/template_helpers.rb
15
+ lib/hanna/template_page_patch.rb
18
16
  lib/hanna.rb
17
+ Manifest
19
18
  Rakefile
19
+ README.markdown
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require File.join(File.dirname(__FILE__), "lib/hanna/rdoc_version")
6
6
  require 'echoe'
7
7
 
8
8
  Echoe.new('hanna') do |p|
9
- p.version = '0.1.3'
9
+ p.version = '0.1.4'
10
10
 
11
11
  p.summary = "An RDoc template that rocks"
12
12
  p.description = "Hanna is an RDoc template that scales. It's implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind."
@@ -20,4 +20,5 @@ Echoe.new('hanna') do |p|
20
20
  p.runtime_dependencies = []
21
21
  p.runtime_dependencies << ['rdoc', Hanna::RDOC_VERSION_REQUIREMENT]
22
22
  p.runtime_dependencies << ['haml', '~> 2.0']
23
+ p.runtime_dependencies << ['rake', '~> 0.8.2']
23
24
  end
data/bin/hanna CHANGED
@@ -35,7 +35,7 @@ require 'rdoc/rdoc'
35
35
 
36
36
  options = []
37
37
 
38
- options << '-T' << 'hanna/hanna.rb'
38
+ options << '-T' << 'hanna'
39
39
  options << '--inline-source' << '--charset=UTF-8'
40
40
 
41
41
  if ARGV.first == '--gems'
data/hanna.gemspec CHANGED
@@ -1,18 +1,18 @@
1
1
 
2
- # Gem::Specification for Hanna-0.1.3
2
+ # Gem::Specification for Hanna-0.1.4
3
3
  # Originally generated by Echoe
4
4
 
5
5
  --- !ruby/object:Gem::Specification
6
6
  name: hanna
7
7
  version: !ruby/object:Gem::Version
8
- version: 0.1.3
8
+ version: 0.1.4
9
9
  platform: ruby
10
10
  authors:
11
11
  - "Mislav Marohni\xC4\x87"
12
12
  autorequire:
13
13
  bindir: bin
14
14
 
15
- date: 2008-09-19 00:00:00 -04:00
15
+ date: 2008-09-22 00:00:00 -04:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -35,6 +35,16 @@ dependencies:
35
35
  - !ruby/object:Gem::Version
36
36
  version: "2.0"
37
37
  version:
38
+ - !ruby/object:Gem::Dependency
39
+ name: rake
40
+ type: :runtime
41
+ version_requirement:
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ~>
45
+ - !ruby/object:Gem::Version
46
+ version: 0.8.2
47
+ version:
38
48
  - !ruby/object:Gem::Dependency
39
49
  name: echoe
40
50
  type: :development
@@ -53,41 +63,41 @@ extensions: []
53
63
 
54
64
  extra_rdoc_files:
55
65
  - bin/hanna
56
- - README.markdown
57
- - lib/hanna/template_page_patch.rb
66
+ - lib/hanna/hanna.rb
58
67
  - lib/hanna/rdoc_version.rb
59
- - lib/hanna/template_helpers.rb
60
- - lib/hanna/template_files/method_list.haml
61
- - lib/hanna/template_files/styles.sass
68
+ - lib/hanna/rdoctask.rb
62
69
  - lib/hanna/template_files/class_index.haml
63
- - lib/hanna/template_files/layout.haml
70
+ - lib/hanna/template_files/file_index.haml
64
71
  - lib/hanna/template_files/index.haml
72
+ - lib/hanna/template_files/layout.haml
73
+ - lib/hanna/template_files/method_list.haml
65
74
  - lib/hanna/template_files/page.haml
66
75
  - lib/hanna/template_files/sections.haml
67
- - lib/hanna/template_files/file_index.haml
68
- - lib/hanna/rdoctask.rb
69
- - lib/hanna/hanna.rb
76
+ - lib/hanna/template_files/styles.sass
77
+ - lib/hanna/template_helpers.rb
78
+ - lib/hanna/template_page_patch.rb
70
79
  - lib/hanna.rb
80
+ - README.markdown
71
81
  files:
72
- - hanna.gemspec
73
82
  - bin/hanna
74
- - README.markdown
75
- - Manifest
76
- - lib/hanna/template_page_patch.rb
83
+ - hanna.gemspec
84
+ - lib/hanna/hanna.rb
77
85
  - lib/hanna/rdoc_version.rb
78
- - lib/hanna/template_helpers.rb
79
- - lib/hanna/template_files/method_list.haml
80
- - lib/hanna/template_files/styles.sass
86
+ - lib/hanna/rdoctask.rb
81
87
  - lib/hanna/template_files/class_index.haml
82
- - lib/hanna/template_files/layout.haml
88
+ - lib/hanna/template_files/file_index.haml
83
89
  - lib/hanna/template_files/index.haml
90
+ - lib/hanna/template_files/layout.haml
91
+ - lib/hanna/template_files/method_list.haml
84
92
  - lib/hanna/template_files/page.haml
85
93
  - lib/hanna/template_files/sections.haml
86
- - lib/hanna/template_files/file_index.haml
87
- - lib/hanna/rdoctask.rb
88
- - lib/hanna/hanna.rb
94
+ - lib/hanna/template_files/styles.sass
95
+ - lib/hanna/template_helpers.rb
96
+ - lib/hanna/template_page_patch.rb
89
97
  - lib/hanna.rb
98
+ - Manifest
90
99
  - Rakefile
100
+ - README.markdown
91
101
  has_rdoc: false
92
102
  homepage: http://github.com/mislav/hanna
93
103
  post_install_message:
data/lib/hanna/hanna.rb CHANGED
@@ -19,7 +19,7 @@ module RDoc::Generator::HTML::HANNA
19
19
  content = names.inject('') { |all, name| all << File.read(File.join(dir, name)) }
20
20
  extension = names.first =~ /\.(\w+)$/ && $1
21
21
 
22
- Hanna::TemplateHelpers.with_no_warnings do
22
+ Hanna::TemplateHelpers.silence_warnings do
23
23
  case extension
24
24
  when 'sass'
25
25
  Sass::Engine.new(content)
@@ -1,17 +1,15 @@
1
1
  require 'hanna/rdoc_version'
2
-
3
2
  require 'rake'
4
3
  require 'rake/rdoctask'
5
4
 
6
5
  Rake::RDocTask.class_eval do
7
6
  # don't allow it
8
- undef :external=
9
-
7
+ undef :external=, :template=
8
+
10
9
  # Create the tasks defined by this task lib.
11
10
  def define
12
- unless @template and @template != 'html'
13
- @template = 'hanna'
14
- end
11
+ @template = 'hanna'
12
+
15
13
  # inline source and UTF-8 are defaults:
16
14
  options << '--inline-source' unless options.include? '--inline-source' or options.include? '-S'
17
15
  options << '--charset=UTF-8' if options.grep(/^(--charset\b|-c\b)/).empty?
@@ -31,13 +29,13 @@ Rake::RDocTask.class_eval do
31
29
 
32
30
  directory @rdoc_dir
33
31
  task name => [rdoc_target]
34
- file rdoc_target => @rdoc_files + [$rakefile] do
32
+ file rdoc_target => @rdoc_files + [Rake.application.rakefile] do
35
33
  rm_r @rdoc_dir rescue nil
36
34
  Hanna::require_rdoc
37
35
  require 'rdoc/rdoc'
38
36
 
39
37
  RDoc::RDoc.new.document(option_list + @rdoc_files)
40
38
  end
41
- self
39
+ return self
42
40
  end
43
41
  end
@@ -16,6 +16,7 @@ body
16
16
  :margin 0
17
17
  :padding 0
18
18
  :background white
19
+ :color black
19
20
 
20
21
  #wrapper
21
22
  :min-height 100%
@@ -246,15 +247,18 @@ div.header
246
247
  :padding 0 0 .5em .5em
247
248
 
248
249
  #context
249
- :font-size 85%
250
- :padding-left 1.5em
251
250
  :border-top 1px dashed silver
252
251
  :margin-top 1em
252
+ :margin-bottom 1em
253
253
  h2
254
254
  :color #333
255
255
  :font = "bold small-caps 1.3em" !title_font
256
256
  :margin .5em 0 .1em 0
257
-
257
+
258
+ #section
259
+ h3
260
+ :margin-top 1em
261
+
258
262
  #methods
259
263
  h3
260
264
  :font = "small-caps 1.2em" !title_font
@@ -17,11 +17,9 @@ module Hanna
17
17
  end
18
18
  end
19
19
 
20
- #
21
20
  # We need to suppress warnings before calling into HAML because
22
21
  # HAML has lots of uninitialized instance variable accesses.
23
- #
24
- def with_no_warnings
22
+ def silence_warnings
25
23
  save = $-w
26
24
  $-w = false
27
25
 
@@ -31,7 +29,7 @@ module Hanna
31
29
  $-w = save
32
30
  end
33
31
  end
34
- module_function :with_no_warnings
32
+ module_function :silence_warnings
35
33
 
36
34
  def debug(text)
37
35
  "<pre>#{h YAML::dump(text)}</pre>"
@@ -5,25 +5,23 @@ RDoc::TemplatePage.class_eval do
5
5
  include Hanna::TemplateHelpers
6
6
 
7
7
  # overwrite the original method
8
- alias :old_write_html_on :write_html_on # suppresses a warning
8
+ alias :old_write_html_on :write_html_on # suppresses the overwrite warning
9
9
  def write_html_on(io, values)
10
10
  result = @templates.reverse.inject(nil) do |previous, template|
11
11
  case template
12
- when Haml::Engine
13
- with_no_warnings do
14
- template.to_html(get_binding, :values => values) { previous }
15
- end
16
- when Sass::Engine
17
- with_no_warnings do
18
- template.to_css
19
- end
20
- when String
21
- ERB.new(template).result(get_binding(values){ previous })
22
- when nil
23
- previous
24
- else
25
- raise "don't know how to handle a template of class '#{template.class.name}'"
12
+ when Haml::Engine
13
+ silence_warnings do
14
+ template.to_html(get_binding, :values => values) { previous }
26
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
27
25
  end
28
26
 
29
27
  io.write result
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mislav-hanna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Mislav Marohni\xC4\x87"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
- date: 2008-09-18 21:00:00 -07:00
11
+ date: 2008-09-21 21:00:00 -07:00
12
12
  default_executable:
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
@@ -31,6 +31,16 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: "2.0"
33
33
  version:
34
+ - !ruby/object:Gem::Dependency
35
+ name: rake
36
+ type: :runtime
37
+ version_requirement:
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ~>
41
+ - !ruby/object:Gem::Version
42
+ version: 0.8.2
43
+ version:
34
44
  - !ruby/object:Gem::Dependency
35
45
  name: echoe
36
46
  type: :development
@@ -49,41 +59,41 @@ extensions: []
49
59
 
50
60
  extra_rdoc_files:
51
61
  - bin/hanna
52
- - README.markdown
53
- - lib/hanna/template_page_patch.rb
62
+ - lib/hanna/hanna.rb
54
63
  - lib/hanna/rdoc_version.rb
55
- - lib/hanna/template_helpers.rb
56
- - lib/hanna/template_files/method_list.haml
57
- - lib/hanna/template_files/styles.sass
64
+ - lib/hanna/rdoctask.rb
58
65
  - lib/hanna/template_files/class_index.haml
59
- - lib/hanna/template_files/layout.haml
66
+ - lib/hanna/template_files/file_index.haml
60
67
  - lib/hanna/template_files/index.haml
68
+ - lib/hanna/template_files/layout.haml
69
+ - lib/hanna/template_files/method_list.haml
61
70
  - lib/hanna/template_files/page.haml
62
71
  - lib/hanna/template_files/sections.haml
63
- - lib/hanna/template_files/file_index.haml
64
- - lib/hanna/rdoctask.rb
65
- - lib/hanna/hanna.rb
72
+ - lib/hanna/template_files/styles.sass
73
+ - lib/hanna/template_helpers.rb
74
+ - lib/hanna/template_page_patch.rb
66
75
  - lib/hanna.rb
76
+ - README.markdown
67
77
  files:
68
- - hanna.gemspec
69
78
  - bin/hanna
70
- - README.markdown
71
- - Manifest
72
- - lib/hanna/template_page_patch.rb
79
+ - hanna.gemspec
80
+ - lib/hanna/hanna.rb
73
81
  - lib/hanna/rdoc_version.rb
74
- - lib/hanna/template_helpers.rb
75
- - lib/hanna/template_files/method_list.haml
76
- - lib/hanna/template_files/styles.sass
82
+ - lib/hanna/rdoctask.rb
77
83
  - lib/hanna/template_files/class_index.haml
78
- - lib/hanna/template_files/layout.haml
84
+ - lib/hanna/template_files/file_index.haml
79
85
  - lib/hanna/template_files/index.haml
86
+ - lib/hanna/template_files/layout.haml
87
+ - lib/hanna/template_files/method_list.haml
80
88
  - lib/hanna/template_files/page.haml
81
89
  - lib/hanna/template_files/sections.haml
82
- - lib/hanna/template_files/file_index.haml
83
- - lib/hanna/rdoctask.rb
84
- - lib/hanna/hanna.rb
90
+ - lib/hanna/template_files/styles.sass
91
+ - lib/hanna/template_helpers.rb
92
+ - lib/hanna/template_page_patch.rb
85
93
  - lib/hanna.rb
94
+ - Manifest
86
95
  - Rakefile
96
+ - README.markdown
87
97
  has_rdoc: false
88
98
  homepage: http://github.com/mislav/hanna
89
99
  post_install_message: