aspose_cells_cloud 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -10
- data/lib/aspose_cells_cloud/api/cells_api.rb +2 -2
- data/lib/aspose_cells_cloud/api_client.rb +9 -4
- data/lib/aspose_cells_cloud/version.rb +1 -1
- data/test/cells_tests.rb +11 -6
- metadata +3 -35
- data/test/data/Creative.jpg +0 -0
- data/test/data/Embeded_OleObject_Sample_Book1.xlsx +0 -0
- data/test/data/Sample_Book1.xlsx +0 -0
- data/test/data/Sample_Book2.xls +0 -0
- data/test/data/Sample_Pivot_Table_Example.xls +0 -0
- data/test/data/Sample_Protected_Test_Book.xls +0 -0
- data/test/data/Sample_SmartMarker.xlsx +0 -0
- data/test/data/Sample_SmartMarker_Data.xml +0 -14
- data/test/data/Sample_Test_Book.xls +0 -0
- data/test/data/WorkSheetBackground_Sample_Test_Book.xls +0 -0
- data/test/data/aspose-cloud.png +0 -0
- data/test/data/aspose-logo.png +0 -0
- data/test/data/calendar.xlsx +0 -0
- data/test/data/encrypted_Sample_Test_Book.xls +0 -0
- data/test/data/myWorkbook.xlsx +0 -0
- data/test/data/testfile.txt +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8eee75d390129e363828ff2b6400c6592352cdd
|
4
|
+
data.tar.gz: 55bad3fa8a5691754de0452e8e3c9bbfe0fdf024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065660a3ab225d43045965227d0948074ccbe64da4bd35a3ed59ab34509312abe70b84db610b4f77c3515d7c90c82e94fc08239b0c7e3e153d6180a22cc6ac9f
|
7
|
+
data.tar.gz: 4228476a19abf4a6297dd628e16def9e562bd38f339e7ca5c94446590d84cc2272d0042a5df50497838dc89e2976d5547589a0122c91e36eff4761dbe08b8e92
|
data/README.md
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
# Aspose.Cells Cloud SDK For Ruby
|
2
|
-
This SDK lets you use [Aspose Cloud Cells APIs](http://api.aspose.
|
2
|
+
This SDK lets you use [Aspose Cloud Cells APIs](http://api.aspose.cloud/swagger/ui/index) in your web apps.
|
3
3
|
|
4
|
-
## Installing
|
5
|
-
You can simply install AsposeCellsCloud with gem:
|
6
4
|
|
7
|
-
|
5
|
+
<p align="center">
|
6
|
+
<a title="Download complete Aspose.Cells for Cloud source code" href="https://github.com/asposecells/Aspose_Cells_Cloud/archive/master.zip">
|
7
|
+
<img src="https://raw.github.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" />
|
8
|
+
</a>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
##How to use the SDK?
|
12
|
+
The complete source code is available in this repository folder, you can either directly use it in your project or use RubyGems. For more details, please visit our [documentation website](http://www.aspose.com/docs/display/cellscloud/Available+SDKs).
|
13
|
+
|
8
14
|
|
9
15
|
## Usage
|
10
16
|
APIs of this SDK can be called as follows:
|
@@ -33,10 +39,7 @@ class CellsUsage
|
|
33
39
|
end
|
34
40
|
```
|
35
41
|
## Unit Tests
|
36
|
-
Aspose Cells SDK includes a suite of unit tests within the [test](https://github.com/
|
37
|
-
|
38
|
-
## Contact
|
39
|
-
Your feedback is very important to us. Please email us all your queries and feedback at marketplace@aspose.com.
|
42
|
+
Aspose Cells SDK includes a suite of unit tests within the [test](https://github.com/aspose-cells/Aspose.Cells-for-Cloud/tree/master/SDKs) subdirectory. These Unit Tests also serves as examples of how to use the Aspose Cells SDK.
|
40
43
|
|
41
|
-
##
|
42
|
-
|
44
|
+
##Contact Us
|
45
|
+
Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://www.aspose.com/community/forums/).
|
@@ -781,7 +781,7 @@ module AsposeCellsCloud
|
|
781
781
|
return result
|
782
782
|
end
|
783
783
|
|
784
|
-
#
|
784
|
+
# Encrypt document.
|
785
785
|
#
|
786
786
|
# @param name The document name.
|
787
787
|
# @param encryption Encryption parameters.
|
@@ -8670,7 +8670,7 @@ module AsposeCellsCloud
|
|
8670
8670
|
return result
|
8671
8671
|
end
|
8672
8672
|
|
8673
|
-
# Delete pivot field into
|
8673
|
+
# Delete pivot field into pivot table
|
8674
8674
|
#
|
8675
8675
|
# @param name Document name.
|
8676
8676
|
# @param sheet_name The worksheet name.
|
@@ -86,6 +86,8 @@ module AsposeCellsCloud
|
|
86
86
|
end
|
87
87
|
|
88
88
|
url = sign(url, opts[:query_params])
|
89
|
+
puts "URL is #{url}"
|
90
|
+
puts "req_opts is #{req_opts}"
|
89
91
|
Typhoeus::Request.new(url, req_opts)
|
90
92
|
|
91
93
|
end
|
@@ -95,6 +97,7 @@ module AsposeCellsCloud
|
|
95
97
|
|
96
98
|
def sign(url, query_params)
|
97
99
|
|
100
|
+
puts "URL1 #{url}"
|
98
101
|
fail "Please set Aspose App key and SID first. You can get App key and App SID from https://cloud.aspose.com" if AsposeApp.app_key.nil? || AsposeApp.app_sid.nil?
|
99
102
|
|
100
103
|
url = url[0..-2] if url[-1].eql? '/'
|
@@ -107,9 +110,11 @@ module AsposeCellsCloud
|
|
107
110
|
url = url[0..-2]
|
108
111
|
end
|
109
112
|
|
113
|
+
url = "http://api.aspose.com/1.1/storage/folder/test_folder"
|
110
114
|
url = URI.escape(url)
|
115
|
+
puts "URL2 #{url}"
|
111
116
|
parsed_url = URI.parse(url)
|
112
|
-
|
117
|
+
|
113
118
|
url_to_sign = "#{parsed_url.scheme}://#{parsed_url.host}#{parsed_url.path}"
|
114
119
|
url_to_sign += "?#{parsed_url.query}" if parsed_url.query
|
115
120
|
if parsed_url.query
|
@@ -117,7 +122,8 @@ module AsposeCellsCloud
|
|
117
122
|
else
|
118
123
|
url_to_sign += "?appSID=#{AsposeApp.app_sid}"
|
119
124
|
end
|
120
|
-
|
125
|
+
|
126
|
+
puts "URL3 #{url_to_sign}"
|
121
127
|
# create a signature using the private key and the URL
|
122
128
|
raw_signature = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha1'), AsposeApp.app_key, url_to_sign)
|
123
129
|
|
@@ -137,7 +143,6 @@ module AsposeCellsCloud
|
|
137
143
|
|
138
144
|
# prepend the server and append the signature.
|
139
145
|
url_to_sign + "&signature=#{signature}"
|
140
|
-
|
141
146
|
end
|
142
147
|
|
143
148
|
# Deserialize the response to the given return type.
|
@@ -227,7 +232,7 @@ module AsposeCellsCloud
|
|
227
232
|
# close and delete temp file
|
228
233
|
tmp_file.close!
|
229
234
|
|
230
|
-
File.open(path, '
|
235
|
+
File.open(path, 'wb') { |file| file.write(response.body) }
|
231
236
|
Configuration.logger.info "File written to #{path}. Please move the file to a proper "\
|
232
237
|
"folder for further processing and delete the temp afterwards"
|
233
238
|
File.new(path)
|
data/test/cells_tests.rb
CHANGED
@@ -11,7 +11,7 @@ class CellsTests < Minitest::Test
|
|
11
11
|
def setup
|
12
12
|
#Get App key and App SID from https://cloud.aspose.com
|
13
13
|
AsposeApp.app_key_and_sid("", "")
|
14
|
-
|
14
|
+
@cells_api = CellsApi.new
|
15
15
|
end
|
16
16
|
|
17
17
|
def teardown
|
@@ -19,14 +19,15 @@ class CellsTests < Minitest::Test
|
|
19
19
|
|
20
20
|
def upload_file(file_name)
|
21
21
|
@storage_api = StorageApi.new
|
22
|
-
response = @storage_api.put_create(file_name, File.open("data/" << file_name,"r") { |io| io.read } )
|
22
|
+
response = @storage_api.put_create(file_name, File.open("../../../data/" << file_name,"r") { |io| io.read } )
|
23
23
|
assert(response, message="Failed to upload {file_name} file.")
|
24
24
|
end
|
25
25
|
|
26
26
|
def test_put_convert_work_book
|
27
27
|
file_name = "myWorkbook.xlsx"
|
28
28
|
convert_to_format = "pdf"
|
29
|
-
response = @cells_api.put_convert_work_book(File.open("data/" << file_name,"r") { |io| io.read }, {format: convert_to_format})
|
29
|
+
response = @cells_api.put_convert_work_book(File.open("../../../data/" << file_name,"r") { |io| io.read }, {format: convert_to_format})
|
30
|
+
puts response
|
30
31
|
assert(response, message="Failed to convert workbook from request content to {convert_to_format} format.")
|
31
32
|
end
|
32
33
|
|
@@ -47,7 +48,10 @@ class CellsTests < Minitest::Test
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def test_put_workbook_create
|
50
|
-
|
51
|
+
#file_name = "calendar.xlsx"
|
52
|
+
#upload_file(file_name)
|
53
|
+
response = @cells_api.put_workbook_create("newworkbook_02.xlsx", {template_file: "calendar.xlsx"})
|
54
|
+
puts response
|
51
55
|
assert(response, message="Failed to create new workbook.")
|
52
56
|
end
|
53
57
|
|
@@ -58,6 +62,7 @@ class CellsTests < Minitest::Test
|
|
58
62
|
save_options = SavingSaveOptions.new
|
59
63
|
save_options.clear_data = true
|
60
64
|
response = @cells_api.post_document_save_as(file_name, save_options, {newfilename: "updatedWorkbook.xlsx", isAutoFitRows: true, isAutoFitColumns: true})
|
65
|
+
puts response
|
61
66
|
assert(response, message="Failed to convert document and save result to storage.")
|
62
67
|
end
|
63
68
|
|
@@ -260,7 +265,7 @@ class CellsTests < Minitest::Test
|
|
260
265
|
upload_file(file_name)
|
261
266
|
data_file = "Sample_SmartMarker_Data.xml"
|
262
267
|
|
263
|
-
response = @cells_api.post_workbook_get_smart_marker_result(file_name, File.open("data/" << data_file,"r") { |io| io.read })
|
268
|
+
response = @cells_api.post_workbook_get_smart_marker_result(file_name, File.open("../../../data/" << data_file,"r") { |io| io.read })
|
264
269
|
assert(response, message="Failed to get smart marker processing result")
|
265
270
|
end
|
266
271
|
|
@@ -401,7 +406,7 @@ class CellsTests < Minitest::Test
|
|
401
406
|
upload_file(file_name)
|
402
407
|
|
403
408
|
sheet_name = "Sheet1"
|
404
|
-
background_image = File.open("data/Creative.jpg","r") { |io| io.read }
|
409
|
+
background_image = File.open("../../../data/Creative.jpg","r") { |io| io.read }
|
405
410
|
response = @cells_api.put_work_sheet_background(file_name, sheet_name, background_image)
|
406
411
|
assert(response, message="Failed to set worksheet background image")
|
407
412
|
end
|
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: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Sohail Ismail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -231,22 +231,6 @@ files:
|
|
231
231
|
- lib/aspose_cells_cloud/models/worksheets_response.rb
|
232
232
|
- lib/aspose_cells_cloud/version.rb
|
233
233
|
- test/cells_tests.rb
|
234
|
-
- test/data/Creative.jpg
|
235
|
-
- test/data/Embeded_OleObject_Sample_Book1.xlsx
|
236
|
-
- test/data/Sample_Book1.xlsx
|
237
|
-
- test/data/Sample_Book2.xls
|
238
|
-
- test/data/Sample_Pivot_Table_Example.xls
|
239
|
-
- test/data/Sample_Protected_Test_Book.xls
|
240
|
-
- test/data/Sample_SmartMarker.xlsx
|
241
|
-
- test/data/Sample_SmartMarker_Data.xml
|
242
|
-
- test/data/Sample_Test_Book.xls
|
243
|
-
- test/data/WorkSheetBackground_Sample_Test_Book.xls
|
244
|
-
- test/data/aspose-cloud.png
|
245
|
-
- test/data/aspose-logo.png
|
246
|
-
- test/data/calendar.xlsx
|
247
|
-
- test/data/encrypted_Sample_Test_Book.xls
|
248
|
-
- test/data/myWorkbook.xlsx
|
249
|
-
- test/data/testfile.txt
|
250
234
|
homepage: http://www.aspose.com/cloud/excel-api.aspx
|
251
235
|
licenses:
|
252
236
|
- MIT
|
@@ -267,25 +251,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
251
|
version: '0'
|
268
252
|
requirements: []
|
269
253
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.
|
254
|
+
rubygems_version: 2.6.8
|
271
255
|
signing_key:
|
272
256
|
specification_version: 4
|
273
257
|
summary: Aspose.Cells for Cloud
|
274
258
|
test_files:
|
275
259
|
- test/cells_tests.rb
|
276
|
-
- test/data/Creative.jpg
|
277
|
-
- test/data/Embeded_OleObject_Sample_Book1.xlsx
|
278
|
-
- test/data/Sample_Book1.xlsx
|
279
|
-
- test/data/Sample_Book2.xls
|
280
|
-
- test/data/Sample_Pivot_Table_Example.xls
|
281
|
-
- test/data/Sample_Protected_Test_Book.xls
|
282
|
-
- test/data/Sample_SmartMarker.xlsx
|
283
|
-
- test/data/Sample_SmartMarker_Data.xml
|
284
|
-
- test/data/Sample_Test_Book.xls
|
285
|
-
- test/data/WorkSheetBackground_Sample_Test_Book.xls
|
286
|
-
- test/data/aspose-cloud.png
|
287
|
-
- test/data/aspose-logo.png
|
288
|
-
- test/data/calendar.xlsx
|
289
|
-
- test/data/encrypted_Sample_Test_Book.xls
|
290
|
-
- test/data/myWorkbook.xlsx
|
291
|
-
- test/data/testfile.txt
|
data/test/data/Creative.jpg
DELETED
Binary file
|
Binary file
|
data/test/data/Sample_Book1.xlsx
DELETED
Binary file
|
data/test/data/Sample_Book2.xls
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/data/aspose-cloud.png
DELETED
Binary file
|
data/test/data/aspose-logo.png
DELETED
Binary file
|
data/test/data/calendar.xlsx
DELETED
Binary file
|
Binary file
|
data/test/data/myWorkbook.xlsx
DELETED
Binary file
|
data/test/data/testfile.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Hello This is a test file.
|