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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a03a5db74661e761e600143a2156eb8b123cbd24a7b2a1f965f04cc78df567c5
4
- data.tar.gz: da3d99dcba730103b6545ac4700a1e4d0d859be7c3c47fc92032e49274bcf94f
3
+ metadata.gz: 5fcd9fe8ad08c01b6cd0ca4e52208444ff3da05a10ebdf20eac4d6d8f443c94f
4
+ data.tar.gz: 9a4842f2843643892704f9ebfd134f98519c0a689a18fbfed0d7587b3e30330a
5
5
  SHA512:
6
- metadata.gz: 1196c45816646b1f2b58acb79598c69cf9706a333f92c0d47e0bdd94f1b336a813963b8c7e84db2c3d7e0cfb39f8016626ed35eac8c144d8ab88397e0b7fadad
7
- data.tar.gz: 434915e2525a5b3cf5fadd8ed2af3177844ca9aca29160efefb17d5ae2dd45485ee45075fc0f1b7a052e09513dd168a8ef94aacec7612f40068b54d7f3c25418
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
  [![Gem](https://img.shields.io/gem/v/convert_api.svg)](https://rubygems.org/gems/convert_api)
5
- [![Build Status](https://github.com/ConvertAPI/convertapi-ruby/actions/workflows/main.yml/badge.svg)](https://github.com/ConvertAPI/convertapi-ruby/actions)
5
+ [![Build](https://github.com/ConvertAPI/convertapi-library-ruby/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/ConvertAPI/convertapi-library-ruby/actions/workflows/build.yml)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](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/auth
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 = 'your-api-secret-or-token'
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/master/examples) folder.
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 `CONVERT_API_SECRET=your_secret rake spec` to run the tests.
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`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
 
@@ -1,6 +1,6 @@
1
1
  require 'net/https'
2
2
  require 'uri'
3
- require 'cgi'
3
+ require 'cgi/escape'
4
4
  require 'json'
5
5
 
6
6
  module ConvertApi
@@ -1,3 +1,3 @@
1
1
  module ConvertApi
2
- VERSION = '3.0.0'
2
+ VERSION = '3.0.1'
3
3
  end
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
- URI_REGEXP = URI::regexp(%w(http https))
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.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: 2024-09-14 00:00:00.000000000 Z
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
- - ".github/workflows/main.yml"
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
- post_install_message:
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.5.11
106
- signing_key:
100
+ rubygems_version: 3.6.9
107
101
  specification_version: 4
108
102
  summary: ConvertAPI client library
109
103
  test_files: []
@@ -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
@@ -1,12 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- Gemfile.lock
10
-
11
- # rspec failure tracking
12
- .rspec_status
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.3.4
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in convert_api.gemspec
6
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
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