ratonvirus 0.4.1 → 0.4.3

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
  SHA256:
3
- metadata.gz: 027fd97e056390ebc3f0eff82c492afc83a4e92f1020d05f556c87d29d358e4d
4
- data.tar.gz: c144da909ec456c23a17be3f04fb34fe4c314584eed310f17b39fcfe99da0ca6
3
+ metadata.gz: 54fcf1a6676b0edbd60fc04c6e0790b538fa795d9ec78e2e99e33292f09ba2d5
4
+ data.tar.gz: e840f5043ce9a27115f69e205bb848fa4266cfae74ecf6d9dafa7173fadb51b6
5
5
  SHA512:
6
- metadata.gz: 1e7ea0fc1e99cf8ed987a17f83262e38ff648f9a26b34de96e9de91705fc8ffab99dd94b6dff70451a661b605a4f711e56de183aba21e48b6fbce15415d2ede5
7
- data.tar.gz: ce610990fcb99df22fdb3f87fb423a6ccfaca5494f886da9042f7af645ce8600e1d5873e65b6d613b31cd30a012dfcac92695313980e35114ee587719c3d541c
6
+ metadata.gz: 6df74f6e28b507d9ae253ba09b684fa59c777542f6fc40539d543960105f867ee73528265e59b43e869c0301492401ae84f2f001b78fcce1be08923d14e5979d
7
+ data.tar.gz: 4f783c558fecd0b8e7b62c6e78867305197f23c5dd0a7a368ceef7fbcd0806dca854e8c7af327848e57ad245be73b54a8da0a398f3d3e794ff3668edacd5d03f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.4.2
2
+
3
+ Fixed:
4
+
5
+ - Issue with ActiveStorage file integrity check due to IO position change after the virus check
6
+
1
7
  # v0.4.1
2
8
 
3
9
  Fixed:
@@ -12,11 +18,17 @@ Changed:
12
18
 
13
19
  - The minimum Ruby version is now set to 2.7 as it is a requirement of Rails 7
14
20
 
21
+ # v0.3.2
22
+
23
+ Fixed:
24
+
25
+ - Backport: Issue with ActiveStorage file integrity check due to IO position change after the virus check
26
+
15
27
  # v0.3.1
16
28
 
17
29
  Fixed:
18
30
 
19
- - Issue related to the EICAR test scanner. Related to [#16](https://github.com/mainio/ratonvirus/pull/16)
31
+ - Backport: Issue related to the EICAR test scanner. Related to [#16](https://github.com/mainio/ratonvirus/pull/16)
20
32
 
21
33
  # v0.3.0
22
34
 
@@ -24,7 +24,7 @@ module Ratonvirus
24
24
  return unless block_given?
25
25
 
26
26
  return unless asset
27
- return if asset.empty?
27
+ return if asset.respond_to?(:empty?) && asset.empty?
28
28
 
29
29
  if asset.respond_to?(:path)
30
30
  # A file asset that responds to path (e.g. default `File`
@@ -33,7 +33,6 @@ module Ratonvirus
33
33
 
34
34
  return
35
35
  end
36
-
37
36
  # Plain file path string provided as resource
38
37
  yield asset
39
38
  end
@@ -22,7 +22,12 @@ module Ratonvirus
22
22
 
23
23
  begin
24
24
  tempfile.binmode
25
- IO.copy_stream(io, tempfile)
25
+ if io.is_a?(StringIO)
26
+ # cannot specify src_offset for non-IO
27
+ IO.copy_stream(io, tempfile)
28
+ else
29
+ IO.copy_stream(io, tempfile, nil, 0)
30
+ end
26
31
  tempfile.flush
27
32
  tempfile.rewind
28
33
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ratonvirus
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratonvirus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antti Hukkanen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-14 00:00:00.000000000 Z
11
+ date: 2023-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport