convert_api 3.0.0 → 3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -0
- data/README.md +10 -7
- data/lib/convert_api/client.rb +1 -1
- data/lib/convert_api/version.rb +1 -1
- data/lib/convert_api.rb +2 -1
- metadata +10 -16
- data/.github/workflows/main.yml +0 -27
- data/.github/workflows/publish.yml +0 -21
- data/.gitignore +0 -12
- data/.rspec +0 -2
- data/.ruby-version +0 -1
- data/Gemfile +0 -6
- data/Rakefile +0 -6
- data/convert_api.gemspec +0 -27
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fcd9fe8ad08c01b6cd0ca4e52208444ff3da05a10ebdf20eac4d6d8f443c94f
|
|
4
|
+
data.tar.gz: 9a4842f2843643892704f9ebfd134f98519c0a689a18fbfed0d7587b3e30330a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc25cd4c5fa5cd60d147d3831b7a9c24d012634681a6f1e6f5d1bb5b4095a91e56f49f30cfc890d940b5358a1e16cbd7712f05d8ccd8964eca5c5f15dd1c502b
|
|
7
|
+
data.tar.gz: afe7726d6c1e03bcc5e155c9abd593114a35857af0bc31de64dba8c0127f52449ed5368f494732202e9b77cf1d539ed1ade1c9fdcc25e98fc1578d4b5a9a71a2
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
|
|
6
|
+
|
|
7
|
+
## [3.0.1] — 2026-10-20
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- No more warnings on load on current Rubies: `URI.regexp is obsolete` (Ruby 3.4+) and "CGI library is
|
|
11
|
+
removed from Ruby 4.0" (Ruby 4.0). The library now uses the RFC 2396 URI parser directly and requires
|
|
12
|
+
only `cgi/escape`. Behaviour is unchanged.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Tested on Ruby 3.2, 3.3, 3.4 and 4.0 (was 2.0–3.3 and JRuby). No Ruby version constraint was added: the
|
|
16
|
+
gem still installs on older Rubies, which are no longer tested.
|
|
17
|
+
- The gem contains only `lib/`, `README.md`, `LICENSE.txt` and `CHANGELOG.md` (it used to ship the
|
|
18
|
+
repository's dotfiles, `Gemfile`, `Rakefile` and workflow). Its RubyGems page links to the source,
|
|
19
|
+
changelog and issues.
|
|
20
|
+
- The specs that call ConvertAPI are tagged `live` and run only when `CONVERT_API_SECRET` is set.
|
|
21
|
+
- Releases are now cut from a GitHub Release `v{version}` and pushed with RubyGems Trusted Publishing. See
|
|
22
|
+
[RELEASING.md](RELEASING.md).
|
|
23
|
+
|
|
24
|
+
## [3.0.0] — 2024-09-14
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Credentials are sent in the `Authorization` header and configured with `config.api_credentials` (an API
|
|
28
|
+
secret or token), which replaces `api_secret` and `token`.
|
|
29
|
+
|
|
30
|
+
### Removed
|
|
31
|
+
- Alternative converter support.
|
|
32
|
+
|
|
33
|
+
## [2.0.0] — 2024-08-04
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
- Token authentication.
|
|
37
|
+
|
|
38
|
+
[3.0.1]: https://github.com/ConvertAPI/convertapi-library-ruby/compare/v3.0.0...v3.0.1
|
|
39
|
+
[3.0.0]: https://github.com/ConvertAPI/convertapi-library-ruby/compare/v2.0.0...v3.0.0
|
|
40
|
+
[2.0.0]: https://github.com/ConvertAPI/convertapi-library-ruby/compare/v1.4.0...v2.0.0
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
[](https://rubygems.org/gems/convert_api)
|
|
5
|
-
[](https://github.com/ConvertAPI/convertapi-library-ruby/actions/workflows/build.yml)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
8
|
|
|
@@ -23,11 +23,11 @@ gem 'convert_api'
|
|
|
23
23
|
|
|
24
24
|
### Configuration
|
|
25
25
|
|
|
26
|
-
You can get your credentials at https://www.convertapi.com/a/
|
|
26
|
+
You can get your credentials at [https://www.convertapi.com/a/authentication](https://www.convertapi.com/a/authentication)
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
29
|
ConvertApi.configure do |config|
|
|
30
|
-
config.api_credentials = '
|
|
30
|
+
config.api_credentials = 'api-token'
|
|
31
31
|
end
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -120,18 +120,21 @@ end
|
|
|
120
120
|
|
|
121
121
|
### More examples
|
|
122
122
|
|
|
123
|
-
Find more advanced examples in the [examples/](https://github.com/ConvertAPI/convertapi-ruby/tree/
|
|
123
|
+
Find more advanced examples in the [examples/](https://github.com/ConvertAPI/convertapi-library-ruby/tree/main/examples) folder.
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
## Development
|
|
127
127
|
|
|
128
|
-
Run `
|
|
128
|
+
Run `bundle exec rake spec` to run the specs. Without an API token only the offline specs run; with
|
|
129
|
+
`CONVERT_API_SECRET=your_api_token bundle exec rake spec` the specs that call ConvertAPI run too
|
|
130
|
+
(set `CONVERT_API_BASE_URI` to test against another deployment).
|
|
129
131
|
|
|
130
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
132
|
+
To install this gem onto your local machine, run `bundle exec rake install`. Releases are published from
|
|
133
|
+
GitHub Releases only; see [RELEASING.md](RELEASING.md) and [CHANGELOG.md](CHANGELOG.md).
|
|
131
134
|
|
|
132
135
|
## Contributing
|
|
133
136
|
|
|
134
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ConvertAPI/convertapi-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
137
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ConvertAPI/convertapi-library-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
135
138
|
|
|
136
139
|
## License
|
|
137
140
|
|
data/lib/convert_api/client.rb
CHANGED
data/lib/convert_api/version.rb
CHANGED
data/lib/convert_api.rb
CHANGED
|
@@ -10,7 +10,8 @@ require 'convert_api/file_param'
|
|
|
10
10
|
require 'convert_api/format_detector'
|
|
11
11
|
|
|
12
12
|
module ConvertApi
|
|
13
|
-
|
|
13
|
+
# URI.regexp is obsolete since Ruby 3.4 and warns; the RFC 2396 parser is what it always used.
|
|
14
|
+
URI_REGEXP = (defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER).make_regexp(%w(http https))
|
|
14
15
|
DEFAULT_URL_FORMAT = 'url'
|
|
15
16
|
|
|
16
17
|
module_function
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: convert_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomas Rutkauskas
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -62,16 +61,9 @@ executables: []
|
|
|
62
61
|
extensions: []
|
|
63
62
|
extra_rdoc_files: []
|
|
64
63
|
files:
|
|
65
|
-
-
|
|
66
|
-
- ".github/workflows/publish.yml"
|
|
67
|
-
- ".gitignore"
|
|
68
|
-
- ".rspec"
|
|
69
|
-
- ".ruby-version"
|
|
70
|
-
- Gemfile
|
|
64
|
+
- CHANGELOG.md
|
|
71
65
|
- LICENSE.txt
|
|
72
66
|
- README.md
|
|
73
|
-
- Rakefile
|
|
74
|
-
- convert_api.gemspec
|
|
75
67
|
- lib/convert_api.rb
|
|
76
68
|
- lib/convert_api/client.rb
|
|
77
69
|
- lib/convert_api/configuration.rb
|
|
@@ -83,11 +75,14 @@ files:
|
|
|
83
75
|
- lib/convert_api/task.rb
|
|
84
76
|
- lib/convert_api/upload_io.rb
|
|
85
77
|
- lib/convert_api/version.rb
|
|
86
|
-
homepage: https://github.com/ConvertAPI/convertapi-ruby
|
|
78
|
+
homepage: https://github.com/ConvertAPI/convertapi-library-ruby
|
|
87
79
|
licenses:
|
|
88
80
|
- MIT
|
|
89
|
-
metadata:
|
|
90
|
-
|
|
81
|
+
metadata:
|
|
82
|
+
source_code_uri: https://github.com/ConvertAPI/convertapi-library-ruby
|
|
83
|
+
changelog_uri: https://github.com/ConvertAPI/convertapi-library-ruby/blob/main/CHANGELOG.md
|
|
84
|
+
bug_tracker_uri: https://github.com/ConvertAPI/convertapi-library-ruby/issues
|
|
85
|
+
documentation_uri: https://www.convertapi.com/doc
|
|
91
86
|
rdoc_options: []
|
|
92
87
|
require_paths:
|
|
93
88
|
- lib
|
|
@@ -102,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
102
97
|
- !ruby/object:Gem::Version
|
|
103
98
|
version: '0'
|
|
104
99
|
requirements: []
|
|
105
|
-
rubygems_version: 3.
|
|
106
|
-
signing_key:
|
|
100
|
+
rubygems_version: 3.6.9
|
|
107
101
|
specification_version: 4
|
|
108
102
|
summary: ConvertAPI client library
|
|
109
103
|
test_files: []
|
data/.github/workflows/main.yml
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Build
|
|
2
|
-
on: [push,pull_request]
|
|
3
|
-
jobs:
|
|
4
|
-
build:
|
|
5
|
-
runs-on: ubuntu-latest
|
|
6
|
-
strategy:
|
|
7
|
-
matrix:
|
|
8
|
-
ruby-version:
|
|
9
|
-
- 2.0
|
|
10
|
-
- 2.6
|
|
11
|
-
- 2.7
|
|
12
|
-
- 3.1
|
|
13
|
-
- 3.2
|
|
14
|
-
- 3.3
|
|
15
|
-
- jruby-9.1
|
|
16
|
-
- jruby-head
|
|
17
|
-
name: Ruby ${{ matrix.ruby-version }} sample
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v3
|
|
20
|
-
- uses: ruby/setup-ruby@v1
|
|
21
|
-
with:
|
|
22
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
23
|
-
# bundler-cache: true
|
|
24
|
-
- run: bundle install
|
|
25
|
-
- env:
|
|
26
|
-
CONVERT_API_SECRET: ${{ secrets.CONVERTAPI_SECRET }}
|
|
27
|
-
run: bundle exec rake spec
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Publish gem to rubygems
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [published]
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@v4
|
|
10
|
-
- uses: ruby/setup-ruby@v1
|
|
11
|
-
|
|
12
|
-
# setup .gem/credentials
|
|
13
|
-
- run: mkdir -p ~/.gem
|
|
14
|
-
- env:
|
|
15
|
-
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
|
16
|
-
run: >-
|
|
17
|
-
echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
|
|
18
|
-
- run: chmod 0600 ~/.gem/credentials
|
|
19
|
-
|
|
20
|
-
- run: gem build convert_api.gemspec --output=release.gem
|
|
21
|
-
- run: gem push release.gem
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.3.4
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/convert_api.gemspec
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require 'convert_api/version'
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = 'convert_api'
|
|
7
|
-
spec.version = ConvertApi::VERSION
|
|
8
|
-
spec.authors = ['Tomas Rutkauskas']
|
|
9
|
-
spec.email = ['support@convertapi.com']
|
|
10
|
-
|
|
11
|
-
spec.summary = %q{ConvertAPI client library}
|
|
12
|
-
spec.description = %q{Convert various files like MS Word, Excel, PowerPoint, Images to PDF and Images. Create PDF and Images from url and raw HTML. Extract and create PowerPoint presentation from PDF. Merge, Encrypt, Split, Repair and Decrypt PDF files. All supported files conversions and manipulations can be found at https://www.convertapi.com/doc/supported-formats}
|
|
13
|
-
spec.homepage = 'https://github.com/ConvertAPI/convertapi-ruby'
|
|
14
|
-
spec.license = 'MIT'
|
|
15
|
-
|
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
17
|
-
f.match(%r{^(test|spec|features|examples)/})
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
spec.bindir = 'exe'
|
|
21
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
|
-
spec.require_paths = ['lib']
|
|
23
|
-
|
|
24
|
-
spec.add_development_dependency 'bundler'
|
|
25
|
-
spec.add_development_dependency 'rake', '>= 12.3.3'
|
|
26
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
27
|
-
end
|