remove_bg 1.4.1 → 2.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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +298 -57
  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/Appraisals +49 -10
  10. data/CHANGELOG.md +12 -0
  11. data/Gemfile +2 -5
  12. data/Gemfile.lock +132 -62
  13. data/LICENSE.md +25 -0
  14. data/README.md +93 -38
  15. data/Rakefile +4 -0
  16. data/SECURITY.md +36 -0
  17. data/gemfiles/faraday_2_0.gemfile +7 -0
  18. data/gemfiles/faraday_2_1.gemfile +7 -0
  19. data/gemfiles/faraday_2_2.gemfile +7 -0
  20. data/gemfiles/faraday_2_3.gemfile +7 -0
  21. data/gemfiles/faraday_2_4.gemfile +7 -0
  22. data/gemfiles/faraday_2_5.gemfile +7 -0
  23. data/gemfiles/faraday_2_6.gemfile +7 -0
  24. data/gemfiles/faraday_2_7.gemfile +7 -0
  25. data/gemfiles/faraday_2_8.gemfile +7 -0
  26. data/gemfiles/faraday_2_9.gemfile +7 -0
  27. data/gemfiles/faraday_2_x.gemfile +7 -0
  28. data/lib/remove_bg/account_info.rb +7 -1
  29. data/lib/remove_bg/api.rb +2 -0
  30. data/lib/remove_bg/api_client.rb +31 -12
  31. data/lib/remove_bg/base_request_options.rb +2 -0
  32. data/lib/remove_bg/composite_result.rb +29 -10
  33. data/lib/remove_bg/configuration.rb +16 -3
  34. data/lib/remove_bg/error.rb +12 -2
  35. data/lib/remove_bg/http_connection.rb +9 -4
  36. data/lib/remove_bg/image_composer.rb +28 -9
  37. data/lib/remove_bg/rate_limit_info.rb +9 -6
  38. data/lib/remove_bg/request_options.rb +32 -0
  39. data/lib/remove_bg/result.rb +29 -4
  40. data/lib/remove_bg/result_metadata.rb +2 -0
  41. data/lib/remove_bg/upload.rb +7 -5
  42. data/lib/remove_bg/url_validator.rb +4 -4
  43. data/lib/remove_bg/version.rb +3 -1
  44. data/lib/remove_bg.rb +19 -0
  45. data/remove_bg.gemspec +43 -16
  46. data/resources/removebgByCanva.svg +47 -0
  47. data/sonar-project.properties +22 -0
  48. data/tasks/version.rake +34 -0
  49. metadata +243 -63
  50. data/.env.test +0 -2
  51. data/LICENSE +0 -21
  52. data/gemfiles/faraday_0_15.gemfile +0 -11
  53. data/gemfiles/faraday_0_16.gemfile +0 -11
  54. data/gemfiles/faraday_0_17.gemfile +0 -11
  55. data/gemfiles/faraday_1_x.gemfile +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 728a996008009c54dc10d72f0b0db353b1156182a8379c51ed0cf5f9fbe4b27e
4
- data.tar.gz: 991a7201af58af739e73af965d082b43a0427d79878e0db2f17d13c3ac575053
3
+ metadata.gz: ef5b34e46cd2739b86ea655145faa5984a5a3ceae1767e9a6ea4a8d5ad950182
4
+ data.tar.gz: 95146d0326251ec59a60843a4cecc2b0b8ebbdbfdb047b33b3b1684db62b2506
5
5
  SHA512:
6
- metadata.gz: 2800e1a449e12e3168c7e15d9fd85b8424434ff568821600464a05d6448529e22514ab1e80cdd7c76c7a6ab91e45db01f99b7a7e7dab617d00b797f6788aa872
7
- data.tar.gz: 556b0ded824694cffb639cab278eb00ffea8df314c5beee20a2565528671d8548fb856a3d14a52af73c5147f54d016b457268101046ce6c75647fb0a6b606c61
6
+ metadata.gz: 6ece195e014cc84b8fc6843d31f6a311499fd267da4e6e8c70c5b1d5b8c08521fa665d7347b5f4a6c55a74daa2dfbbc1cf99c59c6bdf5bd6d8001839371b7d9a
7
+ data.tar.gz: 68cdac8ec969b29b842955e24a14b160b3e5b33b766e1835dce9ddb49e05f0b61beedd7471a2dd395166823b9709fee580185bdb0a451c810b32b2b0626e2102
data/.circleci/config.yml CHANGED
@@ -1,70 +1,311 @@
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
+ sonarcloud: sonarsource/sonarcloud@2.0
8
+ asdf: rynkowsg/asdf@0.1
9
+ codecov: codecov/codecov@4.1
10
+ gcr: circleci/gcp-gcr@0.16
11
+ github: circleci/github-cli@2.3
12
+
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.3"
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
32
+ docker:
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
47
39
 
