vaas 3.1.0 → 4.1.0

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: e23bd7f42275d3abaadea284ae353797be04d87481168e2c405d60e91b5f3651
4
- data.tar.gz: 256a204cc03536ab392903e4301d05b8acc26599510ebf7982ce317ef6918cbb
3
+ metadata.gz: b9ee17255eb683f1cc2a17f21aaaf98252b0e19aaad49acc374bf324a332e6d3
4
+ data.tar.gz: fa0849a662c6055af4e55681d971cc7685fdb60dc631a3330c540239d7bb58fa
5
5
  SHA512:
6
- metadata.gz: d2101b2769f8016e5881e7e4fbdd364da661a9a0d39322d359e95af2288f227d21a2302a46a2339f063c44e8714165754f18bb75d25b454988481454a9a512f9
7
- data.tar.gz: 153593621130ced28b394d6033e842192b112ba0169d37ffba1596473c231543689f466ed0cba3c50217f4ec9382d10996decd9a18d2c3d9ee968e9bb6bb6b78
6
+ metadata.gz: f9457b4baf9b103f6f68628f8493010c1060c1c94ed788938d337b21cd312f16162032d1f8bf3dd31c23679a083504530b01913412517bd278116a2aca6efe3e
7
+ data.tar.gz: 4d1ae479fe946587cb4db212b3a85cc89c200c390351e4fd71f2d2f0bc215426f44108288453c5bbc8c0fa97883027b1a71ddef8ad3ae9fa81d5351c733bcd5a
@@ -5,7 +5,7 @@ require 'async'
5
5
 
6
6
 
7
7
  def main
8
- client_id = "vaas-customer"
8
+ client_id = ENV.fetch("VAAS_CLIENT_ID")
9
9
  client_secret = ENV.fetch("CLIENT_SECRET")
10
10
  user_name = ENV.fetch("VAAS_USER_NAME")
11
11
  password = ENV.fetch("VAAS_PASSWORD")
@@ -166,8 +166,8 @@ module VAAS
166
166
  task.with_timeout(@timeout) do
167
167
  token = message['upload_token']
168
168
  url = message['url']
169
-
170
- client = Async::HTTP::Internet.new
169
+ endpoint = Async::HTTP::Endpoint.parse(url)
170
+ client = Async::HTTP::Client.new(endpoint, protocol: Async::HTTP::Protocol::HTTP1)
171
171
 
172
172
  header = [['authorization', token]]
173
173
  body = Protocol::HTTP::Body::File.open(File.join(path))
@@ -1,12 +1,15 @@
1
1
  module VAAS
2
2
  class VaasVerdict
3
3
 
4
- attr_reader :sha256, :verdict, :guid
4
+ attr_reader :sha256, :verdict, :guid, :detection, :mime_type, :file_type
5
5
 
6
6
  def initialize(response)
7
7
  @sha256 = response['sha256']
8
8
  @verdict = response['verdict']
9
9
  @guid = response['guid']
10
+ @detection = response.fetch("detection", "")
11
+ @mime_type = response.fetch("mime_type", "")
12
+ @file_type = response.fetch("file_type", "")
10
13
  end
11
14
 
12
15
  end
data/lib/vaas/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module VAAS
2
- VERSION = '3.1.0'
2
+ VERSION = '4.1.0'
3
3
  end
data/vaas.gemspec CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
15
15
  s.metadata = { "documentation_uri" => "https://github.com/GDATASoftwareAG/vaas/blob/main/ruby/README.md" }
16
16
  s.required_ruby_version = '>= 3.1.1'
17
17
 
18
- s.add_dependency 'async', '~> 2.3.1'
19
- s.add_dependency 'async-http', '~> 0.59.4'
20
- s.add_dependency 'async-websocket', '~> 0.22.1'
18
+ s.add_dependency 'async', '~> 2.15.3'
19
+ s.add_dependency 'async-http', '~> 0.70.0'
20
+ s.add_dependency 'async-websocket', '~> 0.28.0'
21
21
 
22
22
  s.add_development_dependency "minitest", '~> 5.17.0'
23
23
  s.add_development_dependency 'dotenv', '~> 2.8.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vaas
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allie Weitenkamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-13 00:00:00.000000000 Z
11
+ date: 2024-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.3.1
19
+ version: 2.15.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.3.1
26
+ version: 2.15.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: async-http
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.59.4
33
+ version: 0.70.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.59.4
40
+ version: 0.70.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: async-websocket
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.22.1
47
+ version: 0.28.0
48
48
  type: :runtime
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: 0.22.1
54
+ version: 0.28.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.3.26
125
+ rubygems_version: 3.3.27
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Verdict as a Service by G Data