aspose_html_cloud 19.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,165 @@
1
+ # -*- coding: utf-8 -*-
2
+ =begin
3
+ --------------------------------------------------------------------------------------------------------------------
4
+ <copyright company="Aspose" file="spec_helper.rb">
5
+ </copyright>
6
+ Copyright (c) 2019 Aspose.HTML for Cloud
7
+ <summary>
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+ </summary>
26
+ --------------------------------------------------------------------------------------------------------------------
27
+ =end
28
+
29
+ # load the gem
30
+ require 'aspose_html_cloud'
31
+
32
+ CONFIG = {
33
+ "basePath": "http://localhost:5000/v3.0",
34
+ "authPath": "https://api-qa.aspose.cloud/connect/token",
35
+ "apiKey": "html.cloud",
36
+ "appSID": "html.cloud",
37
+ "debug": true
38
+ }
39
+ # from storage api
40
+ Storage_api = AsposeHtml::StorageApi.new CONFIG
41
+
42
+ # Helper methods
43
+ def upload_file_helper(file_name, upload_folder = nil)
44
+ folder = upload_folder.nil? ? "HtmlTestDoc" : upload_folder
45
+ path = folder + '/' + file_name
46
+ file = File.realpath(__dir__ + '/../testdata/' + file_name)
47
+ Storage_api.upload_file(path, file)
48
+ end
49
+
50
+ def download_file_helper(file_name, download_folder = nil)
51
+ folder = download_folder.nil? ? "HtmlTestDoc" : download_folder
52
+ path = folder + "/" + file_name
53
+ opts = {version_id: nil, storageName: nil}
54
+ Storage_api.download_file(path, opts)
55
+ end
56
+
57
+ def save_to_test_dir(answer, dst_file)
58
+ src = answer.path
59
+ dst = File.realpath(__dir__ + '/../testresult')
60
+ dst << "/" << dst_file
61
+ FileUtils.mv(src, dst)
62
+ end
63
+
64
+ def get_file_size(file_name)
65
+ file = __dir__ + '/../testdata/' + file_name
66
+ File.size(file)
67
+ end
68
+
69
+
70
+ # The following was generated by the `rspec --init` command. Conventionally, all
71
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
72
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
73
+ # this file to always be loaded, without a need to explicitly require it in any
74
+ # files.
75
+ #
76
+ # Given that it is always loaded, you are encouraged to keep this file as
77
+ # light-weight as possible. Requiring heavyweight dependencies from this file
78
+ # will add to the boot time of your test suite on EVERY test run, even for an
79
+ # individual file that may not need all of that loaded. Instead, consider making
80
+ # a separate helper file that requires the additional dependencies and performs
81
+ # the additional setup, and require it from the spec files that actually need
82
+ # it.
83
+ #
84
+ # The `.rspec` file also contains a few flags that are not defaults but that
85
+ # users commonly want.
86
+ #
87
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
88
+ RSpec.configure do |config|
89
+ # rspec-expectations config goes here. You can use an alternate
90
+ # assertion/expectation library such as wrong or the stdlib/minitest
91
+ # assertions if you prefer.
92
+ config.expect_with :rspec do |expectations|
93
+ # This option will default to `true` in RSpec 4. It makes the `description`
94
+ # and `failure_message` of custom matchers include text for helper methods
95
+ # defined using `chain`, e.g.:
96
+ # be_bigger_than(2).and_smaller_than(4).description
97
+ # # => "be bigger than 2 and smaller than 4"
98
+ # ...rather than:
99
+ # # => "be bigger than 2"
100
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
101
+ end
102
+
103
+ # rspec-mocks config goes here. You can use an alternate test double
104
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
105
+ config.mock_with :rspec do |mocks|
106
+ # Prevents you from mocking or stubbing a method that does not exist on
107
+ # a real object. This is generally recommended, and will default to
108
+ # `true` in RSpec 4.
109
+ mocks.verify_partial_doubles = true
110
+ end
111
+
112
+ # The settings below are suggested to provide a good initial experience
113
+ # with RSpec, but feel free to customize to your heart's content.
114
+ =begin
115
+ # These two settings work together to allow you to limit a spec run
116
+ # to individual examples or groups you care about by tagging them with
117
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
118
+ # get run.
119
+ config.filter_run :focus
120
+ config.run_all_when_everything_filtered = true
121
+
122
+ # Allows RSpec to persist some state between runs in order to support
123
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
124
+ # you configure your source control system to ignore this file.
125
+ config.example_status_persistence_file_path = "spec/examples.txt"
126
+
127
+ # Limits the available syntax to the non-monkey patched syntax that is
128
+ # recommended. For more details, see:
129
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
130
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
131
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
132
+ config.disable_monkey_patching!
133
+
134
+ # This setting enables warnings. It's recommended, but in some cases may
135
+ # be too noisy due to issues in dependencies.
136
+ config.warnings = true
137
+
138
+ # Many RSpec users commonly either run the entire suite or an individual
139
+ # file, and it's useful to allow more verbose output when running an
140
+ # individual spec file.
141
+ if config.files_to_run.one?
142
+ # Use the documentation formatter for detailed output,
143
+ # unless a formatter has already been configured
144
+ # (e.g. via a command-line flag).
145
+ config.default_formatter = 'doc'
146
+ end
147
+
148
+ # Print the 10 slowest examples and example groups at the
149
+ # end of the spec run, to help surface which specs are running
150
+ # particularly slow.
151
+ config.profile_examples = 10
152
+
153
+ # Run specs in random order to surface order dependencies. If you find an
154
+ # order dependency and want to debug it, you can fix the order by providing
155
+ # the seed, which is printed after each run.
156
+ # --seed 1234
157
+ config.order = :random
158
+
159
+ # Seed global randomization in this process using the `--seed` CLI option.
160
+ # Setting this allows you to use `--seed` to deterministically reproduce
161
+ # test failures related to randomization by passing the same `--seed` value
162
+ # as the one that triggered the failure.
163
+ Kernel.srand config.seed
164
+ =end
165
+ end
metadata ADDED
@@ -0,0 +1,249 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aspose_html_cloud
3
+ version: !ruby/object:Gem::Version
4
+ version: 19.5.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Makogon
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: typhoeus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.0.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: json
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.1'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.1.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.1'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.1.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '3.6'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.6.0
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.6'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 3.6.0
73
+ - !ruby/object:Gem::Dependency
74
+ name: vcr
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '3.0'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 3.0.1
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 3.0.1
93
+ - !ruby/object:Gem::Dependency
94
+ name: webmock
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '1.24'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.24.3
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.24'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 1.24.3
113
+ - !ruby/object:Gem::Dependency
114
+ name: autotest
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '4.4'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 4.4.6
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '4.4'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 4.4.6
133
+ - !ruby/object:Gem::Dependency
134
+ name: autotest-rails-pure
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '4.1'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 4.1.2
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '4.1'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 4.1.2
153
+ - !ruby/object:Gem::Dependency
154
+ name: autotest-growl
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.2'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 0.2.16
163
+ type: :development
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '0.2'
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 0.2.16
173
+ - !ruby/object:Gem::Dependency
174
+ name: autotest-fsevent
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.2'
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 0.2.12
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '0.2'
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: 0.2.12
193
+ description: This repository contains Aspose.HTML Cloud SDK for ruby source code.
194
+ email: alexander.makogon@aspose.com
195
+ executables: []
196
+ extensions: []
197
+ extra_rdoc_files: []
198
+ files:
199
+ - lib/aspose_html_cloud.rb
200
+ - lib/aspose_html_cloud/api/html_api.rb
201
+ - lib/aspose_html_cloud/api/storage_api.rb
202
+ - lib/aspose_html_cloud/api_client.rb
203
+ - lib/aspose_html_cloud/api_error.rb
204
+ - lib/aspose_html_cloud/configuration.rb
205
+ - lib/aspose_html_cloud/models/base_model.rb
206
+ - lib/aspose_html_cloud/models/disc_usage.rb
207
+ - lib/aspose_html_cloud/models/error.rb
208
+ - lib/aspose_html_cloud/models/error_details.rb
209
+ - lib/aspose_html_cloud/models/file_version.rb
210
+ - lib/aspose_html_cloud/models/file_versions.rb
211
+ - lib/aspose_html_cloud/models/files_list.rb
212
+ - lib/aspose_html_cloud/models/files_upload_result.rb
213
+ - lib/aspose_html_cloud/models/object_exist.rb
214
+ - lib/aspose_html_cloud/models/storage_exist.rb
215
+ - lib/aspose_html_cloud/models/storage_file.rb
216
+ - lib/aspose_html_cloud/version.rb
217
+ - spec/api/html_api_spec.rb
218
+ - spec/api/model_spec.rb
219
+ - spec/api/storage_api_spec.rb
220
+ - spec/spec_helper.rb
221
+ homepage: https://www.aspose.com
222
+ licenses:
223
+ - MIT
224
+ metadata: {}
225
+ post_install_message:
226
+ rdoc_options: []
227
+ require_paths:
228
+ - lib
229
+ required_ruby_version: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - ">="
232
+ - !ruby/object:Gem::Version
233
+ version: '1.9'
234
+ required_rubygems_version: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ requirements: []
240
+ rubyforge_project:
241
+ rubygems_version: 2.7.6.2
242
+ signing_key:
243
+ specification_version: 4
244
+ summary: A ruby wrapper for the Aspose.HTML Cloud SDK API.
245
+ test_files:
246
+ - spec/api/html_api_spec.rb
247
+ - spec/api/model_spec.rb
248
+ - spec/api/storage_api_spec.rb
249
+ - spec/spec_helper.rb