docraptor 1.4.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 +14 -0
  17. data/CHANGELOG.md +9 -0
  18. data/Gemfile +3 -1
  19. data/README.md +14 -21
  20. data/Rakefile +1 -2
  21. data/docraptor.gemspec +5 -18
  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 +90 -89
  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 +11 -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 +36 -0
  51. data/script/swagger +6 -33
  52. data/script/test +50 -16
  53. data/test/async.rb +2 -2
  54. data/test/expire_hosted.rb +5 -10
  55. data/test/hosted_async.rb +8 -7
  56. data/test/hosted_sync.rb +4 -9
  57. data/test/sync.rb +2 -2
  58. data/test/xlsx.rb +6 -3
  59. metadata +33 -199
  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: 1d6b898db0c2631364545a4da3f3a87ef8a249e7e1db737091e42a8095dc2ba4
4
- data.tar.gz: 38cc4dd86eb0ae69502ee42c6bdd8cfc1715f8b9b425aa15c4a8089a3edaa609
3
+ metadata.gz: e59619a7e4c76658472337dcfedf6ecbb1a6e4cbc6bedfcb7aa80adc4fe33ae9
4
+ data.tar.gz: 69095f9007180960bdae69017a5a6dedf48ad1d475b0d87db92951c8a8525a14
5
5
  SHA512:
6
- metadata.gz: 648892ceb32bc298f8fe5689873212106f8059d47b009164d69ccec923a8437e2209e9f7a4d30de0bda430a1a5bb260ab34133797a3a8d796b3b515119120c58
7
- data.tar.gz: 1479aabfe153182ef3e0afc66b9c7e5105a2c7873cbe3fe640c6078411895dc30bbb17d58568d22db55a3383f542c2feb9ad140c4ac054de9c58f89244adeb6f
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 ADDED
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
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,12 @@
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
+
6
+ ### 2.0.0 [June 1, 2021]
7
+ * Add support for ruby 3.x (remove `URI.encode`)
8
+ * Remove support for rubies <2.3
9
+
1
10
  ### 1.4.0 [July 31, 2020]
2
11
  * add support for hosted documents
3
12
  * upgrade to latest swagger 2.4.14
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
@@ -18,9 +18,7 @@ bundle install
18
18
  ```
19
19
 
20
20
 
21
- ## Usage
22
-
23
- See [examples](examples/) for runnable examples with file output, error handling, etc.
21
+ ## Basic Usage
24
22
 
25
23
  ```ruby
26
24
  DocRaptor.configure do |config|
@@ -44,25 +42,20 @@ response = $docraptor.create_doc(
44
42
  )
45
43
  ```
46
44
 
47
- Docs created like this are limited to 60 seconds to render, check out the [async example](examples/async.rb) which allows 10 minutes.
48
-
49
- We have guides for doing some of the common things:
50
-
51
- * [Headers and Footers](https://docraptor.com/documentation/style#pdf-headers-footers) including page skipping
52
- * [CSS Media Selector](https://docraptor.com/documentation/api#api_basic_pdf) to make the page look exactly as it does in your browser
53
- * Protect content with [HTTP authentication](https://docraptor.com/documentation/api#api_http_user) or [proxies](https://docraptor.com/documentation/api#api_http_proxy) so only DocRaptor can access them
45
+ ## Next Steps
54
46
 
47
+ - Optionally store and get a URL for your converted document with [document hosting](https://docraptor.com/document-hosting)
48
+ - View more [code examples](examples) with error handling, asynchronous creation, file saving, and document hosting.
49
+ - Perfect your document styling with our [style and formatting reference](https://docraptor.com/documentation/style), and [API reference](https://docraptor.com/documentation/api). Easily add headers and footers, page breaks, page numbers, table of contents, and much more!
55
50
 
56
51
  ## More Help
57
52
 
58
- DocRaptor has a lot of more [styling](https://docraptor.com/documentation/style) and [implementation options](https://docraptor.com/documentation/api).
59
-
60
- Stuck? We're experts at using DocRaptor so please [email us](mailto:support@docraptor.com) if you run into trouble.
53
+ Stuck? We're experts at turning HTML into PDFs so please [email us](mailto:support@docraptor.com) if you run into trouble.
61
54
 
62
55
 
63
56
  ## Development
64
57
 
65
- 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`.
66
59
 
67
60
 
68
61
  ## Release Process
@@ -70,14 +63,14 @@ The majority of the code in this repo is generated using swagger-codegen on [doc
70
63
  1. Pull latest master
71
64
  2. Merge feature branch(es) into master
72
65
  3. `script/test`
73
- 4. Increment version in code:
74
- - `swagger-config.json`
66
+ 4. Increment version: `generator-config.json`
67
+ 5. Run `script/generate_language` to update generated version numbers:
75
68
  - `lib/docraptor/version.rb`
76
- 5. Update [CHANGELOG.md](CHANGELOG.md)
77
- 6. Commit "Release version vX.Y.Z"
78
- 7. `rake release`
79
- 8. Verify package release at https://rubygems.org/gems/docraptor
80
- 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
81
74
 
82
75
 
83
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.14
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 6.1.0-SNAPSHOT
12
12
 
13
13
  =end
14
14
 
@@ -24,25 +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 = ">= 1.9"
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
31
 
33
32
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
- s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
- s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
- s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
- s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
- s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
- s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
-
41
- # added by script/fix_gemspec.rb.
42
- s.add_development_dependency 'rake', '~>11.2', '>= 11.2.2'
43
- s.add_development_dependency 'pry', '~>0.10', '>= 0.10.4'
44
- # </added> : if the above lines are missing in the gemspec, then
45
- # the matcher for autotest is probably broken
46
33
 
47
34
  s.files = `git ls-files`.split("\n").uniq.sort.select { |f| !f.empty? }
48
35
  s.test_files = `git ls-files spec test`.split("\n")