aspose_slides_cloud 23.9.0 → 23.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -7
  3. data/README.md +4 -0
  4. data/aspose_slides_cloud.gemspec +0 -1
  5. data/docker-entrypoint.sh +1 -0
  6. data/lib/aspose_slides_cloud/api/slides_async_api.rb +273 -0
  7. data/lib/aspose_slides_cloud/api_client.rb +2 -1
  8. data/lib/aspose_slides_cloud/models/operation.rb +209 -0
  9. data/lib/aspose_slides_cloud/type_registry.rb +1 -0
  10. data/lib/aspose_slides_cloud/version.rb +1 -1
  11. data/lib/aspose_slides_cloud.rb +2 -0
  12. data/spec/api/slides_api_spec.rb +2016 -2016
  13. data/spec/api/slides_async_api_spec.rb +554 -0
  14. data/spec/spec_utils.rb +38 -7
  15. data/spec/use_cases/abstract_class_spec.rb +1 -1
  16. data/spec/use_cases/animation_spec.rb +28 -28
  17. data/spec/use_cases/async_api_spec.rb +82 -0
  18. data/spec/use_cases/chart_spec.rb +51 -51
  19. data/spec/use_cases/comment_spec.rb +17 -17
  20. data/spec/use_cases/create_spec.rb +22 -22
  21. data/spec/use_cases/font_spec.rb +24 -24
  22. data/spec/use_cases/header_footer_spec.rb +9 -9
  23. data/spec/use_cases/hyperlink_spec.rb +10 -10
  24. data/spec/use_cases/image_spec.rb +16 -16
  25. data/spec/use_cases/layout_slide_spec.rb +41 -41
  26. data/spec/use_cases/master_slide_spec.rb +40 -40
  27. data/spec/use_cases/math_spec.rb +15 -15
  28. data/spec/use_cases/merge_spec.rb +15 -15
  29. data/spec/use_cases/notes_slide_spec.rb +39 -39
  30. data/spec/use_cases/nullable_field_spec.rb +7 -7
  31. data/spec/use_cases/paragraph_spec.rb +38 -38
  32. data/spec/use_cases/pipeline_spec.rb +1 -1
  33. data/spec/use_cases/portion_spec.rb +34 -34
  34. data/spec/use_cases/property_spec.rb +38 -38
  35. data/spec/use_cases/section_spec.rb +16 -16
  36. data/spec/use_cases/shape_format_spec.rb +12 -12
  37. data/spec/use_cases/shape_spec.rb +87 -87
  38. data/spec/use_cases/slide_spec.rb +32 -32
  39. data/spec/use_cases/split_spec.rb +12 -12
  40. data/spec/use_cases/table_spec.rb +38 -38
  41. data/spec/use_cases/text_format_spec.rb +4 -4
  42. data/spec/use_cases/text_spec.rb +28 -28
  43. data/spec/use_cases/vba_spec.rb +10 -10
  44. data/spec/use_cases/watermark_spec.rb +36 -36
  45. data/testConfig.json +2 -1
  46. data/testRules.json +7 -0
  47. metadata +8 -24
  48. data/spec/use_cases/convert_spec.rb +0 -199
@@ -29,11 +29,11 @@ describe 'UseCases' do
29
29
  file_name = "test.pptx"
30
30
  password = "password"
31
31
  slide_index = 1
32
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
33
- result = AsposeSlidesCloud::SpecUtils.api.get_presentation_text_items(file_name, nil, password, folder_name)
34
- result_with_empty = AsposeSlidesCloud::SpecUtils.api.get_presentation_text_items(file_name, true, password, folder_name)
35
- slide_result = AsposeSlidesCloud::SpecUtils.api.get_slide_text_items(file_name, slide_index, nil, password, folder_name)
36
- slide_result_with_empty = AsposeSlidesCloud::SpecUtils.api.get_slide_text_items(file_name, slide_index, true, password, folder_name)
32
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
33
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_presentation_text_items(file_name, nil, password, folder_name)
34
+ result_with_empty = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_presentation_text_items(file_name, true, password, folder_name)
35
+ slide_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_slide_text_items(file_name, slide_index, nil, password, folder_name)
36
+ slide_result_with_empty = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_slide_text_items(file_name, slide_index, true, password, folder_name)
37
37
  expect(result_with_empty.items.length).to be > result.items.length
38
38
  expect(result.items.length).to be > slide_result.items.length
39
39
  expect(slide_result_with_empty.items.length).to be > slide_result.items.length
@@ -46,14 +46,14 @@ describe 'UseCases' do
46
46
  slide_index = 1
47
47
  old_value = "text"
48
48
  new_value = "new_text"
49
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
50
- result = AsposeSlidesCloud::SpecUtils.api.replace_presentation_text(file_name, old_value, new_value, nil, password, folder_name)
51
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
52
- result_with_empty = AsposeSlidesCloud::SpecUtils.api.replace_presentation_text(file_name, old_value, new_value, true, password, folder_name)
53
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
54
- slide_result = AsposeSlidesCloud::SpecUtils.api.replace_slide_text(file_name, slide_index, old_value, new_value, nil, password, folder_name)
55
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
56
- slide_result_with_empty = AsposeSlidesCloud::SpecUtils.api.replace_slide_text(file_name, slide_index, old_value, new_value, true, password, folder_name)
49
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
50
+ result = AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_presentation_text(file_name, old_value, new_value, nil, password, folder_name)
51
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
52
+ result_with_empty = AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_presentation_text(file_name, old_value, new_value, true, password, folder_name)
53
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
54
+ slide_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_slide_text(file_name, slide_index, old_value, new_value, nil, password, folder_name)
55
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
56
+ slide_result_with_empty = AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_slide_text(file_name, slide_index, old_value, new_value, true, password, folder_name)
57
57
  expect(result_with_empty.matches).to be > result.matches
58
58
  expect(result.matches).to be > slide_result.matches
59
59
  expect(slide_result_with_empty.matches).to be > slide_result.matches
@@ -65,10 +65,10 @@ describe 'UseCases' do
65
65
  old_value = "text"
66
66
  new_value = "new_text"
67
67
  source = File.binread("TestData/test.pptx")
68
- AsposeSlidesCloud::SpecUtils.api.replace_presentation_text_online(source, old_value, new_value, nil, password)
69
- AsposeSlidesCloud::SpecUtils.api.replace_presentation_text_online(source, old_value, new_value, true, password)
70
- AsposeSlidesCloud::SpecUtils.api.replace_slide_text_online(source, slide_index, old_value, new_value, nil, password)
71
- AsposeSlidesCloud::SpecUtils.api.replace_slide_text_online(source, slide_index, old_value, new_value, true, password)
68
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_presentation_text_online(source, old_value, new_value, nil, password)
69
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_presentation_text_online(source, old_value, new_value, true, password)
70
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_slide_text_online(source, slide_index, old_value, new_value, nil, password)
71
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_slide_text_online(source, slide_index, old_value, new_value, true, password)
72
72
  end
73
73
 
74
74
  it 'replace text formatting' do
@@ -89,10 +89,10 @@ describe 'UseCases' do
89
89
  portion_format = AsposeSlidesCloud::PortionFormat.new
90
90
  portion_format.font_color = color
91
91
 
92
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
93
- AsposeSlidesCloud::SpecUtils.api.create_portion(file_name, slide_index, shape_index, paragraph_index, portion, portion_index, password, folder_name)
94
- AsposeSlidesCloud::SpecUtils.api.replace_text_formatting(file_name, old_text, new_text, portion_format, nil, password, folder_name)
95
- updated_portion = AsposeSlidesCloud::SpecUtils.api.get_portion(file_name, slide_index, shape_index, paragraph_index, portion_index, password, folder_name)
92
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
93
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_portion(file_name, slide_index, shape_index, paragraph_index, portion, portion_index, password, folder_name)
94
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_text_formatting(file_name, old_text, new_text, portion_format, nil, password, folder_name)
95
+ updated_portion = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_portion(file_name, slide_index, shape_index, paragraph_index, portion_index, password, folder_name)
96
96
  expect(updated_portion.text).to eq(new_text)
97
97
  expect(updated_portion.font_color).to eq(color)
98
98
  end
@@ -102,7 +102,7 @@ describe 'UseCases' do
102
102
  source = File.binread("TestData/test.pptx")
103
103
  portion_format = AsposeSlidesCloud::PortionFormat.new
104
104
  portion_format.font_color = "#FFFFA500"
