github-markup 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37119f750db66a695879748bc56748aa31e54ad7
4
- data.tar.gz: 2bfd5d36c6933e9de2d9320cdda49735f44f0fd5
3
+ metadata.gz: c4c0ef742a30505af2fe74fdd3840e142e661d0f
4
+ data.tar.gz: 6dfd99c01002dd9f2fd979b941489ad5075cbba6
5
5
  SHA512:
6
- metadata.gz: 5ca4a0185167529c03823d514b3c47a2d184e9fcc7461fc6746267a705312a215a4ec8c14f698f8092c20e1c0bd7e8fce56cc7f9919564ff7b85a0bed4c35f8c
7
- data.tar.gz: 02272c864ef5e2df2359dcc84319e9da6afebf24b60eb8b29e700b935da0de58a885299acfa897ec4b9415676479b56b9c867775ae4a6b81965a7060d403a3ee
6
+ metadata.gz: 259e3c497d07b68b63cb4a3841a04079e2ee319d6bfa434f1384a617c912d66ef81803c61255953c4071af17b9d659db80c2cb1df70e394f0dd7e0cf5364f900
7
+ data.tar.gz: bda40a4f1d7116fefa6b644422bcd3fc5a5c7b6bca19e80df245f9e308d88f54643112080efc8d71f08303d08d7474f8c6723c204d97275075ca0ab20a901009
data/Gemfile CHANGED
@@ -2,9 +2,9 @@ source "http://rubygems.org"
2
2
  gem "redcarpet"
3
3
  gem "RedCloth"
4
4
  gem "rdoc", "~>3.6"
5
- gem "org-ruby", ">= 0.7.0"
5
+ gem "org-ruby", ">= 0.8.1"
6
6
  gem "creole", "~>0.3.6"
7
7
  gem "wikicloth", "=0.6.0"
8
8
  gem "literati", "= 0.0.3"
9
- gem "asciidoctor", ">= 0.0.9"
9
+ gem "asciidoctor", "= 0.1.4"
10
10
  gem "rake"
data/README.md CHANGED
@@ -17,7 +17,7 @@ you wish to run the library. You can also run `script/bootstrap` to fetch them a
17
17
  * [.creole](http://wikicreole.org/) -- `gem install creole`
18
18
  * [.mediawiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `gem install wikicloth`
19
19
  * [.rst](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
20
- * [.asciidoc, .adoc, .asc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc`
20
+ * [.asciidoc, .adoc, .asc](http://asciidoc.org/) -- `gem install asciidoctor` (http://asciidoctor.org)
21
21
  * [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML`
22
22
  comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
23
23
 
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  ## the sub! line in the Rakefile
17
17
  s.name = 'github-markup'
18
18
  s.version = GitHub::Markup::VERSION
19
- s.date = '2013-12-04'
19
+ s.date = '2014-01-28'
20
20
  s.executables = ['github-markup']
21
21
 
22
22
  ## Make sure your summary is short. The description may be as long
@@ -1,6 +1,6 @@
1
1
  module GitHub
2
2
  module Markup
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  Version = VERSION
5
5
  end
6
6
  end
@@ -1,10 +1,29 @@
1
1
  #!/usr/bin/env python
2
+ """
3
+ rest2html - A small wrapper file for parsing ReST files at GitHub.
2
4
 
3
- """A small wrapper file for parsing ReST files at GitHub."""
5
+ Written in 2008 by Jannis Leidel <jannis@leidel.info>
6
+
7
+ Brandon Keepers <bkeepers@github.com>
8
+ Bryan Veloso <bryan@revyver.com>
9
+ Chris Wanstrath <chris@ozmm.org>
10
+ Dave Abrahams <dave@boostpro.com>
11
+ Gasper Zejn <zejn@kiberpipa.org>
12
+ Michael Jones <m.pricejones@gmail.com>
13
+ Sam Whited <sam@samwhited.com>
14
+ Tyler Chung <zonyitoo@gmail.com>
15
+ Vicent Marti <tanoku@gmail.com>
16
+
17
+ To the extent possible under law, the author(s) have dedicated all copyright
18
+ and related and neighboring rights to this software to the public domain
19
+ worldwide. This software is distributed without any warranty.
20
+
21
+ You should have received a copy of the CC0 Public Domain Dedication along with
22
+ this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
23
+ """
4
24
 
5
25
  __author__ = "Jannis Leidel"
6
- __copyright__ = "Copyright (C) 2008 Jannis Leidel"
7
- __license__ = "Public Domain"
26
+ __license__ = "CC0"
8
27
  __version__ = "0.1"
9
28
 
10
29
  try:
@@ -9,7 +9,11 @@ module GitHub
9
9
  end
10
10
 
11
11
  def to_html
12
- h = ::RDoc::Markup::ToHtml.new
12
+ if ::RDoc::VERSION.to_i >= 4
13
+ h = ::RDoc::Markup::ToHtml.new(::RDoc::Options.new)
14
+ else
15
+ h = ::RDoc::Markup::ToHtml.new
16
+ end
13
17
  h.convert(@content)
14
18
  end
15
19
  end
@@ -26,8 +26,8 @@ markup(:literati, /lhs/) do |content|
26
26
  Literati.render(content)
27
27
  end
28
28
 
29
- markup(:asciidoctor, /asc|adoc|asciidoc/) do |content|
30
- Asciidoctor::Document.new(content).render
29
+ markup(:asciidoctor, /adoc|asc(iidoc)?/) do |content|
30
+ Asciidoctor.render(content, :safe => :secure, :attributes => %w(showtitle idprefix idseparator=- env=github env-github source-highlighter=html-pipeline))
31
31
  end
32
32
 
33
33
  command(:rest2html, /re?st(\.txt)?/)
@@ -6,4 +6,3 @@ cd $(dirname "$0")/..
6
6
 
7
7
  bundle install
8
8
  easy_install docutils
9
- brew install asciidoc
@@ -1,2 +1,14 @@
1
+ = Document Title
2
+
3
+ == First Section
4
+
1
5
  * One
2
6
  * Two
7
+
8
+ == Second Section
9
+
10
+ NOTE: Here is some source code.
11
+
12
+ ```ruby
13
+ puts "Hello, World!"
14
+ ```
@@ -1,3 +1,7 @@
1
+ <h1>Document Title</h1>
2
+ <div class="sect1">
3
+ <h2 id="first-section">First Section</h2>
4
+ <div class="sectionbody">
1
5
  <div class="ulist">
2
6
  <ul>
3
7
  <li>
@@ -8,3 +12,28 @@
8
12
  </li>
9
13
  </ul>
10
14
  </div>
15
+ </div>
16
+ </div>
17
+ <div class="sect1">
18
+ <h2 id="second-section">Second Section</h2>
19
+ <div class="sectionbody">
20
+ <div class="admonitionblock note">
21
+ <table>
22
+ <tr>
23
+ <td class="icon">
24
+ <div class="title">Note</div>
25
+ </td>
26
+ <td class="content">
27
+ Here is some source code.
28
+ </td>
29
+ </tr>
30
+ </table>
31
+ </div>
32
+ <div class="listingblock">
33
+ <div class="content">
34
+ <pre lang="ruby"><code>puts "Hello, World!"</code></pre>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-04 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  This gem is used by GitHub to render any fancy markup such as
@@ -93,4 +93,3 @@ signing_key:
93
93
  specification_version: 2
94
94
  summary: The code GitHub uses to render README.markup
95
95
  test_files: []
96
- has_rdoc: