remove_bg 1.5.0 → 2.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +329 -59
  3. data/.depfu.yml +21 -0
  4. data/.editorconfig +19 -0
  5. data/.gitignore +8 -8
  6. data/.grenrc.json +20 -0
  7. data/.rspec +5 -0
  8. data/.rubocop.yml +43 -0
  9. data/.tool-versions +1 -0
  10. data/Appraisals +49 -10
  11. data/CHANGELOG.md +19 -2
  12. data/Gemfile +2 -5
  13. data/Gemfile.lock +132 -78
  14. data/LICENSE.md +25 -0
  15. data/README.md +31 -12
  16. data/Rakefile +4 -0
  17. data/SECURITY.md +36 -0
  18. data/gemfiles/faraday_2_0.gemfile +7 -0
  19. data/gemfiles/faraday_2_1.gemfile +7 -0
  20. data/gemfiles/faraday_2_2.gemfile +7 -0
  21. data/gemfiles/faraday_2_3.gemfile +7 -0
  22. data/gemfiles/faraday_2_4.gemfile +7 -0
  23. data/gemfiles/faraday_2_5.gemfile +7 -0
  24. data/gemfiles/faraday_2_6.gemfile +7 -0
  25. data/gemfiles/faraday_2_7.gemfile +7 -0
  26. data/gemfiles/faraday_2_8.gemfile +7 -0
  27. data/gemfiles/faraday_2_9.gemfile +7 -0
  28. data/gemfiles/faraday_2_x.gemfile +7 -0
  29. data/lib/remove_bg/account_info.rb +2 -0
  30. data/lib/remove_bg/api.rb +2 -0
  31. data/lib/remove_bg/api_client.rb +12 -12
  32. data/lib/remove_bg/base_request_options.rb +2 -0
  33. data/lib/remove_bg/composite_result.rb +19 -10
  34. data/lib/remove_bg/configuration.rb +2 -0
  35. data/lib/remove_bg/error.rb +3 -1
  36. data/lib/remove_bg/http_connection.rb +7 -4
  37. data/lib/remove_bg/image_composer.rb +13 -12
  38. data/lib/remove_bg/rate_limit_info.rb +9 -6
  39. data/lib/remove_bg/request_options.rb +3 -3
  40. data/lib/remove_bg/result.rb +13 -3
  41. data/lib/remove_bg/result_metadata.rb +2 -0
  42. data/lib/remove_bg/upload.rb +5 -8
  43. data/lib/remove_bg/url_validator.rb +4 -4
  44. data/lib/remove_bg/version.rb +3 -1
  45. data/lib/remove_bg.rb +2 -0
  46. data/remove_bg.gemspec +43 -20
  47. data/resources/removebgByCanva.svg +47 -0
  48. data/sonar-project.properties +22 -0
  49. data/tasks/version.rake +34 -0
  50. metadata +207 -82
  51. data/.env.test +0 -2
  52. data/LICENSE +0 -21
  53. data/gemfiles/faraday_0_15.gemfile +0 -11
  54. data/gemfiles/faraday_0_16.gemfile +0 -11
  55. data/gemfiles/faraday_0_17.gemfile +0 -11
  56. data/gemfiles/faraday_1_x.gemfile +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47f8cd273ddfe8639badf0fd59050342af16e542a508162f77fbec7b7a2a5dd4
4
- data.tar.gz: 5adcc396f765f7a4858e7c7c4d82d7610b5d42e2200401be29b5ea543f5fdc88
3
+ metadata.gz: d98c7854629bfaf9f54f3bfdc1da555a74e824644b14ce959af79c1fdc002cb7
4
+ data.tar.gz: f39fb1824c889096aea5581cc1c31eb775c94fa2ffbc2fb474720aeb07d5e2c4
5
5
  SHA512:
