wikicloth 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
1
  rvm:
2
- - 1.8.7 # (current default)
3
2
  - 1.9.3
3
+ - 2.0.0
4
+ - 2.1.0
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
  gemspec
data/Rakefile CHANGED
@@ -11,20 +11,11 @@ Rake::TestTask.new(:test) do |test|
11
11
  test.verbose = true
12
12
  end
13
13
 
14
- if RUBY_VERSION =~ /^1\.9/
15
- require 'simplecov'
16
- desc "Code coverage detail"
17
- task :simplecov do
18
- ENV['COVERAGE'] = "true"
19
- Rake::Task['spec'].execute
20
- end
21
- else
22
- require 'rcov/rcovtask'
23
- Rcov::RcovTask.new do |test|
24
- test.libs << 'test'
25
- test.pattern = 'test/**/test_*.rb'
26
- test.verbose = true
27
- end
14
+ require 'simplecov'
15
+ desc "Code coverage detail"
16
+ task :simplecov do
17
+ ENV['COVERAGE'] = "true"
18
+ Rake::Task['spec'].execute
28
19
  end
29
20
 
30
21
  task :default => :test
@@ -1,5 +1,3 @@
1
- require 'rubygems' if RUBY_VERSION < '1.9'
2
- require 'jcode' if RUBY_VERSION < '1.9'
3
1
  require 'builder'
4
2
  # if i18n gem loaded use it instead
5
3
  require File.join(File.expand_path(File.dirname(__FILE__)), "wikicloth", "i18n") unless defined?(I18n)
@@ -1,31 +1,11 @@
1
- require 'rinku'
2
-
3
- if RUBY_VERSION < '1.9'
4
- READ_MODE = "r"
5
- class Object
6
- module InstanceExecHelper; end
7
- include InstanceExecHelper
8
- def instance_exec(*args, &block)
9
- begin
10
- old_critical, Thread.critical = Thread.critical, true
11
- n = 0
12
- n += 1 while respond_to?(mname="__instance_exec#{n}")
13
- InstanceExecHelper.module_eval{ define_method(mname, &block) }
14
- ensure
15
- Thread.critical = old_critical
16
- end
17
- begin
18
- ret = send(mname, *args)
19
- ensure
20
- InstanceExecHelper.module_eval{ remove_method(mname) } rescue nil
21
- end
22
- ret
23
- end
24
- end
25
- else
26
- READ_MODE = "r:UTF-8"
1
+ begin
2
+ require 'rinku'
3
+ rescue LoadError
4
+ require 'twitter-text'
27
5
  end
28
6
 
7
+ READ_MODE = "r:UTF-8"
8
+
29
9
  module Math
30
10
  def self.eval(expression)
31
11
  allowed_characters = Regexp.escape('+-*/.() ')
@@ -48,8 +28,14 @@ module ExtendedString
48
28
  self.gsub(/\W+/, '-').gsub(/^-+/,'').gsub(/-+$/,'').downcase
49
29
  end
50
30
 
51
- def auto_link
52
- Rinku.auto_link(to_s)
31
+ if defined? Rinku
32
+ def auto_link
33
+ Rinku.auto_link(to_s)
34
+ end
35
+ else
36
+ def auto_link
37
+ Twitter::Autolink.auto_link(to_s)
38
+ end
53
39
  end
54
40
 
55
41
  def last(n)
@@ -1,3 +1,3 @@
1
1
  module WikiCloth
2
- VERSION = "0.8.1" unless defined?(::WikiCloth::VERSION)
2
+ VERSION = "0.8.2" unless defined?(::WikiCloth::VERSION)
3
3
  end
@@ -175,7 +175,7 @@ class WikiBuffer::Var < WikiBuffer
175
175
  when "ucfirst"
176
176
  params.first.capitalize
177
177
  when "lcfirst"
178
- params.first[0,1].downcase + params.first[1..-1]
178
+ params.first[0,1].downcase + params.first[1..-1].to_s
179
179
  when "anchorencode"
180
180
  params.first.gsub(/\s+/,'_')
181
181
  when "plural"
@@ -22,11 +22,11 @@ spec = Gem::Specification.new do |s|
22
22
  s.license = "MIT"
23
23
  s.add_dependency 'builder'
24
24
  s.add_dependency 'expression_parser'
25
- s.add_dependency 'rinku'
25
+ s.add_dependency 'twitter-text'
26
26
  s.add_development_dependency 'test-unit'
27
27
  s.add_development_dependency 'activesupport'
28
28
  s.add_development_dependency 'i18n'
29
29
  s.add_development_dependency 'rake'
30
30
  s.add_development_dependency 'rdoc'
31
- s.add_development_dependency(RUBY_VERSION =~ /^1\.9/ ? "simplecov" : "rcov")
31
+ s.add_development_dependency 'simplecov'
32
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikicloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
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: 2014-01-07 00:00:00.000000000 Z
12
+ date: 2015-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &17717700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *17717700
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: expression_parser
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &17717280 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: '0'
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
35
+ version_requirements: *17717280
46
36
  - !ruby/object:Gem::Dependency
47
- name: rinku
48
- requirement: !ruby/object:Gem::Requirement
37
+ name: twitter-text
38
+ requirement: &17716860 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *17716860
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: test-unit
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &17768360 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: '0'
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
57
+ version_requirements: *17768360
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: activesupport
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &17767940 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ! '>='
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: '0'
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
68
+ version_requirements: *17767940
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: i18n
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &17767520 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ! '>='
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: '0'
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
79
+ version_requirements: *17767520
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: rake
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &17767100 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ! '>='
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: '0'
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
90
+ version_requirements: *17767100
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: rdoc
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &17766680 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ! '>='
@@ -133,15 +98,10 @@ dependencies:
133
98
  version: '0'
134
99
  type: :development
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
101
+ version_requirements: *17766680
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: simplecov
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &17766260 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
107
  - - ! '>='
@@ -149,12 +109,7 @@ dependencies:
149
109
  version: '0'
150
110
  type: :development
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
112
+ version_requirements: *17766260
158
113
  description: mediawiki parser
159
114
  email: nricciar@gmail.com
160
115
  executables: []
@@ -230,21 +185,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
185
  - - ! '>='
231
186
  - !ruby/object:Gem::Version
232
187
  version: '0'
233
- segments:
234
- - 0
235
- hash: -2603482441025638053
236
188
  required_rubygems_version: !ruby/object:Gem::Requirement
237
189
  none: false
238
190
  requirements:
239
191
  - - ! '>='
240
192
  - !ruby/object:Gem::Version
241
193
  version: '0'
242
- segments:
243
- - 0
244
- hash: -2603482441025638053
245
194
  requirements: []
246
195
  rubyforge_project:
247
- rubygems_version: 1.8.25
196
+ rubygems_version: 1.8.11
248
197
  signing_key:
249
198
  specification_version: 3
250
199
  summary: An implementation of the mediawiki markup in ruby