markdpwn 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/Gemfile +8 -8
  2. data/Gemfile.lock +18 -18
  3. data/VERSION +1 -1
  4. data/lib/markdpwn/code.rb +12 -10
  5. data/markdpwn.gemspec +27 -27
  6. metadata +20 -20
data/Gemfile CHANGED
@@ -1,22 +1,22 @@
1
1
  source :rubygems
2
2
 
3
3
  # Code formatting.
4
- gem 'pygments.rb', '>= 0.2.11'
4
+ gem 'pygments.rb', '>= 0.2.13'
5
5
 
6
6
  # Github formatting.
7
- gem 'github-markup', '>= 0.7.2', :require => 'github/markup'
7
+ gem 'github-markup', '>= 0.7.4', :require => 'github/markup'
8
8
  gem 'redcarpet', '>= 2.1.1'
9
9
  gem 'RedCloth', '>= 4.2.9'
10
10
  gem 'rdoc', '>= 3.12'
11
- gem 'org-ruby', '>= 0.6.2'
11
+ gem 'org-ruby', '>= 0.7.1'
12
12
  gem 'creole', '>= 0.4.2'
13
- gem 'wikicloth', '>= 0.7.1'
13
+ gem 'wikicloth', '>= 0.8.0'
14
14
 
15
15
  group :development do
16
- gem 'minitest', '>= 2.11'
17
- gem 'yard', '>= 0.7'
18
- gem 'bundler', '>= 1.0.22'
19
- gem 'jeweler', '>= 1.8.3'
16
+ gem 'minitest', '>= 3.4.0'
17
+ gem 'yard', '>= 0.8'
18
+ gem 'bundler', '>= 1.2.0'
19
+ gem 'jeweler', '>= 1.8.4'
20
20
  gem 'rcov', '>= 0', :platform => :mri_18
21
21
  gem 'simplecov', '>= 0', :platform => :mri_19
22
22
  end
data/Gemfile.lock CHANGED
@@ -3,23 +3,23 @@ GEM
3
3
  specs:
4
4
  RedCloth (4.2.9)
5
5
  blankslate (2.1.2.4)
6
- builder (3.0.0)
6
+ builder (3.1.0)
7
7
  creole (0.4.2)
8
8
  expression_parser (0.9.0)
9
9
  ffi (1.0.11)
10
10
  git (1.2.5)
11
- github-markup (0.7.2)
12
- jeweler (1.8.3)
11
+ github-markup (0.7.4)
12
+ jeweler (1.8.4)
13
13
  bundler (~> 1.0)
14
14
  git (>= 1.2.5)
15
15
  rake
16
16
  rdoc
17
- json (1.6.6)
18
- minitest (2.12.1)
19
- multi_json (1.2.0)
20
- org-ruby (0.6.2)
17
+ json (1.7.5)
18
+ minitest (3.4.0)
19
+ multi_json (1.3.6)
20
+ org-ruby (0.7.1)
21
21
  rubypants (>= 0.2.0)
22
- pygments.rb (0.2.11)
22
+ pygments.rb (0.2.13)
23
23
  rubypython (~> 0.5.3)
24
24
  rake (0.9.2.2)
25
25
  rcov (1.0.0)
@@ -30,30 +30,30 @@ GEM
30
30
  rubypython (0.5.3)
31
31
  blankslate (>= 2.1.2.3)
32
32
  ffi (~> 1.0.7)
33
- simplecov (0.6.1)
33
+ simplecov (0.6.4)
34
34
  multi_json (~> 1.0)
35
35
  simplecov-html (~> 0.5.3)
36
36
  simplecov-html (0.5.3)
37
37
  wikicloth (0.8.0)
38
38
  builder
39
39
  expression_parser
40
- yard (0.7.5)
40
+ yard (0.8.2.1)
41
41
 
42
42
  PLATFORMS
43
43
  ruby
44
44
 
45
45
  DEPENDENCIES
46
46
  RedCloth (>= 4.2.9)
47
- bundler (>= 1.0.22)
47
+ bundler (>= 1.2.0)
48
48
  creole (>= 0.4.2)
49
- github-markup (>= 0.7.2)
50
- jeweler (>= 1.8.3)
51
- minitest (>= 2.11)
52
- org-ruby (>= 0.6.2)
53
- pygments.rb (>= 0.2.11)
49
+ github-markup (>= 0.7.4)
50
+ jeweler (>= 1.8.4)
51
+ minitest (>= 3.4.0)
52
+ org-ruby (>= 0.7.1)
53
+ pygments.rb (>= 0.2.13)
54
54
  rcov
55
55
  rdoc (>= 3.12)
56
56
  redcarpet (>= 2.1.1)
57
57
  simplecov
58
- wikicloth (>= 0.7.1)
59
- yard (>= 0.7)
58
+ wikicloth (>= 0.8.0)
59
+ yard (>= 0.8)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
data/lib/markdpwn/code.rb CHANGED
@@ -13,8 +13,8 @@ module Code
13
13
  # @option options [String] :file_name the name of the file containing the
14
14
  # piece of code; meaningful for files in version control repositories,
15
15
  # e-mail attachments, and code fetched from links
16
- # @option options [String] :language the name of the code's language; GFM code
17
- # blocks can include a language name
16
+ # @option options [String] :language the name of the code's language; GFM
17
+ # code blocks can include a language name
18
18
  # @return [String] a HTML fragment containing the formatted code
19
19
  def self.render(code, options = {})
20
20
  [
@@ -23,15 +23,17 @@ module Code
23
23
  "</div>"
24
24
  ].join ''
25
25
  end
26
-
26
+
27
27
  # The raw Pygments output for parsing some code.
28
28
  #
29
29
  def self.pygment(code, options = {})
30
30
  lexer = pygments_lexer options
31
- Pygments.highlight code, :lexer => lexer, :formatter => 'html',
32
- :options => { :encoding => 'utf-8', :nowrap => true }
31
+ pygments_args = { :formatter => 'html',
32
+ :options => { :encoding => 'utf-8', :nowrap => true } }
33
+ pygments_args[:lexer] = lexer if lexer
34
+ Pygments.highlight code, pygments_args
33
35
  end
34
-
36
+
35
37
  # The name of the Python lexer that is most suitable for some code.
36
38
  #
37
39
  # @param [Hash] options code properties that help choose the formatter
@@ -48,7 +50,7 @@ module Code
48
50
  end
49
51
  return lexer if lexer
50
52
  end
51
-
53
+
52
54
  if mime_type = options[:mime_type]
53
55
  lexer = begin
54
56
  Pygments.lexer_name_for :mimetype => mime_type
@@ -57,7 +59,7 @@ module Code
57
59
  end
58
60
  return lexer if lexer
59
61
  end
60
-
62
+
61
63
  if file_name = options[:file_name]
62
64
  lexer = begin
63
65
  Pygments.lexer_name_for :filename => file_name
@@ -66,7 +68,7 @@ module Code
66
68
  end
67
69
  return lexer if lexer
68
70
  end
69
-
71
+
70
72
  if code = options[:code]
71
73
  lexer = begin
72
74
  Pygments.lexer_name_for code
@@ -75,7 +77,7 @@ module Code
75
77
  end
76
78
  return lexer if lexer
77
79
  end
78
-
80
+
79
81
  nil
80
82
  end
81
83
  end # namespace Markdpwn::Code
data/markdpwn.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "markdpwn"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Victor Costan"]
12
- s.date = "2012-04-15"
12
+ s.date = "2012-09-06"
13
13
  s.description = "HTML-formats text documents such as Markdown, textile, and source code"
14
14
  s.email = "victor@costan.us"
15
15
  s.extra_rdoc_files = [
@@ -50,56 +50,56 @@ Gem::Specification.new do |s|
50
50
  s.homepage = "http://github.com/pwnall/markdpwn"
51
51
  s.licenses = ["MIT"]
52
52
  s.require_paths = ["lib"]
53
- s.rubygems_version = "1.8.22"
53
+ s.rubygems_version = "1.8.24"
54
54
  s.summary = "HTML-formats text documents such as Markdown, textile, and source code"
55
55
 
56
56
  if s.respond_to? :specification_version then
57
57
  s.specification_version = 3
58
58
 
59
59
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
60
- s.add_runtime_dependency(%q<pygments.rb>, [">= 0.2.11"])
61
- s.add_runtime_dependency(%q<github-markup>, [">= 0.7.2"])
60
+ s.add_runtime_dependency(%q<pygments.rb>, [">= 0.2.13"])
61
+ s.add_runtime_dependency(%q<github-markup>, [">= 0.7.4"])
62
62
  s.add_runtime_dependency(%q<redcarpet>, [">= 2.1.1"])
63
63
  s.add_runtime_dependency(%q<RedCloth>, [">= 4.2.9"])
64
64
  s.add_runtime_dependency(%q<rdoc>, [">= 3.12"])
65
- s.add_runtime_dependency(%q<org-ruby>, [">= 0.6.2"])
65
+ s.add_runtime_dependency(%q<org-ruby>, [">= 0.7.1"])
66
66
  s.add_runtime_dependency(%q<creole>, [">= 0.4.2"])
67
- s.add_runtime_dependency(%q<wikicloth>, [">= 0.7.1"])
68
- s.add_development_dependency(%q<minitest>, [">= 2.11"])
69
- s.add_development_dependency(%q<yard>, [">= 0.7"])
70
- s.add_development_dependency(%q<bundler>, [">= 1.0.22"])
71
- s.add_development_dependency(%q<jeweler>, [">= 1.8.3"])
67
+ s.add_runtime_dependency(%q<wikicloth>, [">= 0.8.0"])
68
+ s.add_development_dependency(%q<minitest>, [">= 3.4.0"])
69
+ s.add_development_dependency(%q<yard>, [">= 0.8"])
70
+ s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
71
+ s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
72
72
  s.add_development_dependency(%q<rcov>, [">= 0"])
73
73
  s.add_development_dependency(%q<simplecov>, [">= 0"])
74
74
  else
75
- s.add_dependency(%q<pygments.rb>, [">= 0.2.11"])
76
- s.add_dependency(%q<github-markup>, [">= 0.7.2"])
75
+ s.add_dependency(%q<pygments.rb>, [">= 0.2.13"])
76
+ s.add_dependency(%q<github-markup>, [">= 0.7.4"])
77
77
  s.add_dependency(%q<redcarpet>, [">= 2.1.1"])
78
78
  s.add_dependency(%q<RedCloth>, [">= 4.2.9"])
79
79
  s.add_dependency(%q<rdoc>, [">= 3.12"])
80
- s.add_dependency(%q<org-ruby>, [">= 0.6.2"])
80
+ s.add_dependency(%q<org-ruby>, [">= 0.7.1"])
81
81
  s.add_dependency(%q<creole>, [">= 0.4.2"])
82
- s.add_dependency(%q<wikicloth>, [">= 0.7.1"])
83
- s.add_dependency(%q<minitest>, [">= 2.11"])
84
- s.add_dependency(%q<yard>, [">= 0.7"])
85
- s.add_dependency(%q<bundler>, [">= 1.0.22"])
86
- s.add_dependency(%q<jeweler>, [">= 1.8.3"])
82
+ s.add_dependency(%q<wikicloth>, [">= 0.8.0"])
83
+ s.add_dependency(%q<minitest>, [">= 3.4.0"])
84
+ s.add_dependency(%q<yard>, [">= 0.8"])
85
+ s.add_dependency(%q<bundler>, [">= 1.2.0"])
86
+ s.add_dependency(%q<jeweler>, [">= 1.8.4"])
87
87
  s.add_dependency(%q<rcov>, [">= 0"])
88
88
  s.add_dependency(%q<simplecov>, [">= 0"])
89
89
  end
90
90
  else
91
- s.add_dependency(%q<pygments.rb>, [">= 0.2.11"])
92
- s.add_dependency(%q<github-markup>, [">= 0.7.2"])
91
+ s.add_dependency(%q<pygments.rb>, [">= 0.2.13"])
92
+ s.add_dependency(%q<github-markup>, [">= 0.7.4"])
93
93
  s.add_dependency(%q<redcarpet>, [">= 2.1.1"])
94
94
  s.add_dependency(%q<RedCloth>, [">= 4.2.9"])
95
95
  s.add_dependency(%q<rdoc>, [">= 3.12"])
96
- s.add_dependency(%q<org-ruby>, [">= 0.6.2"])
96
+ s.add_dependency(%q<org-ruby>, [">= 0.7.1"])
97
97
  s.add_dependency(%q<creole>, [">= 0.4.2"])
98
- s.add_dependency(%q<wikicloth>, [">= 0.7.1"])
99
- s.add_dependency(%q<minitest>, [">= 2.11"])
100
- s.add_dependency(%q<yard>, [">= 0.7"])
101
- s.add_dependency(%q<bundler>, [">= 1.0.22"])
102
- s.add_dependency(%q<jeweler>, [">= 1.8.3"])
98
+ s.add_dependency(%q<wikicloth>, [">= 0.8.0"])
99
+ s.add_dependency(%q<minitest>, [">= 3.4.0"])
100
+ s.add_dependency(%q<yard>, [">= 0.8"])
101
+ s.add_dependency(%q<bundler>, [">= 1.2.0"])
102
+ s.add_dependency(%q<jeweler>, [">= 1.8.4"])
103
103
  s.add_dependency(%q<rcov>, [">= 0"])
104
104
  s.add_dependency(%q<simplecov>, [">= 0"])
105
105
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdpwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-15 00:00:00.000000000 Z
12
+ date: 2012-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pygments.rb
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.2.11
21
+ version: 0.2.13
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.2.11
29
+ version: 0.2.13
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: github-markup
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 0.7.2
37
+ version: 0.7.4
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 0.7.2
45
+ version: 0.7.4
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: redcarpet
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -98,7 +98,7 @@ dependencies:
98
98
  requirements:
99
99
  - - ! '>='
100
100
  - !ruby/object:Gem::Version
101
- version: 0.6.2
101
+ version: 0.7.1
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  requirements:
107
107
  - - ! '>='
108
108
  - !ruby/object:Gem::Version
109
- version: 0.6.2
109
+ version: 0.7.1
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: creole
112
112
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ dependencies:
130
130
  requirements:
131
131
  - - ! '>='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.7.1
133
+ version: 0.8.0
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ dependencies:
138
138
  requirements:
139
139
  - - ! '>='
140
140
  - !ruby/object:Gem::Version
141
- version: 0.7.1
141
+ version: 0.8.0
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: minitest
144
144
  requirement: !ruby/object:Gem::Requirement
@@ -146,7 +146,7 @@ dependencies:
146
146
  requirements:
147
147
  - - ! '>='
148
148
  - !ruby/object:Gem::Version
149
- version: '2.11'
149
+ version: 3.4.0
150
150
  type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  requirements:
155
155
  - - ! '>='
156
156
  - !ruby/object:Gem::Version
157
- version: '2.11'
157
+ version: 3.4.0
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: yard
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +162,7 @@ dependencies:
162
162
  requirements:
163
163
  - - ! '>='
164
164
  - !ruby/object:Gem::Version
165
- version: '0.7'
165
+ version: '0.8'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ dependencies:
170
170
  requirements:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
- version: '0.7'
173
+ version: '0.8'
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: bundler
176
176
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +178,7 @@ dependencies:
178
178
  requirements:
179
179
  - - ! '>='
180
180
  - !ruby/object:Gem::Version
181
- version: 1.0.22
181
+ version: 1.2.0
182
182
  type: :development
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
@@ -186,7 +186,7 @@ dependencies:
186
186
  requirements:
187
187
  - - ! '>='
188
188
  - !ruby/object:Gem::Version
189
- version: 1.0.22
189
+ version: 1.2.0
190
190
  - !ruby/object:Gem::Dependency
191
191
  name: jeweler
192
192
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ dependencies:
194
194
  requirements:
195
195
  - - ! '>='
196
196
  - !ruby/object:Gem::Version
197
- version: 1.8.3
197
+ version: 1.8.4
198
198
  type: :development
199
199
  prerelease: false
200
200
  version_requirements: !ruby/object:Gem::Requirement
@@ -202,7 +202,7 @@ dependencies:
202
202
  requirements:
203
203
  - - ! '>='
204
204
  - !ruby/object:Gem::Version
205
- version: 1.8.3
205
+ version: 1.8.4
206
206
  - !ruby/object:Gem::Dependency
207
207
  name: rcov
208
208
  requirement: !ruby/object:Gem::Requirement
@@ -287,7 +287,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
287
287
  version: '0'
288
288
  segments:
289
289
  - 0
290
- hash: -2821084060881153957
290
+ hash: -4265765567859591802
291
291
  required_rubygems_version: !ruby/object:Gem::Requirement
292
292
  none: false
293
293
  requirements:
@@ -296,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
296
  version: '0'
297
297
  requirements: []
298
298
  rubyforge_project:
299
- rubygems_version: 1.8.22
299
+ rubygems_version: 1.8.24
300
300
  signing_key:
301
301
  specification_version: 3
302
302
  summary: HTML-formats text documents such as Markdown, textile, and source code