aspose_cells_cloud 22.3 → 22.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -3
- data/lib/aspose_cells_cloud/api/cells_api.rb +15 -3
- data/lib/aspose_cells_cloud/api/light_cells_api.rb +5 -0
- data/lib/aspose_cells_cloud/api_client.rb +2 -2
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/spec/api/cells_export_spec.rb +21 -2
- data/spec/api/cells_save_as_api_spec.rb +17 -0
- data/spec/api/cells_simple_spec.rb +11 -8
- data/spec/api/cells_workbook_api_spec.rb +32 -0
- 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: ea2e2f191a6270345967bd0eb15daf9ca4a62fc58a237187e6f2f2bd76dfaddd
|
4
|
+
data.tar.gz: 005d92eaf768d1d318b23e3baa2da88b285c3a804ee8a95b4ca8c890e7eba799
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99cb82511828de8a83125f5d78e463dcbed3dd6e7c3bce6e0f9168b16de25efcf5112f84fb8dcebc0e6b0e12fefe1b4274888ddd032990d407489dd1f5a498aa
|
7
|
+
data.tar.gz: 68e6fae2f985f3d9df4c3884e6fb235f34f4ecfaa3b74b5cf75359170d96f13f479bfecb545fa614e9208f59efcf8e07d06d8b39156528df216900434508228b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/22.
|
1
|
+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_cells_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_cells_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-ruby)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-ruby/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-ruby/22.4)
|
2
2
|
|
3
3
|
|
4
4
|
# Ruby SDK for Spreadsheet Processing in the Cloud
|
@@ -22,9 +22,12 @@ Ruby Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate Mic
|
|
22
22
|
- [Convert Excel files to popular formats](https://docs.aspose.cloud/cells/convert-excel-workbook-to-different-file-formats/).
|
23
23
|
|
24
24
|
|
25
|
-
## Feature & Enhancements in Version 22.
|
25
|
+
## Feature & Enhancements in Version 22.4
|
26
26
|
|
27
|
-
-
|
27
|
+
- Export API adds extended query parameters.
|
28
|
+
- Convert API adds extended query parameters.
|
29
|
+
- SaveAs API adds extended query parameters.
|
30
|
+
- Get Workbook API adds extended query parameters.
|
28
31
|
|
29
32
|
|
30
33
|
## Read & Write Spreadsheet Formats
|
@@ -13316,7 +13316,11 @@ module AsposeCellsCloud
|
|
13316
13316
|
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
13317
13317
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
13318
13318
|
query_params[:'outStorageName'] = opts[:'out_storage_name'] if !opts[:'out_storage_name'].nil?
|
13319
|
-
|
13319
|
+
if opts[:'extendedQueryParameters']
|
13320
|
+
opts[:'extendedQueryParameters'].each do |key , value|
|
13321
|
+
query_params[key] = value
|
13322
|
+
end
|
13323
|
+
end
|
13320
13324
|
# header parameters
|
13321
13325
|
header_params = {}
|
13322
13326
|
# HTTP header 'Accept' (if needed)
|
@@ -14978,7 +14982,11 @@ module AsposeCellsCloud
|
|
14978
14982
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
14979
14983
|
query_params[:'outPath'] = opts[:'out_path'] if !opts[:'out_path'].nil?
|
14980
14984
|
query_params[:'outStorageName'] = opts[:'out_storage_name'] if !opts[:'out_storage_name'].nil?
|
14981
|
-
|
14985
|
+
if opts[:'extendedQueryParameters']
|
14986
|
+
opts[:'extendedQueryParameters'].each do |key , value|
|
14987
|
+
query_params[key] = value
|
14988
|
+
end
|
14989
|
+
end
|
14982
14990
|
# header parameters
|
14983
14991
|
header_params = {}
|
14984
14992
|
# HTTP header 'Accept' (if needed)
|
@@ -16367,7 +16375,11 @@ module AsposeCellsCloud
|
|
16367
16375
|
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
|
16368
16376
|
query_params[:'outPath'] = opts[:'out_path'] if !opts[:'out_path'].nil?
|
16369
16377
|
query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
|
16370
|
-
|
16378
|
+
if opts[:'extendedQueryParameters']
|
16379
|
+
opts[:'extendedQueryParameters'].each do |key , value|
|
16380
|
+
query_params[key] = value
|
16381
|
+
end
|
16382
|
+
end
|
16371
16383
|
# header parameters
|
16372
16384
|
header_params = {}
|
16373
16385
|
# HTTP header 'Accept' (if needed)
|
@@ -344,6 +344,11 @@ module AsposeCellsCloud
|
|
344
344
|
query_params = {}
|
345
345
|
query_params[:'objectType'] = object_type
|
346
346
|
query_params[:'format'] = format
|
347
|
+
if opts[:'extendedQueryParameters']
|
348
|
+
opts[:'extendedQueryParameters'].each do |key , value|
|
349
|
+
query_params[key] = value
|
350
|
+
end
|
351
|
+
end
|
347
352
|
|
348
353
|
# header parameters
|
349
354
|
header_params = {}
|
@@ -116,7 +116,7 @@ module AsposeCellsCloud
|
|
116
116
|
:params => query_params,
|
117
117
|
:body => body
|
118
118
|
}
|
119
|
-
|
119
|
+
print query_params
|
120
120
|
if [:post, :patch, :put, :delete].include?(http_method)
|
121
121
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
122
122
|
req_opts.update :body => req_body
|
@@ -137,7 +137,7 @@ module AsposeCellsCloud
|
|
137
137
|
f.request :url_encoded
|
138
138
|
f.adapter Faraday.default_adapter
|
139
139
|
end
|
140
|
-
|
140
|
+
|
141
141
|
if req_opts[:body] == {}
|
142
142
|
req_opts[:body] = nil
|
143
143
|
end
|
@@ -161,6 +161,7 @@ describe 'LightCellsApi' do
|
|
161
161
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
162
162
|
end
|
163
163
|
end
|
164
|
+
|
164
165
|
describe 'lite_cells_unit export object test' do
|
165
166
|
it "should work" do
|
166
167
|
files = {}
|
@@ -169,11 +170,26 @@ describe 'LightCellsApi' do
|
|
169
170
|
name =$AssemblyTestXlsx
|
170
171
|
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
171
172
|
|
173
|
+
|
172
174
|
result = @instance.post_export(files ,"workbook","pdf")
|
173
175
|
|
174
176
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
175
|
-
|
177
|
+
end
|
176
178
|
end
|
179
|
+
|
180
|
+
describe 'lite_cells_unit export object test' do
|
181
|
+
it "should work" do
|
182
|
+
files = {}
|
183
|
+
name = $DataSourceXlsx
|
184
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
185
|
+
name =$AssemblyTestXlsx
|
186
|
+
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
187
|
+
|
188
|
+
result = @instance.post_export(files ,"listobject","xlsx")
|
189
|
+
|
190
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
191
|
+
end
|
192
|
+
end
|
177
193
|
|
178
194
|
describe 'lite_cells_unit export object test' do
|
179
195
|
it "should work" do
|
@@ -211,10 +227,13 @@ describe 'LightCellsApi' do
|
|
211
227
|
name =$AssemblyTestXlsx
|
212
228
|
files[name] = ::File.open(File.expand_path("data/"+name),"r")
|
213
229
|
|
214
|
-
|
230
|
+
extendedQueryParameters = {}
|
231
|
+
extendedQueryParameters['OnePagePerSheet'] = 'false'
|
232
|
+
result = @instance.post_export(files ,"listobject","pdf", { :extendedQueryParameters=>extendedQueryParameters})
|
215
233
|
|
216
234
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
217
235
|
end
|
218
236
|
end
|
237
|
+
|
219
238
|
end
|
220
239
|
|
@@ -86,4 +86,21 @@ describe 'CellsSaveAsApi' do
|
|
86
86
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
87
87
|
end
|
88
88
|
end
|
89
|
+
describe 'cells_save_as_post_document_save_as to extend format test' do
|
90
|
+
it "should work" do
|
91
|
+
name = $BOOK1
|
92
|
+
save_options = nil
|
93
|
+
newfilename = 'newbook.xls.md'
|
94
|
+
is_auto_fit_rows = true
|
95
|
+
is_auto_fit_columns = true
|
96
|
+
folder = $TEMPFOLDER
|
97
|
+
extendedQueryParameters = {}
|
98
|
+
extendedQueryParameters['OnePagePerSheet'] = 'false'
|
99
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
100
|
+
expect(result.uploaded.size).to be > 0
|
101
|
+
result = @instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>(folder+"/"+newfilename), :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder,:extendedQueryParameters=>extendedQueryParameters})
|
102
|
+
expect(result.code).to eql(200)
|
103
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
|
+
end
|
105
|
+
end
|
89
106
|
end
|
@@ -29,15 +29,18 @@ describe 'CellsApi' do
|
|
29
29
|
describe 'cells_ranges_post_worksheet_cells_range_outline_border test' do
|
30
30
|
it "should work" do
|
31
31
|
name = $BOOK1
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
password = nil
|
33
|
+
format = 'pdf'
|
34
|
+
is_auto_fit = true
|
35
|
+
only_save_table = true
|
36
36
|
folder = $TEMPFOLDER
|
37
|
-
|
38
|
-
|
39
|
-
result
|
40
|
-
|
37
|
+
out_path = nil
|
38
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
39
|
+
expect(result.uploaded.size).to be > 0
|
40
|
+
extendedQueryParameters = {}
|
41
|
+
extendedQueryParameters['OnePagePerSheet'] = 'false'
|
42
|
+
result = @instance.cells_workbook_get_workbook(name, { :password=>password, :format=>format,:folder=>folder, :out_path=>out_path, :extendedQueryParameters=>extendedQueryParameters})
|
43
|
+
# expect(result.code).to eql(200)
|
41
44
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
42
45
|
end
|
43
46
|
end
|
@@ -63,6 +63,24 @@ describe 'CellsWorkbookApi' do
|
|
63
63
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
64
64
|
end
|
65
65
|
end
|
66
|
+
describe 'cells_workbook_get_workbook to extend test' do
|
67
|
+
it "should work" do
|
68
|
+
name = $BOOK1
|
69
|
+
password = nil
|
70
|
+
format = 'XPS'
|
71
|
+
is_auto_fit = true
|
72
|
+
only_save_table = true
|
73
|
+
folder = $TEMPFOLDER
|
74
|
+
out_path = nil
|
75
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
76
|
+
expect(result.uploaded.size).to be > 0
|
77
|
+
extendedQueryParameters = {}
|
78
|
+
extendedQueryParameters['OnePagePerSheet'] = 'false'
|
79
|
+
result = @instance.cells_workbook_get_workbook(name, { :password=>password, :format=>format,:folder=>folder, :out_path=>out_path, :extendedQueryParameters=>extendedQueryParameters})
|
80
|
+
# expect(result.code).to eql(200)
|
81
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
82
|
+
end
|
83
|
+
end
|
66
84
|
# unit tests for cells_workbook_get_workbook
|
67
85
|
# Read workbook info or export.
|
68
86
|
#
|
@@ -512,6 +530,20 @@ describe 'CellsWorkbookApi' do
|
|
512
530
|
end
|
513
531
|
end
|
514
532
|
|
533
|
+
describe 'cells_workbook_put_convert_workbook_extend test' do
|
534
|
+
it "should work" do
|
535
|
+
name = $BOOK1
|
536
|
+
format = 'pdf'
|
537
|
+
password = nil
|
538
|
+
out_path = "Tdd.pdf"
|
539
|
+
extendedQueryParameters = {}
|
540
|
+
extendedQueryParameters['OnePagePerSheet'] = 'false'
|
541
|
+
result = @instance.cells_workbook_put_convert_workbook( ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) },{:format=>format,out_path=>out_path,:extendedQueryParameters=>extendedQueryParameters})
|
542
|
+
# expect(result.code).to eql(200)
|
543
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
515
547
|
# unit tests for cells_workbook_put_workbook_create
|
516
548
|
# Create new workbook using deferent methods.
|
517
549
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_cells_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '22.
|
4
|
+
version: '22.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspose Cells Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|