pygmentize 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,14 @@
1
1
  require "shellwords"
2
2
 
3
3
  class Pygmentize
4
- VERSION = "0.0.2"
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}"
@@ -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 = "0.0.2"
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 = ["pygmentize.gemspec", "LICENSE", "Rakefile", "lib/pygmentize.rb", "test/pygmentize.rb", "vendor/pygmentize.py", "vendor/pygments", "vendor/pygments/__init__.py", "vendor/pygments/AUTHORS", "vendor/pygments/cmdline.py", "vendor/pygments/console.py", "vendor/pygments/filter.py", "vendor/pygments/filters", "vendor/pygments/filters/__init__.py", "vendor/pygments/formatter.py", "vendor/pygments/formatters", "vendor/pygments/formatters/__init__.py", "vendor/pygments/formatters/_mapping.py", "vendor/pygments/formatters/bbcode.py", "vendor/pygments/formatters/html.py", "vendor/pygments/formatters/img.py", "vendor/pygments/formatters/latex.py", "vendor/pygments/formatters/other.py", "vendor/pygments/formatters/rtf.py", "vendor/pygments/formatters/svg.py", "vendor/pygments/formatters/terminal.py", "vendor/pygments/formatters/terminal256.py", "vendor/pygments/lexer.py", "vendor/pygments/lexers", "vendor/pygments/lexers/__init__.py", "vendor/pygments/lexers/_asybuiltins.py", "vendor/pygments/lexers/_clbuiltins.py", "vendor/pygments/lexers/_luabuiltins.py", "vendor/pygments/lexers/_mapping.py", "vendor/pygments/lexers/_phpbuiltins.py", "vendor/pygments/lexers/_vimbuiltins.py", "vendor/pygments/lexers/agile.py", "vendor/pygments/lexers/asm.py", "vendor/pygments/lexers/compiled.py", "vendor/pygments/lexers/dotnet.py", "vendor/pygments/lexers/functional.py", "vendor/pygments/lexers/math.py", "vendor/pygments/lexers/other.py", "vendor/pygments/lexers/parsers.py", "vendor/pygments/lexers/special.py", "vendor/pygments/lexers/templates.py", "vendor/pygments/lexers/text.py", "vendor/pygments/lexers/web.py", "vendor/pygments/LICENSE", "vendor/pygments/plugin.py", "vendor/pygments/scanner.py", "vendor/pygments/style.py", "vendor/pygments/styles", "vendor/pygments/styles/__init__.py", "vendor/pygments/styles/autumn.py", "vendor/pygments/styles/borland.py", "vendor/pygments/styles/bw.py", "vendor/pygments/styles/colorful.py", "vendor/pygments/styles/default.py", "vendor/pygments/styles/emacs.py", "vendor/pygments/styles/friendly.py", "vendor/pygments/styles/fruity.py", "vendor/pygments/styles/manni.py", "vendor/pygments/styles/monokai.py", "vendor/pygments/styles/murphy.py", "vendor/pygments/styles/native.py", "vendor/pygments/styles/pastie.py", "vendor/pygments/styles/perldoc.py", "vendor/pygments/styles/tango.py", "vendor/pygments/styles/trac.py", "vendor/pygments/styles/vim.py", "vendor/pygments/styles/vs.py", "vendor/pygments/token.py", "vendor/pygments/unistring.py", "vendor/pygments/util.py"]
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
@@ -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
- try:
39
- import pkg_resources
40
- except ImportError:
41
- pkg_resources = None
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: false
5
- segments:
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: 2010-11-30 00:00:00 -03:00
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.3.7
124
+ rubygems_version: 1.6.2
133
125
  signing_key:
134
126
  specification_version: 3
135
127
  summary: A Ruby gem that vendors Pygments