cloudmersive-virus-scan-api-client 1.3.3 → 1.3.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: ca19a52c01c34e9068692a74aadeee38a482c37cadcdbad41086f9e79662a63f
4
- data.tar.gz: 50e1f95f4b735d6b16b4b5993dbb1f1af75c470e1b21b3ee92cdde35201ba8f9
3
+ metadata.gz: ad8f9e6096f5b0c6ecc212958ffa7c3fcfb18867e94df0dc24521cfa75c59adf
4
+ data.tar.gz: 56cb27c6facfd5f334c1f775ab5d82c8ba873f8874728674ff450131e8312cf5
5
5
  SHA512:
6
- metadata.gz: db10eb7300cee67c48aae8b53518be1e5ce6e10254e27e9710c467c0b05a1b86bc181586e861d810f192a4197dc912995699989a9312975a795588921d382335
7
- data.tar.gz: 3d8a86a049b86d2805393bf4eaf0affcf856fac21a8f30aa997fd27636d31188b8cb51429959ce2b5bbc9ed14a9f5bcf34b22ec16ee6e7f698409e34bb17b975
6
+ metadata.gz: 393d0248bcb64dc8c9ad19dfe3c22f6cb16df435b0acfd0490dab28d42eb1397371f96ebd847545b3ff62670e4356061d1a6562561da4eb648d8b4c0b4ba72c7
7
+ data.tar.gz: 320e48c252ce801c8508674cf83bab1f78bc485009dd8fa547051aa87df848ae4646e4883fd2f5d10f117894c80d2b611828e085fe3c0f60769aac593050b065
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: 1.3.3
10
+ - Package version: 1.3.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-1.3.3.gem
26
+ gem install ./cloudmersive-virus-scan-api-client-1.3.4.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-1.3.3.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-1.3.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', '~> 1.3.3'
34
+ gem 'cloudmersive-virus-scan-api-client', '~> 1.3.4'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -90,6 +90,7 @@ opts = {
90
90
  allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
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, Pythong 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
+ 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).
93
94
  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.
94
95
  }
95
96
 
@@ -110,6 +111,7 @@ Name | Type | Description | Notes
110
111
  **allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
111
112
  **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]
112
113
  **allow_scripts** | **BOOLEAN**| Set to false to block script files, such as a PHP files, Pythong 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
+ **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]
113
115
  **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]
114
116
 
115
117
  ### Return type
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
7
7
  **contains_executable** | **BOOLEAN** | True if the scan contained an executable (application code), which can be a significant risk factor | [optional]
8
8
  **contains_invalid_file** | **BOOLEAN** | True if the scan contained an invalid file (such as a PDF that is not a valid PDF, Word Document that is not a valid Word Document, etc.), which can be a significant risk factor | [optional]
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
+ **contains_password_protected_file** | **BOOLEAN** | True if the scan contained a password protected or encrypted file, which can be a significant risk factor | [optional]
10
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]
11
12
  **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]
12
13
  **found_viruses** | [**Array<VirusFound>**](VirusFound.md) | Array of viruses found, if any | [optional]
@@ -83,6 +83,7 @@ module CloudmersiveVirusScanApiClient
83
83
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
84
84
  # @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).
85
85
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong 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).
86
+ # @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).
86
87
  # @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.
87
88
  # @return [VirusScanAdvancedResult]
88
89
  def scan_file_advanced(input_file, opts = {})
@@ -97,6 +98,7 @@ module CloudmersiveVirusScanApiClient
97
98
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
98
99
  # @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).
99
100
  # @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Pythong 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).
101
+ # @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).
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 = {})
@@ -122,6 +124,7 @@ module CloudmersiveVirusScanApiClient
122
124
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
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?
127
+ header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
125
128
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
126
129
 
127
130
  # form parameters
@@ -27,6 +27,9 @@ module CloudmersiveVirusScanApiClient
27
27
  # True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor
28
28
  attr_accessor :contains_script
29
29
 
30
+ # True if the scan contained a password protected or encrypted file, which can be a significant risk factor
31
+ attr_accessor :contains_password_protected_file
32
+
30
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
31
34
  attr_accessor :contains_restricted_file_format
32
35
 
@@ -44,6 +47,7 @@ module CloudmersiveVirusScanApiClient
44
47
  :'contains_executable' => :'ContainsExecutable',
45
48
  :'contains_invalid_file' => :'ContainsInvalidFile',
46
49
  :'contains_script' => :'ContainsScript',
50
+ :'contains_password_protected_file' => :'ContainsPasswordProtectedFile',
47
51
  :'contains_restricted_file_format' => :'ContainsRestrictedFileFormat',
48
52
  :'verified_file_format' => :'VerifiedFileFormat',
49
53
  :'found_viruses' => :'FoundViruses'
@@ -57,6 +61,7 @@ module CloudmersiveVirusScanApiClient
57
61
  :'contains_executable' => :'BOOLEAN',
58
62
  :'contains_invalid_file' => :'BOOLEAN',
59
63
  :'contains_script' => :'BOOLEAN',
64
+ :'contains_password_protected_file' => :'BOOLEAN',
60
65
  :'contains_restricted_file_format' => :'BOOLEAN',
61
66
  :'verified_file_format' => :'String',
62
67
  :'found_viruses' => :'Array<VirusFound>'
@@ -87,6 +92,10 @@ module CloudmersiveVirusScanApiClient
87
92
  self.contains_script = attributes[:'ContainsScript']
88
93
  end
89
94
 
95
+ if attributes.has_key?(:'ContainsPasswordProtectedFile')
96
+ self.contains_password_protected_file = attributes[:'ContainsPasswordProtectedFile']
97
+ end
98
+
90
99
  if attributes.has_key?(:'ContainsRestrictedFileFormat')
91
100
  self.contains_restricted_file_format = attributes[:'ContainsRestrictedFileFormat']
92
101
  end
@@ -125,6 +134,7 @@ module CloudmersiveVirusScanApiClient
125
134
  contains_executable == o.contains_executable &&
126
135
  contains_invalid_file == o.contains_invalid_file &&
127
136
  contains_script == o.contains_script &&
137
+ contains_password_protected_file == o.contains_password_protected_file &&
128
138
  contains_restricted_file_format == o.contains_restricted_file_format &&
129
139
  verified_file_format == o.verified_file_format &&
130
140
  found_viruses == o.found_viruses
@@ -139,7 +149,7 @@ module CloudmersiveVirusScanApiClient
139
149
  # Calculates hash code according to all attributes.
140
150
  # @return [Fixnum] Hash code
141
151
  def hash
142
- [clean_result, contains_executable, contains_invalid_file, contains_script, contains_restricted_file_format, verified_file_format, found_viruses].hash
152
+ [clean_result, contains_executable, contains_invalid_file, contains_script, contains_password_protected_file, contains_restricted_file_format, verified_file_format, found_viruses].hash
143
153
  end
144
154
 
145
155
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.3.1
11
11
  =end
12
12
 
13
13
  module CloudmersiveVirusScanApiClient
14
- VERSION = "1.3.3"
14
+ VERSION = "1.3.4"
15
15
  end
@@ -52,6 +52,7 @@ describe 'ScanApi' do
52
52
  # @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
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, Pythong 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
+ # @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).
55
56
  # @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.
56
57
  # @return [VirusScanAdvancedResult]
57
58
  describe 'scan_file_advanced test' do
@@ -56,6 +56,12 @@ describe 'VirusScanAdvancedResult' do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "contains_password_protected_file"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
59
65
  describe 'test attribute "contains_restricted_file_format"' do
60
66
  it 'should work' do
61
67
  # 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: 1.3.3
4
+ version: 1.3.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-01-28 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus