pygmentize 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pygmentize.rb +3 -3
- data/pygmentize.gemspec +11 -2
- data/vendor/pygments/plugin.py +8 -4
- metadata +4 -12
data/lib/pygmentize.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require "shellwords"
|
2
2
|
|
3
3
|
class Pygmentize
|
4
|
-
VERSION = "0.0.
|
4
|
+
VERSION = "0.0.3"
|
5
5
|
|
6
6
|
def self.bin
|
7
7
|
"/usr/bin/env python #{File.expand_path("../vendor/pygmentize.py", File.dirname(__FILE__))}"
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.process(source, lexer)
|
11
|
-
args
|
10
|
+
def self.process(source, lexer, args = [])
|
11
|
+
args += [
|
12
12
|
"-l", lexer.to_s,
|
13
13
|
"-f", "html",
|
14
14
|
"-O", "encoding=#{source.encoding}"
|
data/pygmentize.gemspec
CHANGED
@@ -1,13 +1,22 @@
|
|
1
|
+
require "./lib/pygmentize"
|
1
2
|
|
2
3
|
Gem::Specification.new do |s|
|
3
4
|
s.name = "pygmentize"
|
4
|
-
s.version =
|
5
|
+
s.version = Pygmentize::VERSION
|
5
6
|
s.summary = "A Ruby gem that vendors Pygments"
|
6
7
|
s.description = "A Ruby gem that vendors Pygments"
|
7
8
|
s.authors = ["Damian Janowski", "Michel Martens"]
|
8
9
|
s.email = ["djanowski@dimaion.com", "michel@soveran.com"]
|
9
10
|
s.homepage = "http://github.com/djanowski/pygmentize"
|
10
|
-
s.files = [
|
11
|
+
s.files = Dir[
|
12
|
+
"*.gemspec",
|
13
|
+
"LICENSE",
|
14
|
+
"README.markdown",
|
15
|
+
"Rakefile",
|
16
|
+
"lib/**/*.rb",
|
17
|
+
"test/*.*",
|
18
|
+
"vendor/**/*",
|
19
|
+
]
|
11
20
|
|
12
21
|
s.executables.push("pygmentize")
|
13
22
|
end
|
data/vendor/pygments/plugin.py
CHANGED
@@ -35,10 +35,14 @@
|
|
35
35
|
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
|
36
36
|
:license: BSD, see LICENSE for details.
|
37
37
|
"""
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
import warnings
|
39
|
+
|
40
|
+
with warnings.catch_warnings():
|
41
|
+
warnings.simplefilter("ignore")
|
42
|
+
try:
|
43
|
+
import pkg_resources
|
44
|
+
except ImportError:
|
45
|
+
pkg_resources = None
|
42
46
|
|
43
47
|
LEXER_ENTRY_POINT = 'pygments.lexers'
|
44
48
|
FORMATTER_ENTRY_POINT = 'pygments.formatters'
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pygmentize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
version: 0.0.2
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.3
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Damian Janowski
|
@@ -15,7 +11,7 @@ autorequire:
|
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
13
|
|
18
|
-
date:
|
14
|
+
date: 2011-05-13 00:00:00 -03:00
|
19
15
|
default_executable:
|
20
16
|
dependencies: []
|
21
17
|
|
@@ -115,21 +111,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
111
|
requirements:
|
116
112
|
- - ">="
|
117
113
|
- !ruby/object:Gem::Version
|
118
|
-
segments:
|
119
|
-
- 0
|
120
114
|
version: "0"
|
121
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
116
|
none: false
|
123
117
|
requirements:
|
124
118
|
- - ">="
|
125
119
|
- !ruby/object:Gem::Version
|
126
|
-
segments:
|
127
|
-
- 0
|
128
120
|
version: "0"
|
129
121
|
requirements: []
|
130
122
|
|
131
123
|
rubyforge_project:
|
132
|
-
rubygems_version: 1.
|
124
|
+
rubygems_version: 1.6.2
|
133
125
|
signing_key:
|
134
126
|
specification_version: 3
|
135
127
|
summary: A Ruby gem that vendors Pygments
|