presso 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/presso.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caef41f274a200d1b39bb457c4e32d4d35329f52
|
4
|
+
data.tar.gz: 56cc91de33bc86c52fb3300e5eb1aef2ab2cbd0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff13848bf24d1cfabd8f4b2dac817e024b47888313769bd53898b9fe9e8bec8cdc630b5092ad3396757322773e0b3973ed602e4a3210023c2fa2e4cf4f6439f9
|
7
|
+
data.tar.gz: 2a89fc8d4cb72532af7720f87c0ccb4e03cff959d99d5f2b8c2989e5be967d56172786e5eb129e15307ca2badc87f66d5d81ee2dd128d94d3a5959941e7d0701
|
data/lib/presso.rb
CHANGED
@@ -3,7 +3,7 @@ require 'java'
|
|
3
3
|
raise LoadError, "Incompatible JRuby version. Use at least JRuby 1.7.4. See JRUBY-7157." if JRUBY_VERSION =~ /^1\.7\.[0-3]$/
|
4
4
|
|
5
5
|
class Presso
|
6
|
-
VERSION = '1.0.
|
6
|
+
VERSION = '1.0.2'.freeze
|
7
7
|
|
8
8
|
module JavaUtilZip
|
9
9
|
include_package 'java.util.zip'
|
@@ -20,7 +20,9 @@ class Presso
|
|
20
20
|
Dir['**/*'].each do |path|
|
21
21
|
if File.file?(path)
|
22
22
|
stream.put_next_entry(JavaUtilZip::ZipEntry.new(path))
|
23
|
-
|
23
|
+
File.open(path) do |input|
|
24
|
+
IO.copy_stream(input, stream_io)
|
25
|
+
end
|
24
26
|
stream_io.flush
|
25
27
|
elsif File.directory?(path)
|
26
28
|
stream.put_next_entry(JavaUtilZip::ZipEntry.new(path+'/'))
|
@@ -46,7 +48,9 @@ class Presso
|
|
46
48
|
FileUtils.mkdir_p(entry.name)
|
47
49
|
else
|
48
50
|
FileUtils.mkdir_p(File.dirname(entry.name))
|
49
|
-
|
51
|
+
File.open(entry.name, 'w') do |output|
|
52
|
+
IO.copy_stream(stream_io, output)
|
53
|
+
end
|
50
54
|
end
|
51
55
|
stream.close_entry
|
52
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: presso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burt Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Easy zip and unzip, backed by java.util.zip
|
14
14
|
email:
|
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
37
37
|
version: '0'
|
38
38
|
requirements: []
|
39
39
|
rubyforge_project:
|
40
|
-
rubygems_version: 2.
|
40
|
+
rubygems_version: 2.1.9
|
41
41
|
signing_key:
|
42
42
|
specification_version: 4
|
43
43
|
summary: A zip library for JRuby
|