105
- AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online(source, "banana", "orange", portion_format, nil, password)
105
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.replace_text_formatting_online(source, "banana", "orange", portion_format, nil, password)
106
106
  end
107
107
 
108
108
  it "highlight shape text" do
@@ -114,10 +114,10 @@ describe 'UseCases' do
114
114
  paragraph_index = 1
115
115
  highlight_color = "#FFF5FF8A"
116
116
  text_to_highlight = "highlight"
117
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
118
- AsposeSlidesCloud::SpecUtils.api.highlight_shape_text(file_name, slide_index, shape_index, text_to_highlight, highlight_color,
117
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
118
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.highlight_shape_text(file_name, slide_index, shape_index, text_to_highlight, highlight_color,
119
119
  nil, false, password, folder_name)
120
- para = AsposeSlidesCloud::SpecUtils.api.get_paragraph(file_name, slide_index, shape_index, paragraph_index, password, folder_name)
120
+ para = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_paragraph(file_name, slide_index, shape_index, paragraph_index, password, folder_name)
121
121
  expect(para.portion_list[0].text).not_to eq(text_to_highlight)
122
122
  expect(para.portion_list[0].highlight_color).not_to eq(highlight_color)
123
123
  expect(para.portion_list[1].text).to eq(text_to_highlight)
@@ -134,10 +134,10 @@ describe 'UseCases' do
134
134
  text_to_highlight = "highlight"
135
135
  highlight_color = "#FFF5FF8A"
136
136
  regex = "h.ghl[abci]ght"
137
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
138
- AsposeSlidesCloud::SpecUtils.api.highlight_shape_regex(file_name, slide_index, shape_index, regex, highlight_color,
137
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
138
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.highlight_shape_regex(file_name, slide_index, shape_index, regex, highlight_color,
139
139
  nil, false, password, folder_name)
140
- para = AsposeSlidesCloud::SpecUtils.api.get_paragraph(file_name, slide_index, shape_index, paragraph_index, password, folder_name)
140
+ para = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_paragraph(file_name, slide_index, shape_index, paragraph_index, password, folder_name)
141
141
  expect(para.portion_list[0].text).not_to eq(text_to_highlight)
142
142
  expect(para.portion_list[0].highlight_color).not_to eq(highlight_color)
143
143
  expect(para.portion_list[1].text).to eq(text_to_highlight)
@@ -27,7 +27,7 @@ describe 'UseCases' do
27
27
  it 'create VBA module' do
28
28
  folder_name = "TempSlidesSDK"
29
29
  file_name = "test.pptx"
30
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
30
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
31
31
 
32
32
  dto = AsposeSlidesCloud::VbaModule.new
33
33
  dto.name = "Module1"
@@ -41,53 +41,53 @@ describe 'UseCases' do
41
41
  reference1.lib_id = "*\\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.0#0#C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\MSO.DLL#Microsoft Office 14.0 Object Library"
42
42
  dto.references = [reference0, reference1]
43
43
 
44
- response = AsposeSlidesCloud::SpecUtils.api.create_vba_module(file_name, dto, "password", folder_name)
44
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_vba_module(file_name, dto, "password", folder_name)
45
45
  puts "'#{response.name}' has been created \n #{response.self_uri.href}"
46
46
  end
47
47
 
48
48
  it 'delete VBA module' do
49
49
  folder_name = "TempSlidesSDK"
50
50
  file_name = "macros.pptm"
51
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
51
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
52
52
 
53
53
  module_index = 1
54
54
 
55
- response = AsposeSlidesCloud::SpecUtils.api.delete_vba_module(file_name, module_index, nil, folder_name)
55
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_vba_module(file_name, module_index, nil, folder_name)
56
56
  puts "VBA project contains: #{response.modules.length} module(s), and #{response.references.length} references"
57
57
  end
58
58
 
59
59
  it 'get VBA module' do
60
60
  folder_name = "TempSlidesSDK"
61
61
  file_name = "macros.pptm"
62
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
62
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
63
63
 
64
64
  module_index = 1
65
65
 
66
- response = AsposeSlidesCloud::SpecUtils.api.get_vba_module(file_name, module_index, nil, folder_name)
66
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_vba_module(file_name, module_index, nil, folder_name)
67
67
  puts "#{response.name} \n#{response.source_code}"
68
68
  end
69
69
 
70
70
  it 'delete VBA project info' do
71
71
  folder_name = "TempSlidesSDK"
72
72
  file_name = "macros.pptm"
73
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
73
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
74
74
 
75
75
  module_index = 1
76
76
 
77
- response = AsposeSlidesCloud::SpecUtils.api.get_vba_project(file_name, nil, folder_name)
77
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_vba_project(file_name, nil, folder_name)
78
78
  puts "VBA project contains: #{response.modules.length} module(s), and #{response.references.length} references"
79
79
  end
80
80
 
81
81
  it 'update VBA module' do
82
82
  folder_name = "TempSlidesSDK"
83
83
  file_name = "macros.pptm"
84
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
84
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
85
85
 
86
86
  dto = AsposeSlidesCloud::VbaModule.new
87
87
  dto.source_code = "Sub Test() MsgBox ""Test"" End Sub"
88
88
  module_index = 1
89
89
 
90
- response = AsposeSlidesCloud::SpecUtils.api.update_vba_module(file_name, module_index, dto, "password", folder_name)
90
+ response = AsposeSlidesCloud::SpecUtils.testSlidesApi.update_vba_module(file_name, module_index, dto, "password", folder_name)
91
91
  puts "'#{response.name}' has been update \n #{response.self_uri.href}"
92
92
  end
93
93
  end
@@ -31,17 +31,17 @@ describe 'UseCases' do
31
31
  password = "password"
32
32
  slide_index = 1
33
33
  watermark_text = "watermarkText"
34
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
35
- get1_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
34
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
35
+ get1_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
36
36
  shape_count = get1_result.shapes_links.length + 1
37
- AsposeSlidesCloud::SpecUtils.api.create_watermark(file_name, nil, nil, watermark_text, nil, nil, password, folder_name)
38
- get2_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
37
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_watermark(file_name, nil, nil, watermark_text, nil, nil, password, folder_name)
38
+ get2_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
39
39
  expect(get2_result.shapes_links.length).to eq(shape_count)
40
- shape = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_count, password, folder_name)
40
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_count, password, folder_name)
41
41
  expect(shape.name).to eq("watermark")
