zipping 0.2.1 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6d26ef58bcb6f2cf5e72b4979157edcacfc2b15
4
- data.tar.gz: 934f22728e3df8c6aebb2cb5233512a693267e84
3
+ metadata.gz: 9df3e0d3ed5925494133de2e8a1d113f78cd17ca
4
+ data.tar.gz: 66d6eb3e9dac4b73ac732879a393dc53eea1f401
5
5
  SHA512:
6
- metadata.gz: 91db69bf6bb30b3573d4ac116b17e3c53d3f1559c504aa67a96236b2687fdf860592d4b150c6aa5339fd28df2dbd463c1cacb0b229889ade0802b0403ad71408
7
- data.tar.gz: 24796b591dc42fa83ab0cff4afe6646b1cc355ddaa78fbe0bc38c319a619c65a571256a8db3395ad17284a41a08f6682ea3306343a0eeb78ba09d9ff527ed0ae
6
+ metadata.gz: 0353b2fc64bcc220fa8be971730e510097d522beaff69de9b45c34ed5cf61d0a3800e437659166e8f7cb44b5768855c35418c059b34570464151318d9a3c49c7
7
+ data.tar.gz: f865c6fc3ce47ebde3a158f0ed9d844802c47cd770b0ddb00223631339fffd4c96c2ce2f4d98afb806d13027dc82995ff61eee3657d02f0e7b92df8721f5ac91
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  zipping
2
2
  =======
3
+ [![Gem Version](https://badge.fury.io/rb/zipping.png)](http://badge.fury.io/rb/zipping)
3
4
 
4
5
  This gem is for compressing files as a zip and outputting to a stream (or a stream-like interface object). The output to a stream proceeds little by little, as files are compressed.
5
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -1,3 +1,3 @@
1
1
  module Zipping
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/zipping.rb CHANGED
@@ -103,7 +103,8 @@ module Zipping
103
103
  return nil unless path.is_a?(String) && File.exists?(path)
104
104
  ret = {
105
105
  :path => path,
106
- :name => File.basename(path)
106
+ :name => File.basename(path),
107
+ :time => Time.now
107
108
  }
108
109
  end
109
110
 
@@ -173,7 +174,7 @@ module Zipping
173
174
  # Pack file entities and output to stream. Directory entities are not packed but stored.
174
175
  def pack_file_entities(o = @o, files = @f, dir = @current_dir, dirs = @pending_dirs, data_positions = @dp, encoding = @e, file_division_size = @s)
175
176
  files.each do |file|
176
- next unless file.is_a?(Hash) && file[:path].present?
177
+ next unless file.is_a?(Hash) && file[:path]
177
178
 
178
179
  f = file[:path]
179
180
  if File.directory? f
@@ -424,11 +425,11 @@ module Zipping
424
425
  next
425
426
  end
426
427
  elsif file.is_a? Hash
427
- next unless file[:path].present? && file[:path].is_a?(String)
428
+ next unless file[:path] && file[:path].is_a?(String)
428
429
  entry = file
429
430
  path = entry[:path]
430
- entry[:name] = File.basename(path) unless entry[:name].present? && entry[:name].is_a?(String)
431
- entry[:time] = File.mtime(path) unless entry[:time].present? && entry[:time].is_a?(Time)
431
+ entry[:name] = File.basename(path) unless entry[:name] && entry[:name].is_a?(String)
432
+ entry[:time] = File.mtime(path) unless entry[:time] && entry[:time].is_a?(Time)
432
433
  else
433
434
  next
434
435
  end
data/zipping.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["info@nekojarashi.com.com"]
11
11
  spec.description = "This gem is for compressing files as a zip and outputting to a stream (or a stream-like interface object). The output to a stream proceeds little by little, as files are compressed."
12
12
  spec.summary = "Compress files as a zip and output it to a stream."
13
- spec.homepage = "http://www.nekojarashi.com"
13
+ spec.homepage = "https://github.com/nekojarashi/zipping"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipping
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shuntaro Shitasako
@@ -88,7 +88,7 @@ files:
88
88
  - spec/spec_helper.rb
89
89
  - spec/zipping_spec.rb
90
90
  - zipping.gemspec
91
- homepage: http://www.nekojarashi.com
91
+ homepage: https://github.com/nekojarashi/zipping
92
92
  licenses:
93
93
  - MIT
94
94
  metadata: {}