aspose_slides_cloud 19.9.0 → 19.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose_slides_cloud/api_client.rb +4 -1
- data/lib/aspose_slides_cloud/configuration.rb +6 -1
- data/lib/aspose_slides_cloud/models/chart.rb +11 -1
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/spec/extra/extra_spec.rb +18 -0
- data/spec/spec_utils.rb +27 -5
- data/testRules.json +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0192b8a850075f93dbdf34e271ed979875abaaf931ea2e2ffb0d4c8b6e37c30b'
|
4
|
+
data.tar.gz: 3a214622c624ecb0c79af550649db45e5b284a3f0ccd5017ae54b27d36bfb30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4ba98bcea2f6b1ba68d861f10909163acb0c5ac5feec79147c27c82aca9c200354302d12d69c5b8a4f6853d1f88332b2b3b926fc460a9c9cc0e5d014cde9324
|
7
|
+
data.tar.gz: 1092643a4283e72a7f24777c1d85f65b117842ca5e29b823b271c98b2c23134d94ed8c8156beff1d5dcce37e59f7c67782a0f7a3b553a14b1e4a61ac7d92a319
|
@@ -152,10 +152,10 @@ module AsposeSlidesCloud
|
|
152
152
|
req.params = opts[:query_params]
|
153
153
|
form_params = opts[:form_params] || {}
|
154
154
|
req.body = build_request_body(req.headers, form_params, opts[:body], opts[:files])
|
155
|
+
set_headers(req.headers)
|
155
156
|
if @config.debugging
|
156
157
|
@config.logger.debug "HTTP request\nMethod: #{req.method}\nPath: #{req.path}\nParams: #{req.params}\nHeaders: #{req.headers}\nBody: #{req.body}\n"
|
157
158
|
end
|
158
|
-
set_headers(req.headers)
|
159
159
|
end
|
160
160
|
|
161
161
|
def set_headers(headers)
|
@@ -164,6 +164,9 @@ module AsposeSlidesCloud
|
|
164
164
|
if @config.timeout > 0
|
165
165
|
headers['x-aspose-timeout'] = @config.timeout
|
166
166
|
end
|
167
|
+
@config.custom_headers.each do |key, value|
|
168
|
+
headers[key] = value
|
169
|
+
end
|
167
170
|
set_auth_header(headers)
|
168
171
|
end
|
169
172
|
|
@@ -69,12 +69,16 @@ module AsposeSlidesCloud
|
|
69
69
|
# The time limit for HTTP request in seconds.
|
70
70
|
# Default to 0 (never times out).
|
71
71
|
attr_accessor :timeout
|
72
|
-
|
72
|
+
|
73
73
|
# Set this to false to skip client side validation in the operation.
|
74
74
|
# Default to true.
|
75
75
|
# @return [true, false]
|
76
76
|
attr_accessor :client_side_validation
|
77
77
|
|
78
|
+
# Custom HTTP headers for all requests.
|
79
|
+
# @return [Hash]
|
80
|
+
attr_accessor :custom_headers
|
81
|
+
|
78
82
|
### TLS/SSL setting
|
79
83
|
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
80
84
|
# Default to true.
|
@@ -126,6 +130,7 @@ module AsposeSlidesCloud
|
|
126
130
|
@auth_base_url = 'https://api.aspose.cloud'
|
127
131
|
@version = 'v3.0'
|
128
132
|
@timeout = 0
|
133
|
+
@custom_headers = Hash.new
|
129
134
|
@client_side_validation = true
|
130
135
|
@verify_ssl = false
|
131
136
|
@verify_ssl_host = false
|
@@ -79,6 +79,9 @@ module AsposeSlidesCloud
|
|
79
79
|
# Gets or sets the type of the chart.
|
80
80
|
attr_accessor :chart_type
|
81
81
|
|
82
|
+
# True if data labels over the maximum of the chart shall be shown.
|
83
|
+
attr_accessor :show_data_labels_over_maximum
|
84
|
+
|
82
85
|
# Gets or sets the series of chart data values.
|
83
86
|
attr_accessor :series
|
84
87
|
|
@@ -149,6 +152,7 @@ module AsposeSlidesCloud
|
|
149
152
|
:'type' => :'Type',
|
150
153
|
:'shape_type' => :'ShapeType',
|
151
154
|
:'chart_type' => :'ChartType',
|
155
|
+
:'show_data_labels_over_maximum' => :'ShowDataLabelsOverMaximum',
|
152
156
|
:'series' => :'Series',
|
153
157
|
:'categories' => :'Categories',
|
154
158
|
:'title' => :'Title',
|
@@ -182,6 +186,7 @@ module AsposeSlidesCloud
|
|
182
186
|
:'type' => :'String',
|
183
187
|
:'shape_type' => :'String',
|
184
188
|
:'chart_type' => :'String',
|
189
|
+
:'show_data_labels_over_maximum' => :'BOOLEAN',
|
185
190
|
:'series' => :'Array<Series>',
|
186
191
|
:'categories' => :'Array<String>',
|
187
192
|
:'title' => :'ChartTitle',
|
@@ -280,6 +285,10 @@ module AsposeSlidesCloud
|
|
280
285
|
self.chart_type = attributes[:'ChartType']
|
281
286
|
end
|
282
287
|
|
288
|
+
if attributes.has_key?(:'ShowDataLabelsOverMaximum')
|
289
|
+
self.show_data_labels_over_maximum = attributes[:'ShowDataLabelsOverMaximum']
|
290
|
+
end
|
291
|
+
|
283
292
|
if attributes.has_key?(:'Series')
|
284
293
|
if (value = attributes[:'Series']).is_a?(Array)
|
285
294
|
self.series = value
|
@@ -413,6 +422,7 @@ module AsposeSlidesCloud
|
|
413
422
|
type == o.type &&
|
414
423
|
shape_type == o.shape_type &&
|
415
424
|
chart_type == o.chart_type &&
|
425
|
+
show_data_labels_over_maximum == o.show_data_labels_over_maximum &&
|
416
426
|
series == o.series &&
|
417
427
|
categories == o.categories &&
|
418
428
|
title == o.title &&
|
@@ -433,7 +443,7 @@ module AsposeSlidesCloud
|
|
433
443
|
# Calculates hash code according to all attributes.
|
434
444
|
# @return [Fixnum] Hash code
|
435
445
|
def hash
|
436
|
-
[self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, line_format, type, shape_type, chart_type, series, categories, title, back_wall, side_wall, floor, legend, axes, plot_area].hash
|
446
|
+
[self_uri, alternate_links, name, width, height, alternative_text, alternative_text_title, hidden, x, y, z_order_position, shapes, fill_format, effect_format, line_format, type, shape_type, chart_type, show_data_labels_over_maximum, series, categories, title, back_wall, side_wall, floor, legend, axes, plot_area].hash
|
437
447
|
end
|
438
448
|
|
439
449
|
# Builds the object from hash
|
data/spec/extra/extra_spec.rb
CHANGED
@@ -80,5 +80,23 @@ describe 'SlidesApiExtra' do
|
|
80
80
|
expect(c).to eq(200)
|
81
81
|
expect(o).not_to be(nil)
|
82
82
|
end
|
83
|
+
|
84
|
+
it 'base shape' do
|
85
|
+
#requestParam = AsposeSlidesCloud::GetSlideShapeRequest.new
|
86
|
+
#requestParam.name = "test.ppt"
|
87
|
+
#requestParam.slide_index = 1
|
88
|
+
#requestParam.shape_index = 1
|
89
|
+
#requestParam.password = "password"
|
90
|
+
#requestParam.folder = "TempSlidesSDK"
|
91
|
+
#AsposeSlidesCloud::SpecUtils.initialize('GetSlideShape', nil, nil)
|
92
|
+
#o = AsposeSlidesCloud::SpecUtils.api.get_slide_shape(requestParam)
|
93
|
+
#expect(o.text).to eq("1")
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'chart' do
|
97
|
+
#chart = Chart.new
|
98
|
+
#expect(chart.type).to eq("Chart")
|
99
|
+
#expect(chart.shape_type).to eq("Chart")
|
100
|
+
end
|
83
101
|
end
|
84
102
|
end
|
data/spec/spec_utils.rb
CHANGED
@@ -23,6 +23,27 @@ SOFTWARE.
|
|
23
23
|
module AsposeSlidesCloud
|
24
24
|
class SpecUtils
|
25
25
|
def self.initialize(method, name, value)
|
26
|
+
if !@@is_initialized
|
27
|
+
download_request = AsposeSlidesCloud::DownloadFileRequest.new
|
28
|
+
download_request.path = "TempTests/version.txt"
|
29
|
+
version = SpecUtils.api.download_file(download_request)
|
30
|
+
if version != EXPECTED_TEST_DATA_VERSION
|
31
|
+
Dir.entries(TEST_DATA_PATH).each { |f|
|
32
|
+
if !File.directory? File.join(TEST_DATA_PATH, f)
|
33
|
+
fd = File.binread(File.join(TEST_DATA_PATH, f))
|
34
|
+
upload_request = AsposeSlidesCloud::UploadFileRequest.new
|
35
|
+
upload_request.file = fd
|
36
|
+
upload_request.path = "TempTests/" + f
|
37
|
+
SpecUtils.api.upload_file(upload_request)
|
38
|
+
end
|
39
|
+
}
|
40
|
+
upload_request = AsposeSlidesCloud::UploadFileRequest.new
|
41
|
+
upload_request.file = EXPECTED_TEST_DATA_VERSION
|
42
|
+
upload_request.path = "TempTests/version.txt"
|
43
|
+
SpecUtils.api.upload_file(upload_request)
|
44
|
+
end
|
45
|
+
@@is_initialized = true
|
46
|
+
end
|
26
47
|
files = Hash.new
|
27
48
|
SpecUtils.test_rules["Files"].each do |rule|
|
28
49
|
if SpecUtils.good_rule?(rule, name, method)
|
@@ -38,11 +59,10 @@ module AsposeSlidesCloud
|
|
38
59
|
end
|
39
60
|
files.each do |path, rule|
|
40
61
|
if rule["Action"] == "Put"
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
SpecUtils.api.upload_file(upload_request)
|
62
|
+
copy_request = AsposeSlidesCloud::CopyFileRequest.new
|
63
|
+
copy_request.src_path = "TempTests/" + rule['ActualName']
|
64
|
+
copy_request.dest_path = path
|
65
|
+
SpecUtils.api.copy_file(copy_request)
|
46
66
|
elsif rule["Action"] == "Delete"
|
47
67
|
delete_request = AsposeSlidesCloud::DeleteFileRequest.new
|
48
68
|
delete_request.path = path
|
@@ -148,7 +168,9 @@ module AsposeSlidesCloud
|
|
148
168
|
end
|
149
169
|
|
150
170
|
@@api = nil
|
171
|
+
@@is_initialized = false
|
151
172
|
|
152
173
|
TEST_DATA_PATH = "TestData"
|
174
|
+
EXPECTED_TEST_DATA_VERSION = "1"
|
153
175
|
end
|
154
176
|
end
|
data/testRules.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
{ "Action": "Delete", "File": "test.ppt", "Method": "UploadFile" },
|
7
7
|
{ "Action": "Put", "File": "test-unprotected.ppt", "Method": "DeleteSlidesCleanSlidesList" },
|
8
8
|
{ "Action": "Put", "File": "test-unprotected.ppt", "Method": "PutSlidesSlide" },
|
9
|
-
{ "Action": "Put", "File": "
|
9
|
+
{ "Action": "Put", "File": "TemplateCV.pptx", "Method": "PostSlidesDocument" },
|
10
10
|
{ "Action": "Delete", "Folder": "%v", "File": "test.ppt", "Parameter": "Folder" },
|
11
11
|
{ "Action": "Delete", "File": "%v", "Parameter": "Name" },
|
12
12
|
{ "Action": "Delete", "File": "changedtest.ppt", "Method": "PostSlidesDocument" },
|
@@ -20,7 +20,9 @@
|
|
20
20
|
{ "Action": "Delete", "Folder": "TempSlidesSDKinvalid", "File": "changedtest.ppt", "Method": "PostSlidesDocumentFromTemplate" },
|
21
21
|
{ "Action": "Delete", "File": "changedtest.ppt", "Method": "PutNewPresentation" },
|
22
22
|
{ "Action": "Delete", "File": "invalidchangedtest.ppt", "Method": "PutNewPresentation" },
|
23
|
-
{ "Action": "Delete", "Folder": "TempSlidesSDKinvalid", "File": "changedtest.ppt", "Method": "PutNewPresentation" }
|
23
|
+
{ "Action": "Delete", "Folder": "TempSlidesSDKinvalid", "File": "changedtest.ppt", "Method": "PutNewPresentation" },
|
24
|
+
{ "Action": "Delete", "Folder": "invalidTempSlidesSDK", "File": "test.ppt", "Parameter": "CloneFrom" },
|
25
|
+
{ "Action": "Delete", "Folder": "invalidTempSlidesSDK", "File": "test.ppt", "Parameter": "SourcePath" }
|
24
26
|
],
|
25
27
|
"Values": [
|
26
28
|
{ "InvalidValue": "%vinvalid" },
|
@@ -36,7 +38,7 @@
|
|
36
38
|
{ "Value": "TempSlidesSDK/test.ppt", "InvalidValue": "invalid%v", "Parameter": "SrcPath" },
|
37
39
|
{ "Value": "TempSlidesSDK/changedtest.ppt", "InvalidValue": "invalid%v", "Parameter": "DestPath" },
|
38
40
|
{ "Value": "TempSlidesSDK/test.ppt", "InvalidValue": "invalid%v", "Parameter": "TemplatePath" },
|
39
|
-
{ "Value": "TempSlidesSDK/
|
41
|
+
{ "Value": "TempSlidesSDK/TemplateCV.pptx", "InvalidValue": "invalid%v", "Parameter": "TemplatePath", "Method": "PostSlidesDocument" },
|
40
42
|
{ "Value": "TempSlidesSDK/test.ppt", "InvalidValue": "invalid%v", "Parameter": "CloneFrom" },
|
41
43
|
{ "Value": "TempSlidesSDK/test.ppt", "InvalidValue": "invalid%v", "Parameter": "Source" },
|
42
44
|
{ "Value": "TempSlidesSDK/out.pdf", "Parameter": "OutPath" },
|
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: 19.
|
4
|
+
version: 19.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: 2019-
|
11
|
+
date: 2019-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|