presso 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/presso.rb +7 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86e5f35bdc09fa0c12db4f0f539428643b5ea1ed
4
- data.tar.gz: 1adb07ec20aabb8751fbc0a7f68327f5f6568751
3
+ metadata.gz: caef41f274a200d1b39bb457c4e32d4d35329f52
4
+ data.tar.gz: 56cc91de33bc86c52fb3300e5eb1aef2ab2cbd0b
5
5
  SHA512:
6
- metadata.gz: 00d2b8876a9bae179d45d6ce955d070d586152745deb635928fbf659960be0e5b1581455748204769a330a7c092fc2e5c08a4683486100303380c3444b8080bb
7
- data.tar.gz: a165e75e63efbc34e388fba2e4a283173d3b193fd71a51b5f3dacfd1c4d93926a4e3f7f49bcbcdd81a76200381911358359f2eeea0b14b5c1aa16669dabd0a98
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.1'.freeze
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
- IO.copy_stream(path, stream_io)
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
- IO.copy_stream(stream_io, entry.name)
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.1
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: 2014-04-16 00:00:00.000000000 Z
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.2.2
40
+ rubygems_version: 2.1.9
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: A zip library for JRuby