6
- metadata.gz: 4ad4065335850911ee8b45604ed0de465742bdf183078d0ae4e9de52fb1f77519d4d9bd5aa7a042d04e9c0960a8af4f3d0e84cfdb49c6ae48e773626c6ad9639
7
- data.tar.gz: a265d257a9e77bd9d87b9ef42c2aff4b0d7b8b7b3482a8717a44b4d3192c5064b0e4e67e62b9d513ecbb67e317c8b470db19194b350ade66d73b602b6ec9a7c8
6
+ metadata.gz: 6e71d886ea81021acd12f9ae51bed5b31a7eb68a82873914770ccd8f3ed93a35d05353b3413983a59bf8fcafab9a27b42ecb61537b5228b95e5ddb2b95a17773
7
+ data.tar.gz: 8974ee1e97ee15e53497c9bbe06537257306c279d1d4121f7307041318a11d350e243cbf4c6f33638167046927f570c33294909d6277ecbce253e74601b9d877
data/.circleci/config.yml CHANGED
@@ -1,72 +1,342 @@
1
1
  ---
2
- version: 2
3
-
4
- base_job: &base_job
5
- steps:
6
- - checkout
7
-
8
- - restore_cache:
9
- keys:
10
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
-
12
- - run:
13
- name: install dependencies
14
- command: |
15
- gem install bundler --version '~> 2.0'
16
- bundle config set path vendor/bundle
17
- bundle install --jobs=4 --retry=3
18
-
19
- - run:
20
- name: install image processsing dependencies
21
- command: |
22
- sudo apt-get update
23
- sudo apt install imagemagick libvips
24
-
25
- - save_cache:
26
- paths:
27
- - ./vendor/bundle
28
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
29
-
30
- - run:
31
- name: run tests
32
- command: |
33
- bundle exec rspec --format progress \
34
- --format RspecJunitFormatter \
35
- --out test-results/rspec.xml
36
-
37
- - run:
38
- name: run appraisals
39
- command: |
40
- bundle exec appraisal install --jobs 4 --retry 3
41
- bundle exec appraisal rspec
42
-
43
- - store_test_results:
44
- path: test-results
2
+ version: 2.1
45
3
 
46
- ################################################################################
4
+ # Used Orbs (https://circleci.com/docs/2.0/using-orbs/)
5
+ orbs:
6
+ ruby: circleci/ruby@2.1
7
+ node: circleci/node@5.2
8
+ sonarcloud: sonarsource/sonarcloud@2.0
9
+ asdf: rynkowsg/asdf@0.1
10
+ codecov: codecov/codecov@4.1
11
+ github: circleci/github-cli@2.3
47
12
 
48
- jobs:
49
- ruby-2.5:
50
- <<: *base_job
13
+ # Pipeline parameters
14
+ parameters:
15
+ # The main branch of the repository (e.g. main)
16
+ main-branch:
17
+ type: string
18
+ default: main
19
+ default-ruby:
20
+ type: string
21
+ default: "3.3.4"
22
+
23
+ # Define common YAML anchors
24
+ x-common-auth: &common-auth
25
+ auth:
26
+ username: ${DOCKERHUB_USER}
27
+ password: ${DOCKERHUB_PASSWORD}
28
+
29
+ # Define executors
30
+ executors:
31
+ docker: # Docker using the Base Convenience Image
51
32
  docker:
52
- - image: circleci/ruby:2.5
53
- ruby-2.6:
54
- <<: *base_job
33
+ - image: cimg/base:stable
34
+ <<: *common-auth
35
+ macos: # macOS executor running Xcode
36
+ macos:
37
+ # https://circleci.com/developer/machine/image/xcode
38
+ xcode: 15.4.0
39
+
40
+ jobs:
41
+ # Lint Job
42
+ lint:
55
43
  docker:
