tex2id 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tex2id/cli.rb +4 -9
- data/lib/tex2id/version.rb +1 -1
- data/lib/tex2id.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f56bc5e09157b4915d2f458de3d2dedd59717308cd162fbebee5137477ede8cd
|
4
|
+
data.tar.gz: b529dfa019139b2f245a2c7b8321e158d8ebd5f5f53315711a8bfaa51ffd98a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e598ad2e760a8c736b87b5bc8d12d506dabd241452af42cf8da555da5c1e83db741f98dc6b31942fe4a91d6869562a911febb63af0a0d4db49eb3724a0e28c49
|
7
|
+
data.tar.gz: ec6085ee4b184999f1179a49144b8126af8014122da99b2fd2aa43c120163d0e1d2e7740702e5442c6e2757bed08fc5bad9686c01ca73ead6c8bde05e71f904a
|
data/lib/tex2id/cli.rb
CHANGED
@@ -43,27 +43,22 @@ Usage: #{$0} <source_file> [<output_file>]
|
|
43
43
|
def source
|
44
44
|
case source_file
|
45
45
|
when "-"
|
46
|
-
$stdin.set_encoding("Windows-31J:UTF-8")
|
47
46
|
$stdin.read
|
48
47
|
else
|
49
|
-
IO.read(source_file, mode: 'r
|
48
|
+
IO.read(source_file, mode: 'r')
|
50
49
|
end
|
51
50
|
end
|
52
51
|
|
53
52
|
def with_output_file_io
|
54
53
|
begin
|
55
54
|
io = if output_file
|
56
|
-
File.open(output_file, 'w
|
55
|
+
File.open(output_file, 'w')
|
57
56
|
else
|
58
|
-
$stdout
|
57
|
+
$stdout
|
59
58
|
end
|
60
59
|
yield io
|
61
60
|
ensure
|
62
|
-
if output_file
|
63
|
-
io.close
|
64
|
-
else
|
65
|
-
$stdout.set_encoding("UTF-8")
|
66
|
-
end
|
61
|
+
io.close if output_file
|
67
62
|
end
|
68
63
|
end
|
69
64
|
|
data/lib/tex2id/version.rb
CHANGED
data/lib/tex2id.rb
CHANGED