48
40
  jobs:
49
- ruby-2.5:
50
- <<: *base_job
41
+ # Lint Job
42
+ lint:
51
43
  docker:
52
- - image: circleci/ruby:2.5
53
- ruby-2.6:
54
- <<: *base_job
44
+ - image: cimg/base:stable
45
+ <<: *common-auth
46
+ resource_class: small
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
+ default: "3.3.3"
82
+ executor: << parameters.os >>
83
+ environment:
84
+ RUBY_VERSION: << parameters.ruby-version >>
85
+ steps:
86
+ # Install dependencies based on the OS
87
+ - when:
88
+ condition:
89
+ equal: ["docker", "<< parameters.os >>"]
90
+ steps:
91
+ - run:
92
+ name: Install ImageMagick, libvips and libffi
93
+ command: |
94
+ sudo apt-get update
95
+ sudo apt-get -y --no-install-recommends install openssl imagemagick \
96
+ libvips42 libffi-dev libreadline-dev libtool libyaml-dev
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: ["docker", "<< parameters.os >>"]
140
+ - equal: ["<< pipeline.parameters.default-ruby >>", "<< parameters.ruby-version >>"]
141
+ steps:
142
+ - persist_to_workspace:
143
+ root: .
144
+ paths:
145
+ - rspec
146
+ - coverage
147
+ - when:
148
+ condition:
149
+ equal: ["<< pipeline.git.tag >>", ""]
150
+ steps:
151
+ - codecov/upload:
152
+ cli_args: --verbose
153
+ validate: true
154
+
155
+ # Sonarcloud Job
156
+ sonarcloud:
55
157
  docker:
56
- - image: circleci/ruby:2.6
57
- ruby-2.7:
58
- <<: *base_job
158
+ - image: cimg/openjdk:21.0-node
159
+ <<: *common-auth
160
+ resource_class: small
161
+ steps:
162
+ - checkout
163
+ - attach_workspace:
164
+ at: .
165
+ - run:
166
+ name: Replace Version
167
+ command: |
168
+ if [ -n "${CIRCLE_TAG}" ] && [ ! -z "${CIRCLE_TAG}" ] ; then
169
+ export APP_VERSION="${CIRCLE_TAG}"
170
+ elif [ -n "${CIRCLE_BRANCH}" ] && [ ! -z "${CIRCLE_BRANCH}" ] ; then
171
+ export APP_VERSION="${CIRCLE_BRANCH}"
172
+ else
173
+ export APP_VERSION="${CIRCLE_SHA1:0:7}"
174
+ fi
175
+ echo "Setting version to ${APP_VERSION}"
176
+ sed -i -e "s\\sonar.projectVersion=.*$\\sonar.projectVersion=${APP_VERSION}\\g" sonar-project.properties
177
+ - sonarcloud/scan
178
+
179
+ # Release Job
180
+ release:
59
181
  docker:
