mislav-hanna 0.1.8 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +30 -16
- data/bin/hanna +1 -1
- data/lib/hanna/rdoctask.rb +1 -1
- data/lib/hanna/version.rb +19 -0
- data/lib/rubygems_plugin.rb +22 -0
- metadata +10 -34
- data/Manifest +0 -22
- data/hanna.gemspec +0 -40
- data/lib/hanna/rdoc_version.rb +0 -21
data/Rakefile
CHANGED
@@ -1,20 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
Echoe.new('hanna') do |p|
|
5
|
-
p.version = '0.1.8'
|
1
|
+
desc "generates .gemspec file"
|
2
|
+
task :gemspec do
|
3
|
+
require 'lib/hanna/version'
|
6
4
|
|
7
|
-
|
8
|
-
|
5
|
+
spec = Gem::Specification.new do |gem|
|
6
|
+
gem.name = 'hanna'
|
7
|
+
gem.version = Hanna::VERSION
|
8
|
+
|
9
|
+
gem.summary = "An RDoc template that scales"
|
10
|
+
gem.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."
|
11
|
+
|
12
|
+
gem.add_dependency 'rdoc', Hanna::RDOC_VERSION_REQUIREMENT
|
13
|
+
gem.add_dependency 'haml', '~> 2.0.4'
|
14
|
+
gem.add_dependency 'rake', '~> 0.8.2'
|
15
|
+
|
16
|
+
gem.email = 'mislav.marohnic@gmail.com'
|
17
|
+
gem.homepage = 'http://github.com/mislav/' + gem.name
|
18
|
+
gem.authors = ['Mislav Marohnić']
|
19
|
+
gem.has_rdoc = false
|
20
|
+
|
21
|
+
gem.files = FileList['Rakefile', '{bin,lib,rails,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files`.split("\n")
|
22
|
+
gem.executables = Dir['bin/*'].map { |f| File.basename(f) }
|
23
|
+
end
|
9
24
|
|
10
|
-
|
11
|
-
p.email = 'mislav.marohnic@gmail.com'
|
12
|
-
p.url = 'http://github.com/mislav/hanna'
|
25
|
+
spec_string = spec.to_ruby
|
13
26
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
27
|
+
begin
|
28
|
+
Thread.new { eval("$SAFE = 3\n#{spec_string}", binding) }.join
|
29
|
+
rescue
|
30
|
+
abort "unsafe gemspec: #{$!}"
|
31
|
+
else
|
32
|
+
File.open("#{spec.name}.gemspec", 'w') { |file| file.write spec_string }
|
33
|
+
end
|
20
34
|
end
|
data/bin/hanna
CHANGED
data/lib/hanna/rdoctask.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Hanna
|
2
|
+
|
3
|
+
VERSION = '0.1.10'
|
4
|
+
|
5
|
+
# The version of RDoc that Hanna should use
|
6
|
+
RDOC_VERSION = '2.3.0'
|
7
|
+
RDOC_VERSION_REQUIREMENT = "~> #{RDOC_VERSION}"
|
8
|
+
|
9
|
+
# Load the correct version of RDoc
|
10
|
+
def self.require_rdoc(terminate = true)
|
11
|
+
begin
|
12
|
+
gem 'rdoc', RDOC_VERSION_REQUIREMENT
|
13
|
+
rescue Gem::LoadError
|
14
|
+
$stderr.puts "Hanna requires the RDoc #{RDOC_VERSION} gem"
|
15
|
+
exit 1 if terminate
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
unless defined?(Hanna) or defined?(RDoc)
|
2
|
+
require 'rubygems/doc_manager'
|
3
|
+
require 'rubygems/requirement'
|
4
|
+
require 'hanna/version'
|
5
|
+
|
6
|
+
class << Gem::DocManager
|
7
|
+
alias load_rdoc_without_version_constraint load_rdoc
|
8
|
+
|
9
|
+
# overwrite load_rdoc to load the exact version of RDoc that Hanna works with
|
10
|
+
def load_rdoc
|
11
|
+
Hanna::require_rdoc(false) # don't terminate if failed
|
12
|
+
|
13
|
+
# call the original method
|
14
|
+
load_rdoc_without_version_constraint
|
15
|
+
requirement = Gem::Requirement.create Hanna::RDOC_VERSION_REQUIREMENT
|
16
|
+
|
17
|
+
unless requirement.satisfied_by? rdoc_version
|
18
|
+
raise Gem::DocumentError, "ERROR: RDoc version #{requirement} not installed"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
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.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Mislav Marohni\xC4\x87"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-17 00:00:00 -07:00
|
13
13
|
default_executable: hanna
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -48,31 +48,12 @@ executables:
|
|
48
48
|
- hanna
|
49
49
|
extensions: []
|
50
50
|
|
51
|
-
extra_rdoc_files:
|
52
|
-
|
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/method_search.js
|
63
|
-
- lib/hanna/template_files/page.haml
|
64
|
-
- lib/hanna/template_files/prototype-1.6.0.3.js
|
65
|
-
- lib/hanna/template_files/sections.haml
|
66
|
-
- lib/hanna/template_files/styles.sass
|
67
|
-
- lib/hanna/template_helpers.rb
|
68
|
-
- lib/hanna/template_page_patch.rb
|
69
|
-
- lib/hanna.rb
|
70
|
-
- README.markdown
|
51
|
+
extra_rdoc_files: []
|
52
|
+
|
71
53
|
files:
|
54
|
+
- Rakefile
|
72
55
|
- bin/hanna
|
73
|
-
- hanna.gemspec
|
74
56
|
- lib/hanna/hanna.rb
|
75
|
-
- lib/hanna/rdoc_version.rb
|
76
57
|
- lib/hanna/rdoctask.rb
|
77
58
|
- lib/hanna/template_files/class_index.haml
|
78
59
|
- lib/hanna/template_files/file_index.haml
|
@@ -87,21 +68,16 @@ files:
|
|
87
68
|
- lib/hanna/template_files/styles.sass
|
88
69
|
- lib/hanna/template_helpers.rb
|
89
70
|
- lib/hanna/template_page_patch.rb
|
71
|
+
- lib/hanna/version.rb
|
90
72
|
- lib/hanna.rb
|
91
|
-
-
|
92
|
-
- Rakefile
|
73
|
+
- lib/rubygems_plugin.rb
|
93
74
|
- README.markdown
|
94
75
|
has_rdoc: false
|
95
76
|
homepage: http://github.com/mislav/hanna
|
96
77
|
licenses:
|
97
78
|
post_install_message:
|
98
|
-
rdoc_options:
|
99
|
-
|
100
|
-
- --inline-source
|
101
|
-
- --title
|
102
|
-
- Hanna
|
103
|
-
- --main
|
104
|
-
- README.markdown
|
79
|
+
rdoc_options: []
|
80
|
+
|
105
81
|
require_paths:
|
106
82
|
- lib
|
107
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -114,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
90
|
requirements:
|
115
91
|
- - ">="
|
116
92
|
- !ruby/object:Gem::Version
|
117
|
-
version: "
|
93
|
+
version: "0"
|
118
94
|
version:
|
119
95
|
requirements: []
|
120
96
|
|
data/Manifest
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
bin/hanna
|
2
|
-
hanna.gemspec
|
3
|
-
lib/hanna/hanna.rb
|
4
|
-
lib/hanna/rdoc_version.rb
|
5
|
-
lib/hanna/rdoctask.rb
|
6
|
-
lib/hanna/template_files/class_index.haml
|
7
|
-
lib/hanna/template_files/file_index.haml
|
8
|
-
lib/hanna/template_files/index.haml
|
9
|
-
lib/hanna/template_files/layout.haml
|
10
|
-
lib/hanna/template_files/method_index.haml
|
11
|
-
lib/hanna/template_files/method_list.haml
|
12
|
-
lib/hanna/template_files/method_search.js
|
13
|
-
lib/hanna/template_files/page.haml
|
14
|
-
lib/hanna/template_files/prototype-1.6.0.3.js
|
15
|
-
lib/hanna/template_files/sections.haml
|
16
|
-
lib/hanna/template_files/styles.sass
|
17
|
-
lib/hanna/template_helpers.rb
|
18
|
-
lib/hanna/template_page_patch.rb
|
19
|
-
lib/hanna.rb
|
20
|
-
Manifest
|
21
|
-
Rakefile
|
22
|
-
README.markdown
|
data/hanna.gemspec
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{hanna}
|
5
|
-
s.version = "0.1.8"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Mislav Marohni\304\207"]
|
9
|
-
s.date = %q{2009-08-21}
|
10
|
-
s.default_executable = %q{hanna}
|
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
|
-
s.email = %q{mislav.marohnic@gmail.com}
|
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/method_search.js", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/hanna.rb", "README.markdown"]
|
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/method_search.js", "lib/hanna/template_files/page.haml", "lib/hanna/template_files/prototype-1.6.0.3.js", "lib/hanna/template_files/sections.haml", "lib/hanna/template_files/styles.sass", "lib/hanna/template_helpers.rb", "lib/hanna/template_page_patch.rb", "lib/hanna.rb", "Manifest", "Rakefile", "README.markdown"]
|
16
|
-
s.homepage = %q{http://github.com/mislav/hanna}
|
17
|
-
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Hanna", "--main", "README.markdown"]
|
18
|
-
s.require_paths = ["lib"]
|
19
|
-
s.rubygems_version = %q{1.3.5}
|
20
|
-
s.summary = %q{An RDoc template that scales}
|
21
|
-
|
22
|
-
if s.respond_to? :specification_version then
|
23
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
|
-
s.specification_version = 3
|
25
|
-
|
26
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_runtime_dependency(%q<rdoc>, ["~> 2.3.0"])
|
28
|
-
s.add_runtime_dependency(%q<haml>, ["~> 2.0.4"])
|
29
|
-
s.add_runtime_dependency(%q<rake>, ["~> 0.8.2"])
|
30
|
-
else
|
31
|
-
s.add_dependency(%q<rdoc>, ["~> 2.3.0"])
|
32
|
-
s.add_dependency(%q<haml>, ["~> 2.0.4"])
|
33
|
-
s.add_dependency(%q<rake>, ["~> 0.8.2"])
|
34
|
-
end
|
35
|
-
else
|
36
|
-
s.add_dependency(%q<rdoc>, ["~> 2.3.0"])
|
37
|
-
s.add_dependency(%q<haml>, ["~> 2.0.4"])
|
38
|
-
s.add_dependency(%q<rake>, ["~> 0.8.2"])
|
39
|
-
end
|
40
|
-
end
|
data/lib/hanna/rdoc_version.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module Hanna
|
2
|
-
#
|
3
|
-
# The version of RDoc that Hanna should use.
|
4
|
-
#
|
5
|
-
RDOC_VERSION = '2.3.0'
|
6
|
-
RDOC_VERSION_REQUIREMENT = "~> #{RDOC_VERSION}"
|
7
|
-
|
8
|
-
#
|
9
|
-
# This method loads the correct version of RDoc. If the correct
|
10
|
-
# version of RDoc is not present, this method will terminate the
|
11
|
-
# program with a helpful error message.
|
12
|
-
#
|
13
|
-
def self.require_rdoc
|
14
|
-
begin
|
15
|
-
gem 'rdoc', RDOC_VERSION_REQUIREMENT
|
16
|
-
rescue Gem::LoadError
|
17
|
-
$stderr.puts "Error: hanna requires the RDoc #{RDOC_VERSION} gem!"
|
18
|
-
exit 1
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|