vim_printer 0.1.6 → 0.1.7
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/CHANGELOG.md +4 -0
- data/lib/vim_printer/core_ext/file.rb +7 -3
- data/lib/vim_printer/version.rb +1 -1
- metadata +18 -20
- data/test/fixtures/inputs/vim_printer_output.tar.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5566edff0f15c84bb060c3a67ebb43c9a1f82493
|
4
|
+
data.tar.gz: 25d4de42648eeeb45ee1a3172053b661857d973c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 528cfb4898ae23c698d738d004ba260ef7e77cbb3109387d7b737ac243ef681865310e2f2a725dfbdffbd71f1a7a5d289dd71979bb91f368896206046b02ecc8
|
7
|
+
data.tar.gz: cc553f646c27ab209ec96f41c7993c3aa83308d7f697b05f188a552524e101f6737306b599cb8ebcac94d3dabae737107cf4daf36346d2838520ab0ba18c3d95
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,17 @@
|
|
1
|
-
#
|
1
|
+
# from: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/44936
|
2
2
|
class File
|
3
|
+
# Note: monkey patch to check if a given file is a binary
|
3
4
|
def self.binary?(name)
|
4
5
|
name = File.expand_path(name)
|
5
6
|
my_stat = stat(name)
|
6
7
|
return false unless my_stat.file?
|
7
8
|
open(name) do |file|
|
8
9
|
blk = file.read(my_stat.blksize)
|
9
|
-
|
10
|
-
blk.count("^ -~", "^\r\n") / blk.size > 0.3 || blk.count("\x00") > 0
|
10
|
+
if blk
|
11
|
+
return blk.size == 0 || blk.count("^ -~", "^\r\n") / blk.size > 0.3 || blk.count("\x00") > 0
|
12
|
+
else
|
13
|
+
false
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
data/lib/vim_printer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vim_printer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burin Choomnuan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -251,7 +251,6 @@ files:
|
|
251
251
|
- test/fixtures/inputs/java/demo4.yyy.java
|
252
252
|
- test/fixtures/inputs/noexts1_zzz
|
253
253
|
- test/fixtures/inputs/noexts2_zzz
|
254
|
-
- test/fixtures/inputs/vim_printer_output.tar.gz
|
255
254
|
- test/fixtures/outputs/demo1.xxx.rb.xhtml
|
256
255
|
- test/fixtures/outputs/demo1.yyy.rb.xhtml
|
257
256
|
- test/fixtures/outputs/demo2.xxx.rb.xhtml
|
@@ -289,25 +288,24 @@ specification_version: 4
|
|
289
288
|
summary: Batch convert multiple files to htmls using the power of Vim. Work will any
|
290
289
|
languages that can be open with Vim e.g. any non-binary files.
|
291
290
|
test_files:
|
292
|
-
- test/
|
293
|
-
- test/
|
294
|
-
- test/fixtures/inputs/demo2.xxx.rb
|
295
|
-
- test/fixtures/inputs/demo2.yyy.rb
|
296
|
-
- test/fixtures/inputs/java/demo3.xxx.java
|
297
|
-
- test/fixtures/inputs/java/demo3.yyy.java
|
298
|
-
- test/fixtures/inputs/java/demo4.xxx.java
|
299
|
-
- test/fixtures/inputs/java/demo4.yyy.java
|
300
|
-
- test/fixtures/inputs/noexts1_zzz
|
301
|
-
- test/fixtures/inputs/noexts2_zzz
|
302
|
-
- test/fixtures/inputs/vim_printer_output.tar.gz
|
291
|
+
- test/lib/vim_printer/test_cli.rb
|
292
|
+
- test/test_helper.rb
|
303
293
|
- test/fixtures/outputs/demo1.xxx.rb.xhtml
|
304
|
-
- test/fixtures/outputs/demo1.yyy.rb.xhtml
|
305
|
-
- test/fixtures/outputs/demo2.xxx.rb.xhtml
|
306
|
-
- test/fixtures/outputs/demo2.yyy.rb.xhtml
|
307
294
|
- test/fixtures/outputs/java/demo3.xxx.java.xhtml
|
295
|
+
- test/fixtures/outputs/java/demo4.yyy.java.xhtml
|
308
296
|
- test/fixtures/outputs/java/demo3.yyy.java.xhtml
|
309
297
|
- test/fixtures/outputs/java/demo4.xxx.java.xhtml
|
310
|
-
- test/fixtures/outputs/
|
311
|
-
- test/
|
312
|
-
- test/
|
298
|
+
- test/fixtures/outputs/demo2.xxx.rb.xhtml
|
299
|
+
- test/fixtures/outputs/demo1.yyy.rb.xhtml
|
300
|
+
- test/fixtures/outputs/demo2.yyy.rb.xhtml
|
301
|
+
- test/fixtures/inputs/noexts2_zzz
|
302
|
+
- test/fixtures/inputs/java/demo3.xxx.java
|
303
|
+
- test/fixtures/inputs/java/demo4.xxx.java
|
304
|
+
- test/fixtures/inputs/java/demo3.yyy.java
|
305
|
+
- test/fixtures/inputs/java/demo4.yyy.java
|
306
|
+
- test/fixtures/inputs/demo2.yyy.rb
|
307
|
+
- test/fixtures/inputs/demo1.yyy.rb
|
308
|
+
- test/fixtures/inputs/demo2.xxx.rb
|
309
|
+
- test/fixtures/inputs/noexts1_zzz
|
310
|
+
- test/fixtures/inputs/demo1.xxx.rb
|
313
311
|
has_rdoc:
|
Binary file
|