pygmentize 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/Rakefile +11 -0
  2. data/bin/pygmentize +5 -0
  3. data/lib/{pygments.rb → pygmentize.rb} +3 -3
  4. data/pygmentize.gemspec +5 -3
  5. data/test/{pygments.rb → pygmentize.rb} +3 -3
  6. metadata +10 -39
  7. data/vendor/pygments/__init__.pyc +0 -0
  8. data/vendor/pygments/cmdline.pyc +0 -0
  9. data/vendor/pygments/console.pyc +0 -0
  10. data/vendor/pygments/filter.pyc +0 -0
  11. data/vendor/pygments/filters/__init__.pyc +0 -0
  12. data/vendor/pygments/formatter.pyc +0 -0
  13. data/vendor/pygments/formatters/__init__.pyc +0 -0
  14. data/vendor/pygments/formatters/_mapping.pyc +0 -0
  15. data/vendor/pygments/formatters/bbcode.pyc +0 -0
  16. data/vendor/pygments/formatters/html.pyc +0 -0
  17. data/vendor/pygments/formatters/img.pyc +0 -0
  18. data/vendor/pygments/formatters/latex.pyc +0 -0
  19. data/vendor/pygments/formatters/other.pyc +0 -0
  20. data/vendor/pygments/formatters/rtf.pyc +0 -0
  21. data/vendor/pygments/formatters/svg.pyc +0 -0
  22. data/vendor/pygments/formatters/terminal.pyc +0 -0
  23. data/vendor/pygments/formatters/terminal256.pyc +0 -0
  24. data/vendor/pygments/lexer.pyc +0 -0
  25. data/vendor/pygments/lexers/__init__.pyc +0 -0
  26. data/vendor/pygments/lexers/_mapping.pyc +0 -0
  27. data/vendor/pygments/lexers/agile.pyc +0 -0
  28. data/vendor/pygments/lexers/functional.pyc +0 -0
  29. data/vendor/pygments/lexers/special.pyc +0 -0
  30. data/vendor/pygments/lexers/web.pyc +0 -0
  31. data/vendor/pygments/plugin.pyc +0 -0
  32. data/vendor/pygments/style.pyc +0 -0
  33. data/vendor/pygments/styles/__init__.pyc +0 -0
  34. data/vendor/pygments/styles/default.pyc +0 -0
  35. data/vendor/pygments/token.pyc +0 -0
  36. data/vendor/pygments/unistring.pyc +0 -0
  37. data/vendor/pygments/util.pyc +0 -0
@@ -0,0 +1,11 @@
1
+ task :test do
2
+ require "cutest"
3
+
4
+ Cutest.run(Dir["test/pygmentize.rb"])
5
+ end
6
+
7
+ task :cleanup do
8
+ `find . -name "*.pyc" -delete`
9
+ end
10
+
11
+ task :default => :test
@@ -0,0 +1,5 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require "pygmentize"
4
+
5
+ exec("#{Pygmentize.bin} #{Shellwords.shelljoin(ARGV)}")
@@ -1,13 +1,13 @@
1
1
  require "shellwords"
2
2
 
3
- class Pygments
4
- VERSION = "0.0.1"
3
+ class Pygmentize
4
+ VERSION = "0.0.2"
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.pygmentize(source, lexer)
10
+ def self.process(source, lexer)
11
11
  args = [
12
12
  "-l", lexer.to_s,
13
13
  "-f", "html",
@@ -1,11 +1,13 @@
1
1
 
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "pygmentize"
4
- s.version = "0.0.1"
4
+ s.version = "0.0.2"
5
5
  s.summary = "A Ruby gem that vendors Pygments"
6
6
  s.description = "A Ruby gem that vendors Pygments"
7
7
  s.authors = ["Damian Janowski", "Michel Martens"]
8
8
  s.email = ["djanowski@dimaion.com", "michel@soveran.com"]
9
- s.homepage = "http://github.com/djanowski/pygments"
10
- s.files = ["pygmentize.gemspec", "LICENSE", "lib/pygments.rb", "test/pygments.rb", "vendor/pygmentize.py", "vendor/pygments", "vendor/pygments/__init__.py", "vendor/pygments/__init__.pyc", "vendor/pygments/AUTHORS", "vendor/pygments/cmdline.py", "vendor/pygments/cmdline.pyc", "vendor/pygments/console.py", "vendor/pygments/console.pyc", "vendor/pygments/filter.py", "vendor/pygments/filter.pyc", "vendor/pygments/filters", "vendor/pygments/filters/__init__.py", "vendor/pygments/filters/__init__.pyc", "vendor/pygments/formatter.py", "vendor/pygments/formatter.pyc", "vendor/pygments/formatters", "vendor/pygments/formatters/__init__.py", "vendor/pygments/formatters/__init__.pyc", "vendor/pygments/formatters/_mapping.py", "vendor/pygments/formatters/_mapping.pyc", "vendor/pygments/formatters/bbcode.py", "vendor/pygments/formatters/bbcode.pyc", "vendor/pygments/formatters/html.py", "vendor/pygments/formatters/html.pyc", "vendor/pygments/formatters/img.py", "vendor/pygments/formatters/img.pyc", "vendor/pygments/formatters/latex.py", "vendor/pygments/formatters/latex.pyc", "vendor/pygments/formatters/other.py", "vendor/pygments/formatters/other.pyc", "vendor/pygments/formatters/rtf.py", "vendor/pygments/formatters/rtf.pyc", "vendor/pygments/formatters/svg.py", "vendor/pygments/formatters/svg.pyc", "vendor/pygments/formatters/terminal.py", "vendor/pygments/formatters/terminal.pyc", "vendor/pygments/formatters/terminal256.py", "vendor/pygments/formatters/terminal256.pyc", "vendor/pygments/lexer.py", "vendor/pygments/lexer.pyc", "vendor/pygments/lexers", "vendor/pygments/lexers/__init__.py", "vendor/pygments/lexers/__init__.pyc", "vendor/pygments/lexers/_asybuiltins.py", "vendor/pygments/lexers/_clbuiltins.py", "vendor/pygments/lexers/_luabuiltins.py", "vendor/pygments/lexers/_mapping.py", "vendor/pygments/lexers/_mapping.pyc", "vendor/pygments/lexers/_phpbuiltins.py", "vendor/pygments/lexers/_vimbuiltins.py", "vendor/pygments/lexers/agile.py", "vendor/pygments/lexers/agile.pyc", "vendor/pygments/lexers/asm.py", "vendor/pygments/lexers/compiled.py", "vendor/pygments/lexers/dotnet.py", "vendor/pygments/lexers/functional.py", "vendor/pygments/lexers/functional.pyc", "vendor/pygments/lexers/math.py", "vendor/pygments/lexers/other.py", "vendor/pygments/lexers/parsers.py", "vendor/pygments/lexers/special.py", "vendor/pygments/lexers/special.pyc", "vendor/pygments/lexers/templates.py", "vendor/pygments/lexers/text.py", "vendor/pygments/lexers/web.py", "vendor/pygments/lexers/web.pyc", "vendor/pygments/LICENSE", "vendor/pygments/plugin.py", "vendor/pygments/plugin.pyc", "vendor/pygments/scanner.py", "vendor/pygments/style.py", "vendor/pygments/style.pyc", "vendor/pygments/styles", "vendor/pygments/styles/__init__.py", "vendor/pygments/styles/__init__.pyc", "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/default.pyc", "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/token.pyc", "vendor/pygments/unistring.py", "vendor/pygments/unistring.pyc", "vendor/pygments/util.py", "vendor/pygments/util.pyc"]
9
+ 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
+
12
+ s.executables.push("pygmentize")
11
13
  end
@@ -1,10 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
- require File.expand_path("../lib/pygments", File.dirname(__FILE__))
3
+ require File.expand_path("../lib/pygmentize", File.dirname(__FILE__))
4
4
  require "nokogiri"
5
5
 
6
6
  test "colorizes output" do
7
- output = Pygments.pygmentize(%Q[{foo: "bar"}], :javascript)
7
+ output = Pygmentize.process(%Q[{foo: "bar"}], :javascript)
8
8
 
9
9
  doc = Nokogiri::HTML(output)
10
10
 
@@ -13,7 +13,7 @@ test "colorizes output" do
13
13
  end
14
14
 
15
15
  test "handles encodings" do
16
- output = Pygments.pygmentize(%Q[{foo: "bar", baz: "qüx"}], :javascript)
16
+ output = Pygmentize.process(%Q[{foo: "bar", baz: "qüx"}], :javascript)
17
17
 
18
18
  assert output.encoding == Encoding::UTF_8
19
19
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Damian Janowski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-24 00:00:00 -03:00
18
+ date: 2010-11-30 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -23,8 +23,8 @@ description: A Ruby gem that vendors Pygments
23
23
  email:
24
24
  - djanowski@dimaion.com
25
25
  - michel@soveran.com
26
- executables: []
27
-
26
+ executables:
27
+ - pygmentize
28
28
  extensions: []
29
29
 
30
30
  extra_rdoc_files: []
@@ -32,85 +32,58 @@ extra_rdoc_files: []
32
32
  files:
33
33
  - pygmentize.gemspec
34
34
  - LICENSE
35
- - lib/pygments.rb
36
- - test/pygments.rb
35
+ - Rakefile
36
+ - lib/pygmentize.rb
37
+ - test/pygmentize.rb
37
38
  - vendor/pygmentize.py
38
39
  - vendor/pygments/__init__.py
39
- - vendor/pygments/__init__.pyc
40
40
  - vendor/pygments/AUTHORS
41
41
  - vendor/pygments/cmdline.py
42
- - vendor/pygments/cmdline.pyc
43
42
  - vendor/pygments/console.py
44
- - vendor/pygments/console.pyc
45
43
  - vendor/pygments/filter.py
46
- - vendor/pygments/filter.pyc
47
44
  - vendor/pygments/filters/__init__.py
48
- - vendor/pygments/filters/__init__.pyc
49
45
  - vendor/pygments/formatter.py
50
- - vendor/pygments/formatter.pyc
51
46
  - vendor/pygments/formatters/__init__.py
52
- - vendor/pygments/formatters/__init__.pyc
53
47
  - vendor/pygments/formatters/_mapping.py
54
- - vendor/pygments/formatters/_mapping.pyc
55
48
  - vendor/pygments/formatters/bbcode.py
56
- - vendor/pygments/formatters/bbcode.pyc
57
49
  - vendor/pygments/formatters/html.py
58
- - vendor/pygments/formatters/html.pyc
59
50
  - vendor/pygments/formatters/img.py
60
- - vendor/pygments/formatters/img.pyc
61
51
  - vendor/pygments/formatters/latex.py
62
- - vendor/pygments/formatters/latex.pyc
63
52
  - vendor/pygments/formatters/other.py
64
- - vendor/pygments/formatters/other.pyc
65
53
  - vendor/pygments/formatters/rtf.py
66
- - vendor/pygments/formatters/rtf.pyc
67
54
  - vendor/pygments/formatters/svg.py
68
- - vendor/pygments/formatters/svg.pyc
69
55
  - vendor/pygments/formatters/terminal.py
70
- - vendor/pygments/formatters/terminal.pyc
71
56
  - vendor/pygments/formatters/terminal256.py
72
- - vendor/pygments/formatters/terminal256.pyc
73
57
  - vendor/pygments/lexer.py
74
- - vendor/pygments/lexer.pyc
75
58
  - vendor/pygments/lexers/__init__.py
76
- - vendor/pygments/lexers/__init__.pyc
77
59
  - vendor/pygments/lexers/_asybuiltins.py
78
60
  - vendor/pygments/lexers/_clbuiltins.py
79
61
  - vendor/pygments/lexers/_luabuiltins.py
80
62
  - vendor/pygments/lexers/_mapping.py
81
- - vendor/pygments/lexers/_mapping.pyc
82
63
  - vendor/pygments/lexers/_phpbuiltins.py
83
64
  - vendor/pygments/lexers/_vimbuiltins.py
84
65
  - vendor/pygments/lexers/agile.py
85
- - vendor/pygments/lexers/agile.pyc
86
66
  - vendor/pygments/lexers/asm.py
87
67
  - vendor/pygments/lexers/compiled.py
88
68
  - vendor/pygments/lexers/dotnet.py
89
69
  - vendor/pygments/lexers/functional.py
90
- - vendor/pygments/lexers/functional.pyc
91
70
  - vendor/pygments/lexers/math.py
92
71
  - vendor/pygments/lexers/other.py
93
72
  - vendor/pygments/lexers/parsers.py
94
73
  - vendor/pygments/lexers/special.py
95
- - vendor/pygments/lexers/special.pyc
96
74
  - vendor/pygments/lexers/templates.py
97
75
  - vendor/pygments/lexers/text.py
98
76
  - vendor/pygments/lexers/web.py
99
- - vendor/pygments/lexers/web.pyc
100
77
  - vendor/pygments/LICENSE
101
78
  - vendor/pygments/plugin.py
102
- - vendor/pygments/plugin.pyc
103
79
  - vendor/pygments/scanner.py
104
80
  - vendor/pygments/style.py
105
- - vendor/pygments/style.pyc
106
81
  - vendor/pygments/styles/__init__.py
107
- - vendor/pygments/styles/__init__.pyc
108
82
  - vendor/pygments/styles/autumn.py
109
83
  - vendor/pygments/styles/borland.py
110
84
  - vendor/pygments/styles/bw.py
111
85
  - vendor/pygments/styles/colorful.py
112
86
  - vendor/pygments/styles/default.py
113
- - vendor/pygments/styles/default.pyc
114
87
  - vendor/pygments/styles/emacs.py
115
88
  - vendor/pygments/styles/friendly.py
116
89
  - vendor/pygments/styles/fruity.py
@@ -125,13 +98,11 @@ files:
125
98
  - vendor/pygments/styles/vim.py
126
99
  - vendor/pygments/styles/vs.py
127
100
  - vendor/pygments/token.py
128
- - vendor/pygments/token.pyc
129
101
  - vendor/pygments/unistring.py
130
- - vendor/pygments/unistring.pyc
131
102
  - vendor/pygments/util.py
132
- - vendor/pygments/util.pyc
103
+ - bin/pygmentize
133
104
  has_rdoc: true
134
- homepage: http://github.com/djanowski/pygments
105
+ homepage: http://github.com/djanowski/pygmentize
135
106
  licenses: []
136
107
 
137
108
  post_install_message:
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file