60
- - image: circleci/ruby:2.7
182
+ - image: cimg/base:stable
183
+ <<: *common-auth
184
+ resource_class: small
185
+ environment:
186
+ GIT_MAIN_BRANCH: << pipeline.parameters.main-branch >>
187
+ CHANGELOG_FILENAME: CHANGELOG.md
188
+ steps:
189
+ - setup_remote_docker
190
+ - checkout
191
+ - attach_workspace:
192
+ at: .
193
+ - github/install:
194
+ version: 2.47.0
195
+ - ruby/install:
196
+ version: "<< pipeline.parameters.default-ruby >>"
197
+ # Install dependencies using bundler
198
+ - ruby/install-deps:
199
+ pre-install-steps:
200
+ - run: bundle config set jobs $(nproc)
201
+ key: gems-v{{ .Environment.CACHE_VERSION }}
202
+ - run:
203
+ name: Build and push gem
204
+ command: |
205
+ bundle config set frozen false
206
+ bundle exec rake version["${CIRCLE_TAG}"]
207
+ bundle exec gem build --strict
208
+ GEM_HOST_API_KEY="${REMOVE_BG_GEM_PUSH_KEY}" gem push "remove_bg-${CIRCLE_TAG}.gem"
209
+
210
+ # Update version to next beta version
211
+ NEXT_PATCH_TAG=$(echo "${CIRCLE_TAG:-0.0.0}" | awk 'BEGIN{FS=OFS="."} {$3+=1} 1')
212
+ BETA_TAG="${NEXT_PATCH_TAG}.pre"
213
+ bundle exec rake version["${BETA_TAG}"]
214
+ - gcr/gcr-auth
215
+ - run:
216
+ name: Edit Release
217
+ command: |
218
+ # Update release
219
+ docker run --rm -it --name=gren -v $(pwd)/.grenrc.json:/.grenrc.json \
220
+ eu.gcr.io/removebg-226919/github-release-notes:latest \
221
+ release --tags "${CIRCLE_TAG}" --override --token ${GITHUB_AUTH_TOKEN} --username ${CIRCLE_PROJECT_USERNAME} --repo ${CIRCLE_PROJECT_REPONAME}
222
+
223
+ # Get current release description
224
+ gh release view ${CIRCLE_TAG} --repo ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} --json body --jq '.body' > release-body.txt
225
+
226
+ # Append to release description
227
+ echo "Updating release description"
228
+ gh release edit ${CIRCLE_TAG} --repo ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} --notes-file release-body.txt --latest --title ${CIRCLE_TAG}
229
+ - run:
230
+ name: Generate CHANGELOG.md
231
+ command: |
232
+ # Configure git
233
+ git config --global credential.helper cache
234
+ git config --global user.email "${GITHUB_USER_EMAIL}"
235
+ git config --global user.name "${GITHUB_USER_NAME}"
236
+
237
+ # Check out main branch
238
+ git checkout --force "${GIT_MAIN_BRANCH}"
239
+
240
+ # Generate changelog
241
+ docker run -it --name=gren -v $(pwd)/.grenrc.json:/.grenrc.json \
242
+ eu.gcr.io/removebg-226919/github-release-notes:latest \
243
+ changelog --override --token ${GITHUB_AUTH_TOKEN} --username ${CIRCLE_PROJECT_USERNAME} --repo ${CIRCLE_PROJECT_REPONAME}
244
+
245
+ docker cp "gren:/${CHANGELOG_FILENAME}" "${CHANGELOG_FILENAME}"
246
+ docker rm gren
247
+
248
+ # Remove Windows line endings
249
+ sed -i $'s/\r$//' "${CHANGELOG_FILENAME}"
250
+
251
+ # Commit changelog and bumped version to git
252
+ git add "${CHANGELOG_FILENAME}"
253
+ git add lib/remove_bg/version.rb
254
+ git add Gemfile.lock
255
+ git commit -m "📝 Update ${CHANGELOG_FILENAME} for ${CIRCLE_TAG}" -m "[skip ci]"
256
+ git push -q --set-upstream origin ${GIT_MAIN_BRANCH}
61
257
 
62
258
  ################################################################################
63
259
 
64
260
  workflows:
65
- version: 2
66
261
  multiple-rubies:
67
262
  jobs:
68
- - ruby-2.5
69
- - ruby-2.6
70
- - ruby-2.7
263
+ # Test Job
264
+ - test:
265
+ context:
266
+ - DockerHub
267
+ matrix:
268
+ parameters:
269
+ os: ["docker", "macos"]
270
+ ruby-version: ["3.1.6", "3.2.3", "3.3.3"]
271
+ filters:
272
+ tags:
273
+ only: /^\d+\.\d+\.\d+$/
274
+
275
+ # Lint Job
276
+ - lint:
277
+ context:
278
+ - DockerHub
279
+ requires:
280
+ - test
281
+ filters:
282
+ tags:
283
+ only: /^\d+\.\d+\.\d+$/
284
+
285
+ # Sonarcloud Job
286
+ - sonarcloud:
287
+ context:
288
+ - DockerHub
289
+ - SonarCloud
290
+ requires:
291
+ - lint
292
+ - test
293
+ filters:
294
+ tags:
295
+ only: /^\d+\.\d+\.\d+$/
296
+
297
+ # Release Job
298
+ - release:
299
+ context:
300
+ - DockerHub
301
+ - rubygems.org
302
+ - Google Cloud kaleido
303
+ requires:
304
+ - lint
305
+ - test
306
+ - sonarcloud
307
+ filters:
308
+ tags:
309
+ only: /^\d+\.\d+\.\d+$/
310
+ branches:
311
+ 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/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,5 +1,17 @@
1
1
  # Changelog
2
2
 
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
7
+ - Deprecate Faraday < 2, add support for all Faraday 2.x versions
8
+ - Increase default timeout to 20 seconds
9
+
10
+ ## 1.5.0
11
+
12
+ - Auto-detect any available image processing libraries
13
+ - Reduce bandwidth usage by using ZIP format where possible
14
+
3
15
  ## 1.4.1
4
16
 
5
17
  - Fixes binary encoding issue - via [#15](https://github.com/remove-bg/ruby/pull/15)
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