github-markup 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -11
- data/Rakefile +0 -37
- data/lib/github/commands/asciidocapi.pyc +0 -0
- data/lib/github/markup/version.rb +1 -1
- data/lib/github/markups.rb +4 -0
- data/test/markups/README.creole +34 -0
- data/test/markups/README.creole.html +16 -0
- metadata +21 -22
- data/.gitignore +0 -1
- data/.kick +0 -26
- data/HISTORY.md +0 -68
data/README.md
CHANGED
@@ -7,14 +7,19 @@ rich text file.
|
|
7
7
|
Markups
|
8
8
|
-------
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
* .
|
14
|
-
* .
|
15
|
-
* .
|
16
|
-
* .
|
17
|
-
* .
|
10
|
+
The following markups are supported. The dependencies listed are required if
|
11
|
+
you wish to run the library.
|
12
|
+
|
13
|
+
* [.markdown](http://daringfireball.net/projects/markdown/) -- `gem install rdiscount`
|
14
|
+
* [.textile](http://www.textism.com/tools/textile/) -- `gem install RedCloth`
|
15
|
+
* [.rdoc](http://rdoc.sourceforge.net/)
|
16
|
+
* [.org](http://orgmode.org/) -- `gem install org-ruby`
|
17
|
+
* [.creole](http://wikicreole.org/) -- `gem install creole`
|
18
|
+
* [.rst](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
|
19
|
+
* [.asciidoc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc`
|
20
|
+
* [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML`
|
21
|
+
comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
|
22
|
+
* .1 - Requires [`groff`](http://www.gnu.org/software/groff/)
|
18
23
|
|
19
24
|
|
20
25
|
Contributing
|
@@ -110,6 +115,6 @@ Contributing
|
|
110
115
|
6. Enjoy a refreshing Diet Coke and wait
|
111
116
|
|
112
117
|
|
113
|
-
[r2h]: http://github.com/
|
114
|
-
[r2hc]: http://github.com/
|
115
|
-
[1]: http://github.com/
|
118
|
+
[r2h]: http://github.com/github/markup/tree/master/lib/github/commands/rest2html
|
119
|
+
[r2hc]: http://github.com/github/markup/tree/master/lib/github/markups.rb#L13
|
120
|
+
[1]: http://github.com/github/markup/issues
|
data/Rakefile
CHANGED
@@ -9,40 +9,3 @@ desc "Kick it"
|
|
9
9
|
task :kick do
|
10
10
|
exec "kicker -e rake test lib"
|
11
11
|
end
|
12
|
-
|
13
|
-
begin
|
14
|
-
require 'jeweler'
|
15
|
-
$LOAD_PATH.unshift 'lib'
|
16
|
-
require 'github/markup/version'
|
17
|
-
Jeweler::Tasks.new do |gemspec|
|
18
|
-
gemspec.name = "github-markup"
|
19
|
-
gemspec.summary = "The code we use to render README.your_favorite_markup"
|
20
|
-
gemspec.description = "The code we use to render README.your_favorite_markup"
|
21
|
-
gemspec.email = "chris@ozmm.org"
|
22
|
-
gemspec.homepage = "http://github.com/defunkt/github-markup"
|
23
|
-
gemspec.authors = ["Chris Wanstrath"]
|
24
|
-
gemspec.version = GitHub::Markup::Version
|
25
|
-
end
|
26
|
-
rescue LoadError
|
27
|
-
warn "Jeweler not available."
|
28
|
-
warn "Install it with: gem install jeweler"
|
29
|
-
end
|
30
|
-
|
31
|
-
begin
|
32
|
-
require 'sdoc_helpers'
|
33
|
-
rescue LoadError
|
34
|
-
warn "sdoc support not enabled. Please gem install sdoc-helpers."
|
35
|
-
end
|
36
|
-
|
37
|
-
desc "Build a gem"
|
38
|
-
task :gem => [ :gemspec, :build ]
|
39
|
-
|
40
|
-
desc "Push a new version to Gemcutter"
|
41
|
-
task :publish => [ :test, :gemspec, :build ] do
|
42
|
-
system "git tag v#{GitHub::Markup::Version}"
|
43
|
-
system "git push origin v#{GitHub::Markup::Version}"
|
44
|
-
system "git push origin master"
|
45
|
-
system "gem push pkg/github-markup-#{GitHub::Markup::Version}.gem"
|
46
|
-
system "git clean -fd"
|
47
|
-
#exec "rake pages"
|
48
|
-
end
|
Binary file
|
data/lib/github/markups.rb
CHANGED
@@ -14,6 +14,10 @@ markup('org-ruby', /org/) do |content|
|
|
14
14
|
Orgmode::Parser.new(content).to_html
|
15
15
|
end
|
16
16
|
|
17
|
+
markup(:creole, /creole/) do |content|
|
18
|
+
Creole.creolize(content)
|
19
|
+
end
|
20
|
+
|
17
21
|
command(:rest2html, /re?st(\.txt)?/)
|
18
22
|
|
19
23
|
command('asciidoc -s --backend=xhtml11 -o - -', /asciidoc/)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
= H1 =
|
2
|
+
|
3
|
+
== H2 ==
|
4
|
+
|
5
|
+
paragraph of text that will be turned into a paragraph element. It can
|
6
|
+
go over several lines with line breaks, it will be turned into a
|
7
|
+
contiguous paragraph element.
|
8
|
+
|
9
|
+
You can force a linebreak in your paragraph text\\thusly.
|
10
|
+
|
11
|
+
|
12
|
+
* a list element
|
13
|
+
** sub list element
|
14
|
+
* 2nd list element
|
15
|
+
|
16
|
+
{{{
|
17
|
+
pre formatted text
|
18
|
+
|
19
|
+
$ ls -la
|
20
|
+
total 56
|
21
|
+
drwxr-xr-x 6 nferrier users 4096 Jul 5 23:10 .
|
22
|
+
drwxr-x--- 120 nferrier users 12288 Jul 5 19:36 ..
|
23
|
+
drwxr-xr-x 2 nferrier users 4096 Jul 5 18:19 bin
|
24
|
+
-rw-r--r-- 1 nferrier users 6 Jul 5 18:19 .gitignore
|
25
|
+
drwxr-xr-x 4 nferrier users 4096 Jul 5 23:10 .hg
|
26
|
+
-rw-r--r-- 1 nferrier users 1182 Jul 5 18:19 HISTORY.md
|
27
|
+
-rw-r--r-- 1 nferrier users 562 Jul 5 18:19 .kick
|
28
|
+
drwxr-xr-x 3 nferrier users 4096 Jul 5 18:19 lib
|
29
|
+
-rw-r--r-- 1 nferrier users 1050 Jul 5 18:19 LICENSE
|
30
|
+
-rw-r--r-- 1 nferrier users 1312 Jul 5 18:19 Rakefile
|
31
|
+
-rw-r--r-- 1 nferrier users 3390 Jul 5 18:19 README.md
|
32
|
+
drwxr-xr-x 3 nferrier users 4096 Jul 5 18:19 test
|
33
|
+
}}}
|
34
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h1>H1</h1><h2>H2</h2><p>paragraph of text that will be turned into a paragraph element. It can go over several lines with line breaks, it will be turned into a contiguous paragraph element.</p><p>You can force a linebreak in your paragraph text<br/>thusly.</p><ul><li>a list element<ul><li>sub list element</li></ul></li><li>2nd list element</li></ul><pre>pre formatted text
|
2
|
+
|
3
|
+
$ ls -la
|
4
|
+
total 56
|
5
|
+
drwxr-xr-x 6 nferrier users 4096 Jul 5 23:10 .
|
6
|
+
drwxr-x--- 120 nferrier users 12288 Jul 5 19:36 ..
|
7
|
+
drwxr-xr-x 2 nferrier users 4096 Jul 5 18:19 bin
|
8
|
+
-rw-r--r-- 1 nferrier users 6 Jul 5 18:19 .gitignore
|
9
|
+
drwxr-xr-x 4 nferrier users 4096 Jul 5 23:10 .hg
|
10
|
+
-rw-r--r-- 1 nferrier users 1182 Jul 5 18:19 HISTORY.md
|
11
|
+
-rw-r--r-- 1 nferrier users 562 Jul 5 18:19 .kick
|
12
|
+
drwxr-xr-x 3 nferrier users 4096 Jul 5 18:19 lib
|
13
|
+
-rw-r--r-- 1 nferrier users 1050 Jul 5 18:19 LICENSE
|
14
|
+
-rw-r--r-- 1 nferrier users 1312 Jul 5 18:19 Rakefile
|
15
|
+
-rw-r--r-- 1 nferrier users 3390 Jul 5 18:19 README.md
|
16
|
+
drwxr-xr-x 3 nferrier users 4096 Jul 5 18:19 test</pre>
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 5
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.5.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Chris Wanstrath
|
@@ -14,37 +14,36 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
18
|
-
default_executable:
|
17
|
+
date: 2010-07-07 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
21
|
-
description:
|
21
|
+
description: " This gem is used by GitHub to render any fancy markup such as\n Markdown, Textile, Org-Mode, etc. Fork it and add your own!\n"
|
22
22
|
email: chris@ozmm.org
|
23
|
-
executables:
|
24
|
-
|
23
|
+
executables: []
|
24
|
+
|
25
25
|
extensions: []
|
26
26
|
|
27
|
-
extra_rdoc_files:
|
28
|
-
|
29
|
-
- README.md
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
30
29
|
files:
|
31
|
-
- .gitignore
|
32
|
-
- .kick
|
33
|
-
- HISTORY.md
|
34
|
-
- LICENSE
|
35
30
|
- README.md
|
36
31
|
- Rakefile
|
37
|
-
-
|
32
|
+
- LICENSE
|
38
33
|
- lib/github/commands/asciidoc2html
|
39
34
|
- lib/github/commands/asciidocapi.py
|
35
|
+
- lib/github/commands/asciidocapi.pyc
|
40
36
|
- lib/github/commands/rest2html
|
41
|
-
- lib/github/markup.rb
|
42
37
|
- lib/github/markup/rdoc.rb
|
43
38
|
- lib/github/markup/version.rb
|
39
|
+
- lib/github/markup.rb
|
44
40
|
- lib/github/markups.rb
|
41
|
+
- bin/github-markup
|
45
42
|
- test/markup_test.rb
|
46
43
|
- test/markups/README.asciidoc
|
47
44
|
- test/markups/README.asciidoc.html
|
45
|
+
- test/markups/README.creole
|
46
|
+
- test/markups/README.creole.html
|
48
47
|
- test/markups/README.markdown
|
49
48
|
- test/markups/README.markdown.html
|
50
49
|
- test/markups/README.noformat
|
@@ -64,12 +63,12 @@ files:
|
|
64
63
|
- test/markups/README.txt
|
65
64
|
- test/markups/README.txt.html
|
66
65
|
has_rdoc: true
|
67
|
-
homepage: http://github.com/
|
66
|
+
homepage: http://github.com/github/markup
|
68
67
|
licenses: []
|
69
68
|
|
70
69
|
post_install_message:
|
71
|
-
rdoc_options:
|
72
|
-
|
70
|
+
rdoc_options: []
|
71
|
+
|
73
72
|
require_paths:
|
74
73
|
- lib
|
75
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -92,6 +91,6 @@ rubyforge_project:
|
|
92
91
|
rubygems_version: 1.3.6
|
93
92
|
signing_key:
|
94
93
|
specification_version: 3
|
95
|
-
summary: The code
|
96
|
-
test_files:
|
97
|
-
|
94
|
+
summary: The code GitHub uses to render README.markup
|
95
|
+
test_files: []
|
96
|
+
|
data/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
*.pyc
|
data/.kick
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# take control of the growl notifications
|
2
|
-
module GrowlHacks
|
3
|
-
def growl(type, subject, body, *args, &block)
|
4
|
-
case type
|
5
|
-
when Kicker::GROWL_NOTIFICATIONS[:succeeded]
|
6
|
-
puts subject = "Success"
|
7
|
-
body = body.split("\n").last
|
8
|
-
when Kicker::GROWL_NOTIFICATIONS[:failed]
|
9
|
-
subject = "Failure"
|
10
|
-
puts body
|
11
|
-
body = body.split("\n").last
|
12
|
-
else
|
13
|
-
return nil
|
14
|
-
end
|
15
|
-
super(type, subject, body, *args, &block)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
Kicker.send :extend, GrowlHacks
|
20
|
-
|
21
|
-
# no logging
|
22
|
-
Kicker::Utils.module_eval do
|
23
|
-
def log(message)
|
24
|
-
nil
|
25
|
-
end
|
26
|
-
end
|
data/HISTORY.md
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
## 0.4.0 (2010-04-23)
|
2
|
-
|
3
|
-
* Removed man page support until it's ready.
|
4
|
-
|
5
|
-
## 0.3.3 (2010-03-29)
|
6
|
-
|
7
|
-
* UTF-8 works with ReST now.
|
8
|
-
|
9
|
-
## 0.3.2 (2010-03-25)
|
10
|
-
|
11
|
-
* Improved test runner
|
12
|
-
* Forgive ReST problems that aren't user errors.
|
13
|
-
|
14
|
-
## 0.3.1 (2010-03-22)
|
15
|
-
|
16
|
-
* Add .rst.txt extension
|
17
|
-
* Fix ASCII encoding error while using print u'\u010c' non-ASCII char and similar.
|
18
|
-
|
19
|
-
## 0.3.0 (2010-03-11)
|
20
|
-
|
21
|
-
* man rendering
|
22
|
-
* `github-markup` command line runner
|
23
|
-
|
24
|
-
## 0.2.2 (2010-02-09)
|
25
|
-
|
26
|
-
* pod fixes from Ricardo Signes
|
27
|
-
|
28
|
-
## 0.2.1 (2010-01-25)
|
29
|
-
|
30
|
-
* ReST fixes from Michael Jones
|
31
|
-
|
32
|
-
## 0.2.0 (2010-01-10)
|
33
|
-
|
34
|
-
* org-mode support
|
35
|
-
|
36
|
-
## 0.1.7 (2009-11-17)
|
37
|
-
|
38
|
-
* Ditch asciidoc2html, call asciidoc directly
|
39
|
-
|
40
|
-
## 0.1.6 (2009-11-17)
|
41
|
-
|
42
|
-
* mdown
|
43
|
-
|
44
|
-
## 0.1.5 (2009-11-17)
|
45
|
-
|
46
|
-
* Actually, if we can't render a thing then don't. Not once, not never.
|
47
|
-
|
48
|
-
## 0.1.4 (2009-11-17)
|
49
|
-
|
50
|
-
* Bugfix: Missing commands return the input (instead of nothing)
|
51
|
-
|
52
|
-
## 0.1.3 (2009-11-02)
|
53
|
-
|
54
|
-
* Strip the INDEX comments from POD
|
55
|
-
|
56
|
-
## 0.1.2 (2009-11-02)
|
57
|
-
|
58
|
-
* Renamed to `github-markup`
|
59
|
-
* Bugfix: POD rendering works now, not just index
|
60
|
-
|
61
|
-
## 0.1.1 (2009-11-02)
|
62
|
-
|
63
|
-
* Added `GitHub::Markup.can_render?` helper.
|
64
|
-
* Bugfix: Actually check file extensions
|
65
|
-
|
66
|
-
## 0.1.0 (2009-11-02)
|
67
|
-
|
68
|
-
* First release
|