aspose_slides_cloud 22.1.0 → 22.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -7
- data/LICENSE +20 -20
- data/README.md +34 -3
- data/Rakefile +8 -8
- data/TestData/test.pptx +0 -0
- data/aspose_slides_cloud.gemspec +56 -54
- data/lib/aspose_slides_cloud/api/slides_api.rb +1136 -665
- data/lib/aspose_slides_cloud/api_client.rb +11 -0
- data/lib/aspose_slides_cloud/api_error.rb +48 -48
- data/lib/aspose_slides_cloud/configuration.rb +188 -188
- data/lib/aspose_slides_cloud/models/accent_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/access_permissions.rb +321 -0
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/add_shape.rb +4 -0
- data/lib/aspose_slides_cloud/models/add_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/api_info.rb +4 -0
- data/lib/aspose_slides_cloud/models/arc_to_path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/array_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/audio_frame.rb +16 -3
- data/lib/aspose_slides_cloud/models/axes.rb +4 -0
- data/lib/aspose_slides_cloud/models/axis.rb +32 -8
- data/lib/aspose_slides_cloud/models/bar_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/block_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/blur_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/border_box_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +6 -5
- data/lib/aspose_slides_cloud/models/box_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +4 -0
- data/lib/aspose_slides_cloud/models/bubble_series.rb +19 -7
- data/lib/aspose_slides_cloud/models/camera.rb +4 -0
- data/lib/aspose_slides_cloud/models/chart.rb +5 -2
- data/lib/aspose_slides_cloud/models/chart_category.rb +4 -0
- data/lib/aspose_slides_cloud/models/chart_lines_format.rb +221 -0
- data/lib/aspose_slides_cloud/models/chart_title.rb +4 -0
- data/lib/aspose_slides_cloud/models/chart_wall.rb +4 -0
- data/lib/aspose_slides_cloud/models/close_path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/color_scheme.rb +4 -0
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/connector.rb +5 -2
- data/lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +4 -0
- data/lib/aspose_slides_cloud/models/data_point.rb +4 -0
- data/lib/aspose_slides_cloud/models/delimiter_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/disc_usage.rb +4 -0
- data/lib/aspose_slides_cloud/models/document.rb +4 -0
- data/lib/aspose_slides_cloud/models/document_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/document_property.rb +4 -0
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +4 -0
- data/lib/aspose_slides_cloud/models/effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/effect_format.rb +4 -0
- data/lib/aspose_slides_cloud/models/entity_exists.rb +4 -0
- data/lib/aspose_slides_cloud/models/error.rb +4 -0
- data/lib/aspose_slides_cloud/models/error_details.rb +4 -0
- data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
- data/lib/aspose_slides_cloud/models/export_options.rb +14 -18
- data/lib/aspose_slides_cloud/models/file_version.rb +4 -0
- data/lib/aspose_slides_cloud/models/file_versions.rb +4 -0
- data/lib/aspose_slides_cloud/models/files_list.rb +4 -0
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +4 -0
- data/lib/aspose_slides_cloud/models/fill_format.rb +4 -0
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/font_fallback_rule.rb +243 -0
- data/lib/aspose_slides_cloud/models/font_scheme.rb +4 -0
- data/lib/aspose_slides_cloud/models/font_set.rb +4 -0
- data/lib/aspose_slides_cloud/models/format_scheme.rb +4 -0
- data/lib/aspose_slides_cloud/models/fraction_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/function_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/geometry_path.rb +4 -0
- data/lib/aspose_slides_cloud/models/geometry_paths.rb +4 -0
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +5 -2
- data/lib/aspose_slides_cloud/models/gif_export_options.rb +8 -3
- data/lib/aspose_slides_cloud/models/glow_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +4 -0
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +4 -0
- data/lib/aspose_slides_cloud/models/graphical_object.rb +5 -2
- data/lib/aspose_slides_cloud/models/group_shape.rb +16 -3
- data/lib/aspose_slides_cloud/models/grouping_character_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/header_footer.rb +4 -0
- data/lib/aspose_slides_cloud/models/html5_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/html_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/hyperlink.rb +4 -0
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +4 -0
- data/lib/aspose_slides_cloud/models/image.rb +4 -0
- data/lib/aspose_slides_cloud/models/image_export_options.rb +8 -3
- data/lib/aspose_slides_cloud/models/image_export_options_base.rb +222 -0
- data/lib/aspose_slides_cloud/models/images.rb +4 -0
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/input.rb +4 -0
- data/lib/aspose_slides_cloud/models/input_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +4 -0
- data/lib/aspose_slides_cloud/models/layout_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/layout_slides.rb +4 -0
- data/lib/aspose_slides_cloud/models/left_sub_superscript_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/legend.rb +16 -2
- data/lib/aspose_slides_cloud/models/light_rig.rb +4 -0
- data/lib/aspose_slides_cloud/models/limit_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/line_format.rb +4 -0
- data/lib/aspose_slides_cloud/models/line_to_path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/master_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/master_slides.rb +4 -0
- data/lib/aspose_slides_cloud/models/math_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/math_paragraph.rb +4 -0
- data/lib/aspose_slides_cloud/models/matrix_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/merge.rb +4 -0
- data/lib/aspose_slides_cloud/models/merging_source.rb +4 -0
- data/lib/aspose_slides_cloud/models/move_to_path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/nary_operator_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/no_fill.rb +4 -0
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/notes_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +4 -0
- data/lib/aspose_slides_cloud/models/object_exist.rb +4 -0
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +76 -3
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +4 -0
- data/lib/aspose_slides_cloud/models/one_value_series.rb +16 -6
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +4 -0
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/output_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/paragraph.rb +16 -2
- data/lib/aspose_slides_cloud/models/paragraphs.rb +4 -0
- data/lib/aspose_slides_cloud/models/path_input_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/path_output_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +4 -0
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +7 -16
- data/lib/aspose_slides_cloud/models/picture_fill.rb +4 -0
- data/lib/aspose_slides_cloud/models/picture_frame.rb +5 -2
- data/lib/aspose_slides_cloud/models/pipeline.rb +4 -0
- data/lib/aspose_slides_cloud/models/placeholder.rb +4 -0
- data/lib/aspose_slides_cloud/models/placeholders.rb +4 -0
- data/lib/aspose_slides_cloud/models/plot_area.rb +4 -0
- data/lib/aspose_slides_cloud/models/portion.rb +36 -2
- data/lib/aspose_slides_cloud/models/portion_format.rb +633 -0
- data/lib/aspose_slides_cloud/models/portions.rb +4 -0
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +4 -0
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +4 -0
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/protection_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/quadratic_bezier_to_path_segment.rb +4 -0
- data/lib/aspose_slides_cloud/models/radical_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/remove_shape.rb +4 -0
- data/lib/aspose_slides_cloud/models/remove_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/replace_text.rb +4 -0
- data/lib/aspose_slides_cloud/models/request_input_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/reset_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/resource_base.rb +4 -0
- data/lib/aspose_slides_cloud/models/resource_uri.rb +4 -0
- data/lib/aspose_slides_cloud/models/response_output_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/right_sub_superscript_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/save.rb +6 -2
- data/lib/aspose_slides_cloud/models/save_shape.rb +4 -0
- data/lib/aspose_slides_cloud/models/save_slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +4 -0
- data/lib/aspose_slides_cloud/models/scatter_series.rb +8 -6
- data/lib/aspose_slides_cloud/models/section.rb +4 -0
- data/lib/aspose_slides_cloud/models/section_zoom_frame.rb +255 -0
- data/lib/aspose_slides_cloud/models/sections.rb +4 -0
- data/lib/aspose_slides_cloud/models/series.rb +5 -41
- data/lib/aspose_slides_cloud/models/series_marker.rb +4 -0
- data/lib/aspose_slides_cloud/models/shape.rb +16 -3
- data/lib/aspose_slides_cloud/models/shape_base.rb +7 -13
- data/lib/aspose_slides_cloud/models/shape_bevel.rb +4 -0
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +4 -0
- data/lib/aspose_slides_cloud/models/shape_type.rb +54 -0
- data/lib/aspose_slides_cloud/models/shapes.rb +4 -0
- data/lib/aspose_slides_cloud/models/slide.rb +4 -0
- data/lib/aspose_slides_cloud/models/slide_animation.rb +4 -0
- data/lib/aspose_slides_cloud/models/slide_background.rb +4 -0
- data/lib/aspose_slides_cloud/models/slide_comment.rb +36 -48
- data/lib/aspose_slides_cloud/models/slide_comment_base.rb +286 -0
- data/lib/aspose_slides_cloud/models/slide_comments.rb +5 -1
- data/lib/aspose_slides_cloud/models/slide_modern_comment.rb +269 -0
- data/lib/aspose_slides_cloud/models/slide_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +4 -0
- data/lib/aspose_slides_cloud/models/slides.rb +4 -0
- data/lib/aspose_slides_cloud/models/smart_art.rb +5 -2
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +4 -0
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +5 -2
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +4 -0
- data/lib/aspose_slides_cloud/models/solid_fill.rb +4 -0
- data/lib/aspose_slides_cloud/models/split_document_result.rb +4 -0
- data/lib/aspose_slides_cloud/models/storage_exist.rb +4 -0
- data/lib/aspose_slides_cloud/models/storage_file.rb +4 -0
- data/lib/aspose_slides_cloud/models/subscript_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/summary_zoom_frame.rb +274 -0
- data/lib/aspose_slides_cloud/models/summary_zoom_section.rb +266 -0
- data/lib/aspose_slides_cloud/models/superscript_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/table.rb +5 -2
- data/lib/aspose_slides_cloud/models/table_cell.rb +26 -2
- data/lib/aspose_slides_cloud/models/table_column.rb +4 -0
- data/lib/aspose_slides_cloud/models/table_row.rb +4 -0
- data/lib/aspose_slides_cloud/models/task.rb +4 -0
- data/lib/aspose_slides_cloud/models/text_bounds.rb +261 -0
- data/lib/aspose_slides_cloud/models/text_element.rb +4 -0
- data/lib/aspose_slides_cloud/models/text_frame_format.rb +255 -0
- data/lib/aspose_slides_cloud/models/text_item.rb +4 -0
- data/lib/aspose_slides_cloud/models/text_items.rb +4 -0
- data/lib/aspose_slides_cloud/models/theme.rb +4 -0
- data/lib/aspose_slides_cloud/models/three_d_format.rb +4 -0
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +8 -3
- data/lib/aspose_slides_cloud/models/update_background.rb +4 -0
- data/lib/aspose_slides_cloud/models/update_shape.rb +4 -0
- data/lib/aspose_slides_cloud/models/video_export_options.rb +289 -0
- data/lib/aspose_slides_cloud/models/video_frame.rb +5 -2
- data/lib/aspose_slides_cloud/models/view_properties.rb +4 -0
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +4 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +6 -5
- data/lib/aspose_slides_cloud/models/xaml_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +6 -3
- data/lib/aspose_slides_cloud/models/xy_series.rb +255 -0
- data/lib/aspose_slides_cloud/models/zoom_frame.rb +255 -0
- data/lib/aspose_slides_cloud/models/zoom_object.rb +301 -0
- data/lib/aspose_slides_cloud/type_registry.rb +42 -12
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/lib/aspose_slides_cloud.rb +23 -6
- data/spec/api/slides_api_spec.rb +1407 -33
- data/spec/spec_helper.rb +122 -122
- data/spec/use_cases/abstract_class_spec.rb +38 -0
- data/spec/use_cases/animation_spec.rb +193 -0
- data/spec/use_cases/auth_spec.rb +91 -0
- data/spec/use_cases/chart_spec.rb +291 -0
- data/spec/use_cases/convert_spec.rb +154 -0
- data/spec/use_cases/create_spec.rb +101 -0
- data/spec/use_cases/header_footer_spec.rb +78 -0
- data/spec/use_cases/hyperlink_spec.rb +92 -0
- data/spec/use_cases/image_spec.rb +102 -0
- data/spec/use_cases/layout_slide_spec.rb +190 -0
- data/spec/use_cases/master_slide_spec.rb +190 -0
- data/spec/use_cases/math_spec.rb +163 -0
- data/spec/use_cases/merge_spec.rb +105 -0
- data/spec/use_cases/notes_slide_spec.rb +172 -0
- data/spec/use_cases/nullable_field_spec.rb +86 -0
- data/spec/use_cases/pipeline_spec.rb +61 -0
- data/spec/use_cases/property_spec.rb +177 -0
- data/spec/use_cases/section_spec.rb +104 -0
- data/spec/use_cases/shape_format_spec.rb +126 -0
- data/spec/use_cases/shape_spec.rb +397 -0
- data/spec/use_cases/split_spec.rb +88 -0
- data/spec/use_cases/text_spec.rb +74 -0
- data/spec/use_cases/timeout_spec.rb +44 -0
- data/spec/use_cases/watermark_spec.rb +158 -0
- data/testRules.json +8 -3
- metadata +112 -15
- data/TestData/ChartTest.pptx +0 -0
- data/TestData/Sections.pptx +0 -0
- data/TestData/placeholders.pptx +0 -0
- data/TestData/test-unprotected.ppt +0 -0
- data/TestData/test.ppt +0 -0
- data/spec/extra/extra_spec.rb +0 -203
data/spec/spec_helper.rb
CHANGED
@@ -1,122 +1,122 @@
|
|
1
|
-
=begin
|
2
|
-
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
-
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
6
|
-
in the Software without restriction, including without limitation the rights
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
9
|
-
furnished to do so, subject to the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be included in all
|
12
|
-
copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
-
SOFTWARE.
|
21
|
-
=end
|
22
|
-
|
23
|
-
# load the gem
|
24
|
-
require 'aspose_slides_cloud'
|
25
|
-
require 'spec_utils'
|
26
|
-
|
27
|
-
# The following was generated by the `rspec --init` command. Conventionally, all
|
28
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
29
|
-
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
30
|
-
# this file to always be loaded, without a need to explicitly require it in any
|
31
|
-
# files.
|
32
|
-
#
|
33
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
34
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
35
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
36
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
37
|
-
# a separate helper file that requires the additional dependencies and performs
|
38
|
-
# the additional setup, and require it from the spec files that actually need
|
39
|
-
# it.
|
40
|
-
#
|
41
|
-
# The `.rspec` file also contains a few flags that are not defaults but that
|
42
|
-
# users commonly want.
|
43
|
-
#
|
44
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
45
|
-
RSpec.configure do |config|
|
46
|
-
# rspec-expectations config goes here. You can use an alternate
|
47
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
48
|
-
# assertions if you prefer.
|
49
|
-
config.expect_with :rspec do |expectations|
|
50
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
51
|
-
# and `failure_message` of custom matchers include text for helper methods
|
52
|
-
# defined using `chain`, e.g.:
|
53
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
54
|
-
# # => "be bigger than 2 and smaller than 4"
|
55
|
-
# ...rather than:
|
56
|
-
# # => "be bigger than 2"
|
57
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
58
|
-
end
|
59
|
-
|
60
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
61
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
62
|
-
config.mock_with :rspec do |mocks|
|
63
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
64
|
-
# a real object. This is generally recommended, and will default to
|
65
|
-
# `true` in RSpec 4.
|
66
|
-
mocks.verify_partial_doubles = true
|
67
|
-
end
|
68
|
-
|
69
|
-
# The settings below are suggested to provide a good initial experience
|
70
|
-
# with RSpec, but feel free to customize to your heart's content.
|
71
|
-
=begin
|
72
|
-
# These two settings work together to allow you to limit a spec run
|
73
|
-
# to individual examples or groups you care about by tagging them with
|
74
|
-
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
75
|
-
# get run.
|
76
|
-
config.filter_run :focus
|
77
|
-
config.run_all_when_everything_filtered = true
|
78
|
-
|
79
|
-
# Allows RSpec to persist some state between runs in order to support
|
80
|
-
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
81
|
-
# you configure your source control system to ignore this file.
|
82
|
-
config.example_status_persistence_file_path = "spec/examples.txt"
|
83
|
-
|
84
|
-
# Limits the available syntax to the non-monkey patched syntax that is
|
85
|
-
# recommended. For more details, see:
|
86
|
-
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
87
|
-
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
88
|
-
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
89
|
-
config.disable_monkey_patching!
|
90
|
-
|
91
|
-
# This setting enables warnings. It's recommended, but in some cases may
|
92
|
-
# be too noisy due to issues in dependencies.
|
93
|
-
config.warnings = true
|
94
|
-
|
95
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
96
|
-
# file, and it's useful to allow more verbose output when running an
|
97
|
-
# individual spec file.
|
98
|
-
if config.files_to_run.one?
|
99
|
-
# Use the documentation formatter for detailed output,
|
100
|
-
# unless a formatter has already been configured
|
101
|
-
# (e.g. via a command-line flag).
|
102
|
-
config.default_formatter = 'doc'
|
103
|
-
end
|
104
|
-
|
105
|
-
# Print the 10 slowest examples and example groups at the
|
106
|
-
# end of the spec run, to help surface which specs are running
|
107
|
-
# particularly slow.
|
108
|
-
config.profile_examples = 10
|
109
|
-
|
110
|
-
# Run specs in random order to surface order dependencies. If you find an
|
111
|
-
# order dependency and want to debug it, you can fix the order by providing
|
112
|
-
# the seed, which is printed after each run.
|
113
|
-
# --seed 1234
|
114
|
-
config.order = :random
|
115
|
-
|
116
|
-
# Seed global randomization in this process using the `--seed` CLI option.
|
117
|
-
# Setting this allows you to use `--seed` to deterministically reproduce
|
118
|
-
# test failures related to randomization by passing the same `--seed` value
|
119
|
-
# as the one that triggered the failure.
|
120
|
-
Kernel.srand config.seed
|
121
|
-
=end
|
122
|
-
end
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
# load the gem
|
24
|
+
require 'aspose_slides_cloud'
|
25
|
+
require 'spec_utils'
|
26
|
+
|
27
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
28
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
29
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
30
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
31
|
+
# files.
|
32
|
+
#
|
33
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
34
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
35
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
36
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
37
|
+
# a separate helper file that requires the additional dependencies and performs
|
38
|
+
# the additional setup, and require it from the spec files that actually need
|
39
|
+
# it.
|
40
|
+
#
|
41
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
42
|
+
# users commonly want.
|
43
|
+
#
|
44
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
45
|
+
RSpec.configure do |config|
|
46
|
+
# rspec-expectations config goes here. You can use an alternate
|
47
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
48
|
+
# assertions if you prefer.
|
49
|
+
config.expect_with :rspec do |expectations|
|
50
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
51
|
+
# and `failure_message` of custom matchers include text for helper methods
|
52
|
+
# defined using `chain`, e.g.:
|
53
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
54
|
+
# # => "be bigger than 2 and smaller than 4"
|
55
|
+
# ...rather than:
|
56
|
+
# # => "be bigger than 2"
|
57
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
58
|
+
end
|
59
|
+
|
60
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
61
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
62
|
+
config.mock_with :rspec do |mocks|
|
63
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
64
|
+
# a real object. This is generally recommended, and will default to
|
65
|
+
# `true` in RSpec 4.
|
66
|
+
mocks.verify_partial_doubles = true
|
67
|
+
end
|
68
|
+
|
69
|
+
# The settings below are suggested to provide a good initial experience
|
70
|
+
# with RSpec, but feel free to customize to your heart's content.
|
71
|
+
=begin
|
72
|
+
# These two settings work together to allow you to limit a spec run
|
73
|
+
# to individual examples or groups you care about by tagging them with
|
74
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
75
|
+
# get run.
|
76
|
+
config.filter_run :focus
|
77
|
+
config.run_all_when_everything_filtered = true
|
78
|
+
|
79
|
+
# Allows RSpec to persist some state between runs in order to support
|
80
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
81
|
+
# you configure your source control system to ignore this file.
|
82
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
83
|
+
|
84
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
85
|
+
# recommended. For more details, see:
|
86
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
87
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
88
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
89
|
+
config.disable_monkey_patching!
|
90
|
+
|
91
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
92
|
+
# be too noisy due to issues in dependencies.
|
93
|
+
config.warnings = true
|
94
|
+
|
95
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
96
|
+
# file, and it's useful to allow more verbose output when running an
|
97
|
+
# individual spec file.
|
98
|
+
if config.files_to_run.one?
|
99
|
+
# Use the documentation formatter for detailed output,
|
100
|
+
# unless a formatter has already been configured
|
101
|
+
# (e.g. via a command-line flag).
|
102
|
+
config.default_formatter = 'doc'
|
103
|
+
end
|
104
|
+
|
105
|
+
# Print the 10 slowest examples and example groups at the
|
106
|
+
# end of the spec run, to help surface which specs are running
|
107
|
+
# particularly slow.
|
108
|
+
config.profile_examples = 10
|
109
|
+
|
110
|
+
# Run specs in random order to surface order dependencies. If you find an
|
111
|
+
# order dependency and want to debug it, you can fix the order by providing
|
112
|
+
# the seed, which is printed after each run.
|
113
|
+
# --seed 1234
|
114
|
+
config.order = :random
|
115
|
+
|
116
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
117
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
118
|
+
# test failures related to randomization by passing the same `--seed` value
|
119
|
+
# as the one that triggered the failure.
|
120
|
+
Kernel.srand config.seed
|
121
|
+
=end
|
122
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'spec_helper'
|
24
|
+
|
25
|
+
describe 'UseCases' do
|
26
|
+
describe 'Abstract Classes' do
|
27
|
+
it 'base shape' do
|
28
|
+
AsposeSlidesCloud::SpecUtils.initialize('GetSlideShape', nil, nil)
|
29
|
+
o = AsposeSlidesCloud::SpecUtils.api.get_shape("test.pptx", 1, 1, "password", "TempSlidesSDK")
|
30
|
+
expect(o.text).to eq("1")
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'chart' do
|
34
|
+
chart = AsposeSlidesCloud::Chart.new
|
35
|
+
expect(chart.type).to eq("Chart")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,193 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'spec_helper'
|
24
|
+
|
25
|
+
describe 'UseCases' do
|
26
|
+
describe 'Animation' do
|
27
|
+
it 'get' do
|
28
|
+
folder_name = "TempSlidesSDK"
|
29
|
+
file_name = "test.pptx"
|
30
|
+
password = "password"
|
31
|
+
slide_index = 1
|
32
|
+
watermark_text = "watermarkText"
|
33
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
34
|
+
|
35
|
+
animation = AsposeSlidesCloud::SpecUtils.api.get_animation(file_name, slide_index, nil, nil, password, folder_name)
|
36
|
+
expect(animation.main_sequence.length).to eq(1)
|
37
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
38
|
+
|
39
|
+
animation = AsposeSlidesCloud::SpecUtils.api.get_animation(file_name, slide_index, 3, nil, password, folder_name)
|
40
|
+
expect(animation.main_sequence.length).to eq(1)
|
41
|
+
expect(animation.interactive_sequences.length).to eq(0)
|
42
|
+
|
43
|
+
animation = AsposeSlidesCloud::SpecUtils.api.get_animation(file_name, slide_index, 3, 1, password, folder_name)
|
44
|
+
expect(animation.main_sequence.length).to eq(0)
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'set' do
|
48
|
+
folder_name = "TempSlidesSDK"
|
49
|
+
file_name = "test.pptx"
|
50
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
51
|
+
|
52
|
+
dto = AsposeSlidesCloud::SlideAnimation.new
|
53
|
+
|
54
|
+
effect1 = AsposeSlidesCloud::Effect.new
|
55
|
+
effect1.type = "Blink"
|
56
|
+
effect1.shape_index = 2
|
57
|
+
effect1.paragraph_index = 1
|
58
|
+
|
59
|
+
effect2 = AsposeSlidesCloud::Effect.new
|
60
|
+
effect2.type = "Box"
|
61
|
+
effect2.subtype = "In"
|
62
|
+
effect2.preset_class_type = "Entrance"
|
63
|
+
effect2.shape_index = 4
|
64
|
+
dto.main_sequence = [ effect1, effect2 ]
|
65
|
+
dto.interactive_sequences = []
|
66
|
+
animation = AsposeSlidesCloud::SpecUtils.api.set_animation(file_name, 1, dto, "password", folder_name)
|
67
|
+
expect(animation.main_sequence.length).to eq(dto.main_sequence.length)
|
68
|
+
expect(animation.interactive_sequences.length).to eq(0)
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'create effect' do
|
72
|
+
folder_name = "TempSlidesSDK"
|
73
|
+
file_name = "test.pptx"
|
74
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
75
|
+
|
76
|
+
dto = AsposeSlidesCloud::Effect.new
|
77
|
+
dto.type = "Blast"
|
78
|
+
dto.shape_index = 3
|
79
|
+
animation = AsposeSlidesCloud::SpecUtils.api.create_animation_effect(file_name, 1, dto, "password", folder_name)
|
80
|
+
expect(animation.main_sequence.length).to eq(2)
|
81
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'create interactive sequence' do
|
85
|
+
folder_name = "TempSlidesSDK"
|
86
|
+
file_name = "test.pptx"
|
87
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
88
|
+
|
89
|
+
dto = AsposeSlidesCloud::InteractiveSequence.new
|
90
|
+
dto.trigger_shape_index = 2
|
91
|
+
effect = AsposeSlidesCloud::Effect.new
|
92
|
+
effect.type = "Blast"
|
93
|
+
effect.shape_index = 3
|
94
|
+
dto.effects = [ effect ]
|
95
|
+
animation = AsposeSlidesCloud::SpecUtils.api.create_animation_interactive_sequence(file_name, 1, dto, "password", folder_name)
|
96
|
+
expect(animation.main_sequence.length).to eq(1)
|
97
|
+
expect(animation.interactive_sequences.length).to eq(2)
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'create interactive sequence effect' do
|
101
|
+
folder_name = "TempSlidesSDK"
|
102
|
+
file_name = "test.pptx"
|
103
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
104
|
+
|
105
|
+
dto = AsposeSlidesCloud::Effect.new
|
106
|
+
dto.type = "Blast"
|
107
|
+
dto.shape_index = 3
|
108
|
+
animation = AsposeSlidesCloud::SpecUtils.api.create_animation_interactive_sequence_effect(file_name, 1, 1, dto, "password", folder_name)
|
109
|
+
expect(animation.main_sequence.length).to eq(1)
|
110
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
111
|
+
end
|
112
|
+
|
113
|
+
it 'update effect' do
|
114
|
+
folder_name = "TempSlidesSDK"
|
115
|
+
file_name = "test.pptx"
|
116
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
117
|
+
|
118
|
+
dto = AsposeSlidesCloud::Effect.new
|
119
|
+
dto.type = "Blast"
|
120
|
+
dto.shape_index = 3
|
121
|
+
animation = AsposeSlidesCloud::SpecUtils.api.update_animation_effect(file_name, 1, 1, dto, "password", folder_name)
|
122
|
+
expect(animation.main_sequence.length).to eq(1)
|
123
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'update interactive sequence effect' do
|
127
|
+
folder_name = "TempSlidesSDK"
|
128
|
+
file_name = "test.pptx"
|
129
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
130
|
+
|
131
|
+
dto = AsposeSlidesCloud::Effect.new
|
132
|
+
dto.type = "Blast"
|
133
|
+
dto.shape_index = 3
|
134
|
+
animation = AsposeSlidesCloud::SpecUtils.api.update_animation_interactive_sequence_effect(file_name, 1, 1, 1, dto, "password", folder_name)
|
135
|
+
expect(animation.main_sequence.length).to eq(1)
|
136
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'delete' do
|
140
|
+
folder_name = "TempSlidesSDK"
|
141
|
+
file_name = "test.pptx"
|
142
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
143
|
+
animation = AsposeSlidesCloud::SpecUtils.api.delete_animation(file_name, 1, "password", folder_name)
|
144
|
+
expect(animation.main_sequence.length).to eq(0)
|
145
|
+
expect(animation.interactive_sequences.length).to eq(0)
|
146
|
+
end
|
147
|
+
|
148
|
+
it 'delete main sequence' do
|
149
|
+
folder_name = "TempSlidesSDK"
|
150
|
+
file_name = "test.pptx"
|
151
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
152
|
+
animation = AsposeSlidesCloud::SpecUtils.api.delete_animation_main_sequence(file_name, 1, "password", folder_name)
|
153
|
+
expect(animation.main_sequence.length).to eq(0)
|
154
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
155
|
+
end
|
156
|
+
|
157
|
+
it 'delete main sequence effect' do
|
158
|
+
folder_name = "TempSlidesSDK"
|
159
|
+
file_name = "test.pptx"
|
160
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
161
|
+
animation = AsposeSlidesCloud::SpecUtils.api.delete_animation_effect(file_name, 1, 1, "password", folder_name)
|
162
|
+
expect(animation.main_sequence.length).to eq(0)
|
163
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
164
|
+
end
|
165
|
+
|
166
|
+
it 'delete interactive sequences' do
|
167
|
+
folder_name = "TempSlidesSDK"
|
168
|
+
file_name = "test.pptx"
|
169
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
170
|
+
animation = AsposeSlidesCloud::SpecUtils.api.delete_animation_interactive_sequences(file_name, 1, "password", folder_name)
|
171
|
+
expect(animation.main_sequence.length).to eq(1)
|
172
|
+
expect(animation.interactive_sequences.length).to eq(0)
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'delete interactive sequence' do
|
176
|
+
folder_name = "TempSlidesSDK"
|
177
|
+
file_name = "test.pptx"
|
178
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
179
|
+
animation = AsposeSlidesCloud::SpecUtils.api.delete_animation_interactive_sequence(file_name, 1, 1, "password", folder_name)
|
180
|
+
expect(animation.main_sequence.length).to eq(1)
|
181
|
+
expect(animation.interactive_sequences.length).to eq(0)
|
182
|
+
end
|
183
|
+
|
184
|
+
it 'delete interactive sequence effect' do
|
185
|
+
folder_name = "TempSlidesSDK"
|
186
|
+
file_name = "test.pptx"
|
187
|
+
AsposeSlidesCloud::SpecUtils.api.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
188
|
+
animation = AsposeSlidesCloud::SpecUtils.api.delete_animation_interactive_sequence_effect(file_name, 1, 1, 1, "password", folder_name)
|
189
|
+
expect(animation.main_sequence.length).to eq(1)
|
190
|
+
expect(animation.interactive_sequences.length).to eq(1)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'spec_helper'
|
24
|
+
|
25
|
+
describe 'UseCases' do
|
26
|
+
describe 'Authentication' do
|
27
|
+
it 'good auth' do
|
28
|
+
config = JSON.parse(File.read('testConfig.json'))
|
29
|
+
configuration = AsposeSlidesCloud::Configuration.new
|
30
|
+
configuration.base_url = config["BaseUrl"]
|
31
|
+
configuration.auth_base_url = config["AuthBaseUrl"] ? config["AuthBaseUrl"] : config["BaseUrl"]
|
32
|
+
configuration.app_sid = config["ClientId"]
|
33
|
+
configuration.app_key = config["ClientSecret"]
|
34
|
+
configuration.debugging = config["Debug"]
|
35
|
+
api = AsposeSlidesCloud::SlidesApi.new(configuration)
|
36
|
+
o, c, _h = api.get_api_info_with_http_info
|
37
|
+
expect(c).to eq(200)
|
38
|
+
expect(o).not_to be(nil)
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'bad auth' do
|
42
|
+
config = JSON.parse(File.read('testConfig.json'))
|
43
|
+
configuration = AsposeSlidesCloud::Configuration.new
|
44
|
+
configuration.base_url = config["BaseUrl"]
|
45
|
+
configuration.auth_base_url = config["AuthBaseUrl"] ? config["AuthBaseUrl"] : config["BaseUrl"]
|
46
|
+
configuration.app_sid = "invalid"
|
47
|
+
configuration.app_key = config["ClientSecret"]
|
48
|
+
configuration.debugging = config["Debug"]
|
49
|
+
api = AsposeSlidesCloud::SlidesApi.new(configuration)
|
50
|
+
begin
|
51
|
+
o, c, _h = api.get_api_info_with_http_info
|
52
|
+
fail "An exception expected"
|
53
|
+
rescue AsposeSlidesCloud::ApiError => e
|
54
|
+
expect(e.code).to eq(401)
|
55
|
+
expect(e.response_body).to include("invalid_client")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'good token' do
|
60
|
+
config = JSON.parse(File.read('testConfig.json'))
|
61
|
+
configuration = AsposeSlidesCloud::Configuration.new
|
62
|
+
configuration.base_url = config["BaseUrl"]
|
63
|
+
configuration.auth_base_url = config["AuthBaseUrl"] ? config["AuthBaseUrl"] : config["BaseUrl"]
|
64
|
+
configuration.app_sid = config["ClientId"]
|
65
|
+
configuration.app_key = config["ClientSecret"]
|
66
|
+
configuration.debugging = config["Debug"]
|
67
|
+
api = AsposeSlidesCloud::SlidesApi.new(configuration)
|
68
|
+
api.get_api_info_with_http_info
|
69
|
+
configuration.app_sid = "invalid"
|
70
|
+
api = AsposeSlidesCloud::SlidesApi.new(configuration)
|
71
|
+
o, c, _h = api.get_api_info_with_http_info
|
72
|
+
expect(c).to eq(200)
|
73
|
+
expect(o).not_to be(nil)
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'bad token' do
|
77
|
+
config = JSON.parse(File.read('testConfig.json'))
|
78
|
+
configuration = AsposeSlidesCloud::Configuration.new
|
79
|
+
configuration.base_url = config["BaseUrl"]
|
80
|
+
configuration.auth_base_url = config["AuthBaseUrl"] ? config["AuthBaseUrl"] : config["BaseUrl"]
|
81
|
+
configuration.app_sid = config["ClientId"]
|
82
|
+
configuration.app_key = config["ClientSecret"]
|
83
|
+
configuration.access_token = "expired.token"
|
84
|
+
configuration.debugging = config["Debug"]
|
85
|
+
api = AsposeSlidesCloud::SlidesApi.new(configuration)
|
86
|
+
o, c, _h = api.get_api_info_with_http_info
|
87
|
+
expect(c).to eq(200)
|
88
|
+
expect(o).not_to be(nil)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|