fnando-kitabu 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/kitabu.gemspec +16 -16
- data/lib/kitabu/base.rb +1 -1
- data/lib/kitabu/blackcloth.rb +17 -0
- metadata +7 -3
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ PKG_FILES = %w(Rakefile kitabu.gemspec README.markdown) + Dir["{bin,lib,template
|
|
4
4
|
|
5
5
|
spec = Gem::Specification.new do |s|
|
6
6
|
s.name = "kitabu"
|
7
|
-
s.version = "0.3.
|
7
|
+
s.version = "0.3.1"
|
8
8
|
s.summary = "A framework for creating e-books from Markdown/Textile text markup using Ruby."
|
9
9
|
s.authors = ["Nando Vieira"]
|
10
10
|
s.email = ["fnando.vieira@gmail.com"]
|
data/kitabu.gemspec
CHANGED
@@ -2,10 +2,22 @@
|
|
2
2
|
# RUN : 'rake gem:update_gemspec'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.authors = ["Nando Vieira"]
|
6
|
-
s.require_paths = ["lib"]
|
7
5
|
s.required_rubygems_version = ">= 0"
|
8
|
-
s.has_rdoc =
|
6
|
+
s.has_rdoc = true
|
7
|
+
s.email = ["fnando.vieira@gmail.com"]
|
8
|
+
s.name = "kitabu"
|
9
|
+
s.homepage = "http://github.com/fnando/kitabu"
|
10
|
+
s.bindir = "bin"
|
11
|
+
s.executables = ["kitabu"]
|
12
|
+
s.summary = "A framework for creating e-books from Markdown/Textile text markup using Ruby."
|
13
|
+
s.requirements = ["Install the Oniguruma RE library and ultraviolet gem to get Syntax Highlighting (only for TextMate users)"]
|
14
|
+
s.description = "A framework for creating e-books from Markdown/Textile text markup using Ruby. Using the Prince PDF generator, you'll be able to get high quality PDFs. Mac users that have Textmate installed can have source code highlighted with his favorite theme."
|
15
|
+
s.add_dependency "discount", ">= 0"
|
16
|
+
s.add_dependency "hpricot", ">= 0"
|
17
|
+
s.add_dependency "unicode", ">= 0"
|
18
|
+
s.add_dependency "main", ">= 0"
|
19
|
+
s.version = "0.3.1"
|
20
|
+
s.require_paths = ["lib"]
|
9
21
|
s.files = ["Rakefile",
|
10
22
|
"kitabu.gemspec",
|
11
23
|
"README.markdown",
|
@@ -36,17 +48,5 @@ Gem::Specification.new do |s|
|
|
36
48
|
"templates/themes/slush_poppies.css",
|
37
49
|
"templates/themes/sunburst.css",
|
38
50
|
"templates/user.css"]
|
39
|
-
s.
|
40
|
-
s.version = "0.3.0"
|
41
|
-
s.homepage = "http://github.com/fnando/kitabu"
|
42
|
-
s.requirements = ["Install the Oniguruma RE library and ultraviolet gem to get Syntax Highlighting (only for TextMate users)"]
|
43
|
-
s.name = "kitabu"
|
44
|
-
s.summary = "A framework for creating e-books from Markdown/Textile text markup using Ruby."
|
45
|
-
s.executables = ["kitabu"]
|
46
|
-
s.description = "A framework for creating e-books from Markdown/Textile text markup using Ruby. Using the Prince PDF generator, you'll be able to get high quality PDFs. Mac users that have Textmate installed can have source code highlighted with his favorite theme."
|
47
|
-
s.add_dependency "discount", ">= 0"
|
48
|
-
s.add_dependency "hpricot", ">= 0"
|
49
|
-
s.add_dependency "unicode", ">= 0"
|
50
|
-
s.add_dependency "main", ">= 0"
|
51
|
-
s.bindir = "bin"
|
51
|
+
s.authors = ["Nando Vieira"]
|
52
52
|
end
|
data/lib/kitabu/base.rb
CHANGED
data/lib/kitabu/blackcloth.rb
CHANGED
@@ -30,6 +30,23 @@ class BlackCloth < RedCloth
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
# Usage:
|
34
|
+
# file. app/models/users.rb
|
35
|
+
#
|
36
|
+
# Remember to set `base_url` in your Kitabu configuration file
|
37
|
+
def textile_file(tag, attrs, cite, content)
|
38
|
+
base_url = Kitabu::Base.config["base_url"]
|
39
|
+
|
40
|
+
if base_url
|
41
|
+
url = File.join(base_url, content)
|
42
|
+
else
|
43
|
+
url = content
|
44
|
+
puts "\nYou're using `file. #{content}` but didn't set base_url in your configuration file.\n"
|
45
|
+
end
|
46
|
+
|
47
|
+
%(<p class="file"><span><strong>Download</strong> <a href="#{url}">#{content}</a></span></p>)
|
48
|
+
end
|
49
|
+
|
33
50
|
# Usage:
|
34
51
|
# syntax(ruby). Some code
|
35
52
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fnando-kitabu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
@@ -9,11 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-05-16 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: discount
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
@@ -23,6 +24,7 @@ dependencies:
|
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: hpricot
|
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: unicode
|
37
|
+
type: :runtime
|
35
38
|
version_requirement:
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
@@ -41,6 +44,7 @@ dependencies:
|
|
41
44
|
version:
|
42
45
|
- !ruby/object:Gem::Dependency
|
43
46
|
name: main
|
47
|
+
type: :runtime
|
44
48
|
version_requirement:
|
45
49
|
version_requirements: !ruby/object:Gem::Requirement
|
46
50
|
requirements:
|
@@ -88,7 +92,7 @@ files:
|
|
88
92
|
- templates/themes/slush_poppies.css
|
89
93
|
- templates/themes/sunburst.css
|
90
94
|
- templates/user.css
|
91
|
-
has_rdoc:
|
95
|
+
has_rdoc: true
|
92
96
|
homepage: http://github.com/fnando/kitabu
|
93
97
|
post_install_message:
|
94
98
|
rdoc_options: []
|