42
42
  expect(shape.text).to eq(watermark_text)
43
- AsposeSlidesCloud::SpecUtils.api.delete_watermark(file_name, nil, password, folder_name)
44
- get3_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
43
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark(file_name, nil, password, folder_name)
44
+ get3_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
45
45
  expect(get3_result.shapes_links.length).to eq(shape_count - 1)
46
46
  end
47
47
 
@@ -51,19 +51,19 @@ describe 'UseCases' do
51
51
  password = "password"
52
52
  slide_index = 1
53
53
  watermark_text = "watermarkText"
54
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
55
- get1_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
54
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
55
+ get1_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
56
56
  shape_count = get1_result.shapes_links.length + 1
57
57
  watermark = AsposeSlidesCloud::Shape.new
58
58
  watermark.text = watermark_text
59
- AsposeSlidesCloud::SpecUtils.api.create_watermark(file_name, watermark, nil, nil, nil, nil, password, folder_name)
60
- get2_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
59
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_watermark(file_name, watermark, nil, nil, nil, nil, password, folder_name)
60
+ get2_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
61
61
  expect(get2_result.shapes_links.length).to eq(shape_count)
62
- shape = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_count, password, folder_name)
62
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_count, password, folder_name)
63
63
  expect(shape.name).to eq("watermark")
64
64
  expect(shape.text).to eq(watermark_text)
65
- AsposeSlidesCloud::SpecUtils.api.delete_watermark(file_name, nil, password, folder_name)
66
- get3_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
65
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark(file_name, nil, password, folder_name)
66
+ get3_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
67
67
  expect(get3_result.shapes_links.length).to eq(shape_count - 1)
68
68
  end
69
69
 
@@ -72,17 +72,17 @@ describe 'UseCases' do
72
72
  file_name = "test.pptx"
73
73
  password = "password"
74
74
  slide_index = 1
75
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
76
- get1_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
75
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
76
+ get1_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
77
77
  shape_count = get1_result.shapes_links.length + 1
78
78
  source = File.binread("TestData/watermark.png")
79
- AsposeSlidesCloud::SpecUtils.api.create_image_watermark(file_name, source, nil, password, folder_name)
80
- get2_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
79
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_image_watermark(file_name, source, nil, password, folder_name)
80
+ get2_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
81
81
  expect(get2_result.shapes_links.length).to eq(shape_count)
