cloudmersive-virus-scan-api-client 2.0.3 → 2.0.4

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: b7caace679782d9c3c94207830526d9155e2fe119c5ccae38f5221313a3fa154
4
- data.tar.gz: bd072e674ea3c7b17766963649bf33e0f51a205da72b23f6c01af537733df2b1
3
+ metadata.gz: 1bede92a24ae5a20f600c48d6123e4b6ff9bf6f89d0d9213acece8b844bc1a64
4
+ data.tar.gz: bdd0be405c767fb4b1b88a89b90696630b2772d342dc22f68ee7b679c25d55c2
5
5
  SHA512:
6
- metadata.gz: 8fcba1dd4d2d82279dafee8e8f2abf0f38045dccda0e314ccfd510affa260f10fce7b6cecbcc4ff51ea98e4a99da8e767294d6090619142115f0f40dfa42aa92
7
- data.tar.gz: 36f045d42117fbd01b0ef22812f8e0daa99c49cab4ac89d22b731265d6b71e0d93d3e8cafa3b6a86b0a67666438401a54b08cb86165d4154d34d88b01728ab05
6
+ metadata.gz: 107a9cf60694ab146600c8367e5433261d8a708a4dcfdb4fa8744ffbd93b6967e674a80733deec7cac68acd0e67215deaef44b1276abc67a907e16bc3128e662
7
+ data.tar.gz: 61946d727cf0263c934b75506bbc6e38d1b7f0ff572866d21e7c93f9c314b61aa521168eb030efc8190141aab51190365416123ccab781c1334eb9eeb74ff5ac
data/README.md CHANGED
@@ -7,7 +7,7 @@ The Cloudmersive Virus Scan API lets you scan files and content for viruses and
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 2.0.3
10
+ - Package version: 2.0.4
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-virus-scan-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-virus-scan-api-client-2.0.3.gem
26
+ gem install ./cloudmersive-virus-scan-api-client-2.0.4.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.3.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.4.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-virus-scan-api-client', '~> 2.0.3'
34
+ gem 'cloudmersive-virus-scan-api-client', '~> 2.0.4'
35
35
 
36
36
  ### Install from Git
37
37
 
data/docs/ScanApi.md CHANGED
@@ -91,6 +91,7 @@ opts = {
91
91
  allow_invalid_files: true, # BOOLEAN | Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
92
92
  allow_scripts: true, # BOOLEAN | Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
93
93
  allow_password_protected_files: true, # BOOLEAN | Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
94
+ allow_macros: true, # BOOLEAN | Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
94
95
  restrict_file_types: 'restrict_file_types_example' # String | Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
95
96
  }
96
97
 
@@ -112,6 +113,7 @@ Name | Type | Description | Notes
112
113
  **allow_invalid_files** | **BOOLEAN**| Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended). | [optional]
113
114
  **allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended). | [optional]
114
115
  **allow_password_protected_files** | **BOOLEAN**| Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended). | [optional]
116
+ **allow_macros** | **BOOLEAN**| Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended). | [optional]
115
117
  **restrict_file_types** | **String**| Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled. | [optional]
116
118
 
117
119
  ### Return type
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **contains_script** | **BOOLEAN** | True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor | [optional]
10
10
  **contains_password_protected_file** | **BOOLEAN** | True if the scan contained a password protected or encrypted file, which can be a significant risk factor | [optional]
11
11
  **contains_restricted_file_format** | **BOOLEAN** | True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false | [optional]
12
+ **contains_macros** | **BOOLEAN** | True if the uploaded file contains embedded Macros of other embedded threats within the document, which can be a significant risk factor | [optional]
12
13
  **verified_file_format** | **String** | For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null. | [optional]
13
14
  **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
14
15
 
@@ -82,6 +82,7 @@ module CloudmersiveVirusScanApiClient
82
82
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
83
83
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
84
84
  # @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
85
+ # @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
85
86
  # @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
86
87
  # @return [VirusScanAdvancedResult]
87
88
  def scan_file_advanced(input_file, opts = {})
@@ -97,6 +98,7 @@ module CloudmersiveVirusScanApiClient
97
98
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
98
99
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
99
100
  # @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
