docraptor 0.0.1

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.
@@ -0,0 +1,253 @@
1
+ module DocRaptor
2
+ #
3
+ class PrinceOptions < BaseObject
4
+ attr_accessor :baseurl, :no_xinclude, :no_network, :http_user, :http_password, :http_proxy, :http_timeout, :insecure, :media, :no_author_style, :no_default_style, :no_embed_fonts, :no_subset_fonts, :no_compress, :encrypt, :key_bits, :user_password, :owner_password, :disallow_print, :disallow_copy, :disallow_annotate, :disallow_modify, :input, :version, :javascript, :css_dpi, :profile
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Set the baseurl for assets.
10
+ :'baseurl' => :'baseurl',
11
+
12
+ # Disable XML inclusion.
13
+ :'no_xinclude' => :'no_xinclude',
14
+
15
+ # Disable network access.
16
+ :'no_network' => :'no_network',
17
+
18
+ # Set the user for HTTP authentication.
19
+ :'http_user' => :'http_user',
20
+
21
+ # Set the password for HTTP authentication.
22
+ :'http_password' => :'http_password',
23
+
24
+ # Set the HTTP proxy server.
25
+ :'http_proxy' => :'http_proxy',
26
+
27
+ # Set the HTTP request timeout.
28
+ :'http_timeout' => :'http_timeout',
29
+
30
+ # Disable SSL verification.
31
+ :'insecure' => :'insecure',
32
+
33
+ # Specify the CSS media type. Defaults to \&quot;print\&quot; but you may want to use \&quot;screen\&quot; for web styles.
34
+ :'media' => :'media',
35
+
36
+ # Ignore author stylesheets.
37
+ :'no_author_style' => :'no_author_style',
38
+
39
+ # Ignore default stylesheets.
40
+ :'no_default_style' => :'no_default_style',
41
+
42
+ # Disable font embedding in PDFs.
43
+ :'no_embed_fonts' => :'no_embed_fonts',
44
+
45
+ # Disable font subsetting in PDFs.
46
+ :'no_subset_fonts' => :'no_subset_fonts',
47
+
48
+ # Disable PDF compression.
49
+ :'no_compress' => :'no_compress',
50
+
51
+ # Encrypt PDF output.
52
+ :'encrypt' => :'encrypt',
53
+
54
+ # Set encryption key size.
55
+ :'key_bits' => :'key_bits',
56
+
57
+ # Set the PDF user password.
58
+ :'user_password' => :'user_password',
59
+
60
+ # Set the PDF owner password.
61
+ :'owner_password' => :'owner_password',
62
+
63
+ # Disallow printing of this PDF.
64
+ :'disallow_print' => :'disallow_print',
65
+
66
+ # Disallow copying of this PDF.
67
+ :'disallow_copy' => :'disallow_copy',
68
+
69
+ # Disallow annotation of this PDF.
70
+ :'disallow_annotate' => :'disallow_annotate',
71
+
72
+ # Disallow modification of this PDF.
73
+ :'disallow_modify' => :'disallow_modify',
74
+
75
+ # Specify the input format.
76
+ :'input' => :'input',
77
+
78
+ # Specify a specific verison of PrinceXML to use.
79
+ :'version' => :'version',
80
+
81
+ # Enable PrinceXML JavaScript. DocRaptor JavaScript parsing is also available elsewhere.
82
+ :'javascript' => :'javascript',
83
+
84
+ # Set the DPI when rendering CSS. Defaults to 96 but can be set with Prince 9.0 and up.
85
+ :'css_dpi' => :'css_dpi',
86
+
87
+ # In Prince 9.0 and up you can set the PDF profile.
88
+ :'profile' => :'profile'
89
+
90
+ }
91
+ end
92
+
93
+ # attribute type
94
+ def self.swagger_types
95
+ {
96
+ :'baseurl' => :'String',
97
+ :'no_xinclude' => :'BOOLEAN',
98
+ :'no_network' => :'BOOLEAN',
99
+ :'http_user' => :'String',
100
+ :'http_password' => :'String',
101
+ :'http_proxy' => :'String',
102
+ :'http_timeout' => :'Integer',
103
+ :'insecure' => :'BOOLEAN',
104
+ :'media' => :'String',
105
+ :'no_author_style' => :'BOOLEAN',
106
+ :'no_default_style' => :'BOOLEAN',
107
+ :'no_embed_fonts' => :'BOOLEAN',
108
+ :'no_subset_fonts' => :'BOOLEAN',
109
+ :'no_compress' => :'BOOLEAN',
110
+ :'encrypt' => :'BOOLEAN',
111
+ :'key_bits' => :'Integer',
112
+ :'user_password' => :'String',
113
+ :'owner_password' => :'String',
114
+ :'disallow_print' => :'BOOLEAN',
115
+ :'disallow_copy' => :'BOOLEAN',
116
+ :'disallow_annotate' => :'BOOLEAN',
117
+ :'disallow_modify' => :'BOOLEAN',
118
+ :'input' => :'String',
119
+ :'version' => :'String',
120
+ :'javascript' => :'BOOLEAN',
121
+ :'css_dpi' => :'Integer',
122
+ :'profile' => :'String'
123
+
124
+ }
125
+ end
126
+
127
+ def initialize(attributes = {})
128
+ return if !attributes.is_a?(Hash) || attributes.empty?
129
+
130
+ # convert string to symbol for hash key
131
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
132
+
133
+
134
+ if attributes[:'baseurl']
135
+ self.baseurl = attributes[:'baseurl']
136
+ end
137
+
138
+ if attributes[:'no_xinclude']
139
+ self.no_xinclude = attributes[:'no_xinclude']
140
+ end
141
+
142
+ if attributes[:'no_network']
143
+ self.no_network = attributes[:'no_network']
144
+ end
145
+
146
+ if attributes[:'http_user']
147
+ self.http_user = attributes[:'http_user']
148
+ end
149
+
150
+ if attributes[:'http_password']
151
+ self.http_password = attributes[:'http_password']
152
+ end
153
+
154
+ if attributes[:'http_proxy']
155
+ self.http_proxy = attributes[:'http_proxy']
156
+ end
157
+
158
+ if attributes[:'http_timeout']
159
+ self.http_timeout = attributes[:'http_timeout']
160
+ end
161
+
162
+ if attributes[:'insecure']
163
+ self.insecure = attributes[:'insecure']
164
+ end
165
+
166
+ if attributes[:'media']
167
+ self.media = attributes[:'media']
168
+ end
169
+
170
+ if attributes[:'no_author_style']
171
+ self.no_author_style = attributes[:'no_author_style']
172
+ end
173
+
174
+ if attributes[:'no_default_style']
175
+ self.no_default_style = attributes[:'no_default_style']
176
+ end
177
+
178
+ if attributes[:'no_embed_fonts']
179
+ self.no_embed_fonts = attributes[:'no_embed_fonts']
180
+ end
181
+
182
+ if attributes[:'no_subset_fonts']
183
+ self.no_subset_fonts = attributes[:'no_subset_fonts']
184
+ end
185
+
186
+ if attributes[:'no_compress']
187
+ self.no_compress = attributes[:'no_compress']
188
+ end
189
+
190
+ if attributes[:'encrypt']
191
+ self.encrypt = attributes[:'encrypt']
192
+ end
193
+
194
+ if attributes[:'key_bits']
195
+ self.key_bits = attributes[:'key_bits']
196
+ end
197
+
198
+ if attributes[:'user_password']
199
+ self.user_password = attributes[:'user_password']
200
+ end
201
+
202
+ if attributes[:'owner_password']
203
+ self.owner_password = attributes[:'owner_password']
204
+ end
205
+
206
+ if attributes[:'disallow_print']
207
+ self.disallow_print = attributes[:'disallow_print']
208
+ end
209
+
210
+ if attributes[:'disallow_copy']
211
+ self.disallow_copy = attributes[:'disallow_copy']
212
+ end
213
+
214
+ if attributes[:'disallow_annotate']
215
+ self.disallow_annotate = attributes[:'disallow_annotate']
216
+ end
217
+
218
+ if attributes[:'disallow_modify']
219
+ self.disallow_modify = attributes[:'disallow_modify']
220
+ end
221
+
222
+ if attributes[:'input']
223
+ self.input = attributes[:'input']
224
+ end
225
+
226
+ if attributes[:'version']
227
+ self.version = attributes[:'version']
228
+ end
229
+
230
+ if attributes[:'javascript']
231
+ self.javascript = attributes[:'javascript']
232
+ end
233
+
234
+ if attributes[:'css_dpi']
235
+ self.css_dpi = attributes[:'css_dpi']
236
+ end
237
+
238
+ if attributes[:'profile']
239
+ self.profile = attributes[:'profile']
240
+ end
241
+
242
+ end
243
+
244
+ def input=(input)
245
+ allowed_values = ["html", "xml", "auto"]
246
+ if input && !allowed_values.include?(input)
247
+ fail "invalid value for 'input', must be one of #{allowed_values}"
248
+ end
249
+ @input = input
250
+ end
251
+
252
+ end
253
+ end
@@ -0,0 +1,3 @@
1
+ module DocRaptor
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,259 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docraptor
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Elijah Miller
8
+ - Matthew Gordon
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-11-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: typhoeus
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '0.2'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.2.1
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '0.2'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.1
34
+ - !ruby/object:Gem::Dependency
35
+ name: json
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.4'
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.4.6
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - "~>"
49
+ - !ruby/object:Gem::Version
50
+ version: '1.4'
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.4.6
54
+ - !ruby/object:Gem::Dependency
55
+ name: rake
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '10.4'
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 10.4.2
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '10.4'
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 10.4.2
74
+ - !ruby/object:Gem::Dependency
75
+ name: rspec
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '3.2'
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 3.2.0
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '3.2'
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 3.2.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: vcr
96
+ requirement: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '2.9'
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 2.9.3
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.9'
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: 2.9.3
114
+ - !ruby/object:Gem::Dependency
115
+ name: webmock
116
+ requirement: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - "~>"
119
+ - !ruby/object:Gem::Version
120
+ version: '1.6'
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.6.2
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '1.6'
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: 1.6.2
134
+ - !ruby/object:Gem::Dependency
135
+ name: autotest
136
+ requirement: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: '4.4'
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: 4.4.6
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - "~>"
149
+ - !ruby/object:Gem::Version
150
+ version: '4.4'
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: 4.4.6
154
+ - !ruby/object:Gem::Dependency
155
+ name: autotest-rails-pure
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '4.1'
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: 4.1.2
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - "~>"
169
+ - !ruby/object:Gem::Version
170
+ version: '4.1'
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: 4.1.2
174
+ - !ruby/object:Gem::Dependency
175
+ name: autotest-growl
176
+ requirement: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '0.2'
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: 0.2.16
184
+ type: :development
185
+ prerelease: false
186
+ version_requirements: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - "~>"
189
+ - !ruby/object:Gem::Version
190
+ version: '0.2'
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: 0.2.16
194
+ - !ruby/object:Gem::Dependency
195
+ name: autotest-fsevent
196
+ requirement: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - "~>"
199
+ - !ruby/object:Gem::Version
200
+ version: '0.2'
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: 0.2.10
204
+ type: :development
205
+ prerelease: false
206
+ version_requirements: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - "~>"
209
+ - !ruby/object:Gem::Version
210
+ version: '0.2'
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: 0.2.10
214
+ description: A native client library for the DocRaptor HTML to PDF/XLS service.
215
+ email:
216
+ - elijah@expectedbehavior.com
217
+ - matt@expectedbehavior.com
218
+ executables: []
219
+ extensions: []
220
+ extra_rdoc_files: []
221
+ files:
222
+ - Rakefile
223
+ - docraptor.gemspec
224
+ - lib/docraptor.rb
225
+ - lib/docraptor/api/client_api.rb
226
+ - lib/docraptor/api_client.rb
227
+ - lib/docraptor/api_error.rb
228
+ - lib/docraptor/configuration.rb
229
+ - lib/docraptor/models/async_doc.rb
230
+ - lib/docraptor/models/async_doc_status.rb
231
+ - lib/docraptor/models/base_object.rb
232
+ - lib/docraptor/models/doc.rb
233
+ - lib/docraptor/models/prince_options.rb
234
+ - lib/docraptor/version.rb
235
+ homepage: https://docraptor.com
236
+ licenses:
237
+ - MIT
238
+ metadata: {}
239
+ post_install_message:
240
+ rdoc_options: []
241
+ require_paths:
242
+ - lib
243
+ required_ruby_version: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - ">="
246
+ - !ruby/object:Gem::Version
247
+ version: '0'
248
+ required_rubygems_version: !ruby/object:Gem::Requirement
249
+ requirements:
250
+ - - ">="
251
+ - !ruby/object:Gem::Version
252
+ version: '0'
253
+ requirements: []
254
+ rubyforge_project:
255
+ rubygems_version: 2.4.5.1
256
+ signing_key:
257
+ specification_version: 4
258
+ summary: A wrapper for the DocRaptor HTML to PDF/XLS service.
259
+ test_files: []