docraptor 2.0.0 → 3.0.0
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/.docker_env.list +3 -0
- data/.generator-language-identifier +1 -0
- data/.generator-revision +1 -0
- data/.github/pull_request_template.txt +17 -0
- data/.gitignore +20 -14
- data/.gitlab-ci.yml +26 -0
- data/.openapi-generator/FILES +27 -0
- data/.openapi-generator/VERSION +1 -0
- data/{.swagger-codegen-ignore → .openapi-generator-ignore} +23 -7
- data/.review/README.md +16 -0
- data/.review/generated_files/.gitignore +39 -0
- data/.review/generated_files/README.md +107 -0
- data/.rubocop.yml +148 -0
- data/.runtime-environments +10 -0
- data/.travis.yml +12 -7
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -1
- data/README.md +8 -8
- data/Rakefile +1 -2
- data/docraptor.gemspec +5 -19
- data/docraptor.yaml +5 -4
- data/examples/async.rb +24 -30
- data/examples/hosted_async.rb +21 -33
- data/examples/hosted_sync.rb +19 -32
- data/examples/sync.rb +20 -26
- data/gemfiles/Gemfile.2.5.lock +70 -0
- data/gemfiles/Gemfile.2.6.lock +70 -0
- data/gemfiles/Gemfile.2.7.lock +70 -0
- data/gemfiles/Gemfile.3.0.lock +70 -0
- data/{swagger-config.json → generator-config.json} +3 -2
- data/lib/docraptor/api/doc_api.rb +154 -79
- data/lib/docraptor/api_client.rb +91 -90
- data/lib/docraptor/api_error.rb +22 -3
- data/lib/docraptor/configuration.rb +85 -15
- data/lib/docraptor/models/async_doc.rb +53 -18
- data/lib/docraptor/models/doc.rb +80 -45
- data/lib/docraptor/models/doc_status.rb +58 -23
- data/lib/docraptor/models/prince_options.rb +101 -66
- data/lib/docraptor/version.rb +4 -4
- data/lib/docraptor.rb +3 -3
- data/script/clean +2 -2
- data/script/console +5 -0
- data/script/docker +39 -0
- data/script/fix_gemspec.rb +3 -18
- data/script/generate_language +21 -4
- data/script/inside_container/README.md +6 -0
- data/script/inside_container/test +38 -0
- data/script/post_generate_language +10 -2
- data/script/setup +25 -14
- data/script/swagger +6 -33
- data/script/test +30 -27
- data/test/async.rb +2 -2
- data/test/expire_hosted.rb +2 -2
- data/test/hosted_async.rb +7 -1
- data/test/hosted_sync.rb +2 -2
- data/test/sync.rb +2 -2
- data/test/xlsx.rb +6 -3
- metadata +29 -217
- data/.swagger-codegen/VERSION +0 -1
- data/.swagger-revision +0 -1
- data/spec/api_client_spec.rb +0 -243
- data/spec/configuration_spec.rb +0 -42
- data/spec/spec_helper.rb +0 -111
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e59619a7e4c76658472337dcfedf6ecbb1a6e4cbc6bedfcb7aa80adc4fe33ae9
|
4
|
+
data.tar.gz: 69095f9007180960bdae69017a5a6dedf48ad1d475b0d87db92951c8a8525a14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45931088e15d3312c18b7f55b51f07c263796ee90d5942c246a60b026ac6eea0f3fae14e3b2e1dba1f2335ff9596f5152005891033e5f01602a22558488d532e
|
7
|
+
data.tar.gz: 945ffc6a58c560588f05c4d8252046250af740e6804978b956f2e04785d9aa4cbc41c059b695ad656248dae3968fc2f766a12e6bf6f153cdeda925a038bb48d1
|
data/.docker_env.list
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby
|
data/.generator-revision
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
v6.0.1
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Why is this change needed?
|
2
|
+
--------------------------
|
3
|
+
|
4
|
+
How does it address the issue?
|
5
|
+
------------------------------
|
6
|
+
|
7
|
+
Any links to any relevant tickets, articles, or other resources?
|
8
|
+
---------------------------------------------------------------
|
9
|
+
|
10
|
+
Any screenshots?
|
11
|
+
----------------
|
12
|
+
|
13
|
+
Did you complete all of the following?
|
14
|
+
--------------------------------------
|
15
|
+
- Run test suite?
|
16
|
+
- Add new tests?
|
17
|
+
- Consider security implications and practices?
|
data/.gitignore
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# Generated by: https://openapi-generator.tech
|
2
|
+
#
|
3
|
+
|
1
4
|
*.gem
|
2
5
|
*.rbc
|
3
6
|
/.config
|
@@ -25,21 +28,24 @@ build/
|
|
25
28
|
/.bundle/
|
26
29
|
/vendor/bundle
|
27
30
|
/lib/bundler/man/
|
28
|
-
Gemfile.lock
|
29
|
-
.ruby-version
|
30
|
-
.ruby-gemset
|
31
|
-
.rvmrc
|
32
|
-
.rubocop.yml
|
33
31
|
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
# for a library or gem, you might want to ignore these files since the code is
|
33
|
+
# intended to run in multiple environments; otherwise, check them in:
|
34
|
+
# Gemfile.lock
|
35
|
+
# .ruby-version
|
36
|
+
# .ruby-gemset
|
37
|
+
|
38
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
39
|
+
.rvmrc
|
37
40
|
|
38
|
-
## Ignore baked in swagger generator
|
39
|
-
swagger-codegen
|
40
41
|
|
41
|
-
|
42
|
-
*~
|
42
|
+
# EB Customizations
|
43
43
|
|
44
|
-
|
45
|
-
|
44
|
+
# Ignore this so we don't see a git modified status on each test run. Currently
|
45
|
+
# the tests copy a different file into place for each ruby version, because the
|
46
|
+
# same lock file won't work with every ruby version. We want those lock files
|
47
|
+
# committed because it helps ensure the tests pass on this repo by ensuring a
|
48
|
+
# static set of dependencies is used for each ruby version. A future improvement
|
49
|
+
# could be to use docker to mount the correct lock file over top of the top
|
50
|
+
# level lock file on each docker run, but that's a future exercise.
|
51
|
+
Gemfile.lock
|
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
.ruby: &ruby
|
2
|
+
variables:
|
3
|
+
LANG: "C.UTF-8"
|
4
|
+
before_script:
|
5
|
+
- ruby -v
|
6
|
+
- bundle config set --local deployment true
|
7
|
+
- bundle install -j $(nproc)
|
8
|
+
parallel:
|
9
|
+
matrix:
|
10
|
+
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
|
11
|
+
image: "ruby:$RUBY_VERSION"
|
12
|
+
cache:
|
13
|
+
paths:
|
14
|
+
- vendor/ruby
|
15
|
+
key: 'ruby-$RUBY_VERSION'
|
16
|
+
|
17
|
+
gem:
|
18
|
+
extends: .ruby
|
19
|
+
script:
|
20
|
+
- bundle exec rspec
|
21
|
+
- bundle exec rake build
|
22
|
+
- bundle exec rake install
|
23
|
+
artifacts:
|
24
|
+
paths:
|
25
|
+
- pkg/*.gem
|
26
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.gitignore
|
2
|
+
.gitlab-ci.yml
|
3
|
+
.rspec
|
4
|
+
.rubocop.yml
|
5
|
+
.travis.yml
|
6
|
+
Gemfile
|
7
|
+
README.md
|
8
|
+
Rakefile
|
9
|
+
docraptor.gemspec
|
10
|
+
lib/docraptor.rb
|
11
|
+
lib/docraptor/api/doc_api.rb
|
12
|
+
lib/docraptor/api_client.rb
|
13
|
+
lib/docraptor/api_error.rb
|
14
|
+
lib/docraptor/configuration.rb
|
15
|
+
lib/docraptor/models/async_doc.rb
|
16
|
+
lib/docraptor/models/doc.rb
|
17
|
+
lib/docraptor/models/doc_status.rb
|
18
|
+
lib/docraptor/models/prince_options.rb
|
19
|
+
lib/docraptor/version.rb
|
20
|
+
spec/api/doc_api_spec.rb
|
21
|
+
spec/api_client_spec.rb
|
22
|
+
spec/configuration_spec.rb
|
23
|
+
spec/models/async_doc_spec.rb
|
24
|
+
spec/models/doc_spec.rb
|
25
|
+
spec/models/doc_status_spec.rb
|
26
|
+
spec/models/prince_options_spec.rb
|
27
|
+
spec/spec_helper.rb
|
@@ -0,0 +1 @@
|
|
1
|
+
6.1.0-SNAPSHOT
|
@@ -22,11 +22,27 @@
|
|
22
22
|
# Then explicitly reverse the ignore rule for a single file:
|
23
23
|
#!docs/README.md
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
|
26
|
+
# These are autogenerated and aren't exactly what we want. We rely on the
|
27
|
+
# readme, and website documentation.
|
28
|
+
# TODO: Ideally, when updating the agent, it would be nice to see the
|
29
|
+
# differences between when the previous version and the new version generated.
|
30
|
+
# This would help make it more obvious when the agent supported a newer usage
|
31
|
+
# pattern that we might prefer.
|
32
|
+
# TODO: Consider if it's possible to make the generated docs more useful so we
|
33
|
+
# might actually want to use them.
|
29
34
|
docs/
|
30
|
-
|
31
|
-
|
32
|
-
|
35
|
+
|
36
|
+
# This seems to be a script related to developing openapi-generator and making
|
37
|
+
# new test APIs.
|
38
|
+
git_push.sh
|
39
|
+
|
40
|
+
# Don't ignore this because we want to review the generated content to see if we
|
41
|
+
# should update our own readme similarly. The most common example is an update
|
42
|
+
# to the supported runtime versions, but it could also be an update to the
|
43
|
+
# recommended usage that we would want to use.
|
44
|
+
!README.md
|
45
|
+
|
46
|
+
# Don't ignore this because we want to know about new files that the generator
|
47
|
+
# ignores.
|
48
|
+
!.gitignore
|
data/.review/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Review newly generated files
|
2
|
+
|
3
|
+
This directory helps with review of generated files where we lagely want
|
4
|
+
the content to be custom.
|
5
|
+
|
6
|
+
The project `README.md` is a good example. We heavily custimize
|
7
|
+
`README.md` based on our particular use case. There are also important
|
8
|
+
changes to the generated `README.md` that should be reviewed when it is
|
9
|
+
updated. These include things like new minimum language versions, or
|
10
|
+
client API changes.
|
11
|
+
|
12
|
+
If you add the `README.md` to the `.openapi-generator-ignore` list then
|
13
|
+
you never see the updates, making it easy to miss things. If you don't
|
14
|
+
add it to the `.openapi-generator-ignore` list then any uncommitted
|
15
|
+
updates to the `README.md` are lost when running
|
16
|
+
`script/generate_language`.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Generated by: https://openapi-generator.tech
|
2
|
+
#
|
3
|
+
|
4
|
+
*.gem
|
5
|
+
*.rbc
|
6
|
+
/.config
|
7
|
+
/coverage/
|
8
|
+
/InstalledFiles
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/spec/examples.txt
|
12
|
+
/test/tmp/
|
13
|
+
/test/version_tmp/
|
14
|
+
/tmp/
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
|
21
|
+
## Documentation cache and generated files:
|
22
|
+
/.yardoc/
|
23
|
+
/_yardoc/
|
24
|
+
/doc/
|
25
|
+
/rdoc/
|
26
|
+
|
27
|
+
## Environment normalization:
|
28
|
+
/.bundle/
|
29
|
+
/vendor/bundle
|
30
|
+
/lib/bundler/man/
|
31
|
+
|
32
|
+
# for a library or gem, you might want to ignore these files since the code is
|
33
|
+
# intended to run in multiple environments; otherwise, check them in:
|
34
|
+
# Gemfile.lock
|
35
|
+
# .ruby-version
|
36
|
+
# .ruby-gemset
|
37
|
+
|
38
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
39
|
+
.rvmrc
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# docraptor
|
2
|
+
|
3
|
+
DocRaptor - the Ruby gem for the DocRaptor
|
4
|
+
|
5
|
+
A native client library for the DocRaptor HTML to PDF/XLS service.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
|
+
|
9
|
+
- API version: 2.0.0
|
10
|
+
- Package version: 3.0.0
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build docraptor.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./docraptor-3.0.0.gem
|
27
|
+
```
|
28
|
+
|
29
|
+
(for development, run `gem install --dev ./docraptor-3.0.0.gem` to install the development dependencies)
|
30
|
+
|
31
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
|
+
|
33
|
+
Finally add this to the Gemfile:
|
34
|
+
|
35
|
+
gem 'docraptor', '~> 3.0.0'
|
36
|
+
|
37
|
+
### Install from Git
|
38
|
+
|
39
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
40
|
+
|
41
|
+
gem 'docraptor', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
42
|
+
|
43
|
+
### Include the Ruby code directly
|
44
|
+
|
45
|
+
Include the Ruby code directly using `-I` as follows:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
ruby -Ilib script.rb
|
49
|
+
```
|
50
|
+
|
51
|
+
## Getting Started
|
52
|
+
|
53
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
# Load the gem
|
57
|
+
require 'docraptor'
|
58
|
+
|
59
|
+
# Setup authorization
|
60
|
+
DocRaptor.configure do |config|
|
61
|
+
# Configure HTTP basic authorization: basicAuth
|
62
|
+
config.username = 'YOUR_USERNAME'
|
63
|
+
config.password = 'YOUR_PASSWORD'
|
64
|
+
end
|
65
|
+
|
66
|
+
api_instance = DocRaptor::DocApi.new
|
67
|
+
doc = DocRaptor::Doc.new({name: 'name_example', document_type: 'pdf', document_content: 'document_content_example'}) # Doc | The document to be created.
|
68
|
+
|
69
|
+
begin
|
70
|
+
result = api_instance.create_async_doc(doc)
|
71
|
+
p result
|
72
|
+
rescue DocRaptor::ApiError => e
|
73
|
+
puts "Exception when calling DocApi->create_async_doc: #{e}"
|
74
|
+
end
|
75
|
+
|
76
|
+
```
|
77
|
+
|
78
|
+
## Documentation for API Endpoints
|
79
|
+
|
80
|
+
All URIs are relative to *https://api.docraptor.com*
|
81
|
+
|
82
|
+
Class | Method | HTTP request | Description
|
83
|
+
------------ | ------------- | ------------- | -------------
|
84
|
+
*DocRaptor::DocApi* | [**create_async_doc**](docs/DocApi.md#create_async_doc) | **POST** /async_docs |
|
85
|
+
*DocRaptor::DocApi* | [**create_doc**](docs/DocApi.md#create_doc) | **POST** /docs |
|
86
|
+
*DocRaptor::DocApi* | [**create_hosted_async_doc**](docs/DocApi.md#create_hosted_async_doc) | **POST** /hosted_async_docs |
|
87
|
+
*DocRaptor::DocApi* | [**create_hosted_doc**](docs/DocApi.md#create_hosted_doc) | **POST** /hosted_docs |
|
88
|
+
*DocRaptor::DocApi* | [**expire**](docs/DocApi.md#expire) | **PATCH** /expire/{id} |
|
89
|
+
*DocRaptor::DocApi* | [**get_async_doc**](docs/DocApi.md#get_async_doc) | **GET** /download/{id} |
|
90
|
+
*DocRaptor::DocApi* | [**get_async_doc_status**](docs/DocApi.md#get_async_doc_status) | **GET** /status/{id} |
|
91
|
+
|
92
|
+
|
93
|
+
## Documentation for Models
|
94
|
+
|
95
|
+
- [DocRaptor::AsyncDoc](docs/AsyncDoc.md)
|
96
|
+
- [DocRaptor::Doc](docs/Doc.md)
|
97
|
+
- [DocRaptor::DocStatus](docs/DocStatus.md)
|
98
|
+
- [DocRaptor::PrinceOptions](docs/PrinceOptions.md)
|
99
|
+
|
100
|
+
|
101
|
+
## Documentation for Authorization
|
102
|
+
|
103
|
+
|
104
|
+
### basicAuth
|
105
|
+
|
106
|
+
- **Type**: HTTP basic authentication
|
107
|
+
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
|
2
|
+
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.4
|
5
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
6
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
7
|
+
DisabledByDefault: true
|
8
|
+
Exclude:
|
9
|
+
- '**/templates/**/*'
|
10
|
+
- '**/vendor/**/*'
|
11
|
+
- 'actionpack/lib/action_dispatch/journey/parser.rb'
|
12
|
+
|
13
|
+
# Prefer &&/|| over and/or.
|
14
|
+
Style/AndOr:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
# Align `when` with `case`.
|
18
|
+
Layout/CaseIndentation:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
# Align comments with method definitions.
|
22
|
+
Layout/CommentIndentation:
|
23
|
+
Enabled: true
|
24
|
+
|
25
|
+
Layout/ElseAlignment:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
Layout/EmptyLineAfterMagicComment:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# In a regular class definition, no empty lines around the body.
|
32
|
+
Layout/EmptyLinesAroundClassBody:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
# In a regular method definition, no empty lines around the body.
|
36
|
+
Layout/EmptyLinesAroundMethodBody:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
# In a regular module definition, no empty lines around the body.
|
40
|
+
Layout/EmptyLinesAroundModuleBody:
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Layout/FirstArgumentIndentation:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
47
|
+
Style/HashSyntax:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
51
|
+
# extra level of indentation.
|
52
|
+
Layout/IndentationConsistency:
|
53
|
+
Enabled: true
|
54
|
+
EnforcedStyle: indented_internal_methods
|
55
|
+
|
56
|
+
# Two spaces, no tabs (for indentation).
|
57
|
+
Layout/IndentationWidth:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Layout/LeadingCommentSpace:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Layout/SpaceAfterColon:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Layout/SpaceAfterComma:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Layout/SpaceAroundKeyword:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Layout/SpaceAroundOperators:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Layout/SpaceBeforeComma:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Layout/SpaceBeforeFirstArg:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Style/DefWithParentheses:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
# Defining a method with parameters needs parentheses.
|
88
|
+
Style/MethodDefParentheses:
|
89
|
+
Enabled: true
|
90
|
+
|
91
|
+
Style/FrozenStringLiteralComment:
|
92
|
+
Enabled: false
|
93
|
+
EnforcedStyle: always
|
94
|
+
|
95
|
+
# Use `foo {}` not `foo{}`.
|
96
|
+
Layout/SpaceBeforeBlockBraces:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
# Use `foo { bar }` not `foo {bar}`.
|
100
|
+
Layout/SpaceInsideBlockBraces:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
104
|
+
Layout/SpaceInsideHashLiteralBraces:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
Layout/SpaceInsideParens:
|
108
|
+
Enabled: true
|
109
|
+
|
110
|
+
# Check quotes usage according to lint rule below.
|
111
|
+
#Style/StringLiterals:
|
112
|
+
# Enabled: true
|
113
|
+
# EnforcedStyle: single_quotes
|
114
|
+
|
115
|
+
# Detect hard tabs, no hard tabs.
|
116
|
+
Layout/IndentationStyle:
|
117
|
+
Enabled: true
|
118
|
+
|
119
|
+
# Blank lines should not have any spaces.
|
120
|
+
Layout/TrailingEmptyLines:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
# No trailing whitespace.
|
124
|
+
Layout/TrailingWhitespace:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
# Use quotes for string literals when they are enough.
|
128
|
+
Style/RedundantPercentQ:
|
129
|
+
Enabled: true
|
130
|
+
|
131
|
+
# Align `end` with the matching keyword or starting expression except for
|
132
|
+
# assignments, where it should be aligned with the LHS.
|
133
|
+
Layout/EndAlignment:
|
134
|
+
Enabled: true
|
135
|
+
EnforcedStyleAlignWith: variable
|
136
|
+
AutoCorrect: true
|
137
|
+
|
138
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
139
|
+
Lint/RequireParentheses:
|
140
|
+
Enabled: true
|
141
|
+
|
142
|
+
Style/RedundantReturn:
|
143
|
+
Enabled: true
|
144
|
+
AllowMultipleReturnValues: true
|
145
|
+
|
146
|
+
Style/Semicolon:
|
147
|
+
Enabled: true
|
148
|
+
AllowAsExpressionSeparator: true
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Versions without patch numbers will test the latest patch version. We include
|
2
|
+
# specific patch versions to provide consistency. We include version numbers
|
3
|
+
# without the patch version in order to automatically test the latest patch
|
4
|
+
# version of each minor version.
|
5
|
+
# DR gem itself requires >= 2.4, so 2.3 is out
|
6
|
+
# 2.4: /app/lib/docraptor/models/async_doc.rb:111:in `build_from_hash': undefined method `transform_keys'
|
7
|
+
ruby:2.5
|
8
|
+
ruby:2.6
|
9
|
+
ruby:2.7
|
10
|
+
ruby:3.0
|
data/.travis.yml
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
sudo: false
|
2
1
|
language: ruby
|
2
|
+
cache: bundler
|
3
3
|
rvm:
|
4
|
-
- 2.3
|
5
|
-
- 2.4
|
6
|
-
- 2.5
|
7
|
-
- 2.6
|
8
|
-
- 2.7
|
9
|
-
- 3.0
|
4
|
+
- 2.3
|
5
|
+
- 2.4
|
6
|
+
- 2.5
|
7
|
+
- 2.6
|
8
|
+
- 2.7
|
9
|
+
- 3.0
|
10
|
+
script:
|
11
|
+
- bundle install --path vendor/bundle
|
12
|
+
- bundle exec rspec
|
13
|
+
- gem build docraptor.gemspec
|
14
|
+
- gem install ./docraptor-3.0.0.gem
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 3.0.0 [November 15, 2022]
|
2
|
+
* Switch API host to more secure api.docraptor.com (dropping old TLS)
|
3
|
+
* Remove support for rubies <2.5
|
4
|
+
* Switch from swagger v2.4.19 to openapi-generator v6.0.1 (better maintained)
|
5
|
+
|
1
6
|
### 2.0.0 [June 1, 2021]
|
2
7
|
* Add support for ruby 3.x (remove `URI.encode`)
|
3
8
|
* Remove support for rubies <2.3
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -55,7 +55,7 @@ Stuck? We're experts at turning HTML into PDFs so please [email us](mailto:suppo
|
|
55
55
|
|
56
56
|
## Development
|
57
57
|
|
58
|
-
The majority of the code in this repo is generated using
|
58
|
+
The majority of the code in this repo is generated using openapi-generator on [docraptor.yaml](docraptor.yaml). You can modify this file and regenerate the client using `script/generate_language`.
|
59
59
|
|
60
60
|
|
61
61
|
## Release Process
|
@@ -63,14 +63,14 @@ The majority of the code in this repo is generated using swagger-codegen on [doc
|
|
63
63
|
1. Pull latest master
|
64
64
|
2. Merge feature branch(es) into master
|
65
65
|
3. `script/test`
|
66
|
-
4. Increment version
|
67
|
-
|
66
|
+
4. Increment version: `generator-config.json`
|
67
|
+
5. Run `script/generate_language` to update generated version numbers:
|
68
68
|
- `lib/docraptor/version.rb`
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
6. Update [CHANGELOG.md](CHANGELOG.md)
|
70
|
+
7. Commit "Release version vX.Y.Z"
|
71
|
+
8. `rake release[<name of your git remote corresponding to DocRaptor/docraptor-ruby>]`
|
72
|
+
9. Verify package release at https://rubygems.org/gems/docraptor
|
73
|
+
10. Refresh documentation on docraptor.com
|
74
74
|
|
75
75
|
|
76
76
|
## Version Policy
|
data/Rakefile
CHANGED
data/docraptor.gemspec
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
#A native client library for the DocRaptor HTML to PDF/XLS service.
|
7
7
|
|
8
|
-
OpenAPI
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
9
9
|
|
10
|
-
Generated by: https://
|
11
|
-
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 6.1.0-SNAPSHOT
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -24,26 +24,12 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.homepage = "https://github.com/docraptor/docraptor-ruby"
|
25
25
|
s.summary = "A wrapper for the DocRaptor HTML to PDF/XLS service."
|
26
26
|
s.description = "A native client library for the DocRaptor HTML to PDF/XLS service."
|
27
|
-
s.license =
|
28
|
-
s.required_ruby_version = ">= 2.
|
27
|
+
s.license = "MIT"
|
28
|
+
s.required_ruby_version = ">= 2.5"
|
29
29
|
|
30
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
-
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
-
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
|
33
31
|
|
34
32
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
35
|
-
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
36
|
-
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
37
|
-
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
38
|
-
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
39
|
-
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
40
|
-
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
41
|
-
|
42
|
-
# added by script/fix_gemspec.rb.
|
43
|
-
s.add_development_dependency 'rake', '~>11.2', '>= 11.2.2'
|
44
|
-
s.add_development_dependency 'pry', '~>0.10', '>= 0.10.4'
|
45
|
-
# </added> : if the above lines are missing in the gemspec, then
|
46
|
-
# the matcher for autotest is probably broken
|
47
33
|
|
48
34
|
s.files = `git ls-files`.split("\n").uniq.sort.select { |f| !f.empty? }
|
49
35
|
s.test_files = `git ls-files spec test`.split("\n")
|
data/docraptor.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
swagger: '2.0'
|
2
2
|
|
3
3
|
info: # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#info-object
|
4
|
-
version: "
|
4
|
+
version: "2.0.0"
|
5
5
|
title: DocRaptor
|
6
6
|
description: "A native client library for the DocRaptor HTML to PDF/XLS service."
|
7
7
|
termsOfService: "https://docraptor.com/tos"
|
@@ -9,7 +9,7 @@ info: # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
|
|
9
9
|
name: "MIT"
|
10
10
|
url: "https://mit-license.org/"
|
11
11
|
|
12
|
-
host: docraptor.com
|
12
|
+
host: api.docraptor.com
|
13
13
|
basePath: /
|
14
14
|
schemes: [https]
|
15
15
|
securityDefinitions:
|
@@ -44,7 +44,7 @@ paths:
|
|
44
44
|
description: Successful response
|
45
45
|
schema:
|
46
46
|
type: string
|
47
|
-
format:
|
47
|
+
format: byte
|
48
48
|
400:
|
49
49
|
description: Bad Request
|
50
50
|
401:
|
@@ -198,7 +198,7 @@ paths:
|
|
198
198
|
description: Successful response
|
199
199
|
schema:
|
200
200
|
type: string
|
201
|
-
format:
|
201
|
+
format: byte
|
202
202
|
400:
|
203
203
|
description: Bad Request
|
204
204
|
403:
|
@@ -457,3 +457,4 @@ definitions:
|
|
457
457
|
validation_errors:
|
458
458
|
type: string
|
459
459
|
description: Error information.
|
460
|
+
|