zip_tricks 4.8.1 → 4.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abccaae29c08d47d71a7c6709fbba2ccffce423798dbb159bbfdc9f832eafc93
4
- data.tar.gz: ba5375f2fbd1617ffdf6c42ddd690f211e771c6eb4cb84c8a2e9323784acfd7c
3
+ metadata.gz: b4fe6dbf849e9bfc54097d7b20ada38b44abe66815f87edddff320a58e55ff06
4
+ data.tar.gz: 47d918893d3c8e4fd2fdd8fdeb284817c0d240eb94f2fd5d2d4903fe520fc2fe
5
5
  SHA512:
6
- metadata.gz: dbd7498e71a1dbb967374a2360e2216ab33924ba263600f795e11787b759aa08c5b2ba3b5085bc4a8362026e87098f18552d0409e23ab03375cf0d89e8bd20d8
7
- data.tar.gz: f337fba0f07875b449ba3b5f5a593b30b2b810ca2aa79b473942a751a47d1db4c0ebbbe099faa474fe4c7a952b1ee030f6f94ed319835a3ba73c1e7cf65648e5
6
+ metadata.gz: 6e88ffe6668482b081934179973dd5b0e37c8dabacf6ca8cf4f5d835596a90bc98d6fef4aaf98c44ae37946e352e7a51ac6c66113935323762f2fe656f328059
7
+ data.tar.gz: fe5ed7fafe4d44946eeadf82ca96bed4da6010f29634780eb9c2532cf414c75b44e9a4464441dda7eec9d95242c53628a91326e3508380778f507bec7194626a
@@ -1,3 +1,7 @@
1
+ ## 4.8.2
2
+
3
+ * Fix extended timestamp timestamp value encoding. Previously we would use an incorrect encoding for the timestamp value, which would output correct but nonsensical timestamps. The pack specifier is now changed to output the correct value.
4
+
1
5
  ## 4.8.1
2
6
 
3
7
  * Fix extended timestamp extra field output. The first bit of the flag would be set instead of the last bit of
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZipTricks
4
- VERSION = '4.8.1'
4
+ VERSION = '4.8.2'
5
5
  end
@@ -57,7 +57,7 @@ class ZipTricks::ZipWriter
57
57
  C_UINT2 = 'v' # Encode a 2-byte unsigned little-endian uint
58
58
  C_UINT8 = 'Q<' # Encode an 8-byte unsigned little-endian uint
59
59
  C_CHAR = 'C' # For bit-encoded strings
60
- C_INT4 = 'N' # Encode a 4-byte signed little-endian int
60
+ C_INT4 = 'l<' # Encode a 4-byte signed little-endian int
61
61
 
62
62
  private_constant :FOUR_BYTE_MAX_UINT,
63
63
  :TWO_BYTE_MAX_UINT,
@@ -385,7 +385,7 @@ class ZipTricks::ZipWriter
385
385
  0x5455, C_UINT2, # tag for this extra block type ("UT")
386
386
  (1 + 4), C_UINT2, # the size of this block (1 byte used for the Flag + 3 longs used for the timestamp)
387
387
  flags, C_CHAR, # encode a single byte
388
- mtime.utc.to_i, C_INT4, # Use a signed long, not the unsigned one used by the rest of the ZIP spec.
388
+ mtime.utc.to_i, C_INT4, # Use a signed int, not the unsigned one used by the rest of the ZIP spec.
389
389
  ]
390
390
  # The atime and ctime can be omitted if not present
391
391
  pack_array(data_and_packspecs)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zip_tricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.1
4
+ version: 4.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-07 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler