aspose_html_cloud 19.6.0 → 22.9.1

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.
@@ -3,7 +3,7 @@
3
3
  --------------------------------------------------------------------------------------------------------------------
4
4
  <copyright company="Aspose" file="model_spec.rb">
5
5
  </copyright>
6
- Copyright (c) 2019 Aspose.HTML for Cloud
6
+ Copyright (c) 2022 Aspose.HTML for Cloud
7
7
  <summary>
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
  of this software and associated documentation files (the "Software"), to deal
@@ -4,7 +4,7 @@
4
4
  --------------------------------------------------------------------------------------------------------------------
5
5
  <copyright company="Aspose" file="storage_api_spec.rb">
6
6
  </copyright>
7
- Copyright (c) 2019 Aspose.HTML for Cloud
7
+ Copyright (c) 2022 Aspose.HTML for Cloud
8
8
  <summary>
9
9
  Permission is hereby granted, free of charge, to any person obtaining a copy
10
10
  of this software and associated documentation files (the "Software"), to deal
@@ -112,43 +112,6 @@ describe 'Test Storage API' do
112
112
  end
113
113
  end
114
114
 
115
- # Get file versions
116
- # @param path File path e.g. &#39;/file.ext&#39;
117
- # @param [Hash] opts the optional parameters
118
- # @option opts [String] :storage_name Storage name
119
- # @return [Array<(FileVersions, Fixnum, Hash)>] FileVersions data, response status code and response headers
120
- describe 'get_file_versions test' do
121
- it "must be {'value':[...]}" do
122
-
123
- name = "test1.html"
124
-
125
- # Upload file to server
126
- res = upload_file_helper(name)
127
- expect(res.uploaded.length).to eql(1)
128
- expect(res.errors.length).to eql(0)
129
-
130
- # Upload file to server
131
- res = upload_file_helper(name)
132
- expect(res.uploaded.length).to eql(1)
133
- expect(res.errors.length).to eql(0)
134
-
135
- # Upload file to server
136
- res = upload_file_helper(name)
137
- expect(res.uploaded.length).to eql(1)
138
- expect(res.errors.length).to eql(0)
139
-
140
- path = "HtmlTestDoc/" + name
141
- opts = {storage_name: nil}
142
-
143
- res = @api.get_file_versions(path, opts)
144
-
145
- expect(res).to be_an_instance_of AsposeHtml::FileVersions
146
- expect(res.value).to be_an_instance_of Array
147
- expect(res.value[0]).to be_an_instance_of AsposeHtml::FileVersion
148
- puts(res)
149
- end
150
- end
151
-
152
115
  #################################################
153
116
  # File API
154
117
  #################################################
@@ -223,93 +186,10 @@ describe 'Test Storage API' do
223
186
  end
224
187
  end
225
188
 
226
- # Copy file
227
- # @param src_path Source file path e.g. &#39;/folder/file.ext&#39;
228
- # @param dest_path Destination file path
229
- # @param [Hash] opts the optional parameters
230
- # @option opts [String] :src_storage_name Source storage name
231
- # @option opts [String] :dest_storage_name Destination storage name
232
- # @option opts [String] :version_id File version ID to copy
233
- # @return nil
234
- describe 'copy_file test' do
235
- it "must be throw if error" do
236
- name = "test_for_copy.html"
237
-
238
- # Upload files to server
239
- res = upload_file_helper(name)
240
- expect(res.uploaded.length).to eql(1)
241
- expect(res.errors.length).to eql(0)
242
-
243
- src_path = "HtmlTestDoc/" + name
244
- dest_path = "HtmlTestDoc/test_copied.html"
245
-
246
- opts = {src_storage: nil, dest_storage: nil, version_id: nil}
247
-
248
- @api.copy_file(src_path, dest_path, opts)
249
-
250
- # Check result destination
251
- res = @api.object_exists(dest_path)
252
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
253
- expect(res.exists).to be true
254
- expect(res.is_folder).to be false
255
-
256
- # Check result source
257
- res = @api.object_exists(src_path)
258
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
259
- expect(res.exists).to be true
260
- expect(res.is_folder).to be false
261
-
262
- # Clear
263
- @api.delete_file(src_path)
264
- @api.delete_file(dest_path)
265
- end
266
- end
267
-
268
- # unit tests for move_file
269
- # Move a specific file
270
- #
271
- # @param src_path Source file path e.g. &#39;/src.ext&#39;
272
- # @param dest_path Destination file path e.g. &#39;/dest.ext&#39;
273
- # @param [Hash] opts the optional parameters
274
- # @option opts [String] :src_storage_name Source storage name
275
- # @option opts [String] :dest_storage_name Destination storage name
276
- # @option opts [String] :version_id File version ID to move
277
- # @return [nil]
278
- describe 'move_file test' do
279
- it "must be throw if error" do
280
- name = "test_for_move.html"
281
-
282
- # Upload files to server
283
- res = upload_file_helper(name)
284
- expect(res.uploaded.length).to eql(1)
285
- expect(res.errors.length).to eql(0)
286
-
287
- src_path = "HtmlTestDoc/" + name
288
- dest_path = "HtmlTestDoc/test_moved.html"
289
-
290
- opts = {src_storage: nil, dest_storage: nil, version_id: nil}
291
-
292
- @api.move_file(src_path, dest_path, opts)
293
-
294
- # Check result destination
295
- res = @api.object_exists(dest_path)
296
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
297
- expect(res.exists).to be true
298
- expect(res.is_folder).to be false
299
-
300
- # Check result source
301
- res = @api.object_exists(src_path)
302
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
303
- expect(res.exists).to be false
304
- expect(res.is_folder).to be false
305
-
306
- # Clear
307
- @api.delete_file(dest_path)
308
- end
309
- end
310
-
311
189
  # Upload file
312
- # @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.
190
+ # @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext
191
+ # If the content is multipart and path does not contains the file name it tries to get them from filename parameter
192
+ # from Content-Disposition header.
313
193
  # @param file File to upload
314
194
  # @param [Hash] opts the optional parameters
315
195
  # @option opts [String] :storage_name Storage name
@@ -318,7 +198,7 @@ describe 'Test Storage API' do
318
198
  it "must be FilesUploadResult" do
319
199
  name = "test_upload_file.html"
320
200
 
321
- path = "HtmlTestDoc/" + name
201
+ path = "HtmlTestDoc"
322
202
  file = File.realpath(__dir__ + '/../../testdata/' + name)
323
203
 
324
204
  opts = {storage_name: nil, version_id: nil}
@@ -378,114 +258,6 @@ describe 'Test Storage API' do
378
258
  end
379
259
  end
380
260
 
381
- # Copy folder
382
- # @param src_path Source folder path e.g. &#39;/src&#39;
383
- # @param dest_path Destination folder path e.g. &#39;/dst&#39;
384
- # @param [Hash] opts the optional parameters
385
- # @option opts [String] :src_storage_name Source storage name
386
- # @option opts [String] :dest_storage_name Destination storage name
387
- # @return [nil]
388
- describe 'copy_folder test' do
389
- it "must be throw if error" do
390
-
391
- src_path = "HtmlTestDoc/testSourceFolder"
392
- opts_exist = {storage_name: nil, version_id: nil}
393
-
394
- # Check before
395
- res = @api.object_exists(src_path, opts_exist)
396
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
397
- expect(res.exists).to be false
398
- expect(res.is_folder).to be false
399
-
400
- # create folder
401
- opts_folder = {storage_name: nil}
402
- @api.create_folder(src_path, opts_folder)
403
-
404
- # Check creating
405
- res = @api.object_exists(src_path, opts_exist)
406
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
407
- expect(res.exists).to be true
408
- expect(res.is_folder).to be true
409
-
410
- # Test copy folder
411
- dest_path = "HtmlTestDoc/CopiedFolder"
412
- opts_copy = {src_storage_name: nil, dest_storage_name: nil}
413
-
414
- @api.copy_folder(src_path, dest_path, opts_copy)
415
-
416
- # Check src after copy
417
- res = @api.object_exists(src_path, opts_exist)
418
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
419
- expect(res.exists).to be true
420
- expect(res.is_folder).to be true
421
-
422
- # Check dst after copy
423
- res = @api.object_exists(dest_path, opts_exist)
424
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
425
- expect(res.exists).to be true
426
- expect(res.is_folder).to be true
427
-
428
- # Clear test folder
429
- opts_delete = {storage_name: nil, recursive: true}
430
- @api.delete_folder(src_path, opts_delete)
431
- @api.delete_folder(dest_path, opts_delete)
432
- end
433
- end
434
-
435
- # Move folder
436
- # @param src_path Folder path to move e.g. &#39;/folder&#39;
437
- # @param dest_path Destination folder path to move to e.g &#39;/dst&#39;
438
- # @param [Hash] opts the optional parameters
439
- # @option opts [String] :src_storage_name Source storage name
440
- # @option opts [String] :dest_storage_name Destination storage name
441
- # @return [nil]
442
- describe 'move_folder test' do
443
- it "must be throw if error" do
444
-
445
- src_path = "HtmlTestDoc/testSourceFolder"
446
- opts_exist = {storage_name: nil, version_id: nil}
447
-
448
- # Check before
449
- res = @api.object_exists(src_path, opts_exist)
450
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
451
- expect(res.exists).to be false
452
- expect(res.is_folder).to be false
453
-
454
- # create folder
455
- opts_folder = {storage_name: nil}
456
- @api.create_folder(src_path, opts_folder)
457
-
458
- # Check creating
459
- res = @api.object_exists(src_path, opts_exist)
460
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
461
- expect(res.exists).to be true
462
- expect(res.is_folder).to be true
463
-
464
- # Test move folder
465
- dest_path = "HtmlTestDoc/MovedFolder"
466
- opts_copy = {src_storage_name: nil, dest_storage_name: nil}
467
-
468
- @api.move_folder(src_path, dest_path, opts_copy)
469
-
470
- # Check src after copy
471
- res = @api.object_exists(src_path, opts_exist)
472
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
473
- expect(res.exists).to be false
474
- expect(res.is_folder).to be false
475
-
476
- # Check dst after copy
477
- res = @api.object_exists(dest_path, opts_exist)
478
- expect(res).to be_an_instance_of AsposeHtml::ObjectExist
479
- expect(res.exists).to be true
480
- expect(res.is_folder).to be true
481
-
482
- # Clear test folder
483
- opts_delete = {storage_name: nil, recursive: true}
484
- @api.delete_folder(src_path, opts_delete)
485
- @api.delete_folder(dest_path, opts_delete)
486
- end
487
- end
488
-
489
261
  # Delete folder
