rack-archive-zip-extract 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: 432413e917d0f7f4a2ef1b12f57267b8b46d78d0
4
- data.tar.gz: 94940fa26a512664bfa8581a5514a6c4ac094ef8
3
+ metadata.gz: bc42fc06d8b9d7371fe4c537c52cde2a0ca7ed44
4
+ data.tar.gz: 3e96f3bf7189f0c9e2632514a12af2249b9a3728
5
5
  SHA512:
6
- metadata.gz: 9c22235308b09be6801bd2468d883d71a4ab0ac42bf264071ddd35deaf8700794ca1c0e1517bc7e04f38c472254a00da6a89c07f1238e78bf625b2fc891b5b48
7
- data.tar.gz: e68c4c38749260ecf1369d4f698159f9a6c53f309da20611989562edad3176c9961508763157eeb90c3171a752d5f4d5c19279c072f1c6c05f08412cf3bf6397
6
+ metadata.gz: 3a6fabd5ce5dd2198a3406af346898912e7232d1739a76f04ec588af4c42191f91dac72e8275db00c4735d03e204dccae16802d9a9527eb35803dc74e560d7d5
7
+ data.tar.gz: b14a589071ad4b6efac1cde43e133c6347bedb057aa7f0e286d175dc24ac655f1f7245bc53113dae643e748e903c64bf03d0a5445758b9289d7018fb37a80e14
@@ -1,6 +1,11 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 0.0.8
5
+ -----
6
+
7
+ * [BUG FIX]Calculate ETag properly
8
+
4
9
  0.0.7
5
10
  -----
6
11
 
@@ -53,7 +53,7 @@ By default, Rack::Archive::Zip::Extract uses [`Rack::Mime::MIME_TYPES`][mime_typ
53
53
 
54
54
  run Rack::Archive::Zip::Extract.new('path/to/docroot', mime_types: {'.html' => 'application/xhtml+xml', '.apk => 'application/vnd.android.package-archive'})
55
55
 
56
- In example above, Rack::Archive::Zip::Example sends "`Content-Type: application/xhtml+xml`" header for access to path with extension "`.html`" instead of "`text/html`" and "`application/vnd.android.package-archive`" for "`*.apk`" instead of default "`application/octet-stream`".
56
+ In example above, Rack::Archive::Zip::Extract sends "`Content-Type: application/xhtml+xml`" header for access to path with extension "`.html`" instead of "`text/html`" and "`application/vnd.android.package-archive`" for "`*.apk`" instead of default "`application/octet-stream`".
57
57
 
58
58
  [mime_types]: http://rack.rubyforge.org/doc/Rack/Mime.html#MIME_TYPES
59
59
 
@@ -1,4 +1,5 @@
1
1
  require 'pathname'
2
+ require 'digest/md5'
2
3
  require 'rack/utils'
3
4
  require 'rack/file'
4
5
  require 'rack/mime'
@@ -136,7 +137,7 @@ module Rack::Archive
136
137
  @file = @archive.fopen(path)
137
138
  @mtime = @file.mtime
138
139
  @size = @file.size
139
- @etag = @file.name.hash.to_s(16) + @mtime.hash.to_s(16) + @size.hash.to_s(16)
140
+ @etag = Digest::MD5.hexdigest(@file.name) + @mtime.to_i.to_s(16) + @size.to_s(16)
140
141
  @buffer_size = buffer_size
141
142
  end
142
143
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-archive-zip-extract
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - KITAITI Makoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-22 00:00:00.000000000 Z
11
+ date: 2015-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2'
47
+ version: '3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2'
54
+ version: '3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: test-unit-notify
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.2.2
151
+ rubygems_version: 2.4.6
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Zip file server