multi_markdown 0.1.0 → 0.2.0
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/ChangeLog.md +18 -9
- data/Gemfile +2 -0
- data/README.md +2 -0
- data/lib/multi_markdown/multi_markdown.rb +8 -2
- data/lib/multi_markdown/version.rb +1 -1
- data/spec/libraries/bluecloth_spec.rb +24 -0
- data/spec/libraries/maruku_spec.rb +24 -0
- data/spec/multi_markdown_spec.rb +2 -2
- metadata +88 -73
data/ChangeLog.md
CHANGED
@@ -1,13 +1,22 @@
|
|
1
|
+
### 0.2.0 / 2012-05-18
|
2
|
+
|
3
|
+
* Added support for:
|
4
|
+
* [BlueCloth][bluecloth]
|
5
|
+
* [Maruku][maruku]
|
6
|
+
* Use the same loading priority as [YARD](https://github.com/lsegal/yard/blob/master/lib/yard/templates/helpers/markup_helper.rb#L24-31)
|
7
|
+
|
1
8
|
### 0.1.0 / 2012-05-18
|
2
9
|
|
3
10
|
* Initial release:
|
4
11
|
* Supports:
|
5
|
-
* [kramdown]
|
6
|
-
* [rdiscount]
|
7
|
-
* [redcarpet]
|
8
|
-
* [rpeg_markdown]
|
9
|
-
|
10
|
-
[
|
11
|
-
[
|
12
|
-
[
|
13
|
-
[
|
12
|
+
* [Kramdown][kramdown]
|
13
|
+
* [RDiscount][rdiscount]
|
14
|
+
* [Redcarpet][redcarpet]
|
15
|
+
* [rpeg-markdown][rpeg_markdown]
|
16
|
+
|
17
|
+
[bluecloth]: http://deveiate.org/projects/BlueCloth
|
18
|
+
[kramdown]: http://kramdown.rubyforge.org/
|
19
|
+
[maruku]: http://maruku.rubyforge.org/
|
20
|
+
[rdiscount]: https://github.com/rtomayko/rdiscount#readme
|
21
|
+
[redcarpet]: https://github.com/tanoku/redcarpet#readme
|
22
|
+
[rpeg_markdown]: https://github.com/rtomayko/rpeg-markdown#readme
|
data/Gemfile
CHANGED
@@ -4,7 +4,9 @@ gemspec
|
|
4
4
|
|
5
5
|
gem 'rspec', '~> 2.4'
|
6
6
|
|
7
|
+
gem 'bluecloth', :require => nil, :group => [:bluecloth]
|
7
8
|
gem 'kramdown', :require => nil, :group => [:kramdown]
|
9
|
+
gem 'maruku', :require => nil, :group => [:maruku]
|
8
10
|
gem 'rdiscount', :require => nil, :group => [:rdiscount]
|
9
11
|
gem 'redcarpet', :require => nil, :group => [:redcarpet]
|
10
12
|
gem 'rpeg-markdown', :require => nil, :group => [:rpeg_markdown]
|
data/README.md
CHANGED
@@ -12,7 +12,9 @@ without having to depend on a specific one.
|
|
12
12
|
|
13
13
|
## Supported
|
14
14
|
|
15
|
+
* [bluecloth](http://deveiate.org/projects/BlueCloth)
|
15
16
|
* [kramdown](http://kramdown.rubyforge.org/)
|
17
|
+
* [maruku](http://maruku.rubyforge.org/)
|
16
18
|
* [rdiscount](https://github.com/rtomayko/rdiscount#readme)
|
17
19
|
* [redcarpet](https://github.com/tanoku/redcarpet#readme)
|
18
20
|
* [rpeg_markdown](https://github.com/rtomayko/rpeg-markdown#readme)
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module MultiMarkdown
|
2
2
|
# Markdown library names
|
3
3
|
LIBRARIES = {
|
4
|
+
:bluecloth => 'bluecloth',
|
4
5
|
:kramdown => 'kramdown',
|
6
|
+
:maruku => 'maruku',
|
5
7
|
:rdiscount => 'rdiscount',
|
6
8
|
:redcarpet => 'redcarpet',
|
7
9
|
:rpeg_markdown => 'peg_markdown'
|
@@ -9,7 +11,9 @@ module MultiMarkdown
|
|
9
11
|
|
10
12
|
# Markdown Constants
|
11
13
|
CONSTANTS = {
|
14
|
+
:bluecloth => 'BlueCloth',
|
12
15
|
:kramdown => 'Kramdown::Document',
|
16
|
+
:maruku => 'Maruku',
|
13
17
|
:rdiscount => 'RDiscount',
|
14
18
|
:redcarpet => 'RedcarpetCompat',
|
15
19
|
:rpeg_markdown => 'PEGMarkdown'
|
@@ -17,9 +21,11 @@ module MultiMarkdown
|
|
17
21
|
|
18
22
|
# The loading priority
|
19
23
|
PRIORITY = [
|
20
|
-
:kramdown,
|
21
|
-
:rdiscount,
|
22
24
|
:redcarpet,
|
25
|
+
:rdiscount,
|
26
|
+
:kramdown,
|
27
|
+
:bluecloth,
|
28
|
+
:maruku,
|
23
29
|
:rpeg_markdown
|
24
30
|
]
|
25
31
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MultiMarkdown do
|
4
|
+
context "with bluecloth" do
|
5
|
+
let(:library) { :bluecloth }
|
6
|
+
let(:constant) { 'BlueCloth' }
|
7
|
+
|
8
|
+
before { Bundler.setup(library) }
|
9
|
+
|
10
|
+
describe "find" do
|
11
|
+
before { require 'bluecloth' }
|
12
|
+
|
13
|
+
it "should find the BlueCloth" do
|
14
|
+
subject.find(library).name.should == constant
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "use" do
|
19
|
+
it "should load and find BlueCloth" do
|
20
|
+
subject.use(library).name.should == constant
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MultiMarkdown do
|
4
|
+
context "with maruku" do
|
5
|
+
let(:library) { :maruku }
|
6
|
+
let(:constant) { 'Maruku' }
|
7
|
+
|
8
|
+
before { Bundler.setup(library) }
|
9
|
+
|
10
|
+
describe "find" do
|
11
|
+
before { require 'maruku' }
|
12
|
+
|
13
|
+
it "should find the Maruku" do
|
14
|
+
subject.find(library).name.should == constant
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "use" do
|
19
|
+
it "should load and find Maruku" do
|
20
|
+
subject.use(library).name.should == constant
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/spec/multi_markdown_spec.rb
CHANGED
@@ -35,10 +35,10 @@ describe MultiMarkdown do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
describe "load" do
|
38
|
-
before { Bundler.setup(:
|
38
|
+
before { Bundler.setup(:rdiscount, :kramdown, :redcarpet) }
|
39
39
|
|
40
40
|
it "should load the first available library" do
|
41
|
-
subject.load.name.should ==
|
41
|
+
subject.load.name.should == subject::CONSTANTS[:redcarpet]
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,90 +1,93 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_markdown
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Postmodern
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0.2'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.2'
|
30
|
-
- !ruby/object:Gem::Dependency
|
17
|
+
|
18
|
+
date: 2012-05-19 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
31
21
|
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '2.4'
|
38
|
-
type: :development
|
39
22
|
prerelease: false
|
40
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
41
24
|
none: false
|
42
|
-
requirements:
|
25
|
+
requirements:
|
43
26
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 11
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 4
|
32
|
+
version: "2.4"
|
54
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: bundler
|
55
37
|
prerelease: false
|
56
|
-
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
57
39
|
none: false
|
58
|
-
requirements:
|
40
|
+
requirements:
|
59
41
|
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 15
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 0
|
47
|
+
version: "1.0"
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
63
51
|
name: yard
|
64
|
-
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
65
54
|
none: false
|
66
|
-
requirements:
|
55
|
+
requirements:
|
67
56
|
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 5
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
- 7
|
62
|
+
version: "0.7"
|
70
63
|
type: :development
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: rubygems-tasks
|
71
67
|
prerelease: false
|
72
|
-
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
69
|
none: false
|
74
|
-
requirements:
|
70
|
+
requirements:
|
75
71
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
79
|
-
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 15
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
- 2
|
77
|
+
version: "0.2"
|
78
|
+
type: :development
|
79
|
+
version_requirements: *id004
|
80
|
+
description: multi_markdown allows projects to use a wide variety of Markdown libraries, without having to depend on a specific one.
|
80
81
|
email: postmodern.mod3@gmail.com
|
81
82
|
executables: []
|
83
|
+
|
82
84
|
extensions: []
|
83
|
-
|
85
|
+
|
86
|
+
extra_rdoc_files:
|
84
87
|
- ChangeLog.md
|
85
88
|
- LICENSE.txt
|
86
89
|
- README.md
|
87
|
-
files:
|
90
|
+
files:
|
88
91
|
- .document
|
89
92
|
- .gitignore
|
90
93
|
- .rspec
|
@@ -99,39 +102,51 @@ files:
|
|
99
102
|
- lib/multi_markdown/multi_markdown.rb
|
100
103
|
- lib/multi_markdown/version.rb
|
101
104
|
- multi_markdown.gemspec
|
105
|
+
- spec/libraries/bluecloth_spec.rb
|
102
106
|
- spec/libraries/kramdown_spec.rb
|
107
|
+
- spec/libraries/maruku_spec.rb
|
103
108
|
- spec/libraries/rdiscount_spec.rb
|
104
109
|
- spec/libraries/redcarpet_spec.rb
|
105
110
|
- spec/libraries/rpeg_markdown_spec.rb
|
106
111
|
- spec/multi_markdown_spec.rb
|
107
112
|
- spec/spec_helper.rb
|
108
113
|
homepage: https://github.com/postmodern/multi_markdown#readme
|
109
|
-
licenses:
|
114
|
+
licenses:
|
110
115
|
- MIT
|
111
116
|
post_install_message:
|
112
117
|
rdoc_options: []
|
113
|
-
|
118
|
+
|
119
|
+
require_paths:
|
114
120
|
- lib
|
115
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
122
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
121
|
-
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
hash: 3
|
127
|
+
segments:
|
128
|
+
- 0
|
129
|
+
version: "0"
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
131
|
none: false
|
123
|
-
requirements:
|
124
|
-
- -
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
hash: 3
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
version: "0"
|
127
139
|
requirements: []
|
140
|
+
|
128
141
|
rubyforge_project:
|
129
|
-
rubygems_version: 1.8.
|
142
|
+
rubygems_version: 1.8.23
|
130
143
|
signing_key:
|
131
144
|
specification_version: 3
|
132
145
|
summary: Allows switching between multiple Markdown libraries.
|
133
|
-
test_files:
|
146
|
+
test_files:
|
147
|
+
- spec/libraries/bluecloth_spec.rb
|
134
148
|
- spec/libraries/kramdown_spec.rb
|
149
|
+
- spec/libraries/maruku_spec.rb
|
135
150
|
- spec/libraries/rdiscount_spec.rb
|
136
151
|
- spec/libraries/redcarpet_spec.rb
|
137
152
|
- spec/libraries/rpeg_markdown_spec.rb
|