56
- - image: circleci/ruby:2.6
57
- ruby-2.7:
58
- <<: *base_job
44
+ - image: cimg/base:stable
45
+ <<: *common-auth
46
+ resource_class: medium
47
+ steps:
48
+ # Check out code
49
+ - checkout
50
+ # Install requested Ruby version
51
+ - ruby/install:
52
+ version: "<< pipeline.parameters.default-ruby >>"
53
+ # Install dependencies using bundler
54
+ - ruby/install-deps:
55
+ pre-install-steps:
56
+ - run: bundle config set jobs $(nproc)
57
+ key: gems-v{{ .Environment.CACHE_VERSION }}
58
+ # Run Rubocop
59
+ - run:
60
+ name: Run Rubocop
61
+ command: |
62
+ bash -c "bundle exec rubocop --format=json --out=rubocop-result.json; [[ \$? -ne 2 ]]"
63
+ - store_artifacts:
64
+ path: rubocop-result.json
65
+ destination: rubocop-result.json
66
+ - persist_to_workspace:
67
+ root: .
68
+ paths:
69
+ - rubocop-result.json
70
+
71
+ # Test Job
72
+ test:
73
+ parameters:
74
+ # The OS to run the jobs on
75
+ os:
76
+ type: string
77
+ default: docker
78
+ # The OS to run the jobs on
79
+ ruby-version:
80
+ type: string
81
+ executor: << parameters.os >>
59
82
  environment:
60
- UPLOAD_COVERAGE: 1
83
+ RUBY_VERSION: << parameters.ruby-version >>
84
+ steps:
85
+ # Install dependencies based on the OS
86
+ - when:
87
+ condition:
88
+ equal: ["docker", "<< parameters.os >>"]
89
+ steps:
90
+ - run:
91
+ name: Install ImageMagick, libvips and libffi
92
+ command: |
93
+ sudo apt-get update
94
+ sudo apt-get -y --no-install-recommends install \
95
+ imagemagick libvips42 libffi-dev libreadline-dev \
96
+ libyaml-dev openssl libtool
97
+ - asdf/install
98
+ - when:
99
+ condition:
100
+ equal: ["macos", "<< parameters.os >>"]
101
+ steps:
102
+ - run:
103
+ name: Install ImageMagick, libvips and libffi
104
+ command: |
105
+ brew install openssl@3 imagemagick vips asdf libffi
106
+ # Install requested Ruby version
107
+ - run:
108
+ name: Install Ruby << parameters.ruby-version >>
109
+ command: |
110
+ asdf plugin-add ruby
111
+ asdf install ruby << parameters.ruby-version >>
112
+ asdf global ruby << parameters.ruby-version >>
113
+ gem install --user-install executable-hooks
114
+ # Check out code
115
+ - checkout
116
+ # Install dependencies using bundler
117
+ - ruby/install-deps:
118
+ pre-install-steps:
119
+ - run: bundle config set jobs $(nproc)
120
+ key: gems-v{{ .Environment.CACHE_VERSION }}
121
+ # Run RSpec tests
122
+ - run:
123
+ name: Run tests
124
+ command: |
125
+ bundle exec rspec spec
126
+ # Run appraisals
127
+ - run:
128
+ name: Run appraisals
129
+ command: |
130
+ bundle exec appraisal install --jobs=$(nproc) --retry 3
131
+ bundle exec appraisal rspec
132
+ # Store test results
133
+ - store_test_results:
134
+ path: rspec/rspec.xml
135
+ # Persist test results to workspace and upload to CodeCov for default Ruby
136
+ - when:
137
+ condition:
138
+ and:
139
+ - equal:
140
+ - "docker"
141
+ - "<< parameters.os >>"
142
+ - equal:
143
+ - "<< pipeline.parameters.default-ruby >>"
144
+ - "<< parameters.ruby-version >>"
145
+ steps:
146
+ - persist_to_workspace:
147
+ root: .
148
+ paths:
149
+ - rspec
150
+ - coverage
151
+ - when:
152
+ condition:
153
+ equal: ["<< pipeline.git.tag >>", ""]
154
+ steps:
155
+ - codecov/upload:
156
+ cli_args: --verbose
157
+ validate: true
158
+
159
+ # Sonarcloud Job
160
+ sonarcloud:
161
+ docker:
162
+ - image: cimg/openjdk:21.0-node
163
+ <<: *common-auth
164
+ resource_class: small
165
+ steps:
166
+ - checkout
167
+ - attach_workspace:
168
+ at: .
169
+ - run:
170
+ name: Replace Version
171
+ command: |
172
+ if [ -n "${CIRCLE_TAG}" ] && [ ! -z "${CIRCLE_TAG}" ] ; then
173
+ export APP_VERSION="${CIRCLE_TAG}"
174
+ elif [ -n "${CIRCLE_BRANCH}" ] && [ ! -z "${CIRCLE_BRANCH}" ] ; then
175
+ export APP_VERSION="${CIRCLE_BRANCH}"
176
+ else
177
+ export APP_VERSION="${CIRCLE_SHA1:0:7}"
178
+ fi
179
+ echo "Setting version to ${APP_VERSION}"
180
+ sed -i -e "s\\sonar.projectVersion=.*$\\sonar.projectVersion=${APP_VERSION}\\g" sonar-project.properties
181
+ - sonarcloud/scan
182
+
183
+ # Release Job
184
+ release:
61
185
  docker:
62
- - image: circleci/ruby:2.7
186
+ - image: cimg/base:stable
187
+ <<: *common-auth
188
+ resource_class: medium+
189
+ environment:
190
+ GIT_MAIN_BRANCH: << pipeline.parameters.main-branch >>
191
+ CHANGELOG_FILENAME: CHANGELOG.md
192
+ steps:
193
+ - github/install
194
+ - node/install:
195
+ node-version: latest
196
+ - run:
197
+ name: Install ImageMagick, libvips and libffi
198
+ command: |
199
+ sudo apt-get update
200
+ sudo apt-get -y --no-install-recommends install \
201
+ imagemagick libvips42 libffi-dev libreadline-dev \
202
+ libyaml-dev openssl libtool
203
+ - asdf/install
204
+ # Install requested Ruby version
205
+ - run:
206
+ name: Install Ruby << pipeline.parameters.default-ruby >>
207
+ command: |
208
+ asdf plugin-add ruby
209
+ asdf install ruby << pipeline.parameters.default-ruby >>
210
+ asdf global ruby << pipeline.parameters.default-ruby >>
211
+ gem install --user-install executable-hooks
212
+ - checkout
213
+ - run:
214
+ name: Check out main branch
215
+ command: git checkout --force "${GIT_MAIN_BRANCH}"
216
+ # Install dependencies using bundler
217
+ - ruby/install-deps:
218
+ pre-install-steps:
219
+ - run: bundle config set jobs $(nproc)
220
+ key: gems-v{{ .Environment.CACHE_VERSION }}
221
+ - run:
222
+ name: Build and push gem
223
+ command: |
224
+ bundle config set frozen false
225
+ bundle exec rake version["${CIRCLE_TAG}"]
226
+ bundle exec gem build --strict
227
+ GEM_HOST_API_KEY="${REMOVE_BG_GEM_PUSH_KEY}" gem push "remove_bg-${CIRCLE_TAG}.gem"
228
+
229
+ # Update version to next beta version
230
+ NEXT_PATCH_TAG=$(echo "${CIRCLE_TAG:-0.0.0}" | awk 'BEGIN{FS=OFS="."} {$3+=1} 1')
231
+ BETA_TAG="${NEXT_PATCH_TAG}.pre"
232
+ bundle exec rake version["${BETA_TAG}"]
233
+ bundle install
234
+ - run:
235
+ name: Edit Release and generate CHANGELOG.md
236
+ command: |
237
+ # Configure git
238
+ git config --global credential.helper cache
239
+ git config --global user.email "${GITHUB_USER_EMAIL}"
240
+ git config --global user.name "${GITHUB_USER_NAME}"
241
+
242
+ # Install GitHub Release Notes
243
+ npm install github-release-notes -g
244
+
245
+ # Get current release description
246
+ gh release view ${CIRCLE_TAG} \
247
+ --repo ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} \
248
+ --json body --jq '.body' > release-body.txt
249
+
250
+ # Create release notes
251
+ gren release \
252
+ --override \
253
+ --tags "${CIRCLE_TAG}" \
254
+ --token ${GITHUB_AUTH_TOKEN} \
255
+ --username ${CIRCLE_PROJECT_USERNAME} \
256
+ --repo ${CIRCLE_PROJECT_REPONAME}
257
+
258
+ # Get current release description
259
+ gh release view ${CIRCLE_TAG} \
260
+ --repo ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} \
261
+ --json body --jq '.body' > release-append.txt
262
+
263
+ echo -e "$(cat release-body.txt)\n\n---\n\n$(cat release-append.txt)" > release.txt
264
+
265
+ # Append to release description
266
+ echo "Updating release description"
267
+ gh release edit ${CIRCLE_TAG} \
268
+ --repo ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} \
269
+ --notes-file release.txt --latest --title ${CIRCLE_TAG}
270
+
271
+ # Generate CHANGELOG.md
272
+ gren changelog \
273
+ --override \
274
+ --token ${GITHUB_AUTH_TOKEN} \
275
+ --username ${CIRCLE_PROJECT_USERNAME} \
276
+ --repo ${CIRCLE_PROJECT_REPONAME}
277
+
278
+ # Remove Windows line endings
279
+ sed -i $'s/\r$//' "${CHANGELOG_FILENAME}"
280
+
281
+ # Commit changelog and bumped version to git
282
+ git add "${CHANGELOG_FILENAME}" lib/remove_bg/version.rb Gemfile.lock
283
+ git diff --name-only --cached
284
+
285
+ git commit -m "📝 Update ${CHANGELOG_FILENAME} for ${CIRCLE_TAG}" -m "[skip ci]"
286
+ git push -q --set-upstream origin ${GIT_MAIN_BRANCH}
63
287
 
64
288
  ################################################################################
65
289
 
66
290
  workflows:
67
- version: 2
68
291
  multiple-rubies:
69
292
  jobs:
70
- - ruby-2.5
71
- - ruby-2.6
72
- - ruby-2.7
293
+ # Test Job
294
+ - test:
295
+ context:
296
+ - DockerHub
297
+ matrix:
298
+ parameters:
299
+ os: ["docker", "macos"]
300
+ ruby-version: ["3.1.6", "3.2.3", "3.3.4"]
301
+ filters:
302
+ tags:
303
+ only: /^\d+\.\d+\.\d+$/
304
+
305
+ # Lint Job
306
+ - lint:
307
+ context:
308
+ - DockerHub
309
+ requires:
310
+ - test
311
+ filters:
312
+ tags:
313
+ only: /^\d+\.\d+\.\d+$/
314
+
315
+ # Sonarcloud Job
316
+ - sonarcloud:
317
+ context:
318
+ - DockerHub
319
+ - SonarCloud
320
+ requires:
321
+ - lint
322
+ - test
323
+ filters:
324
+ tags:
325
+ only: /^\d+\.\d+\.\d+$/
326
+
327
+ # Release Job
328
+ - release:
329
+ context:
330
+ - DockerHub
331
+ - GitHub
332
+ - rubygems.org
333
+ - Google Cloud kaleido
334
+ requires:
335
+ - lint
336
+ - test
337
+ - sonarcloud
338
+ filters:
339
+ tags:
340
+ only: /^\d+\.\d+\.\d+$/
341
+ branches:
342
+ ignore: /^.*$/
data/.depfu.yml ADDED
@@ -0,0 +1,21 @@
1
+ ---
2
+ update_strategy: security
3
+
4
+ bundler:
5
+ update_strategy: grouped
6
+ update_out_of_spec: false
7
+ reasonably_up_to_date: true
8
+ automerge_method: squash
9
+ engine_update_strategy: minor
10
+ commit_message: ⬆️ Update {{dependency}} to version {{version}}
11
+ commit_message_grouped: ⬆️ Update {{update_type}} {{project_type}} dependencies ({{date}})
12
+ labels:
13
+ - dependencies
14
+ - depfu
15
+ security_labels:
16
+ - 🚨 security
17
+ auto_assign: otherguy
18
+ auto_review_team_assign: platform
19
+ grouped_update_schedule: biweekly
20
+ grouped_update_start_date: '2022-01-05' # First wednesday of the year
21
+ grouped_update_time: '6:00'
data/.editorconfig ADDED
@@ -0,0 +1,19 @@
1
+ # EditorConfig is awesome: http://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ # Unix-style newlines with a newline ending every file
7
+ [*]
8
+ indent_style = space
9
+ indent_size = 2
10
+ end_of_line = lf
11
+ insert_final_newline = true
12
+ trim_trailing_whitespace = true
13
+ charset = utf-8
14
+
15
+ [*.rb]
16
+ quote_type = double
17
+
18
+ [*.md]
19
+ indent_size = 4
data/.gitignore CHANGED
@@ -7,16 +7,16 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
- # rspec failure tracking
11
- spec/examples.txt
12
-
13
- .env.*.local
10
+ # Rubocop
11
+ .rubocop-*
12
+ rubocop-result.json
14
13
 
15
- # CircleCI / RSpec JUnit formatter
16
- test-results
14
+ # RSpec
15
+ rspec/
16
+ spec/examples.txt
17
17
 
18
+ # Appraisals
18
19
  gemfiles/*.gemfile.lock
19
20
 
21
+ # Examples
20
22
  examples/output
21
-
22
- .ruby-version
data/.grenrc.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "dataSource": "prs",
3
+ "prefix": "v",
4
+ "onlyMilestones": false,
5
+ "groupBy": {
6
+ "🚀 Enhancements:": ["enhancement", "feature", "internal"],
7
+ "🐞 Bugfixes:": ["bug", "fix"],
8
+ "🔧 Changes:": ["closed", "documentation"],
9
+ "🚨 Security": ["🚨 security", "security"],
10
+ "🔀 Dependencies": ["dependencies", "depfu"]
11
+ },
12
+ "template": {
13
+ "noLabel": "closed",
14
+ "changelogTitle": "# Changelog\n\n",
15
+ "release": "## {{release}}\n\n{{body}}\n",
16
+ "releaseSeparator": "\n",
17
+ "issue": "- {{name}} [{{text}}]({{url}})"
18
+ },
19
+ "changelogFilename": "CHANGELOG.md"
20
+ }
data/.rspec CHANGED
@@ -1,2 +1,7 @@
1
1
  --require spec_helper
2
2
  --color
3
+ --format documentation
4
+ --format RspecJunitFormatter
5
+ --out rspec/rspec.xml
6
+ --format RspecSonarqubeFormatter
7
+ --out rspec/test-report.xml
data/.rubocop.yml ADDED
@@ -0,0 +1,43 @@
1
+ ---
2
+ inherit_from: https://raw.githubusercontent.com/remove-bg/code-style/main/ruby/.rubocop.yml
3
+
4
+ require:
5
+ - rubocop-performance
6
+ - rubocop-rspec
7
+ - rubocop-rake
8
+
9
+ inherit_mode:
10
+ merge:
11
+ - Exclude
12
+
13
+ AllCops:
14
+ NewCops: enable
15
+ TargetRubyVersion: 3.1
16
+ Exclude:
17
+ - gemfiles/**/*
18
+ - vendor/bundle/**/*
19
+
20
+ Layout/LineLength:
21
+ Max: 180
22
+
23
+ Gemspec/DevelopmentDependencies:
24
+ EnforcedStyle: gemspec
25
+
26
+ Metrics/BlockLength:
27
+ Enabled: false
28
+
29
+ Metrics/MethodLength:
30
+ Enabled: false
31
+
32
+ Bundler/OrderedGems:
33
+ Enabled: true
34
+
35
+ RSpec/DescribeClass:
36
+ Exclude:
37
+ - spec/integration/*
38
+
39
+ RSpec/ExampleLength:
40
+ Max: 25
41
+
42
+ RSpec/MultipleExpectations:
43
+ Max: 10
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.1.6 3.2.3 3.3.4
data/Appraisals CHANGED
@@ -1,17 +1,56 @@
1
- # Oldest supported Faraday version
2
- appraise "faraday-0-15" do
3
- gem "faraday", "~> 0.15.0"
1
+ # frozen_string_literal: true
2
+
3
+ # Faraday 2.0
4
+ appraise "faraday-2-0" do
5
+ gem "faraday", "~> 2.0.0"
6
+ end
7
+
8
+ # Faraday 2.1
9
+ appraise "faraday-2-1" do
10
+ gem "faraday", "~> 2.1.0"
11
+ end
12
+
13
+ # Faraday 2.2
14
+ appraise "faraday-2-2" do
15
+ gem "faraday", "~> 2.2.0"
16
+ end
17
+
18
+ # Faraday 2.3
19
+ appraise "faraday-2-3" do
20
+ gem "faraday", "~> 2.3.0"
21
+ end
22
+
23
+ # Faraday 2.4
24
+ appraise "faraday-2-4" do
25
+ gem "faraday", "~> 2.4.0"
26
+ end
27
+
28
+ # Faraday 2.5
29
+ appraise "faraday-2-5" do
30
+ gem "faraday", "~> 2.5.0"
31
+ end
32
+
33
+ # Faraday 2.6
34
+ appraise "faraday-2-6" do
35
+ gem "faraday", "~> 2.6.0"
36
+ end
37
+
38
+ # Faraday 2.7
39
+ appraise "faraday-2-7" do
40
+ gem "faraday", "~> 2.7.0"
4
41
  end
5
42
 
6
- appraise "faraday-0-16" do
7
- gem "faraday", "~> 0.16.0"
43
+ # Faraday 2.8
44
+ appraise "faraday-2-8" do
45
+ gem "faraday", "~> 2.8.0"
8
46
  end
9
47
 
10
- appraise "faraday-0-17" do
11
- gem "faraday", "~> 0.17.0"
48
+ # Faraday 2.9
49
+ appraise "faraday-2-9" do
50
+ gem "faraday", "~> 2.9.0"
12
51
  end
13
52
 
14
- # Latest in Faraday 1.x series
15
- appraise "faraday-1-x" do
16
- gem "faraday", "~> 1.0"
53
+ # Latest in Faraday 2.x series
54
+ appraise "faraday-2-x" do
55
+ gem "faraday", "~> 2", "< 3"
17
56
  end
data/CHANGELOG.md CHANGED
@@ -1,6 +1,23 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 2.0.0
4
+
5
+ - Deprecate `overwrite: true` in favour of `save!` and `save_zip!`
6
+ - Remove support for Ruby 2.5, 2.6, 2.7 and 3.0 [which are EOL](https://www.ruby-lang.org/en/downloads/branches/)
7
+ - Deprecate Faraday < 2, add support for all Faraday 2.x versions
8
+ - Increase default timeout to 20 seconds
9
+
10
+ ---
11
+
12
+
13
+ #### 🚀 Enhancements:
14
+
15
+ - Add support for Faraday 2.x [#31](https://github.com/remove-bg/ruby/pull/31)
16
+
17
+ #### 🚨 Security
18
+
19
+ - 🚨 [security] Update rexml 3.2.6 → 3.2.8 (patch) [#27](https://github.com/remove-bg/ruby/pull/27)
20
+
4
21
 
5
22
  ## 1.5.0
6
23
 
@@ -14,7 +31,7 @@
14
31
  ## 1.4.0
15
32
 
16
33
  - Adds support for images up to 25 megapixels ([documentation](https://github.com/remove-bg/ruby#processing-images-over-10-megapixels))
17
- - Requires an image processing library to be configured (ImageMagick, GraphicsMagick or libvips)
34
+ - Requires an image processing library to be configured (ImageMagick, GraphicsMagick or libvips)
18
35
 
19
36
  ## 1.3.0
20
37
 
data/Gemfile CHANGED
@@ -1,7 +1,4 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
+ source "https://rubygems.org"
3
4
  gemspec
4
-
5
- group :development do
6
- gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git", ref: "5868643"
7
- end