wikilink-converter 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -1
- data/Gemfile.lock +4 -6
- data/VERSION +1 -1
- data/lib/wikilink/converter/namespace.rb +6 -9
- data/lib/wikilink/converter/site.rb +12 -16
- data/lib/wikilink/converter/sites/ruby_china.rb +7 -6
- data/lib/wikilink/converter/utils.rb +14 -0
- data/lib/wikilink/converter.rb +30 -22
- data/spec/wikilink/converter/namespace_spec.rb +13 -11
- data/spec/wikilink/converter/site_spec.rb +38 -73
- data/spec/wikilink/converter_spec.rb +51 -16
- data/wikilink-converter.gemspec +14 -17
- metadata +27 -38
data/Gemfile
CHANGED
@@ -16,8 +16,11 @@ group :development do
|
|
16
16
|
gem 'guard-yard'
|
17
17
|
gem 'redcarpet'
|
18
18
|
|
19
|
-
|
19
|
+
case HOST_OS
|
20
|
+
when /linux/i
|
20
21
|
gem 'rb-inotify', require: false
|
21
22
|
gem 'libnotify', require: false
|
23
|
+
when /darwin/i
|
24
|
+
gem 'growl_notify', require: false
|
22
25
|
end
|
23
26
|
end
|
data/Gemfile.lock
CHANGED
@@ -2,8 +2,9 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
diff-lcs (1.1.3)
|
5
|
-
ffi (1.0.11)
|
6
5
|
git (1.2.5)
|
6
|
+
growl_notify (0.0.3)
|
7
|
+
rb-appscript
|
7
8
|
guard (0.8.8)
|
8
9
|
thor (~> 0.14.6)
|
9
10
|
guard-bundler (0.1.3)
|
@@ -18,11 +19,9 @@ GEM
|
|
18
19
|
bundler (~> 1.0)
|
19
20
|
git (>= 1.2.5)
|
20
21
|
rake
|
21
|
-
libnotify (0.5.9)
|
22
22
|
multi_json (1.0.4)
|
23
23
|
rake (0.9.2.2)
|
24
|
-
rb-
|
25
|
-
ffi (>= 0.5.0)
|
24
|
+
rb-appscript (0.6.1)
|
26
25
|
redcarpet (1.17.2)
|
27
26
|
rspec (2.7.0)
|
28
27
|
rspec-core (~> 2.7.0)
|
@@ -44,13 +43,12 @@ PLATFORMS
|
|
44
43
|
|
45
44
|
DEPENDENCIES
|
46
45
|
bundler
|
46
|
+
growl_notify
|
47
47
|
guard
|
48
48
|
guard-bundler
|
49
49
|
guard-rspec
|
50
50
|
guard-yard
|
51
51
|
jeweler
|
52
|
-
libnotify
|
53
|
-
rb-inotify
|
54
52
|
redcarpet
|
55
53
|
rspec
|
56
54
|
simplecov
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1
|
1
|
+
0.2.1
|
@@ -5,6 +5,7 @@ module Wikilink
|
|
5
5
|
# Namespace converter
|
6
6
|
class Namespace
|
7
7
|
include LinkHelper
|
8
|
+
include HTMLAttributes
|
8
9
|
|
9
10
|
DEFAULT_NAME = ''
|
10
11
|
|
@@ -19,16 +20,17 @@ module Wikilink
|
|
19
20
|
self
|
20
21
|
end
|
21
22
|
|
22
|
-
def run(
|
23
|
+
def run(run_options)
|
23
24
|
if @block
|
24
|
-
instance_exec(
|
25
|
+
instance_exec(run_options, &@block)
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
28
29
|
class Default < Namespace
|
29
|
-
def run(
|
30
|
+
def run(run_options)
|
30
31
|
return super if @block
|
31
32
|
|
33
|
+
path = run_options[:path].to_s
|
32
34
|
path, fragment = path.split('#', 2)
|
33
35
|
path, query = path.split('?', 2)
|
34
36
|
|
@@ -37,7 +39,7 @@ module Wikilink
|
|
37
39
|
|
38
40
|
url = to_url(path, fragment, query)
|
39
41
|
|
40
|
-
link_to(name, url, :class => html_class)
|
42
|
+
link_to(run_options[:name], url, :class => html_class(run_options[:class]))
|
41
43
|
end
|
42
44
|
|
43
45
|
def to_url(path, fragment, query)
|
@@ -48,11 +50,6 @@ module Wikilink
|
|
48
50
|
end
|
49
51
|
end
|
50
52
|
end
|
51
|
-
|
52
|
-
protected
|
53
|
-
def html_class
|
54
|
-
[options[:class], ('external' if options[:external])]
|
55
|
-
end
|
56
53
|
end
|
57
54
|
end
|
58
55
|
end
|
@@ -18,12 +18,12 @@ module Wikilink
|
|
18
18
|
@options[:prefix] ||= '/' if is_current_site
|
19
19
|
@namespace_converters = {}
|
20
20
|
|
21
|
-
|
21
|
+
namespace(DEFAULT_NAMESPACE)
|
22
22
|
|
23
23
|
yield self if block_given?
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def namespace(*args, &block)
|
27
27
|
namespace, converter, options = extract_arguments(*args)
|
28
28
|
namespace = DEFAULT_NAMESPACE if namespace.to_s.empty?
|
29
29
|
|
@@ -50,27 +50,19 @@ module Wikilink
|
|
50
50
|
set_namespace_converter namespace, converter if converter
|
51
51
|
self
|
52
52
|
end
|
53
|
-
alias_method :on, :on_namespace
|
54
|
-
alias_method :namespace, :on_namespace
|
55
53
|
|
56
|
-
def
|
57
|
-
|
54
|
+
def default_namespace(*args, &block)
|
55
|
+
namespace(DEFAULT_NAMESPACE, *args, &block)
|
58
56
|
end
|
59
|
-
alias_method :default_namespace, :on_default_namespace
|
60
57
|
|
61
|
-
def run(
|
58
|
+
def run(namespace, run_options)
|
62
59
|
if converter = namespace_converter(namespace)
|
63
|
-
converter.run(
|
60
|
+
converter.run(run_options)
|
64
61
|
elsif converter = instance_method_converter(namespace)
|
65
|
-
converter.call(
|
62
|
+
converter.call(run_options)
|
66
63
|
end
|
67
64
|
end
|
68
65
|
|
69
|
-
protected
|
70
|
-
def html_class
|
71
|
-
[options[:class], ('external' if options[:external])]
|
72
|
-
end
|
73
|
-
|
74
66
|
private
|
75
67
|
def namespace_converter(namespace)
|
76
68
|
namespace = namespace.to_s.downcase
|
@@ -79,7 +71,11 @@ module Wikilink
|
|
79
71
|
|
80
72
|
def instance_method_converter(namespace)
|
81
73
|
namespace = namespace.to_s.downcase
|
82
|
-
|
74
|
+
if namespace == DEFAULT_NAMESPACE
|
75
|
+
try_message = :run_default_namespace
|
76
|
+
else
|
77
|
+
try_message = "run_namespace_#{namespace}".to_sym
|
78
|
+
end
|
83
79
|
method(try_message) if respond_to?(try_message)
|
84
80
|
end
|
85
81
|
|
@@ -6,6 +6,7 @@ module Wikilink
|
|
6
6
|
module Sites
|
7
7
|
class RubyChina < Wikilink::Converter::Site
|
8
8
|
include Wikilink::Converter::LinkHelper
|
9
|
+
include Wikilink::Converter::HTMLAttributes
|
9
10
|
|
10
11
|
def initialize(options = {})
|
11
12
|
if options[:name] == CURRENT_SITE
|
@@ -18,14 +19,14 @@ module Wikilink
|
|
18
19
|
super(options)
|
19
20
|
end
|
20
21
|
|
21
|
-
def
|
22
|
-
path = "#{options[:domain]}topics/#{path}"
|
23
|
-
link_to name, path, :class => html_class
|
22
|
+
def run_namespace_topic(run_options)
|
23
|
+
path = "#{options[:domain]}topics/#{run_options[:path]}"
|
24
|
+
link_to run_options[:name], path, :class => html_class(run_options[:class])
|
24
25
|
end
|
25
26
|
|
26
|
-
def
|
27
|
-
path = "#{options[:domain]}topics/node#{path}"
|
28
|
-
link_to name, path, :class => html_class
|
27
|
+
def run_namespace_node(run_options)
|
28
|
+
path = "#{options[:domain]}topics/node#{run_options[:path]}"
|
29
|
+
link_to run_options[:name], path, :class => html_class(run_options[:class])
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
@@ -33,5 +33,19 @@ module Wikilink
|
|
33
33
|
"<a #{attributes}href=\"#{CGI.escape_html url}\">#{CGI.escape_html name}</a>"
|
34
34
|
end
|
35
35
|
end
|
36
|
+
|
37
|
+
module HTMLAttributes
|
38
|
+
def html_class(extra_classes = nil)
|
39
|
+
classes = []
|
40
|
+
if respond_to? :options
|
41
|
+
classes << options[:class]
|
42
|
+
classes << 'external' if options[:external]
|
43
|
+
end
|
44
|
+
|
45
|
+
classes << extra_classes if extra_classes
|
46
|
+
|
47
|
+
classes.flatten.join(' ').split.uniq.join(' ')
|
48
|
+
end
|
49
|
+
end
|
36
50
|
end
|
37
51
|
end
|
data/lib/wikilink/converter.rb
CHANGED
@@ -25,6 +25,21 @@ module Wikilink
|
|
25
25
|
include ArgumentExtractor
|
26
26
|
CURRENT_SITE = ::Wikilink::Converter::Site::CURRENT_SITE_NAME
|
27
27
|
|
28
|
+
class << self
|
29
|
+
extend Forwardable
|
30
|
+
def instance
|
31
|
+
@instance ||= Converter.new
|
32
|
+
end
|
33
|
+
def config
|
34
|
+
yield instance
|
35
|
+
end
|
36
|
+
def_delegators(:instance,
|
37
|
+
:run, :execute,
|
38
|
+
:namespace, :default_namespace,
|
39
|
+
:site, :current_site,
|
40
|
+
:action)
|
41
|
+
end
|
42
|
+
|
28
43
|
# Setup a converter. Handlers can be registered in block directly. If no
|
29
44
|
# handler is registered on **page**, a default handler
|
30
45
|
# Wikilink::Converter::Page is created with the given `options`.
|
@@ -35,11 +50,11 @@ module Wikilink
|
|
35
50
|
@action_handlers = {}
|
36
51
|
@options = options
|
37
52
|
|
38
|
-
|
53
|
+
site(CURRENT_SITE, @options)
|
39
54
|
yield self if block_given?
|
40
55
|
end
|
41
56
|
|
42
|
-
def run(text,
|
57
|
+
def run(text, run_options = {})
|
43
58
|
text.gsub(/(^|.)\[\[(.*?[^:])\]\]/) do |match|
|
44
59
|
prefix, inner = $1, $2.strip
|
45
60
|
if prefix == '\\'
|
@@ -61,12 +76,13 @@ module Wikilink
|
|
61
76
|
end
|
62
77
|
|
63
78
|
if name.to_s.empty?
|
64
|
-
name = resolve_name(inner,
|
79
|
+
name = resolve_name(inner, run_options)
|
65
80
|
end
|
66
81
|
|
67
82
|
# ignore malformed wikilink
|
68
83
|
if valid?(site, namespace, path)
|
69
|
-
|
84
|
+
run_options = run_options.merge(path: path, name: name, colon: colon)
|
85
|
+
result = convert_link(site, namespace, run_options)
|
70
86
|
result ? ($1 + result) : match
|
71
87
|
else
|
72
88
|
match
|
@@ -88,14 +104,10 @@ module Wikilink
|
|
88
104
|
end
|
89
105
|
end
|
90
106
|
|
91
|
-
def_delegator :@current_site_converter, :
|
92
|
-
|
93
|
-
alias_method :namespace, :on_namespace
|
94
|
-
|
95
|
-
def_delegator :@current_site_converter, :on_default_namespace
|
96
|
-
alias_method :default_namespace, :on_default_namespace
|
107
|
+
def_delegator :@current_site_converter, :namespace
|
108
|
+
def_delegator :@current_site_converter, :default_namespace
|
97
109
|
|
98
|
-
def
|
110
|
+
def site(*args)
|
99
111
|
site, converter, options = extract_arguments(*args)
|
100
112
|
options = @options.merge(options)
|
101
113
|
site = CURRENT_SITE if site.to_s.empty?
|
@@ -111,19 +123,15 @@ module Wikilink
|
|
111
123
|
set_site_converter site, converter
|
112
124
|
self
|
113
125
|
end
|
114
|
-
alias_method :site, :on_site
|
115
126
|
|
116
|
-
def
|
117
|
-
|
127
|
+
def current_site(*args, &block)
|
128
|
+
site(CURRENT_SITE, *args, &block)
|
118
129
|
end
|
119
|
-
alias_method :current_site, :on_current_site
|
120
130
|
|
121
|
-
def
|
122
|
-
@action_handlers[
|
131
|
+
def action(name, &block)
|
132
|
+
@action_handlers[name.to_s.downcase] = block
|
123
133
|
self
|
124
134
|
end
|
125
|
-
alias_method :action, :on_action
|
126
|
-
|
127
135
|
|
128
136
|
private
|
129
137
|
def site_converter(site)
|
@@ -145,15 +153,15 @@ module Wikilink
|
|
145
153
|
handler.call(argument) if handler
|
146
154
|
end
|
147
155
|
|
148
|
-
def convert_link(
|
156
|
+
def convert_link(site, namespace, run_options)
|
149
157
|
converter = site_converter(site)
|
150
|
-
converter.run(
|
158
|
+
converter.run(namespace, run_options) if converter
|
151
159
|
end
|
152
160
|
|
153
161
|
# TODO: relative
|
154
162
|
# TODO: ruby (computer) -> ruby
|
155
163
|
# TODO: Shanghai, China -> Shanghai
|
156
|
-
def resolve_name(inner_text,
|
164
|
+
def resolve_name(inner_text, run_options)
|
157
165
|
if inner_text.end_with?('|')
|
158
166
|
inner_text.chop.chomp('/').split(%r{[:/]}, 2).last
|
159
167
|
else
|
@@ -9,7 +9,7 @@ shared_examples 'converter that can forward to given block' do |klass|
|
|
9
9
|
describe '#run' do
|
10
10
|
subject { converter.method(:run) }
|
11
11
|
it 'forwards to the block' do
|
12
|
-
subject.should convert(
|
12
|
+
subject.should convert(name: 'Home', path: 'Home').to('it works')
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -22,7 +22,7 @@ shared_examples 'converter that can forward to given block' do |klass|
|
|
22
22
|
describe '#run' do
|
23
23
|
subject { converter.method(:run) }
|
24
24
|
it 'forwards to the block and allows options access' do
|
25
|
-
subject.should convert(
|
25
|
+
subject.should convert(name: 'Home', path: 'Home').to('fake')
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -33,7 +33,7 @@ describe Wikilink::Converter::Namespace do
|
|
33
33
|
describe '#run' do
|
34
34
|
subject { converter.method(:run) }
|
35
35
|
it 'does nothing' do
|
36
|
-
subject.should convert(
|
36
|
+
subject.should convert(name: 'Home', path: 'Home').to(nil)
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -41,14 +41,16 @@ describe Wikilink::Converter::Namespace do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
describe Wikilink::Converter::Namespace::Default do
|
44
|
+
let(:run_options) { { name: 'Name', path: 'Home' } }
|
45
|
+
|
44
46
|
shared_examples 'converter that keeps query fragment only path untouched' do
|
45
|
-
it { should convert(
|
47
|
+
it { should convert(path: '#toc-1', name: 'Header 1').
|
46
48
|
to('<a href="#toc-1">Header 1</a>')
|
47
49
|
}
|
48
|
-
it { should convert(
|
50
|
+
it { should convert(path: '?q=keyword', name: 'Search keyword').
|
49
51
|
to('<a href="?q=keyword">Search keyword</a>')
|
50
52
|
}
|
51
|
-
it { should convert(
|
53
|
+
it { should convert(path: '?q=keyword#page-10', name: 'Search keyword (page 10)').
|
52
54
|
to('<a href="?q=keyword#page-10">Search keyword (page 10)</a>')
|
53
55
|
}
|
54
56
|
end
|
@@ -56,7 +58,7 @@ describe Wikilink::Converter::Namespace::Default do
|
|
56
58
|
let(:converter) { self.class.describes.new }
|
57
59
|
describe '#run' do
|
58
60
|
subject { converter.method(:run) }
|
59
|
-
it { should convert(
|
61
|
+
it { should convert(run_options).
|
60
62
|
to('<a href="Home">Name</a>')
|
61
63
|
}
|
62
64
|
it_behaves_like 'converter that keeps query fragment only path untouched'
|
@@ -74,7 +76,7 @@ describe Wikilink::Converter::Namespace::Default do
|
|
74
76
|
let(:converter) { self.class.describes.new suffix: '/index.html' }
|
75
77
|
describe '#run' do
|
76
78
|
subject { converter.method(:run) }
|
77
|
-
it { should convert(
|
79
|
+
it { should convert(run_options).
|
78
80
|
to('<a href="Home/index.html">Name</a>')
|
79
81
|
}
|
80
82
|
it_behaves_like 'converter that keeps query fragment only path untouched'
|
@@ -85,7 +87,7 @@ describe Wikilink::Converter::Namespace::Default do
|
|
85
87
|
let(:converter) { self.class.describes.new external: true }
|
86
88
|
describe '#run' do
|
87
89
|
subject { converter.method(:run) }
|
88
|
-
it { should convert(
|
90
|
+
it { should convert(run_options).
|
89
91
|
to('<a class="external" href="Home">Name</a>')
|
90
92
|
}
|
91
93
|
end
|
@@ -94,7 +96,7 @@ describe Wikilink::Converter::Namespace::Default do
|
|
94
96
|
let(:converter) { self.class.describes.new class: 'fancy' }
|
95
97
|
describe '#run' do
|
96
98
|
subject { converter.method(:run) }
|
97
|
-
it { should convert(
|
99
|
+
it { should convert(run_options).
|
98
100
|
to('<a class="fancy" href="Home">Name</a>')
|
99
101
|
}
|
100
102
|
end
|
@@ -103,7 +105,7 @@ describe Wikilink::Converter::Namespace::Default do
|
|
103
105
|
let(:converter) { self.class.describes.new external: true, class: 'fancy' }
|
104
106
|
describe '#run' do
|
105
107
|
subject { converter.method(:run) }
|
106
|
-
it { should convert(
|
108
|
+
it { should convert(run_options).
|
107
109
|
to('<a class="fancy external" href="Home">Name</a>')
|
108
110
|
}
|
109
111
|
end
|
@@ -4,51 +4,15 @@ describe Wikilink::Converter::Site do
|
|
4
4
|
DEFAULT_NAMESPACE = Wikilink::Converter::Site::DEFAULT_NAMESPACE
|
5
5
|
CURRENT_SITE_NAME = Wikilink::Converter::Site::CURRENT_SITE_NAME
|
6
6
|
|
7
|
-
# { subject.foo }.should forward(:bar).to(handler).with(any_args)
|
8
|
-
RSpec::Matchers.define :forward do |message|
|
9
|
-
match do |block|
|
10
|
-
block.call
|
11
|
-
@handler.received_message?(message, *@arguments)
|
12
|
-
end
|
13
|
-
|
14
|
-
description do
|
15
|
-
"forward to message #{message} to #{@handler.inspect}"
|
16
|
-
end
|
17
|
-
|
18
|
-
failure_message_for_should do |block|
|
19
|
-
<<MESSAGE
|
20
|
-
expected forward #{message}
|
21
|
-
to #{block}
|
22
|
-
with #{@arguments.inspect}
|
23
|
-
MESSAGE
|
24
|
-
end
|
25
|
-
|
26
|
-
failure_message_for_should_not do |block|
|
27
|
-
<<MESSAGE
|
28
|
-
expected not forward #{message}
|
29
|
-
to #{block}
|
30
|
-
with #{@arguments.inspect}
|
31
|
-
MESSAGE
|
32
|
-
end
|
33
|
-
|
34
|
-
chain :with do |*arguments|
|
35
|
-
@arguments = arguments
|
36
|
-
end
|
37
|
-
|
38
|
-
chain :to do |handler|
|
39
|
-
@handler = handler
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
7
|
shared_examples 'configuring a new instance of class as namespace handler' do |namespace|
|
44
8
|
# require setting converter to an instance of Site
|
45
9
|
context 'with converter class' do
|
46
10
|
class SpecNamespace; end
|
47
11
|
define_method :call do |*args|
|
48
12
|
if namespace.to_s.empty?
|
49
|
-
converter.
|
13
|
+
converter.namespace SpecNamespace, *args
|
50
14
|
else
|
51
|
-
converter.
|
15
|
+
converter.namespace namespace, SpecNamespace, *args
|
52
16
|
end
|
53
17
|
end
|
54
18
|
let(:namespace_converter) { double(:namespace_converter) }
|
@@ -62,7 +26,7 @@ MESSAGE
|
|
62
26
|
SpecNamespace.should_receive(:new).once.and_return(namespace_converter)
|
63
27
|
call
|
64
28
|
namespace_converter.should_receive(:run).and_return('it works')
|
65
|
-
converter.run(
|
29
|
+
converter.run(namespace, path: 'Home', name: 'Name').should eq('it works')
|
66
30
|
end
|
67
31
|
|
68
32
|
context 'and options' do
|
@@ -82,6 +46,7 @@ MESSAGE
|
|
82
46
|
|
83
47
|
let(:default_namespace) { double(:default_namespace).as_null_object }
|
84
48
|
let(:namespace) { double(:namespace).as_null_object }
|
49
|
+
let(:run_options) { { path: 'Home', name: 'Name' } }
|
85
50
|
before { Wikilink::Converter::Namespace::Default.stub(:new) { default_namespace } }
|
86
51
|
|
87
52
|
shared_examples ''
|
@@ -133,26 +98,26 @@ MESSAGE
|
|
133
98
|
|
134
99
|
describe '#run' do
|
135
100
|
it 'delegates default namespace to Namespace::Default instance' do
|
136
|
-
|
137
|
-
|
101
|
+
default_namespace.should_receive(:run).with(hash_including(run_options))
|
102
|
+
converter.run(DEFAULT_NAMESPACE, run_options)
|
138
103
|
end
|
139
104
|
end
|
140
105
|
|
141
|
-
describe '#
|
142
|
-
it 'is a shortcut of #
|
143
|
-
converter.should_receive(:
|
144
|
-
converter.
|
106
|
+
describe '#default_namespace' do
|
107
|
+
it 'is a shortcut of #namespace' do
|
108
|
+
converter.should_receive(:namespace).with(DEFAULT_NAMESPACE, 'arg')
|
109
|
+
converter.default_namespace 'arg'
|
145
110
|
end
|
146
111
|
end
|
147
112
|
|
148
|
-
describe '#
|
113
|
+
describe '#namespace' do
|
149
114
|
context 'without any arguments nor block' do
|
150
115
|
let(:default_namespace) { double(:default_namespace) }
|
151
116
|
|
152
117
|
it 'does not change the default namespace handler' do
|
153
118
|
Wikilink::Converter::Namespace::Default.should_receive(:new).
|
154
119
|
once.and_return(default_namespace)
|
155
|
-
converter.
|
120
|
+
converter.namespace
|
156
121
|
end
|
157
122
|
end
|
158
123
|
|
@@ -161,7 +126,7 @@ MESSAGE
|
|
161
126
|
yielded = double('yielded')
|
162
127
|
yielded.should_receive(:poke)
|
163
128
|
default_namespace.should_receive(:config).and_yield
|
164
|
-
converter.
|
129
|
+
converter.namespace do
|
165
130
|
yielded.poke
|
166
131
|
end
|
167
132
|
end
|
@@ -173,7 +138,7 @@ MESSAGE
|
|
173
138
|
it 'does not change the default namespace handler' do
|
174
139
|
Wikilink::Converter::Namespace::Default.should_receive(:new).
|
175
140
|
once.and_return(default_namespace)
|
176
|
-
converter.
|
141
|
+
converter.namespace foo: :bar
|
177
142
|
end
|
178
143
|
end
|
179
144
|
|
@@ -183,37 +148,37 @@ MESSAGE
|
|
183
148
|
it 'does not change the default namespace handler' do
|
184
149
|
Wikilink::Converter::Namespace::Default.should_receive(:new).
|
185
150
|
once.and_return(default_namespace)
|
186
|
-
converter.
|
151
|
+
converter.namespace(DEFAULT_NAMESPACE)
|
187
152
|
end
|
188
153
|
end
|
189
154
|
context 'with other namespace name' do
|
190
|
-
let(:
|
155
|
+
let(:namespace_name) { 'topics' }
|
191
156
|
let(:klass) { Wikilink::Converter::Namespace }
|
192
157
|
|
193
158
|
it 'creates a new Wikilink::Converter::Namespace instance' do
|
194
159
|
klass.should_receive(:new)
|
195
|
-
converter.
|
160
|
+
converter.namespace namespace_name
|
196
161
|
end
|
197
162
|
it 'initializes Wikilink::Converter::Namespace instance with option :site_name' do
|
198
163
|
klass.should_receive(:new).with(hash_including(site_name: site_name))
|
199
|
-
converter.
|
164
|
+
converter.namespace namespace_name
|
200
165
|
end
|
201
166
|
it 'initializes Wikilink::Converter::Namespace instance with option :name' do
|
202
|
-
klass.should_receive(:new).with(hash_including(name:
|
203
|
-
converter.
|
167
|
+
klass.should_receive(:new).with(hash_including(name: namespace_name))
|
168
|
+
converter.namespace namespace_name
|
204
169
|
end
|
205
170
|
it 'uses the instance of Wikilink::Converter::Namespace as new namespace converter' do
|
206
171
|
klass.should_receive(:new).and_return(namespace)
|
207
|
-
converter.
|
172
|
+
converter.namespace namespace_name
|
208
173
|
namespace.should_receive(:run).and_return('it works')
|
209
|
-
converter.run(
|
174
|
+
converter.run(namespace_name, run_options).should eq('it works')
|
210
175
|
end
|
211
176
|
|
212
177
|
context 'with object' do
|
213
178
|
it 'uses that object as new namespace converter' do
|
214
|
-
converter.
|
179
|
+
converter.namespace namespace_name, namespace
|
215
180
|
namespace.should_receive(:run).and_return('it works')
|
216
|
-
converter.run(
|
181
|
+
converter.run(namespace_name, run_options).should eq('it works')
|
217
182
|
end
|
218
183
|
end
|
219
184
|
|
@@ -224,9 +189,9 @@ MESSAGE
|
|
224
189
|
|
225
190
|
context 'with object' do
|
226
191
|
it 'uses that object as new namespace converter' do
|
227
|
-
converter.
|
192
|
+
converter.namespace namespace
|
228
193
|
namespace.should_receive(:run).and_return('it works')
|
229
|
-
converter.run(
|
194
|
+
converter.run(DEFAULT_NAMESPACE, run_options).should eq('it works')
|
230
195
|
end
|
231
196
|
end
|
232
197
|
|
@@ -276,20 +241,20 @@ MESSAGE
|
|
276
241
|
|
277
242
|
describe '#run' do
|
278
243
|
it 'delegates default namespace to Namespace::Default instance' do
|
279
|
-
|
280
|
-
|
244
|
+
default_namespace.should_receive(:run).with(hash_including(run_options))
|
245
|
+
converter.run(DEFAULT_NAMESPACE, run_options)
|
281
246
|
end
|
282
247
|
|
283
|
-
context 'with method #
|
248
|
+
context 'with method #run_namespace_topics defined' do
|
284
249
|
before { Wikilink::Converter::Namespace::Default.unstub(:new) }
|
285
250
|
class SpecSite < Wikilink::Converter::Site
|
286
|
-
def
|
251
|
+
def run_namespace_topics(run_options)
|
287
252
|
'it works'
|
288
253
|
end
|
289
254
|
end
|
290
255
|
let(:converter) { SpecSite.new }
|
291
|
-
it 'invokes #
|
292
|
-
converter.run('
|
256
|
+
it 'invokes #run_namespace_topics to handle namespace topics' do
|
257
|
+
converter.run('topics', run_options).should eq('it works')
|
293
258
|
end
|
294
259
|
|
295
260
|
context 'but user has override it' do
|
@@ -300,21 +265,21 @@ MESSAGE
|
|
300
265
|
}
|
301
266
|
|
302
267
|
it 'uses user version' do
|
303
|
-
converter.run('
|
268
|
+
converter.run('topics', run_options).should eq('use this version')
|
304
269
|
end
|
305
270
|
end
|
306
271
|
end
|
307
272
|
|
308
|
-
context 'with method #
|
273
|
+
context 'with method #run_default_namespace defined' do
|
309
274
|
before { Wikilink::Converter::Namespace::Default.unstub(:new) }
|
310
275
|
class SpecSite < Wikilink::Converter::Site
|
311
|
-
def
|
276
|
+
def run_default_namespace(run_options)
|
312
277
|
'it works'
|
313
278
|
end
|
314
279
|
end
|
315
280
|
let(:converter) { SpecSite.new }
|
316
|
-
it 'invokes #
|
317
|
-
converter.run(
|
281
|
+
it 'invokes #run_default_namespace to handle default namespace' do
|
282
|
+
converter.run(DEFAULT_NAMESPACE, run_options).should eq('it works')
|
318
283
|
end
|
319
284
|
|
320
285
|
context 'but user has override it' do
|
@@ -325,7 +290,7 @@ MESSAGE
|
|
325
290
|
}
|
326
291
|
|
327
292
|
it 'uses user version' do
|
328
|
-
converter.run(
|
293
|
+
converter.run(DEFAULT_NAMESPACE, run_options).should eq('use this version')
|
329
294
|
end
|
330
295
|
end
|
331
296
|
end
|
@@ -1,8 +1,36 @@
|
|
1
1
|
require File.expand_path('../../spec_helper', __FILE__)
|
2
2
|
|
3
|
+
shared_examples 'singleton' do |klass|
|
4
|
+
describe '.instance' do
|
5
|
+
subject { klass }
|
6
|
+
its(:instance) { should be_a_kind_of(klass) }
|
7
|
+
it 'returns the same instances for all calls to #instance' do
|
8
|
+
klass.instance.should equal(klass.instance)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
3
13
|
describe Wikilink::Converter do
|
4
14
|
CURRENT_SITE = Wikilink::Converter::CURRENT_SITE
|
5
15
|
|
16
|
+
it_behaves_like 'singleton', Wikilink::Converter
|
17
|
+
describe '.config' do
|
18
|
+
it 'yields the singleton instance' do
|
19
|
+
Wikilink::Converter.config do |arg|
|
20
|
+
arg.should equal(Wikilink::Converter.instance)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
%w{run execute}.each do |method|
|
26
|
+
describe ".#{method}" do
|
27
|
+
it "forwards method #{method} to #instance" do
|
28
|
+
Wikilink::Converter.instance.should_receive(method.to_sym).with(:arg)
|
29
|
+
Wikilink::Converter.send method.to_sym, :arg
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
6
34
|
let(:converter) { Wikilink::Converter.new }
|
7
35
|
|
8
36
|
describe '#run' do
|
@@ -39,7 +67,7 @@ describe Wikilink::Converter do
|
|
39
67
|
context 'in namespace topics' do
|
40
68
|
context 'with default handler' do
|
41
69
|
before do
|
42
|
-
converter.
|
70
|
+
converter.namespace('topics', Wikilink::Converter::Namespace::Default)
|
43
71
|
end
|
44
72
|
it { should convert('[[topics:World]]').to('<a href="/World">topics:World</a>') }
|
45
73
|
end
|
@@ -63,23 +91,30 @@ describe Wikilink::Converter do
|
|
63
91
|
context 'in namespace topics' do
|
64
92
|
context 'with default handler' do
|
65
93
|
before do
|
66
|
-
converter.
|
94
|
+
converter.namespace('topics', Wikilink::Converter::Namespace::Default)
|
67
95
|
end
|
68
96
|
it { should convert('[[topics:World|]]').to('<a href="/World">World</a>') }
|
69
97
|
it { should convert('[[:topics:World|]]').to('<a href="/World">World</a>') }
|
70
98
|
end
|
71
99
|
end
|
72
100
|
end
|
101
|
+
it 'passes options to namespace converter' do
|
102
|
+
Wikilink::Converter::Site.any_instance.should_receive(:run) { |*args|
|
103
|
+
args.last[:hello].should eq('world')
|
104
|
+
'result'
|
105
|
+
}
|
106
|
+
converter.run('[[Hello]]', hello: 'world')
|
107
|
+
end
|
73
108
|
end
|
74
109
|
|
75
|
-
describe '#
|
76
|
-
it 'is a shortcut of #
|
77
|
-
converter.should_receive(:
|
78
|
-
converter.
|
110
|
+
describe '#default_site' do
|
111
|
+
it 'is a shortcut of #site' do
|
112
|
+
converter.should_receive(:site).with(CURRENT_SITE, 'arg')
|
113
|
+
converter.current_site 'arg'
|
79
114
|
end
|
80
115
|
end
|
81
116
|
|
82
|
-
describe '#
|
117
|
+
describe '#site' do
|
83
118
|
let(:default_site) { double(:default_site).as_null_object }
|
84
119
|
let(:site) { double(:site).as_null_object }
|
85
120
|
before { Wikilink::Converter::Site.stub(:new) { default_site } }
|
@@ -89,10 +124,10 @@ describe Wikilink::Converter do
|
|
89
124
|
it 'does not create new instance' do
|
90
125
|
converter # call it to initialize first
|
91
126
|
Wikilink::Converter::Site.should_not_receive :new
|
92
|
-
converter.
|
127
|
+
converter.site
|
93
128
|
end
|
94
129
|
it 'yields the default site converter' do
|
95
|
-
converter.
|
130
|
+
converter.site do |site_converter|
|
96
131
|
site_converter.should eq(default_site)
|
97
132
|
end
|
98
133
|
end
|
@@ -102,17 +137,17 @@ describe Wikilink::Converter do
|
|
102
137
|
it 'creates a new instance of Wikilink::Converter::Site as the site converter' do
|
103
138
|
converter # call it to initialize first
|
104
139
|
Wikilink::Converter::Site.should_receive(:new).once
|
105
|
-
converter.
|
140
|
+
converter.site 'wikipedia'
|
106
141
|
end
|
107
142
|
it 'initializes the instance with option :name' do
|
108
143
|
converter # call it to initialize first
|
109
144
|
Wikilink::Converter::Site.should_receive(:new).with(hash_including(name: 'wikipedia')).once
|
110
|
-
converter.
|
145
|
+
converter.site 'wikipedia'
|
111
146
|
end
|
112
147
|
it 'yields the new converter instance' do
|
113
148
|
converter # call it to initialize first
|
114
149
|
Wikilink::Converter::Site.should_receive(:new).once.and_return(site)
|
115
|
-
converter.
|
150
|
+
converter.site('wikipedia') do |site_converter|
|
116
151
|
site_converter.should eq(site)
|
117
152
|
end
|
118
153
|
end
|
@@ -121,7 +156,7 @@ describe Wikilink::Converter do
|
|
121
156
|
it 'initializes the instance with given options' do
|
122
157
|
converter # call it to initialize first
|
123
158
|
Wikilink::Converter::Site.should_receive(:new).with(hash_including(foo: :bar)).once
|
124
|
-
converter.
|
159
|
+
converter.site 'wikipedia', options
|
125
160
|
end
|
126
161
|
end
|
127
162
|
end
|
@@ -130,10 +165,10 @@ describe Wikilink::Converter do
|
|
130
165
|
it 'does not create new instance' do
|
131
166
|
converter # call it to initialize first
|
132
167
|
Wikilink::Converter::Site.should_not_receive :new
|
133
|
-
converter.
|
168
|
+
converter.site site
|
134
169
|
end
|
135
170
|
it 'yields the object' do
|
136
|
-
converter.
|
171
|
+
converter.site(site) do |site_converter|
|
137
172
|
site_converter.should eq(site)
|
138
173
|
end
|
139
174
|
end
|
@@ -152,7 +187,7 @@ describe Wikilink::Converter do
|
|
152
187
|
|
153
188
|
context 'with handler registered on action toc' do
|
154
189
|
before {
|
155
|
-
converter.
|
190
|
+
converter.action('toc') do |arg|
|
156
191
|
"Table of Contents#{arg}"
|
157
192
|
end
|
158
193
|
}
|
data/wikilink-converter.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.1
|
7
|
+
s.name = "wikilink-converter"
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = ["Ian Yang"]
|
12
|
+
s.date = "2011-12-06"
|
13
|
+
s.description = "convert [[WikiLink]] to <a>"
|
14
|
+
s.email = "me@iany.me"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.markdown"
|
@@ -44,11 +44,11 @@ Gem::Specification.new do |s|
|
|
44
44
|
"spec/wikilink/converter_spec.rb",
|
45
45
|
"wikilink-converter.gemspec"
|
46
46
|
]
|
47
|
-
s.homepage =
|
48
|
-
s.licenses = [
|
49
|
-
s.require_paths = [
|
50
|
-
s.rubygems_version =
|
51
|
-
s.summary =
|
47
|
+
s.homepage = "http://github.com/doitian/wikilink-converter"
|
48
|
+
s.licenses = ["MIT"]
|
49
|
+
s.require_paths = ["lib"]
|
50
|
+
s.rubygems_version = "1.8.10"
|
51
|
+
s.summary = "convert [[WikiLink]] to <a>"
|
52
52
|
|
53
53
|
if s.respond_to? :specification_version then
|
54
54
|
s.specification_version = 3
|
@@ -64,8 +64,7 @@ Gem::Specification.new do |s|
|
|
64
64
|
s.add_development_dependency(%q<guard-bundler>, [">= 0"])
|
65
65
|
s.add_development_dependency(%q<guard-yard>, [">= 0"])
|
66
66
|
s.add_development_dependency(%q<redcarpet>, [">= 0"])
|
67
|
-
s.add_development_dependency(%q<
|
68
|
-
s.add_development_dependency(%q<libnotify>, [">= 0"])
|
67
|
+
s.add_development_dependency(%q<growl_notify>, [">= 0"])
|
69
68
|
else
|
70
69
|
s.add_dependency(%q<rspec>, [">= 0"])
|
71
70
|
s.add_dependency(%q<yard>, [">= 0"])
|
@@ -77,8 +76,7 @@ Gem::Specification.new do |s|
|
|
77
76
|
s.add_dependency(%q<guard-bundler>, [">= 0"])
|
78
77
|
s.add_dependency(%q<guard-yard>, [">= 0"])
|
79
78
|
s.add_dependency(%q<redcarpet>, [">= 0"])
|
80
|
-
s.add_dependency(%q<
|
81
|
-
s.add_dependency(%q<libnotify>, [">= 0"])
|
79
|
+
s.add_dependency(%q<growl_notify>, [">= 0"])
|
82
80
|
end
|
83
81
|
else
|
84
82
|
s.add_dependency(%q<rspec>, [">= 0"])
|
@@ -91,8 +89,7 @@ Gem::Specification.new do |s|
|
|
91
89
|
s.add_dependency(%q<guard-bundler>, [">= 0"])
|
92
90
|
s.add_dependency(%q<guard-yard>, [">= 0"])
|
93
91
|
s.add_dependency(%q<redcarpet>, [">= 0"])
|
94
|
-
s.add_dependency(%q<
|
95
|
-
s.add_dependency(%q<libnotify>, [">= 0"])
|
92
|
+
s.add_dependency(%q<growl_notify>, [">= 0"])
|
96
93
|
end
|
97
94
|
end
|
98
95
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wikilink-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153445440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153445440
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: yard
|
27
|
-
requirement: &
|
27
|
+
requirement: &2153444940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2153444940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &2153444460 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2153444460
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &2153443960 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2153443960
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov
|
60
|
-
requirement: &
|
60
|
+
requirement: &2153443480 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2153443480
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard
|
71
|
-
requirement: &
|
71
|
+
requirement: &2153443000 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2153443000
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: guard-rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &2153442520 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2153442520
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: guard-bundler
|
93
|
-
requirement: &
|
93
|
+
requirement: &2153442020 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2153442020
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: guard-yard
|
104
|
-
requirement: &
|
104
|
+
requirement: &2153441500 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2153441500
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: redcarpet
|
115
|
-
requirement: &
|
115
|
+
requirement: &2153440980 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2153440980
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
|
-
name:
|
126
|
-
requirement: &
|
125
|
+
name: growl_notify
|
126
|
+
requirement: &2153440420 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,18 +131,7 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
135
|
-
- !ruby/object:Gem::Dependency
|
136
|
-
name: libnotify
|
137
|
-
requirement: &16719920 !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
|
-
requirements:
|
140
|
-
- - ! '>='
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
143
|
-
type: :development
|
144
|
-
prerelease: false
|
145
|
-
version_requirements: *16719920
|
134
|
+
version_requirements: *2153440420
|
146
135
|
description: convert [[WikiLink]] to <a>
|
147
136
|
email: me@iany.me
|
148
137
|
executables: []
|
@@ -192,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
192
181
|
version: '0'
|
193
182
|
segments:
|
194
183
|
- 0
|
195
|
-
hash: -
|
184
|
+
hash: -3433314059402378483
|
196
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
186
|
none: false
|
198
187
|
requirements:
|
@@ -201,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
190
|
version: '0'
|
202
191
|
requirements: []
|
203
192
|
rubyforge_project:
|
204
|
-
rubygems_version: 1.8.
|
193
|
+
rubygems_version: 1.8.10
|
205
194
|
signing_key:
|
206
195
|
specification_version: 3
|
207
196
|
summary: convert [[WikiLink]] to <a>
|