82
- shape = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_count, password, folder_name)
82
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_count, password, folder_name)
83
83
  expect(shape.name).to eq("watermark")
84
- AsposeSlidesCloud::SpecUtils.api.delete_watermark(file_name, nil, password, folder_name)
85
- get3_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
84
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark(file_name, nil, password, folder_name)
85
+ get3_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
86
86
  expect(get3_result.shapes_links.length).to eq(shape_count - 1)
87
87
  end
88
88
 
@@ -92,8 +92,8 @@ describe 'UseCases' do
92
92
  password = "password"
93
93
  slide_index = 1
94
94
  watermark_name = "myWatermark"
95
- AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
96
- get1_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
95
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
96
+ get1_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
97
97
  shape_count = get1_result.shapes_links.length + 1
98
98
  source = File.binread("TestData/watermark.png")
99
99
  watermark = AsposeSlidesCloud::PictureFrame.new
@@ -101,22 +101,22 @@ describe 'UseCases' do
101
101
  fill_format.base64_data = Base64.encode64(source)
102
102
  watermark.fill_format = fill_format
103
103
  watermark.name = watermark_name
104
- AsposeSlidesCloud::SpecUtils.api.create_image_watermark(file_name, nil, watermark, password, folder_name)
105
- get2_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
104
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.create_image_watermark(file_name, nil, watermark, password, folder_name)
105
+ get2_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
106
106
  expect(get2_result.shapes_links.length).to eq(shape_count)
107
- shape = AsposeSlidesCloud::SpecUtils.api.get_shape(file_name, slide_index, shape_count, password, folder_name)
107
+ shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, slide_index, shape_count, password, folder_name)
108
108
  expect(shape.name).to eq(watermark_name)
109
- AsposeSlidesCloud::SpecUtils.api.delete_watermark(file_name, watermark_name, password, folder_name)
110
- get3_result = AsposeSlidesCloud::SpecUtils.api.get_shapes(file_name, slide_index, password, folder_name)
109
+ AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark(file_name, watermark_name, password, folder_name)
110
+ get3_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shapes(file_name, slide_index, password, folder_name)
111
111
  expect(get3_result.shapes_links.length).to eq(shape_count - 1)
112
112
  end
113
113
 
114
114
  it 'text request' do
115
115
  password = "password"
116
116
  source = File.binread("TestData/test.pptx")
117
- post_result = AsposeSlidesCloud::SpecUtils.api.create_watermark_online(source, nil, nil, "watermarkText", nil, nil, password)
117
+ post_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_watermark_online(source, nil, nil, "watermarkText", nil, nil, password)
118
118
  expect(post_result.size).not_to eq(source.size)
119
- delete_result = AsposeSlidesCloud::SpecUtils.api.delete_watermark_online(source, nil, password)
119
+ delete_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark_online(source, nil, password)
120
120
  expect(post_result.size).to be > delete_result.size
121
121
  end
122
122
 
@@ -125,9 +125,9 @@ describe 'UseCases' do
125
125
  source = File.binread("TestData/test.pptx")
126
126
  watermark = AsposeSlidesCloud::Shape.new
127
127
  watermark.text = "watermarkText"
128
- post_result = AsposeSlidesCloud::SpecUtils.api.create_watermark_online(source, watermark, nil, nil, nil, nil, password)
128
+ post_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_watermark_online(source, watermark, nil, nil, nil, nil, password)
129
129
  expect(post_result.size).not_to eq(source.size)
130
- delete_result = AsposeSlidesCloud::SpecUtils.api.delete_watermark_online(source, nil, password)
130
+ delete_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark_online(source, nil, password)
131
131
  expect(post_result.size).to be > delete_result.size
132
132
  end
133
133
 
@@ -135,9 +135,9 @@ describe 'UseCases' do
135
135
  password = "password"
136
136
  source = File.binread("TestData/test.pptx")
137
137
  watermark = File.binread("TestData/watermark.png")
138
- post_result = AsposeSlidesCloud::SpecUtils.api.create_image_watermark_online(source, watermark, nil, password)
138
+ post_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_image_watermark_online(source, watermark, nil, password)
139
139
  expect(post_result.size).not_to eq(source.size)
140
- delete_result = AsposeSlidesCloud::SpecUtils.api.delete_watermark_online(source, nil, password)
140
+ delete_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark_online(source, nil, password)
141
141
  expect(post_result.size).to be > delete_result.size
142
142
  end
143
143
 
@@ -149,9 +149,9 @@ describe 'UseCases' do
149
149
  fill_format = AsposeSlidesCloud::PictureFill.new
150
150
  fill_format.base64_data = Base64.encode64(watermark_source)
151
151
  watermark.fill_format = fill_format
152
- post_result = AsposeSlidesCloud::SpecUtils.api.create_image_watermark_online(source, nil, watermark, password)
152
+ post_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.create_image_watermark_online(source, nil, watermark, password)
153
153
  expect(post_result.size).not_to eq(source.size)
154
- delete_result = AsposeSlidesCloud::SpecUtils.api.delete_watermark_online(source, nil, password)
154
+ delete_result = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_watermark_online(source, nil, password)
155
155
  expect(post_result.size).to be > delete_result.size
156
156
  end
157
157
  end
data/testConfig.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "ClientId": "@your_client_id@",
3
3
  "ClientSecret": "@your_client_secret@",
4
4
  "BaseUrl" : "@base_url@",
5
+ "AsyncBaseUrl" : "@async_base_url@",
5
6
  "AuthBaseUrl" : "@base_auth_url@",
6
7
  "Debug" : false
7
- }
8
+ }
data/testRules.json CHANGED
@@ -39,6 +39,7 @@
39
39
  { "Value": 2, "Parameter": "SectionIndex" },
40
40
  { "Value": 20, "InvalidValue": 593, "Parameter": "FontHeight" },
41
41
  { "Value": 256, "InvalidValue": 593, "Parameter": "FontColor" },
42
+ { "Value": "#OperationId", "InvalidValue": "#NewId", "Parameter": "Id", "Method": "/^GetOperation/" },
42
43
  { "Value": null, "InvalidValue": 593.5, "Parameter": "ScaleX" },
43
44
  { "Value": null, "InvalidValue": 593.5, "Parameter": "ScaleY" },
44
45
  { "Value": null, "InvalidValue": false, "Type": "bool" },
@@ -158,6 +159,10 @@
158
159
  { "Parameter": "Password", "Method": "/CreatePresentation/" },
159
160
  { "Parameter": "Password", "Method": "/ImportFrom/" },
160
161
  { "Parameter": "Password", "Method": "/Vba/" },
162
+ { "Parameter": "Folder", "Method": "/^Start/" },
163
+ { "Parameter": "Name", "Method": "/^Start/" },
164
+ { "Parameter": "Password", "Method": "/^Start/" },
165
+ { "Parameter": "Slides", "Method": "/^Start/" },
161
166
  { "Parameter": "LayoutAlias" },
162
167
  { "Parameter": "ShapeName" },
163
168
  { "Parameter": "Files" },
@@ -184,10 +189,12 @@
184
189
  { "Code": 201, "Method": "/^Copy.*Slide$/" },
185
190
  { "Code": 400, "Invalid": true },
186
191
  { "Code": 404, "Message" : "AmazonS3 Storage exception: The specified key does not exist.", "Parameter": "Name" },
192
+ { "Code": 404, "Message" : "Operation does not exist", "Parameter": "Id", "Method": "/^GetOperation/" },
187
193
  { "Code": 404, "Message" : "Property %v does not exist.", "Parameter": "PropertyName" },
188
194
  { "Code": 404, "Message" : "AmazonS3 Storage exception: The specified key does not exist.", "Parameter": "Folder" },
189
195
  { "Code": 404, "Message" : "AmazonS3 Storage exception: The specified key does not exist.", "Parameter": "CloneFrom" },
190
196
  { "Code": 404, "Message": "The storage %v was not found or is not associated with the application.", "Parameter": "/Storage/" },
197
+ { "Code": 404, "Message": "The storage was not found or is not associated with the application.", "Parameter": "/Storage/", "Method": "/^Start/" },
191
198
  { "Code": 404, "Message" : "AmazonS3 Storage exception: The specified key does not exist.", "Parameter": "/.*Path/" },
192
199
  { "Code": 404, "Message" : "AmazonS3 Storage exception: The specified key does not exist.", "Parameter": "Source" },