490
262
  # @param path Folder path e.g. &#39;/folder&#39;
491
263
  # @param [Hash] opts the optional parameters
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  --------------------------------------------------------------------------------------------------------------------
4
4
  <copyright company="Aspose" file="spec_helper.rb">
5
5
  </copyright>
6
- Copyright (c) 2019 Aspose.HTML for Cloud
6
+ Copyright (c) 2022 Aspose.HTML for Cloud
7
7
  <summary>
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
  of this software and associated documentation files (the "Software"), to deal
@@ -30,12 +30,11 @@
30
30
  require 'aspose_html_cloud'
31
31
 
32
32
  CONFIG = {
33
- "basePath": "https://api-qa.aspose.cloud/v3.0",
34
- # "basePath": "http://localhost:5000/v3.0",
35
- "authPath": "https://api-qa.aspose.cloud/connect/token",
36
- "apiKey": "html.cloud",
37
- "appSID": "html.cloud",
38
- "debug": true
33
+ "basePath": "https://api.aspose.cloud/v4.0",
34
+ "authPath": "https://api.aspose.cloud/connect/token",
35
+ "apiKey": "c8dda7d6445d82635b8797d1c8edd153",
36
+ "appSID": "2225baa2-097b-4731-9831-d0d56c28230f",
37
+ "debug": true
39
38
  }
40
39
  # from storage api
41
40
  Storage_api = AsposeHtml::StorageApi.new CONFIG
@@ -43,9 +42,8 @@ Storage_api = AsposeHtml::StorageApi.new CONFIG
43
42
  # Helper methods
44
43
  def upload_file_helper(file_name, upload_folder = nil)
45
44
  folder = upload_folder.nil? ? "HtmlTestDoc" : upload_folder
46
- path = folder + '/' + file_name
47
45
  file = File.realpath(__dir__ + '/../testdata/' + file_name)
48
- Storage_api.upload_file(path, file)
46
+ Storage_api.upload_file(folder, file)
49
47
  end
50
48
 
51
49
  def download_file_helper(file_name, download_folder = nil)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_html_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 19.6.0
4
+ version: 22.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Makogon
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-28 00:00:00.000000000 Z
11
+ date: 2022-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -203,6 +203,7 @@ files:
203
203
  - lib/aspose_html_cloud/api_error.rb
204
204
  - lib/aspose_html_cloud/configuration.rb
205
205
  - lib/aspose_html_cloud/models/base_model.rb
206
+ - lib/aspose_html_cloud/models/conversion_result.rb
206
207
  - lib/aspose_html_cloud/models/disc_usage.rb
207
208
  - lib/aspose_html_cloud/models/error.rb
208
209
  - lib/aspose_html_cloud/models/error_details.rb
@@ -218,11 +219,11 @@ files:
218
219
  - spec/api/model_spec.rb
219
220
  - spec/api/storage_api_spec.rb
220
221
  - spec/spec_helper.rb
221
- homepage: https://www.aspose.com
222
+ homepage: https://github.com/aspose-html-cloud/aspose-html-cloud-ruby
222
223
  licenses:
223
224
  - MIT
224
225
  metadata: {}
225
- post_install_message:
226
+ post_install_message:
226
227
  rdoc_options: []
227
228
  require_paths:
228
229
  - lib
@@ -237,9 +238,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
238
  - !ruby/object:Gem::Version
238
239
  version: '0'
239
240
  requirements: []
240
- rubyforge_project:
241
- rubygems_version: 2.7.6.2
242
- signing_key:
241
+ rubygems_version: 3.3.7
242
+ signing_key:
243
243
  specification_version: 4
244
244
  summary: A ruby wrapper for the Aspose.HTML Cloud SDK API.
245
245
  test_files: