aspose_words_cloud 1.0.1 → 1.0.2

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -9
  3. data/lib/aspose_words_cloud/api/words_api.rb +1 -1
  4. data/lib/aspose_words_cloud/api_client.rb +1 -1
  5. data/lib/aspose_words_cloud/version.rb +1 -1
  6. data/test/words_tests.rb +11 -11
  7. metadata +3 -53
  8. data/test/data/AppendWordDocumentsExample-TestFile-Destination.doc +0 -0
  9. data/test/data/AppendWordDocumentsExample-TestFile-Source.doc +0 -0
  10. data/test/data/Customers.txt +0 -6
  11. data/test/data/FormFilled.docx +0 -0
  12. data/test/data/SampleAppendDoc.docx +0 -0
  13. data/test/data/SampleAppendDoc2.docx +0 -0
  14. data/test/data/SampleBlankWatermarkDocument.docx +0 -0
  15. data/test/data/SampleBlankWordDocument.docx +0 -0
  16. data/test/data/SampleExecuteTemplate.doc +0 -0
  17. data/test/data/SampleExecuteTemplate.docx +0 -0
  18. data/test/data/SampleExecuteTemplateData.txt +0 -49
  19. data/test/data/SampleHeaderFooterWordDocument.docx +0 -0
  20. data/test/data/SampleInvoiceTemplate.doc +0 -0
  21. data/test/data/SampleInvoiceTemplateData.txt +0 -24
  22. data/test/data/SampleMailMergeTemplate.docx +0 -0
  23. data/test/data/SampleMailMergeTemplateData.txt +0 -7
  24. data/test/data/SampleMailMergeTemplateImage.doc +0 -0
  25. data/test/data/SampleMailMergeTemplateImageData.txt +0 -12
  26. data/test/data/SampleOlePdfData.docx +0 -0
  27. data/test/data/SampleProtectedBlankWordDocument.docx +0 -0
  28. data/test/data/SampleWordDocument.docx +0 -0
  29. data/test/data/Sample_EmbeddedOLE.docx +0 -0
  30. data/test/data/WordFormatConverterExampleTest.doc +0 -0
  31. data/test/data/aspose-cloud.png +0 -0
  32. data/test/data/header-logo.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d32f2415b2360731b731de62bb578059e1224b47
4
- data.tar.gz: 6efef457d004d4921d010b947290bf1a14682f2e
3
+ metadata.gz: 56adca8a938ac524138d425ae13d72609bd2d69e
4
+ data.tar.gz: 5c059564439ffb80eb76eb2bb595655e7f4c1c6e
5
5
  SHA512:
6
- metadata.gz: dfdab7d03be3f3093ba57233d02024da8389525eae99c98fb50567113cee414d6b83cf80674e8c2d9066282d0b154f7eb6bdbbc8bdeaee41f6ab4a30ebd8686f
7
- data.tar.gz: 939885eec5589b6c1c1f4f9a51d679a3049da79d543c3e7411dfd2e7554b06dbe06e6cf32ffffec4a9a4d04d1da57ad13e18307cd7cf56e308e3cff21dab7788
6
+ metadata.gz: d1e4511ec9068bf5705ac036df53c5cbdcf958ddf10283a38f7c5074ecef9d27ce48da439c1bee0b6ed2d63582eb0bc3cb41b0d979b8f05940f196c2cb69d74f
7
+ data.tar.gz: 7aae6aa12ed7c74542e8260b583c293f3266ebaa06c2fa61448e80114bcd56de4ed31009be6b3d8f625b3361100dcf3c637c9bed7651bc02c7ae00a42a74d7b5
data/README.md CHANGED
@@ -1,10 +1,14 @@
1
1
  # Aspose.Words Cloud SDK For Ruby
2
- This SDK lets you use [Aspose Cloud Word APIs](http://www.aspose.com/cloud/word-api.aspx) in your web apps.
2
+ This SDK lets you use [Aspose Cloud Word APIs](https://www.aspose.com/products/words/cloud) in your web apps.
3
3
 
4
- ## Installing
5
- You can simply install AsposeWordsCloud with gem:
4
+ <p align="center">
5
+ <a title="Download complete Aspose.Words for Cloud source code" href="https://github.com/asposewords/Aspose_Words_Cloud/archive/master.zip">
6
+ <img src="https://raw.github.com/AsposeExamples/java-examples-dashboard/master/images/downloadZip-Button-Large.png" />
7
+ </a>
8
+ </p>
6
9
 
7
- `gem install aspose_words_cloud`
10
+ ##How to Use the SDK?
11
+ 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](https://docs.aspose.com/display/wordscloud/Available+SDKs).
8
12
 
9
13
  ## Usage
10
14
  APIs of this SDK can be called as follows:
@@ -39,10 +43,10 @@ class WordsUsage
39
43
  end
40
44
  ```
41
45
  ## Unit Tests
42
- Aspose Words SDK includes a suite of unit tests within the [test](https://github.com/asposewords/Aspose_Words_Cloud/blob/master/SDKs/Aspose.Words_Cloud_SDK_For_Ruby/test/words_tests.rb) subdirectory. These Unit Tests also serves as examples of how to use the Aspose Cells SDK.
46
+ Aspose Words SDK includes a suite of unit tests within the [test](https://github.com/aspose-words/Aspose.Words-for-Cloud/blob/master/SDKs/Aspose.Words-Cloud-SDK-for-Ruby/test/words_tests.rb) subdirectory. These Unit Tests also serves as examples of how to use the Aspose Cells SDK.
47
+
48
+ ##Contact Us
49
+ Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://www.aspose.com/community/forums/).
50
+
43
51
 
44
- ## Contact
45
- Your feedback is very important to us. Please email us all your queries and feedback at marketplace@aspose.com.
46
52
 
47
- ## License
48
- Aspose Words SDK is available under the MIT license. See the [LICENSE](https://github.com/asposewords/Aspose_Words_Cloud/blob/master/SDKs/Aspose.Words_Cloud_SDK_For_Ruby/LICENSE) file for more info.
@@ -16,7 +16,7 @@ module AsposeWordsCloud
16
16
  # @option opts [String] :out_path Path for saving operation result to the local storage.
17
17
  # @option opts [String] :replace_resources_host_to Controls wherefrom Aspose.Words loads external resource when importing a document from HTML or MHTML.
18
18
  # @return [File]
19
- def put_convert_document(file, opts = {})
19
+ def convert_document(file, opts = {})
20
20
  if Configuration.debugging
21
21
  Configuration.logger.debug "Calling API: WordsApi#put_convert_document ..."
22
22
  end
@@ -227,7 +227,7 @@ module AsposeWordsCloud
227
227
  # close and delete temp file
228
228
  tmp_file.close!
229
229
 
230
- File.open(path, 'w') { |file| file.write(response.body) }
230
+ File.open(path, 'wb') { |file| file.write(response.body) }
231
231
  Configuration.logger.info "File written to #{path}. Please move the file to a proper "\
232
232
  "folder for further processing and delete the temp afterwards"
233
233
  File.new(path)
@@ -1,3 +1,3 @@
1
1
  module AsposeWordsCloud
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/test/words_tests.rb CHANGED
@@ -9,8 +9,8 @@ class WordsTests < Minitest::Test
9
9
  include AsposeStorageCloud
10
10
 
11
11
  def setup
12
- #Get App key and App SID from https://cloud.aspose.com
13
- AsposeApp.app_key_and_sid("", "")
12
+ #Get App key and App SID from https://cloud.aspose.com
13
+ AsposeApp.app_key_and_sid("", "")
14
14
  @words_api = WordsApi.new
15
15
  end
16
16
 
@@ -19,14 +19,14 @@ class WordsTests < 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_document
27
27
  file_name = "SampleWordDocument.docx"
28
28
  convert_to_format = "pdf"
29
- response = @words_api.put_convert_document(File.open("data/" << file_name,"r") { |io| io.read }, {format: convert_to_format})
29
+ response = @words_api.put_convert_document(File.open("../../../data/" << file_name,"r") { |io| io.read }, {format: convert_to_format})
30
30
  assert(response, message="Failed to convert document from request content to {convert_to_format} format.")
31
31
  end
32
32
 
@@ -35,8 +35,8 @@ class WordsTests < Minitest::Test
35
35
  data_file_name = "SampleMailMergeTemplateData.txt"
36
36
  with_regions = false
37
37
 
38
- file = File.open("data/" << file_name,"r") { |io| io.read }
39
- data = File.open("data/" << data_file_name,"r") { |io| io.read }
38
+ file = File.open("../../../data/" << file_name,"r") { |io| io.read }
39
+ data = File.open("../../../data/" << data_file_name,"r") { |io| io.read }
40
40
  response = @words_api.put_execute_mail_merge_online(with_regions, file, data)
41
41
  assert(response, message="Failed to execute document mail merge online.")
42
42
  end
@@ -45,8 +45,8 @@ class WordsTests < Minitest::Test
45
45
  file_name = "SampleExecuteTemplate.doc"
46
46
  data_file_name = "SampleExecuteTemplateData.txt"
47
47
 
48
- file = File.open("data/" << file_name,"r") { |io| io.read }
49
- data = File.open("data/" << data_file_name,"r") { |io| io.read }
48
+ file = File.open("../../../data/" << file_name,"r") { |io| io.read }
49
+ data = File.open("../../../data/" << data_file_name,"r") { |io| io.read }
50
50
  response = @words_api.put_execute_template_online(file, data)
51
51
  assert(response, message="Failed to populate document template with data online.")
52
52
  end
@@ -72,7 +72,7 @@ class WordsTests < Minitest::Test
72
72
 
73
73
  def test_post_run_task
74
74
  file_name = "SampleWordDocument.docx"
75
- response = @words_api.post_run_task(File.open("data/" << file_name,"r") { |io| io.read })
75
+ response = @words_api.post_run_task(File.open("../../../data/" << file_name,"r") { |io| io.read })
76
76
  assert(response, message="Failed to run tasks")
77
77
  end
78
78
 
@@ -338,7 +338,7 @@ class WordsTests < Minitest::Test
338
338
 
339
339
  with_regions = false
340
340
 
341
- response = @words_api.post_document_execute_mail_merge(file_name, with_regions, File.open("data/SampleMailMergeTemplateImageData.txt","r") { |io| io.read })
341
+ response = @words_api.post_document_execute_mail_merge(file_name, with_regions, File.open("../../../data/SampleMailMergeTemplateImageData.txt","r") { |io| io.read })
342
342
  assert(response, message="Failed to execute document mail merge operation")
343
343
  end
344
344
 
@@ -346,7 +346,7 @@ class WordsTests < Minitest::Test
346
346
  file_name = "SampleExecuteTemplate.doc"
347
347
  upload_file(file_name)
348
348
 
349
- response = @words_api.post_execute_template(file_name, File.open("data/SampleExecuteTemplateData.txt","r") { |io| io.read })
349
+ response = @words_api.post_execute_template(file_name, File.open("../../../data/SampleExecuteTemplateData.txt","r") { |io| io.read })
350
350
  assert(response, message="Failed to populate document template with data")
351
351
  end
352
352
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_words_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
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: 2016-11-09 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -177,31 +177,6 @@ files:
177
177
  - lib/aspose_words_cloud/models/tiff_save_options_data.rb
178
178
  - lib/aspose_words_cloud/models/watermark_text.rb
179
179
  - lib/aspose_words_cloud/version.rb
180
- - test/data/AppendWordDocumentsExample-TestFile-Destination.doc
181
- - test/data/AppendWordDocumentsExample-TestFile-Source.doc
182
- - test/data/Customers.txt
183
- - test/data/FormFilled.docx
184
- - test/data/SampleAppendDoc.docx
185
- - test/data/SampleAppendDoc2.docx
186
- - test/data/SampleBlankWatermarkDocument.docx
187
- - test/data/SampleBlankWordDocument.docx
188
- - test/data/SampleExecuteTemplate.doc
189
- - test/data/SampleExecuteTemplate.docx
190
- - test/data/SampleExecuteTemplateData.txt
191
- - test/data/SampleHeaderFooterWordDocument.docx
192
- - test/data/SampleInvoiceTemplate.doc
193
- - test/data/SampleInvoiceTemplateData.txt
194
- - test/data/SampleMailMergeTemplate.docx
195
- - test/data/SampleMailMergeTemplateData.txt
196
- - test/data/SampleMailMergeTemplateImage.doc
197
- - test/data/SampleMailMergeTemplateImageData.txt
198
- - test/data/SampleOlePdfData.docx
199
- - test/data/SampleProtectedBlankWordDocument.docx
200
- - test/data/SampleWordDocument.docx
201
- - test/data/Sample_EmbeddedOLE.docx
202
- - test/data/WordFormatConverterExampleTest.doc
203
- - test/data/aspose-cloud.png
204
- - test/data/header-logo.png
205
180
  - test/words_tests.rb
206
181
  homepage: http://www.aspose.com/cloud/word-api.aspx
207
182
  licenses:
@@ -223,34 +198,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
198
  version: '0'
224
199
  requirements: []
225
200
  rubyforge_project:
226
- rubygems_version: 2.5.1
201
+ rubygems_version: 2.6.8
227
202
  signing_key:
228
203
  specification_version: 4
229
204
  summary: Aspose.Words for Cloud
230
205
  test_files:
231
- - test/data/AppendWordDocumentsExample-TestFile-Destination.doc
232
- - test/data/AppendWordDocumentsExample-TestFile-Source.doc
233
- - test/data/Customers.txt
234
- - test/data/FormFilled.docx
235
- - test/data/SampleAppendDoc.docx
236
- - test/data/SampleAppendDoc2.docx
237
- - test/data/SampleBlankWatermarkDocument.docx
238
- - test/data/SampleBlankWordDocument.docx
239
- - test/data/SampleExecuteTemplate.doc
240
- - test/data/SampleExecuteTemplate.docx
241
- - test/data/SampleExecuteTemplateData.txt
242
- - test/data/SampleHeaderFooterWordDocument.docx
243
- - test/data/SampleInvoiceTemplate.doc
244
- - test/data/SampleInvoiceTemplateData.txt
245
- - test/data/SampleMailMergeTemplate.docx
246
- - test/data/SampleMailMergeTemplateData.txt
247
- - test/data/SampleMailMergeTemplateImage.doc
248
- - test/data/SampleMailMergeTemplateImageData.txt
249
- - test/data/SampleOlePdfData.docx
250
- - test/data/SampleProtectedBlankWordDocument.docx
251
- - test/data/SampleWordDocument.docx
252
- - test/data/Sample_EmbeddedOLE.docx
253
- - test/data/WordFormatConverterExampleTest.doc
254
- - test/data/aspose-cloud.png
255
- - test/data/header-logo.png
256
206
  - test/words_tests.rb
@@ -1,6 +0,0 @@
1
- <customers>
2
- <customer Name="John Ben Jan" ID="1" Domain="History" City="Boston"/>
3
- <customer Name="Lisa Lane" ID="2" Domain="Chemistry" City="LA"/>
4
- <customer Name="Dagomir Zits" ID="3" Domain="Heraldry" City="Milwaukee"/>
5
- <customer Name="Sara Careira Santy" ID="4" Domain="IT" City="Miami"/>
6
- </customers>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,49 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Orders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="OrdersSchema.xsd">
3
- <Order>
4
- <Address>
5
- <Number>23</Number>
6
- <Street>Nelson Street</Street>
7
- <Suburb>Howick</Suburb>
8
- <City>Auckland</City>
9
- </Address>
10
- <PhoneNumber>543 1234</PhoneNumber>
11
- <Date>03/01/2010</Date>
12
- <Total>14.00</Total>
13
- <Item>
14
- <Name>BBQ Chicken Pizza</Name>
15
- <Price>6.00</Price>
16
- <Quantity>1</Quantity>
17
- <ItemTotal>6.00</ItemTotal>
18
- </Item>
19
- <Item>
20
- <Name>1.5 Litre Coke</Name>
21
- <Price>4.00</Price>
22
- <Quantity>2</Quantity>
23
- <ItemTotal>8.00</ItemTotal>
24
- </Item>
25
- </Order>
26
- <Order>
27
- <Address>
28
- <Number>10</Number>
29
- <Street>Parkville Avenue</Street>
30
- <Suburb>Pakuranga</Suburb>
31
- <City>Auckland</City>
32
- </Address>
33
- <PhoneNumber>548 7342</PhoneNumber>
34
- <Date>05/03/2010</Date>
35
- <Total>6.00</Total>
36
- <Item>
37
- <Name>Hawaiian Pizza</Name>
38
- <Price>4.00</Price>
39
- <Quantity>1</Quantity>
40
- <ItemTotal>4.00</ItemTotal>
41
- </Item>
42
- <Item>
43
- <Name>Fries</Name>
44
- <Price>1.00</Price>
45
- <Quantity>2</Quantity>
46
- <ItemTotal>2.00</ItemTotal>
47
- </Item>
48
- </Order>
49
- </Orders>
Binary file
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Orders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="OrdersSchema.xsd">
3
-
4
- <Number>23</Number>
5
- <Address>Nelson Street</Address>
6
- <Suburb>Howick</Suburb>
7
- <City>Auckland</City>
8
- <Phonenumber>543 1234</Phonenumber>
9
- <OrderDate>03/01/2010</OrderDate>
10
- <Total>14.00</Total>
11
- <Items>
12
- <ItemName>BBQ Chicken Pizza</ItemName>
13
- <Price>6.00</Price>
14
- <Quantity>1</Quantity>
15
- <ItemTotal>6.00</ItemTotal>
16
- </Items>
17
- <Items>
18
- <ItemName>1.5 Litre Coke</ItemName>
19
- <Price>4.00</Price>
20
- <Quantity>2</Quantity>
21
- <ItemTotal>8.00</ItemTotal>
22
- </Items>
23
-
24
- </Orders>
Binary file
@@ -1,7 +0,0 @@
1
- <Fields>
2
- <FullName>Sohail</FullName>
3
- <Company>Aspose Pty Ltd</Company>
4
- <Address>Suite 163</Address>
5
- <Address2>79 Longueville Road</Address2>
6
- <City>Lane Cove</City>
7
- </Fields>
@@ -1,12 +0,0 @@
1
- <Fields>
2
- <Img>header-logo.png</Img>
3
- <SenderName>Aspose.com</SenderName>
4
- <RecipientName>Steve Jobs</RecipientName>
5
- <FaxNumber>123456789</FaxNumber>
6
- <PhoneNumber></PhoneNumber>
7
- <Subject>Hello</Subject>
8
- <Body>Test message 1</Body>
9
- <Urgent>true</Urgent>
10
- <ForReview>false</ForReview>
11
- <PleaseComment>true</PleaseComment>
12
- </Fields>
Binary file
Binary file
Binary file
Binary file
Binary file