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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.docker_env.list +3 -0
  3. data/.generator-language-identifier +1 -0
  4. data/.generator-revision +1 -0
  5. data/.github/pull_request_template.txt +17 -0
  6. data/.gitignore +20 -14
  7. data/.gitlab-ci.yml +26 -0
  8. data/.openapi-generator/FILES +27 -0
  9. data/.openapi-generator/VERSION +1 -0
  10. data/{.swagger-codegen-ignore → .openapi-generator-ignore} +23 -7
  11. data/.review/README.md +16 -0
  12. data/.review/generated_files/.gitignore +39 -0
  13. data/.review/generated_files/README.md +107 -0
  14. data/.rubocop.yml +148 -0
  15. data/.runtime-environments +10 -0
  16. data/.travis.yml +12 -7
  17. data/CHANGELOG.md +5 -0
  18. data/Gemfile +3 -1
  19. data/README.md +8 -8
  20. data/Rakefile +1 -2
  21. data/docraptor.gemspec +5 -19
  22. data/docraptor.yaml +5 -4
  23. data/examples/async.rb +24 -30
  24. data/examples/hosted_async.rb +21 -33
  25. data/examples/hosted_sync.rb +19 -32
  26. data/examples/sync.rb +20 -26
  27. data/gemfiles/Gemfile.2.5.lock +70 -0
  28. data/gemfiles/Gemfile.2.6.lock +70 -0
  29. data/gemfiles/Gemfile.2.7.lock +70 -0
  30. data/gemfiles/Gemfile.3.0.lock +70 -0
  31. data/{swagger-config.json → generator-config.json} +3 -2
  32. data/lib/docraptor/api/doc_api.rb +154 -79
  33. data/lib/docraptor/api_client.rb +91 -90
  34. data/lib/docraptor/api_error.rb +22 -3
  35. data/lib/docraptor/configuration.rb +85 -15
  36. data/lib/docraptor/models/async_doc.rb +53 -18
  37. data/lib/docraptor/models/doc.rb +80 -45
  38. data/lib/docraptor/models/doc_status.rb +58 -23
  39. data/lib/docraptor/models/prince_options.rb +101 -66
  40. data/lib/docraptor/version.rb +4 -4
  41. data/lib/docraptor.rb +3 -3
  42. data/script/clean +2 -2
  43. data/script/console +5 -0
  44. data/script/docker +39 -0
  45. data/script/fix_gemspec.rb +3 -18
  46. data/script/generate_language +21 -4
  47. data/script/inside_container/README.md +6 -0
  48. data/script/inside_container/test +38 -0
  49. data/script/post_generate_language +10 -2
  50. data/script/setup +25 -14
  51. data/script/swagger +6 -33
  52. data/script/test +30 -27
  53. data/test/async.rb +2 -2
  54. data/test/expire_hosted.rb +2 -2
  55. data/test/hosted_async.rb +7 -1
  56. data/test/hosted_sync.rb +2 -2
  57. data/test/sync.rb +2 -2
  58. data/test/xlsx.rb +6 -3
  59. metadata +29 -217
  60. data/.swagger-codegen/VERSION +0 -1
  61. data/.swagger-revision +0 -1
  62. data/spec/api_client_spec.rb +0 -243
  63. data/spec/configuration_spec.rb +0 -42
  64. data/spec/spec_helper.rb +0 -111
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfd3d5b8d3364bd02c04b712136686d4a714f6cd3ab3fced0c7efae7e9709ee0
4
- data.tar.gz: 89d4fb74883b56c49a71eef45487534474a8f9fa0ae8fc065a592e6a1ae7340c
3
+ metadata.gz: e59619a7e4c76658472337dcfedf6ecbb1a6e4cbc6bedfcb7aa80adc4fe33ae9
4
+ data.tar.gz: 69095f9007180960bdae69017a5a6dedf48ad1d475b0d87db92951c8a8525a14
5
5
  SHA512:
6
- metadata.gz: 964a77fd28bb343dd5410b01e5b6981f631fd5c0ed047225b2dc048b8070249d9d704bb7a4bd289d154b406e8b794a2ac71e7d031af047bb8c47a0500c86b29d
7
- data.tar.gz: 90787b9656e2455038833d260caf62b7aa48ce833d3de5e1483c1a9893feed6e0deb5d4cb995ee565510c0c3bfabe7e851decdf5cae00fd0389dc07d8319ff90
6
+ metadata.gz: 45931088e15d3312c18b7f55b51f07c263796ee90d5942c246a60b026ac6eea0f3fae14e3b2e1dba1f2335ff9596f5152005891033e5f01602a22558488d532e
7
+ data.tar.gz: 945ffc6a58c560588f05c4d8252046250af740e6804978b956f2e04785d9aa4cbc41c059b695ad656248dae3968fc2f766a12e6bf6f153cdeda925a038bb48d1
data/.docker_env.list ADDED
@@ -0,0 +1,3 @@
1
+ TRACE
2
+ TEST_OUTPUT_DIR=/app/tmp/test_output
3
+ BUNDLE_PATH=/app/tmp/cache/bundle
@@ -0,0 +1 @@
1
+ ruby
@@ -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
- ## Ignore dumb OSX files
35
- .DS_Store
36
- Thumbs.db
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
- ## Ignore dumb emacs files
42
- *~
42
+ # EB Customizations
43
43
 
44
- ## Ignore files that contain special keys
45
- .docraptor_key
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
- # Can't Touch This. Dun-dun-dun-dun. Dun dun. Dun dun.
26
- README.md
27
- CHANGELOG.md
28
- git_push.sh
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
- .gitignore
31
- LICENSE
32
- Rakefile
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.8
5
- - 2.4.10
6
- - 2.5.9
7
- - 2.6.7
8
- - 2.7.3
9
- - 3.0.1
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
@@ -3,5 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 12.3.3'
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
7
9
  end
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 swagger-codegen on [docraptor.yaml](docraptor.yaml). You can modify this file and regenerate the client using `script/generate_language ruby`.
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 in code:
67
- - `swagger-config.json`
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
- 5. Update [CHANGELOG.md](CHANGELOG.md)
70
- 6. Commit "Release version vX.Y.Z"
71
- 7. `rake release`
72
- 8. Verify package release at https://rubygems.org/gems/docraptor
73
- 9. Refresh documentation on docraptor.com
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
@@ -1,5 +1,4 @@
1
- require 'bundler/setup'
2
- require 'bundler/gem_tasks'
1
+ require "bundler/gem_tasks"
3
2
 
4
3
  begin
5
4
  require 'rspec/core/rake_task'
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 spec version: 1.4.0
8
+ The version of the OpenAPI document: 2.0.0
9
9
 
10
- Generated by: https://github.com/swagger-api/swagger-codegen.git
11
- Swagger Codegen version: 2.4.19
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 = 'MIT'
28
- s.required_ruby_version = ">= 2.3"
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: "1.4.0"
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: binary
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: binary
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
+