act 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/act/command.rb +1 -1
- data/lib/act/helper.rb +5 -1
- data/lib/act/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 626ce8cd7e573620e8fe2b43549afb1cc4f65b58
|
4
|
+
data.tar.gz: 78164113d48edf33d4437457e78c3bcb76ebe577
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 767f83cbaab9409a310b798ba02eb8c3b0d11ca9bea3edcf702a4a9d75486b7c5def2f37a22358304d8efd9880c2e442c6f33b58380376ec92d520cc9eddee7d
|
7
|
+
data.tar.gz: 72c0c6840315a642727fd6b220a15c575b7bed615bc336158a81bc59df5a9c9daa3bc377516a1cbe3395fbe50ead9aec6675e26f24826bcd45a5b2ea792054cc
|
data/lib/act/command.rb
CHANGED
@@ -22,7 +22,7 @@ module Act
|
|
22
22
|
def self.options
|
23
23
|
[
|
24
24
|
['--open', 'Open the file in $EDITOR instead of printing it'],
|
25
|
-
['--prettify',
|
25
|
+
['--prettify', 'Prettify output'],
|
26
26
|
['--line-numbers', 'Show output without line numbers'],
|
27
27
|
['--lexer=NAME', 'Use the given lexer'],
|
28
28
|
].concat(super)
|
data/lib/act/helper.rb
CHANGED
@@ -97,10 +97,14 @@ module Act
|
|
97
97
|
raise ArgumentError unless lexer
|
98
98
|
return string if `which pygmentize`.strip.empty?
|
99
99
|
result = nil
|
100
|
-
Open3.popen3("pygmentize -l #{lexer}") do |stdin, stdout, stderr|
|
100
|
+
Open3.popen3("pygmentize -l #{lexer} -O encoding=utf8") do |stdin, stdout, stderr, wait_thr|
|
101
101
|
stdin.write(string)
|
102
102
|
stdin.close_write
|
103
103
|
result = stdout.read
|
104
|
+
unless wait_thr.value.success?
|
105
|
+
warn '[!] Syntax highlighting via the pygmentize tool failed'
|
106
|
+
result = string
|
107
|
+
end
|
104
108
|
end
|
105
109
|
result
|
106
110
|
end
|
data/lib/act/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: act
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Pelosin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|