pygments.rb 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  changelog
2
2
  ===========
3
3
 
4
+ Version 0.5.0 (Apr 13, 2013)
5
+ -----------------------------
6
+
7
+ * Use #rstrip to fix table mode bug
8
+
9
+ Version 0.4.2 (Feb 25, 2013)
10
+ -----------------------------
11
+
12
+ * Add new lexers, including custom lexers
13
+
4
14
  Version 0.3.7 (Jan 2, 2013)
5
15
  -----------------------------
6
16
 
data/Rakefile CHANGED
@@ -31,14 +31,13 @@ end
31
31
 
32
32
  # ==========================================================
33
33
  # Cache lexers
34
- # # ==========================================================
34
+ # ==========================================================
35
35
 
36
36
  # Write all the lexers to a file for easy lookup
37
37
  task :lexers do
38
38
  sh "ruby cache-lexers.rb"
39
39
  end
40
40
 
41
-
42
41
  # ==========================================================
43
42
  # Vendor
44
43
  # ==========================================================
@@ -36,12 +36,21 @@ module Pygments
36
36
 
37
37
  # A pipe to the mentos python process. #popen4 gives us
38
38
  # the pid and three IO objects to write and read.
39
- script = File.expand_path('../mentos.py', __FILE__)
40
- script = 'python ' + script if is_windows
39
+ script = "#{python_binary} #{File.expand_path('../mentos.py', __FILE__)}"
41
40
  @pid, @in, @out, @err = popen4(script)
42
41
  @log.info "[#{Time.now.iso8601}] Starting pid #{@pid.to_s} with fd #{@out.to_i.to_s}."
43
42
  end
44
43
 
44
+ # Detect a suitable Python binary to use. We can't just use `python2`
45
+ # because apparently some old versions of Debian only have `python` or
46
+ # something like that.
47
+ def python_binary
48
+ @python_binary ||= begin
49
+ `which python2`
50
+ $?.success? ? "python2" : "python"
51
+ end
52
+ end
53
+
45
54
  # Stop the child process by issuing a kill -9.
46
55
  #
47
56
  # We then call waitpid() with the pid, which waits for that particular
@@ -1,3 +1,3 @@
1
1
  module Pygments
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pygments.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-13 00:00:00.000000000 Z
13
+ date: 2013-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yajl-ruby
@@ -68,7 +68,6 @@ extensions: []
68
68
  extra_rdoc_files: []
69
69
  files:
70
70
  - .gitignore
71
- - CHANGELOG
72
71
  - CHANGELOG.md
73
72
  - Gemfile
74
73
  - LICENSE
data/CHANGELOG DELETED
@@ -1,9 +0,0 @@
1
- changelog
2
- ===========
3
-
4
- Version 0.3.4 (Dec 28, 2012)
5
-
6
- * Add support for Windows
7
- * Add MIT license
8
-
9
-