193
200
  { "Code": 404, "Message": "Author with name %v not found", "Parameter": "Author" },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_slides_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 23.9.0
4
+ version: 23.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Putrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-29 00:00:00.000000000 Z
11
+ date: 2023-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -230,26 +230,6 @@ dependencies:
230
230
  - - ">="
231
231
  - !ruby/object:Gem::Version
232
232
  version: 0.2.16
233
- - !ruby/object:Gem::Dependency
234
- name: autotest-fsevent
235
- requirement: !ruby/object:Gem::Requirement
236
- requirements:
237
- - - "~>"
238
- - !ruby/object:Gem::Version
239
- version: '0.2'
240
- - - ">="
241
- - !ruby/object:Gem::Version
242
- version: 0.2.12
243
- type: :development
244
- prerelease: false
245
- version_requirements: !ruby/object:Gem::Requirement
246
- requirements:
247
- - - "~>"
248
- - !ruby/object:Gem::Version
249
- version: '0.2'
250
- - - ">="
251
- - !ruby/object:Gem::Version
252
- version: 0.2.12
253
233
  - !ruby/object:Gem::Dependency
254
234
  name: rubyzip
255
235
  requirement: !ruby/object:Gem::Requirement
@@ -297,6 +277,7 @@ files:
297
277
  - docker-entrypoint.sh
298
278
  - lib/aspose_slides_cloud.rb
299
279
  - lib/aspose_slides_cloud/api/slides_api.rb
280
+ - lib/aspose_slides_cloud/api/slides_async_api.rb
300
281
  - lib/aspose_slides_cloud/api_client.rb
301
282
  - lib/aspose_slides_cloud/api_error.rb
302
283
  - lib/aspose_slides_cloud/configuration.rb
@@ -435,6 +416,7 @@ files:
435
416
  - lib/aspose_slides_cloud/models/ole_object_frame.rb
436
417
  - lib/aspose_slides_cloud/models/one_value_chart_data_point.rb
437
418
  - lib/aspose_slides_cloud/models/one_value_series.rb
419
+ - lib/aspose_slides_cloud/models/operation.rb
438
420
  - lib/aspose_slides_cloud/models/ordered_merge_request.rb
439
421
  - lib/aspose_slides_cloud/models/outer_shadow_effect.rb
440
422
  - lib/aspose_slides_cloud/models/output_file.rb
@@ -552,14 +534,15 @@ files:
552
534
  - lib/aspose_slides_cloud/type_registry.rb
553
535
  - lib/aspose_slides_cloud/version.rb
554
536
  - spec/api/slides_api_spec.rb
537
+ - spec/api/slides_async_api_spec.rb
555
538
  - spec/spec_helper.rb
556
539
  - spec/spec_utils.rb
557
540
  - spec/use_cases/abstract_class_spec.rb
558
541
  - spec/use_cases/animation_spec.rb
542
+ - spec/use_cases/async_api_spec.rb
559
543
  - spec/use_cases/auth_spec.rb
560
544
  - spec/use_cases/chart_spec.rb
561
545
  - spec/use_cases/comment_spec.rb
562
- - spec/use_cases/convert_spec.rb
563
546
  - spec/use_cases/create_spec.rb
564
547
  - spec/use_cases/font_spec.rb
565
548
  - spec/use_cases/header_footer_spec.rb
@@ -613,14 +596,15 @@ specification_version: 4
613
596
  summary: Aspose.Slides Cloud SDK
614
597
  test_files:
615
598
  - spec/api/slides_api_spec.rb
599
+ - spec/api/slides_async_api_spec.rb
616
600
  - spec/spec_helper.rb
617
601
  - spec/spec_utils.rb
618
602
  - spec/use_cases/abstract_class_spec.rb
619
603
  - spec/use_cases/animation_spec.rb
604
+ - spec/use_cases/async_api_spec.rb
620
605
  - spec/use_cases/auth_spec.rb
621
606
  - spec/use_cases/chart_spec.rb
622
607
  - spec/use_cases/comment_spec.rb
623
- - spec/use_cases/convert_spec.rb
624
608
  - spec/use_cases/create_spec.rb
625
609
  - spec/use_cases/font_spec.rb
626
610
  - spec/use_cases/header_footer_spec.rb