101
+ # @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
100
102
  # @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
101
103
  # @return [Array<(VirusScanAdvancedResult, Fixnum, Hash)>] VirusScanAdvancedResult data, response status code and response headers
102
104
  def scan_file_advanced_with_http_info(input_file, opts = {})
@@ -123,6 +125,7 @@ module CloudmersiveVirusScanApiClient
123
125
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
124
126
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
125
127
  header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
128
+ header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
126
129
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
127
130
 
128
131
  # form parameters
@@ -33,6 +33,9 @@ module CloudmersiveVirusScanApiClient
33
33
  # True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false
34
34
  attr_accessor :contains_restricted_file_format
35
35
 
36
+ # True if the uploaded file contains embedded Macros of other embedded threats within the document, which can be a significant risk factor
37
+ attr_accessor :contains_macros
38
+
36
39
  # For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null.
37
40
  attr_accessor :verified_file_format
38
41
 
@@ -48,6 +51,7 @@ module CloudmersiveVirusScanApiClient
48
51
  :'contains_script' => :'ContainsScript',
49
52
  :'contains_password_protected_file' => :'ContainsPasswordProtectedFile',
50
53
  :'contains_restricted_file_format' => :'ContainsRestrictedFileFormat',
54
+ :'contains_macros' => :'ContainsMacros',
51
55
  :'verified_file_format' => :'VerifiedFileFormat',
52
56
  :'found_viruses' => :'FoundViruses'
53
57
  }
@@ -62,6 +66,7 @@ module CloudmersiveVirusScanApiClient
62
66
  :'contains_script' => :'BOOLEAN',
63
67
  :'contains_password_protected_file' => :'BOOLEAN',
64
68
  :'contains_restricted_file_format' => :'BOOLEAN',
69
+ :'contains_macros' => :'BOOLEAN',
65
70
  :'verified_file_format' => :'String',
66
71
  :'found_viruses' => :'Array<VirusFound>'
67
72
  }
@@ -99,6 +104,10 @@ module CloudmersiveVirusScanApiClient
99
104
  self.contains_restricted_file_format = attributes[:'ContainsRestrictedFileFormat']
100
105
  end
101
106
 
107
+ if attributes.has_key?(:'ContainsMacros')
108
+ self.contains_macros = attributes[:'ContainsMacros']
109
+ end
110
+
102
111
  if attributes.has_key?(:'VerifiedFileFormat')
103
112
  self.verified_file_format = attributes[:'VerifiedFileFormat']
104
113
  end
@@ -134,6 +143,7 @@ module CloudmersiveVirusScanApiClient
134
143
  contains_script == o.contains_script &&
135
144
  contains_password_protected_file == o.contains_password_protected_file &&
136
145
  contains_restricted_file_format == o.contains_restricted_file_format &&
146
+ contains_macros == o.contains_macros &&
137
147
  verified_file_format == o.verified_file_format &&
138
148
  found_viruses == o.found_viruses
139
149
  end
@@ -147,7 +157,7 @@ module CloudmersiveVirusScanApiClient
147
157
  # Calculates hash code according to all attributes.
148
158
  # @return [Fixnum] Hash code
149
159
  def hash
150
- [clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, verified_file_format, found_viruses].hash
160
+ [clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, contains_macros, verified_file_format, found_viruses].hash
151
161
  end
152
162
 
153
163
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveVirusScanApiClient
14
- VERSION = '2.0.3'
14
+ VERSION = '2.0.4'
15
15
  end
@@ -53,6 +53,7 @@ describe 'ScanApi' do
53
53
  # @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
54
54
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
55
55
  # @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
56
+ # @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
56
57
  # @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
57
58
  # @return [VirusScanAdvancedResult]
58
59
  describe 'scan_file_advanced test' do
@@ -68,6 +68,12 @@ describe 'VirusScanAdvancedResult' do
68
68
  end
69
69
  end
70
70
 
71
+ describe 'test attribute "contains_macros"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
71
77
  describe 'test attribute "verified_file_format"' do
72
78
  it 'should work' do
73
79
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-virus-scan-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-26 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus