remove_bg 2.0.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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +75 -44
- data/.tool-versions +1 -0
- data/CHANGELOG.md +14 -2
- data/Gemfile.lock +10 -8
- data/README.md +1 -1
- data/lib/remove_bg/upload.rb +1 -6
- data/lib/remove_bg/version.rb +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: d98c7854629bfaf9f54f3bfdc1da555a74e824644b14ce959af79c1fdc002cb7
         | 
| 4 | 
            +
              data.tar.gz: f39fb1824c889096aea5581cc1c31eb775c94fa2ffbc2fb474720aeb07d5e2c4
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 6e71d886ea81021acd12f9ae51bed5b31a7eb68a82873914770ccd8f3ed93a35d05353b3413983a59bf8fcafab9a27b42ecb61537b5228b95e5ddb2b95a17773
         | 
| 7 | 
            +
              data.tar.gz: 8974ee1e97ee15e53497c9bbe06537257306c279d1d4121f7307041318a11d350e243cbf4c6f33638167046927f570c33294909d6277ecbce253e74601b9d877
         | 
    
        data/.circleci/config.yml
    CHANGED
    
    | @@ -4,10 +4,10 @@ version: 2.1 | |
| 4 4 | 
             
            # Used Orbs (https://circleci.com/docs/2.0/using-orbs/)
         | 
| 5 5 | 
             
            orbs:
         | 
| 6 6 | 
             
              ruby: circleci/ruby@2.1
         | 
| 7 | 
            +
              node: circleci/node@5.2
         | 
| 7 8 | 
             
              sonarcloud: sonarsource/sonarcloud@2.0
         | 
| 8 9 | 
             
              asdf: rynkowsg/asdf@0.1
         | 
| 9 10 | 
             
              codecov: codecov/codecov@4.1
         | 
| 10 | 
            -
              gcr: circleci/gcp-gcr@0.16
         | 
| 11 11 | 
             
              github: circleci/github-cli@2.3
         | 
| 12 12 |  | 
| 13 13 | 
             
            # Pipeline parameters
         | 
| @@ -18,7 +18,7 @@ parameters: | |
| 18 18 | 
             
                default: main
         | 
| 19 19 | 
             
              default-ruby:
         | 
| 20 20 | 
             
                type: string
         | 
| 21 | 
            -
                default: "3.3. | 
| 21 | 
            +
                default: "3.3.4"
         | 
| 22 22 |  | 
| 23 23 | 
             
            # Define common YAML anchors
         | 
| 24 24 | 
             
            x-common-auth: &common-auth
         | 
| @@ -43,7 +43,7 @@ jobs: | |
| 43 43 | 
             
                docker:
         | 
| 44 44 | 
             
                  - image: cimg/base:stable
         | 
| 45 45 | 
             
                    <<: *common-auth
         | 
| 46 | 
            -
                resource_class:  | 
| 46 | 
            +
                resource_class: medium
         | 
| 47 47 | 
             
                steps:
         | 
| 48 48 | 
             
                  # Check out code
         | 
| 49 49 | 
             
                  - checkout
         | 
| @@ -78,7 +78,6 @@ jobs: | |
| 78 78 | 
             
                  # The OS to run the jobs on
         | 
| 79 79 | 
             
                  ruby-version:
         | 
| 80 80 | 
             
                    type: string
         | 
| 81 | 
            -
                    default: "3.3.3"
         | 
| 82 81 | 
             
                executor: << parameters.os >>
         | 
| 83 82 | 
             
                environment:
         | 
| 84 83 | 
             
                  RUBY_VERSION: << parameters.ruby-version >>
         | 
| @@ -92,8 +91,9 @@ jobs: | |
| 92 91 | 
             
                            name: Install ImageMagick, libvips and libffi
         | 
| 93 92 | 
             
                            command: |
         | 
| 94 93 | 
             
                              sudo apt-get update
         | 
| 95 | 
            -
                              sudo apt-get -y --no-install-recommends install  | 
| 96 | 
            -
                                libvips42 libffi-dev libreadline-dev  | 
| 94 | 
            +
                              sudo apt-get -y --no-install-recommends install \
         | 
| 95 | 
            +
                                imagemagick libvips42 libffi-dev libreadline-dev \
         | 
| 96 | 
            +
                                libyaml-dev openssl libtool
         | 
| 97 97 | 
             
                        - asdf/install
         | 
| 98 98 | 
             
                  - when:
         | 
| 99 99 | 
             
                      condition:
         | 
| @@ -136,8 +136,12 @@ jobs: | |
| 136 136 | 
             
                  - when:
         | 
| 137 137 | 
             
                      condition:
         | 
| 138 138 | 
             
                        and:
         | 
| 139 | 
            -
                          - equal: | 
| 140 | 
            -
             | 
| 139 | 
            +
                          - equal:
         | 
| 140 | 
            +
                              - "docker"
         | 
| 141 | 
            +
                              - "<< parameters.os >>"
         | 
| 142 | 
            +
                          - equal:
         | 
| 143 | 
            +
                              - "<< pipeline.parameters.default-ruby >>"
         | 
| 144 | 
            +
                              - "<< parameters.ruby-version >>"
         | 
| 141 145 | 
             
                      steps:
         | 
| 142 146 | 
             
                        - persist_to_workspace:
         | 
| 143 147 | 
             
                            root: .
         | 
| @@ -181,19 +185,34 @@ jobs: | |
| 181 185 | 
             
                docker:
         | 
| 182 186 | 
             
                  - image: cimg/base:stable
         | 
| 183 187 | 
             
                    <<: *common-auth
         | 
| 184 | 
            -
                resource_class:  | 
| 188 | 
            +
                resource_class: medium+
         | 
| 185 189 | 
             
                environment:
         | 
| 186 190 | 
             
                  GIT_MAIN_BRANCH: << pipeline.parameters.main-branch >>
         | 
| 187 191 | 
             
                  CHANGELOG_FILENAME: CHANGELOG.md
         | 
| 188 192 | 
             
                steps:
         | 
| 189 | 
            -
                  -  | 
| 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
         | 
| 190 212 | 
             
                  - checkout
         | 
| 191 | 
            -
                  -  | 
| 192 | 
            -
                       | 
| 193 | 
            -
             | 
| 194 | 
            -
                      version: 2.47.0
         | 
| 195 | 
            -
                  - ruby/install:
         | 
| 196 | 
            -
                      version: "<< pipeline.parameters.default-ruby >>"
         | 
| 213 | 
            +
                  - run:
         | 
| 214 | 
            +
                      name: Check out main branch
         | 
| 215 | 
            +
                      command: git checkout --force "${GIT_MAIN_BRANCH}"
         | 
| 197 216 | 
             
                  # Install dependencies using bundler
         | 
| 198 217 | 
             
                  - ruby/install-deps:
         | 
| 199 218 | 
             
                      pre-install-steps:
         | 
| @@ -211,47 +230,58 @@ jobs: | |
| 211 230 | 
             
                        NEXT_PATCH_TAG=$(echo "${CIRCLE_TAG:-0.0.0}" | awk 'BEGIN{FS=OFS="."} {$3+=1} 1')
         | 
| 212 231 | 
             
                        BETA_TAG="${NEXT_PATCH_TAG}.pre"
         | 
| 213 232 | 
             
                        bundle exec rake version["${BETA_TAG}"]
         | 
| 214 | 
            -
             | 
| 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}
         | 
| 233 | 
            +
                        bundle install
         | 
| 229 234 | 
             
                  - run:
         | 
| 230 | 
            -
                      name:  | 
| 235 | 
            +
                      name: Edit Release and generate CHANGELOG.md
         | 
| 231 236 | 
             
                      command: |
         | 
| 232 237 | 
             
                        # Configure git
         | 
| 233 238 | 
             
                        git config --global credential.helper cache
         | 
| 234 239 | 
             
                        git config --global user.email "${GITHUB_USER_EMAIL}"
         | 
| 235 240 | 
             
                        git config --global user.name "${GITHUB_USER_NAME}"
         | 
| 236 241 |  | 
| 237 | 
            -
                        #  | 
| 238 | 
            -
                         | 
| 242 | 
            +
                        # Install GitHub Release Notes
         | 
| 243 | 
            +
                        npm install github-release-notes -g
         | 
| 239 244 |  | 
| 240 | 
            -
                        #  | 
| 241 | 
            -
                         | 
| 242 | 
            -
                           | 
| 243 | 
            -
                           | 
| 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
         | 
| 244 249 |  | 
| 245 | 
            -
                         | 
| 246 | 
            -
                         | 
| 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}
         | 
| 247 277 |  | 
| 248 278 | 
             
                        # Remove Windows line endings
         | 
| 249 279 | 
             
                        sed -i $'s/\r$//' "${CHANGELOG_FILENAME}"
         | 
| 250 280 |  | 
| 251 281 | 
             
                        # Commit changelog and bumped version to git
         | 
| 252 | 
            -
                        git add "${CHANGELOG_FILENAME}"
         | 
| 253 | 
            -
                        git  | 
| 254 | 
            -
             | 
| 282 | 
            +
                        git add "${CHANGELOG_FILENAME}" lib/remove_bg/version.rb Gemfile.lock
         | 
| 283 | 
            +
                        git diff --name-only --cached
         | 
| 284 | 
            +
             | 
| 255 285 | 
             
                        git commit -m "📝 Update ${CHANGELOG_FILENAME} for ${CIRCLE_TAG}" -m "[skip ci]"
         | 
| 256 286 | 
             
                        git push -q --set-upstream origin ${GIT_MAIN_BRANCH}
         | 
| 257 287 |  | 
| @@ -267,7 +297,7 @@ workflows: | |
| 267 297 | 
             
                      matrix:
         | 
| 268 298 | 
             
                        parameters:
         | 
| 269 299 | 
             
                          os: ["docker", "macos"]
         | 
| 270 | 
            -
                          ruby-version: ["3.1.6", "3.2.3", "3.3. | 
| 300 | 
            +
                          ruby-version: ["3.1.6", "3.2.3", "3.3.4"]
         | 
| 271 301 | 
             
                      filters:
         | 
| 272 302 | 
             
                        tags:
         | 
| 273 303 | 
             
                          only: /^\d+\.\d+\.\d+$/
         | 
| @@ -298,6 +328,7 @@ workflows: | |
| 298 328 | 
             
                  - release:
         | 
| 299 329 | 
             
                      context:
         | 
| 300 330 | 
             
                        - DockerHub
         | 
| 331 | 
            +
                        - GitHub
         | 
| 301 332 | 
             
                        - rubygems.org
         | 
| 302 333 | 
             
                        - Google Cloud kaleido
         | 
| 303 334 | 
             
                      requires:
         | 
    
        data/.tool-versions
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            ruby 3.1.6 3.2.3 3.3.4
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -3,10 +3,22 @@ | |
| 3 3 | 
             
            ## 2.0.0
         | 
| 4 4 |  | 
| 5 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
         | 
| 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 7 | 
             
            - Deprecate Faraday < 2, add support for all Faraday 2.x versions
         | 
| 8 8 | 
             
            - Increase default timeout to 20 seconds
         | 
| 9 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 | 
            +
             | 
| 21 | 
            +
             | 
| 10 22 | 
             
            ## 1.5.0
         | 
| 11 23 |  | 
| 12 24 | 
             
            - Auto-detect any available image processing libraries
         | 
| @@ -19,7 +31,7 @@ | |
| 19 31 | 
             
            ## 1.4.0
         | 
| 20 32 |  | 
| 21 33 | 
             
            - Adds support for images up to 25 megapixels ([documentation](https://github.com/remove-bg/ruby#processing-images-over-10-megapixels))
         | 
| 22 | 
            -
             | 
| 34 | 
            +
            - Requires an image processing library to be configured (ImageMagick, GraphicsMagick or libvips)
         | 
| 23 35 |  | 
| 24 36 | 
             
            ## 1.3.0
         | 
| 25 37 |  | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                remove_bg (2.0. | 
| 4 | 
            +
                remove_bg (2.0.1)
         | 
| 5 5 | 
             
                  faraday (>= 2, <= 3)
         | 
| 6 6 | 
             
                  faraday-multipart (~> 1.0)
         | 
| 7 7 | 
             
                  faraday-retry (~> 2.2)
         | 
| @@ -25,8 +25,9 @@ GEM | |
| 25 25 | 
             
                  rexml
         | 
| 26 26 | 
             
                diff-lcs (1.5.1)
         | 
| 27 27 | 
             
                docile (1.4.0)
         | 
| 28 | 
            -
                faraday (2. | 
| 28 | 
            +
                faraday (2.10.0)
         | 
| 29 29 | 
             
                  faraday-net_http (>= 2.0, < 3.2)
         | 
| 30 | 
            +
                  logger
         | 
| 30 31 | 
             
                faraday-multipart (1.0.4)
         | 
| 31 32 | 
             
                  multipart-post (~> 2)
         | 
| 32 33 | 
             
                faraday-net_http (3.1.0)
         | 
| @@ -43,13 +44,14 @@ GEM | |
| 43 44 | 
             
                  ruby-vips (>= 2.0.17, < 3)
         | 
| 44 45 | 
             
                json (2.7.2)
         | 
| 45 46 | 
             
                language_server-protocol (3.17.0.3)
         | 
| 47 | 
            +
                logger (1.6.0)
         | 
| 46 48 | 
             
                method_source (1.1.0)
         | 
| 47 | 
            -
                mini_magick (4.13. | 
| 49 | 
            +
                mini_magick (4.13.2)
         | 
| 48 50 | 
             
                multipart-post (2.4.1)
         | 
| 49 51 | 
             
                net-http (0.4.1)
         | 
| 50 52 | 
             
                  uri
         | 
| 51 53 | 
             
                parallel (1.25.1)
         | 
| 52 | 
            -
                parser (3.3. | 
| 54 | 
            +
                parser (3.3.4.0)
         | 
| 53 55 | 
             
                  ast (~> 2.4.1)
         | 
| 54 56 | 
             
                  racc
         | 
| 55 57 | 
             
                pry (0.14.2)
         | 
| @@ -60,7 +62,7 @@ GEM | |
| 60 62 | 
             
                rainbow (3.1.1)
         | 
| 61 63 | 
             
                rake (13.2.1)
         | 
| 62 64 | 
             
                regexp_parser (2.9.2)
         | 
| 63 | 
            -
                rexml (3.3. | 
| 65 | 
            +
                rexml (3.3.2)
         | 
| 64 66 | 
             
                  strscan
         | 
| 65 67 | 
             
                rspec (3.13.0)
         | 
| 66 68 | 
             
                  rspec-core (~> 3.13.0)
         | 
| @@ -82,13 +84,13 @@ GEM | |
| 82 84 | 
             
                  rspec (~> 3.0)
         | 
| 83 85 | 
             
                rspec_junit_formatter (0.6.0)
         | 
| 84 86 | 
             
                  rspec-core (>= 2, < 4, != 2.12.0)
         | 
| 85 | 
            -
                rubocop (1. | 
| 87 | 
            +
                rubocop (1.65.0)
         | 
| 86 88 | 
             
                  json (~> 2.3)
         | 
| 87 89 | 
             
                  language_server-protocol (>= 3.17.0)
         | 
| 88 90 | 
             
                  parallel (~> 1.10)
         | 
| 89 91 | 
             
                  parser (>= 3.3.0.2)
         | 
| 90 92 | 
             
                  rainbow (>= 2.2.2, < 4.0)
         | 
| 91 | 
            -
                  regexp_parser (>=  | 
| 93 | 
            +
                  regexp_parser (>= 2.4, < 3.0)
         | 
| 92 94 | 
             
                  rexml (>= 3.2.5, < 4.0)
         | 
| 93 95 | 
             
                  rubocop-ast (>= 1.31.1, < 2.0)
         | 
| 94 96 | 
             
                  ruby-progressbar (~> 1.7)
         | 
| @@ -100,7 +102,7 @@ GEM | |
| 100 102 | 
             
                  rubocop-ast (>= 1.31.1, < 2.0)
         | 
| 101 103 | 
             
                rubocop-rake (0.6.0)
         | 
| 102 104 | 
             
                  rubocop (~> 1.0)
         | 
| 103 | 
            -
                rubocop-rspec (3.0. | 
| 105 | 
            +
                rubocop-rspec (3.0.3)
         | 
| 104 106 | 
             
                  rubocop (~> 1.61)
         | 
| 105 107 | 
             
                ruby-progressbar (1.13.0)
         | 
| 106 108 | 
             
                ruby-vips (2.2.1)
         | 
    
        data/README.md
    CHANGED
    
    | @@ -11,7 +11,7 @@ | |
| 11 11 | 
             
            [](https://app.codecov.io/gh/remove-bg/ruby)
         | 
| 12 12 | 
             
            [](https://sonarcloud.io/summary/overall?id=remove-bg_ruby)
         | 
| 13 13 | 
             
            [](https://sonarcloud.io/summary/overall?id=remove-bg_ruby)
         | 
| 14 | 
            -
            ](https://github.com/remove-bg/ruby/network/dependencies)
         | 
| 15 15 |  | 
| 16 16 | 
             
            </p>
         | 
| 17 17 |  | 
    
        data/lib/remove_bg/upload.rb
    CHANGED
    
    | @@ -10,7 +10,7 @@ module RemoveBg | |
| 10 10 | 
             
                  raise RemoveBg::FileMissingError.new(file_path) unless File.exist?(file_path)
         | 
| 11 11 |  | 
| 12 12 | 
             
                  content_type = determine_content_type(file_path)
         | 
| 13 | 
            -
                   | 
| 13 | 
            +
                  Faraday::Multipart::FilePart.new(file_path, content_type)
         | 
| 14 14 | 
             
                end
         | 
| 15 15 |  | 
| 16 16 | 
             
                def self.determine_content_type(file_path)
         | 
| @@ -23,10 +23,5 @@ module RemoveBg | |
| 23 23 | 
             
                end
         | 
| 24 24 |  | 
| 25 25 | 
             
                private_class_method :determine_content_type
         | 
| 26 | 
            -
             | 
| 27 | 
            -
                FARADAY_FILE = File
         | 
| 28 | 
            -
                FARADAY_FILE = Faraday::Multipart::FilePart if defined?(Faraday::Multipart::FilePart)
         | 
| 29 | 
            -
             | 
| 30 | 
            -
                private_constant :FARADAY_FILE
         | 
| 31 26 | 
             
              end
         | 
| 32 27 | 
             
            end
         | 
    
        data/lib/remove_bg/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: remove_bg
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0. | 
| 4 | 
            +
              version: 2.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Canva Austria GmbH
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024-07- | 
| 11 | 
            +
            date: 2024-07-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: faraday
         | 
| @@ -373,6 +373,7 @@ files: | |
| 373 373 | 
             
            - ".grenrc.json"
         | 
| 374 374 | 
             
            - ".rspec"
         | 
| 375 375 | 
             
            - ".rubocop.yml"
         | 
| 376 | 
            +
            - ".tool-versions"
         | 
| 376 377 | 
             
            - Appraisals
         | 
| 377 378 | 
             
            - CHANGELOG.md
         | 
| 378 379 | 
             
            - Gemfile
         |