files.com 1.1.650 → 1.1.651

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: f7dde18d343e9bf8a8538ccfb34491976a3db43de79ce6589d686767c75316bd
4
- data.tar.gz: 7d82c5763649255e9817bca9f5c06a6936615ab76e2dd3e160b2d86ece0f61a5
3
+ metadata.gz: 8564cc68092dabc88ac19623420dda160c04d5647b1ec5d9410fa317ce64057a
4
+ data.tar.gz: 2cc0bbfa760bbccdf14d4aee45da8f3d2ed2c653387400f5b1f82bbedea0c501
5
5
  SHA512:
6
- metadata.gz: b83595592c9e9e3ac15367209f141970cd60c28a6c7dd78756a82adb027e70e2b026aadaf0c66398c9a82be5b4ab31c5479447496e129b0eb5ec76449caec23a
7
- data.tar.gz: 3350a714101aa458812fd311a8899040484d16b2d4393cfce4cd445230e87866a783e37cc0f945d288e72fcbc37d278d7a879834c2b34e6e47f4ade1f1a3d1f3
6
+ metadata.gz: 036bbd87171d4d8c1a52fa11c8ce13396090a675ea5388e2732057ee018d7ecd045643f68d8b1396e10269a41b33a29a5a43c3722a817312f451c32f1ace7972
7
+ data.tar.gz: 4e663811a724db8d42b2fb095421873f82aa0e76c63e05c6220835ea8cca784cbf18c10ee2cf29f50a0f054e389ff4f9de3fa292c475751e5949aa2315acff0a
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.650
1
+ 1.1.651
data/docs/file.md CHANGED
@@ -268,6 +268,56 @@ Files::File.move(path,
268
268
  * `overwrite` (boolean): Overwrite existing file(s) in the destination?
269
269
 
270
270
 
271
+ ---
272
+
273
+ ## Decrypt a GPG-encrypted file and save it to a destination path
274
+
275
+ ```
276
+ Files::File.gpg_decrypt(path,
277
+ destination: "destination",
278
+ gpg_key_partner_id: 1,
279
+ use_all_private_keys: false,
280
+ ignore_mdc_error: false,
281
+ overwrite: false
282
+ )
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+ * `path` (string): Required - Path to operate on.
288
+ * `destination` (string): Required - Destination file path for the decrypted file.
289
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
290
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for decryption.
291
+ * `use_all_private_keys` (boolean): Use every accessible private GPG key in the source workspace for decryption.
292
+ * `ignore_mdc_error` (boolean): Ignore errors from the MDC (modification detection code) check.
293
+ * `overwrite` (boolean): Overwrite existing file in the destination?
294
+
295
+
296
+ ---
297
+
298
+ ## Encrypt a file with GPG and save it to a destination path
299
+
300
+ ```
301
+ Files::File.gpg_encrypt(path,
302
+ destination: "destination",
303
+ gpg_key_partner_id: 1,
304
+ signing_key_id: 1,
305
+ armor: false,
306
+ overwrite: false
307
+ )
308
+ ```
309
+
310
+ ### Parameters
311
+
312
+ * `path` (string): Required - Path to operate on.
313
+ * `destination` (string): Required - Destination file path for the encrypted file.
314
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to encrypt with.
315
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for encryption.
316
+ * `signing_key_id` (int64): Optional GPG Key ID to sign with.
317
+ * `armor` (boolean): Output ASCII-armored encrypted data.
318
+ * `overwrite` (boolean): Overwrite existing file in the destination?
319
+
320
+
271
321
  ---
272
322
 
273
323
  ## Extract a ZIP file to a destination folder
@@ -457,6 +507,60 @@ file.move(
457
507
  * `overwrite` (boolean): Overwrite existing file(s) in the destination?
458
508
 
459
509
 
510
+ ---
511
+
512
+ ## Decrypt a GPG-encrypted file and save it to a destination path
513
+
514
+ ```
515
+ file = Files::File.find(path)
516
+
517
+ file.gpg_decrypt(
518
+ destination: "destination",
519
+ gpg_key_partner_id: 1,
520
+ use_all_private_keys: false,
521
+ ignore_mdc_error: false,
522
+ overwrite: false
523
+ )
524
+ ```
525
+
526
+ ### Parameters
527
+
528
+ * `path` (string): Required - Path to operate on.
529
+ * `destination` (string): Required - Destination file path for the decrypted file.
530
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
531
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for decryption.
532
+ * `use_all_private_keys` (boolean): Use every accessible private GPG key in the source workspace for decryption.
533
+ * `ignore_mdc_error` (boolean): Ignore errors from the MDC (modification detection code) check.
534
+ * `overwrite` (boolean): Overwrite existing file in the destination?
535
+
536
+
537
+ ---
538
+
539
+ ## Encrypt a file with GPG and save it to a destination path
540
+
541
+ ```
542
+ file = Files::File.find(path)
543
+
544
+ file.gpg_encrypt(
545
+ destination: "destination",
546
+ gpg_key_partner_id: 1,
547
+ signing_key_id: 1,
548
+ armor: false,
549
+ overwrite: false
550
+ )
551
+ ```
552
+
553
+ ### Parameters
554
+
555
+ * `path` (string): Required - Path to operate on.
556
+ * `destination` (string): Required - Destination file path for the encrypted file.
557
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to encrypt with.
558
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for encryption.
559
+ * `signing_key_id` (int64): Optional GPG Key ID to sign with.
560
+ * `armor` (boolean): Output ASCII-armored encrypted data.
561
+ * `overwrite` (boolean): Overwrite existing file in the destination?
562
+
563
+
460
564
  ---
461
565
 
462
566
  ## Extract a ZIP file to a destination folder
@@ -1075,6 +1075,53 @@ module Files
1075
1075
  Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
1076
1076
  end
1077
1077
 
1078
+ # Decrypt a GPG-encrypted file and save it to a destination path
1079
+ #
1080
+ # Parameters:
1081
+ # destination (required) - string - Destination file path for the decrypted file.
1082
+ # gpg_key_ids - array(int64) - GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
1083
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for decryption.
1084
+ # use_all_private_keys - boolean - Use every accessible private GPG key in the source workspace for decryption.
1085
+ # ignore_mdc_error - boolean - Ignore errors from the MDC (modification detection code) check.
1086
+ # overwrite - boolean - Overwrite existing file in the destination?
1087
+ def gpg_decrypt(params = {})
1088
+ params ||= {}
1089
+ params[:path] = @attributes[:path]
1090
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1091
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1092
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1093
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1094
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1095
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1096
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1097
+
1098
+ Api.send_request("/file_actions/gpg_decrypt/#{@attributes[:path]}", :post, params, @options)
1099
+ end
1100
+
1101
+ # Encrypt a file with GPG and save it to a destination path
1102
+ #
1103
+ # Parameters:
1104
+ # destination (required) - string - Destination file path for the encrypted file.
1105
+ # gpg_key_ids - array(int64) - GPG Key IDs to encrypt with.
1106
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for encryption.
1107
+ # signing_key_id - int64 - Optional GPG Key ID to sign with.
1108
+ # armor - boolean - Output ASCII-armored encrypted data.
1109
+ # overwrite - boolean - Overwrite existing file in the destination?
1110
+ def gpg_encrypt(params = {})
1111
+ params ||= {}
1112
+ params[:path] = @attributes[:path]
1113
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1114
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1115
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1116
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1117
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1118
+ raise InvalidParameterError.new("Bad parameter: signing_key_id must be an Integer") if params[:signing_key_id] and !params[:signing_key_id].is_a?(Integer)
1119
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1120
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1121
+
1122
+ Api.send_request("/file_actions/gpg_encrypt/#{@attributes[:path]}", :post, params, @options)
1123
+ end
1124
+
1078
1125
  # Extract a ZIP file to a destination folder
1079
1126
  #
1080
1127
  # Parameters:
@@ -1284,6 +1331,53 @@ module Files
1284
1331
  FileAction.new(response.data, options)
1285
1332
  end
1286
1333
 
1334
+ # Decrypt a GPG-encrypted file and save it to a destination path
1335
+ #
1336
+ # Parameters:
1337
+ # destination (required) - string - Destination file path for the decrypted file.
1338
+ # gpg_key_ids - array(int64) - GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
1339
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for decryption.
1340
+ # use_all_private_keys - boolean - Use every accessible private GPG key in the source workspace for decryption.
1341
+ # ignore_mdc_error - boolean - Ignore errors from the MDC (modification detection code) check.
1342
+ # overwrite - boolean - Overwrite existing file in the destination?
1343
+ def self.gpg_decrypt(path, params = {}, options = {})
1344
+ params ||= {}
1345
+ params[:path] = path
1346
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1347
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1348
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1349
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1350
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1351
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1352
+
1353
+ response, options = Api.send_request("/file_actions/gpg_decrypt/#{params[:path]}", :post, params, options)
1354
+ FileAction.new(response.data, options)
1355
+ end
1356
+
1357
+ # Encrypt a file with GPG and save it to a destination path
1358
+ #
1359
+ # Parameters:
1360
+ # destination (required) - string - Destination file path for the encrypted file.
1361
+ # gpg_key_ids - array(int64) - GPG Key IDs to encrypt with.
1362
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for encryption.
1363
+ # signing_key_id - int64 - Optional GPG Key ID to sign with.
1364
+ # armor - boolean - Output ASCII-armored encrypted data.
1365
+ # overwrite - boolean - Overwrite existing file in the destination?
1366
+ def self.gpg_encrypt(path, params = {}, options = {})
1367
+ params ||= {}
1368
+ params[:path] = path
1369
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1370
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1371
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1372
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1373
+ raise InvalidParameterError.new("Bad parameter: signing_key_id must be an Integer") if params[:signing_key_id] and !params[:signing_key_id].is_a?(Integer)
1374
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1375
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1376
+
1377
+ response, options = Api.send_request("/file_actions/gpg_encrypt/#{params[:path]}", :post, params, options)
1378
+ FileAction.new(response.data, options)
1379
+ end
1380
+
1287
1381
  # Extract a ZIP file to a destination folder
1288
1382
  #
1289
1383
  # Parameters:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.650"
4
+ VERSION = "1.1.651"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.650
4
+ version: 1.1.651
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com