github-markup 0.3.1 → 0.3.2
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.
- data/HISTORY.md +6 -1
- data/README.md +20 -5
- data/lib/github/commands/rest2html +1 -0
- data/lib/github/markup/version.rb +1 -1
- data/test/markup_test.rb +17 -6
- metadata +2 -2
data/HISTORY.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
## 0.3.2 (2010-03-25)
|
2
|
+
|
3
|
+
* Improved test runner
|
4
|
+
* Forgive ReST problems that aren't user errors.
|
5
|
+
|
1
6
|
## 0.3.1 (2010-03-22)
|
2
7
|
|
3
|
-
* Add .rst.txt extension
|
8
|
+
* Add .rst.txt extension
|
4
9
|
* Fix ASCII encoding error while using print u'\u010c' non-ASCII char and similar.
|
5
10
|
|
6
11
|
## 0.3.0 (2010-03-11)
|
data/README.md
CHANGED
@@ -4,6 +4,22 @@ GitHub Markup
|
|
4
4
|
We use this library on GitHub when rendering your README or any other
|
5
5
|
rich text file.
|
6
6
|
|
7
|
+
Markups
|
8
|
+
-------
|
9
|
+
|
10
|
+
* .markdown - `gem install markdown`
|
11
|
+
* .textile - `gem install RedCloth`
|
12
|
+
* .rdoc
|
13
|
+
* .org - `gem install org-mode`
|
14
|
+
* .rst - `easy_install docutils`
|
15
|
+
* .asciidoc - `brew install asciidoc`
|
16
|
+
* .pod - `Pod::Simple::HTML` should come with Perl
|
17
|
+
* .1 - Requires `groff`
|
18
|
+
|
19
|
+
|
20
|
+
Contributing
|
21
|
+
------------
|
22
|
+
|
7
23
|
Want to contribute? Great! There are two ways to add markups.
|
8
24
|
|
9
25
|
|
@@ -58,7 +74,6 @@ Installation
|
|
58
74
|
-----------
|
59
75
|
|
60
76
|
gem install github-markup
|
61
|
-
gem install org-ruby
|
62
77
|
|
63
78
|
|
64
79
|
Usage
|
@@ -80,7 +95,7 @@ To run the tests:
|
|
80
95
|
|
81
96
|
$ rake
|
82
97
|
|
83
|
-
To add tests see the `Commands` section earlier in this
|
98
|
+
To add tests see the `Commands` section earlier in this
|
84
99
|
README.
|
85
100
|
|
86
101
|
|
@@ -88,9 +103,9 @@ Contributing
|
|
88
103
|
------------
|
89
104
|
|
90
105
|
1. Fork it.
|
91
|
-
2. Create a branch
|
92
|
-
3. Commit your changes
|
93
|
-
4. Push to the branch
|
106
|
+
2. Create a branch (`git checkout -b my_markup`)
|
107
|
+
3. Commit your changes (`git commit -am "Added Snarkdown"`)
|
108
|
+
4. Push to the branch (`git push origin my_markup`)
|
94
109
|
5. Create an [Issue][1] with a link to your branch
|
95
110
|
6. Enjoy a refreshing Diet Coke and wait
|
96
111
|
|
data/test/markup_test.rb
CHANGED
@@ -9,14 +9,25 @@ class MarkupTest < Test::Unit::TestCase
|
|
9
9
|
markup = readme.split('/').last.gsub(/^README\./, '')
|
10
10
|
|
11
11
|
define_method "test_#{markup}" do
|
12
|
-
|
12
|
+
source = File.read(readme)
|
13
|
+
|
14
|
+
expected_file = "#{readme}.html"
|
15
|
+
expected = File.read(expected_file)
|
13
16
|
actual = GitHub::Markup.render(readme, File.read(readme))
|
14
17
|
|
15
|
-
|
16
|
-
#{markup}
|
17
|
-
|
18
|
-
|
19
|
-
#{
|
18
|
+
if source != expected
|
19
|
+
assert(source != actual, "#{markup} did not render anything")
|
20
|
+
end
|
21
|
+
|
22
|
+
diff = IO.popen("diff -u - #{expected_file}", 'r+') do |f|
|
23
|
+
f.write actual
|
24
|
+
f.close_write
|
25
|
+
f.read
|
26
|
+
end
|
27
|
+
|
28
|
+
assert expected == actual, <<message
|
29
|
+
#{File.basename expected_file}'s contents don't match command output:
|
30
|
+
#{diff}
|
20
31
|
message
|
21
32
|
end
|
22
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-markup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-25 00:00:00 -07:00
|
13
13
|
default_executable: github-markup
|
14
14
|
dependencies: []
|
15
15
|
|