pygments.rb-jruby 0.5.4.1 → 0.5.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pygments/popen.rb +4 -4
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01e588e6d377f0a7e602ccbe71ce49f85ab604e0
|
4
|
+
data.tar.gz: 4de5f0ab43023e1a723109a4f2df6867f1549baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874d344a4f65aa84c047a7ed0157ec14aa38a01cbf1f4e4d858b31720eee5fe882642e633201df884bb01c077ff4f154b1862d1f50dfc760592cd61dce1d5687
|
7
|
+
data.tar.gz: 8d901634d1e6c458980eea3762b99cbfcd5a55e9d529541e30f68eaddd7ae70ff4075dace06d206665892049e1ec443280817997d8a0e9c161cf51ec8d5f6a23
|
data/lib/pygments/popen.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
require '
|
2
|
+
require 'json'
|
3
3
|
require 'timeout'
|
4
4
|
require 'logger'
|
5
5
|
require 'time'
|
@@ -230,7 +230,7 @@ module Pygments
|
|
230
230
|
|
231
231
|
kwargs.freeze
|
232
232
|
kwargs = kwargs.merge("fd" => @out.to_i, "id" => id, "bytes" => bytesize)
|
233
|
-
out_header =
|
233
|
+
out_header = JSON.dump(:method => method, :args => args, :kwargs => kwargs)
|
234
234
|
|
235
235
|
# Get the size of the header itself and write that.
|
236
236
|
bits = get_fixed_bits_from_header(out_header)
|
@@ -370,7 +370,7 @@ module Pygments
|
|
370
370
|
# want them, text otherwise.
|
371
371
|
def return_result(res, method)
|
372
372
|
unless method == :lexer_name_for || method == :highlight || method == :css
|
373
|
-
res =
|
373
|
+
res = JSON.load(res, :symbolize_keys => true)
|
374
374
|
end
|
375
375
|
res = res.rstrip if res.class == String
|
376
376
|
res
|
@@ -379,7 +379,7 @@ module Pygments
|
|
379
379
|
# Convert a text header into JSON for easy access.
|
380
380
|
def header_to_json(header)
|
381
381
|
@log.info "[#{Time.now.iso8601}] In header: #{header.to_s} "
|
382
|
-
header =
|
382
|
+
header = JSON.load(header)
|
383
383
|
|
384
384
|
if header["error"]
|
385
385
|
# Raise this as a Ruby exception of the MentosError class.
|
data/lib/pygments/version.rb
CHANGED
data/pygments.rb.gemspec
CHANGED
@@ -13,7 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.authors = ['Aman Gupta', 'Ted Nyman']
|
14
14
|
s.email = ['aman@tmm1.net']
|
15
15
|
|
16
|
-
s.add_dependency '
|
16
|
+
s.add_dependency 'json'
|
17
|
+
# s.add_dependency 'yajl-ruby', '~> 1.1.0'
|
17
18
|
# s.add_dependency 'posix-spawn', '~> 0.3.6'
|
18
19
|
s.add_development_dependency 'rake-compiler', '~> 0.7.6'
|
19
20
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pygments.rb-jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.4.
|
4
|
+
version: 0.5.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aman Gupta
|
@@ -12,19 +12,19 @@ cert_chain: []
|
|
12
12
|
date: 2013-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: json
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake-compiler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|