remove_bg 1.4.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
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
data/Gemfile.lock CHANGED
@@ -1,89 +1,159 @@
1
- GIT
2
- remote: https://github.com/thoughtbot/appraisal.git
3
- revision: 586864393e405a67b1457b563a4d5adc99e50e2d
4
- ref: 5868643
5
- specs:
6
- appraisal (2.2.0)
7
- bundler
8
- rake
9
- thor (>= 0.14.0)
10
-
11
1
  PATH
12
2
  remote: .
13
3
  specs:
14
- remove_bg (1.4.1)
15
- faraday (>= 0.15, < 2)
16
- image_processing (>= 1.9, < 2)
4
+ remove_bg (2.0.0)
5
+ faraday (>= 2, <= 3)
6
+ faraday-multipart (~> 1.0)
7
+ faraday-retry (~> 2.2)
8
+ image_processing (~> 1.12)
17
9
  rubyzip (>= 2.0, < 3)
18
10
 
19
11
  GEM
20
12
  remote: https://rubygems.org/
21
13
  specs:
22
- addressable (2.7.0)
23
- public_suffix (>= 2.0.2, < 5.0)
24
- coderay (1.1.2)
25
- crack (0.4.3)
26
- safe_yaml (~> 1.0.0)
27
- diff-lcs (1.3)
28
- dotenv (2.7.5)
29
- faraday (1.0.1)
30
- multipart-post (>= 1.2, < 3)
31
- ffi (1.12.2)
32
- hashdiff (1.0.1)
33
- image_processing (1.11.0)
14
+ addressable (2.8.7)
15
+ public_suffix (>= 2.0.2, < 7.0)
16
+ appraisal (2.5.0)
17
+ bundler
18
+ rake
19
+ thor (>= 0.14.0)
20
+ ast (2.4.2)
21
+ bigdecimal (3.1.8)
22
+ coderay (1.1.3)
23
+ crack (1.0.0)
24
+ bigdecimal
25
+ rexml
26
+ diff-lcs (1.5.1)
27
+ docile (1.4.0)
28
+ faraday (2.9.2)
29
+ faraday-net_http (>= 2.0, < 3.2)
30
+ faraday-multipart (1.0.4)
31
+ multipart-post (~> 2)
32
+ faraday-net_http (3.1.0)
33
+ net-http
34
+ faraday-retry (2.2.1)
35
+ faraday (~> 2.0)
36
+ ffi (1.17.0)
37
+ ffi (1.17.0-arm64-darwin)
38
+ ffi (1.17.0-x86_64-linux-gnu)
39
+ hashdiff (1.1.0)
40
+ htmlentities (4.3.4)
41
+ image_processing (1.12.2)
34
42
  mini_magick (>= 4.9.5, < 5)
35
43
  ruby-vips (>= 2.0.17, < 3)
36
- method_source (1.0.0)
37
- mini_magick (4.10.1)
38
- multipart-post (2.1.1)
39
- pry (0.13.1)
44
+ json (2.7.2)
45
+ language_server-protocol (3.17.0.3)
46
+ method_source (1.1.0)
47
+ mini_magick (4.13.1)
48
+ multipart-post (2.4.1)
49
+ net-http (0.4.1)
50
+ uri
51
+ parallel (1.25.1)
52
+ parser (3.3.3.0)
53
+ ast (~> 2.4.1)
54
+ racc
55
+ pry (0.14.2)
40
56
  coderay (~> 1.1)
41
57
  method_source (~> 1.0)
42
- public_suffix (4.0.4)
43
- rake (13.0.1)
44
- rspec (3.9.0)
45
- rspec-core (~> 3.9.0)
46
- rspec-expectations (~> 3.9.0)
47
- rspec-mocks (~> 3.9.0)
48
- rspec-core (3.9.2)
49
- rspec-support (~> 3.9.3)
50
- rspec-expectations (3.9.1)
58
+ public_suffix (6.0.0)
59
+ racc (1.8.0)
60
+ rainbow (3.1.1)
61
+ rake (13.2.1)
62
+ regexp_parser (2.9.2)
63
+ rexml (3.3.1)
64
+ strscan
65
+ rspec (3.13.0)
66
+ rspec-core (~> 3.13.0)
67
+ rspec-expectations (~> 3.13.0)
68
+ rspec-mocks (~> 3.13.0)
69
+ rspec-core (3.13.0)
70
+ rspec-support (~> 3.13.0)
71
+ rspec-expectations (3.13.1)
51
72
  diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.9.0)
53
- rspec-mocks (3.9.1)
73
+ rspec-support (~> 3.13.0)
74
+ rspec-mocks (3.13.1)
54
75
  diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.9.0)
56
- rspec-support (3.9.3)
57
- rspec-with_params (0.2.0)
76
+ rspec-support (~> 3.13.0)
77
+ rspec-sonarqube-formatter (1.5.0)
78
+ htmlentities (~> 4.3.3)
79
+ rspec (~> 3.0)
80
+ rspec-support (3.13.1)
81
+ rspec-with_params (0.3.0)
58
82
  rspec (~> 3.0)
59
- rspec_junit_formatter (0.4.1)
83
+ rspec_junit_formatter (0.6.0)
60
84
  rspec-core (>= 2, < 4, != 2.12.0)
61
- ruby-vips (2.0.17)
62
- ffi (~> 1.9)
63
- rubyzip (2.3.0)
64
- safe_yaml (1.0.5)
65
- thor (1.0.1)
66
- vcr (5.1.0)
67
- webmock (3.8.3)
68
- addressable (>= 2.3.6)
85
+ rubocop (1.64.1)
86
+ json (~> 2.3)
87
+ language_server-protocol (>= 3.17.0)
88
+ parallel (~> 1.10)
89
+ parser (>= 3.3.0.2)
90
+ rainbow (>= 2.2.2, < 4.0)
91
+ regexp_parser (>= 1.8, < 3.0)
92
+ rexml (>= 3.2.5, < 4.0)
93
+ rubocop-ast (>= 1.31.1, < 2.0)
94
+ ruby-progressbar (~> 1.7)
95
+ unicode-display_width (>= 2.4.0, < 3.0)
96
+ rubocop-ast (1.31.3)
97
+ parser (>= 3.3.1.0)
98
+ rubocop-performance (1.21.1)
99
+ rubocop (>= 1.48.1, < 2.0)
100
+ rubocop-ast (>= 1.31.1, < 2.0)
101
+ rubocop-rake (0.6.0)
102
+ rubocop (~> 1.0)
103
+ rubocop-rspec (3.0.2)
104
+ rubocop (~> 1.61)
105
+ ruby-progressbar (1.13.0)
106
+ ruby-vips (2.2.1)
107
+ ffi (~> 1.12)
108
+ rubyzip (2.3.2)
109
+ simplecov (0.22.0)
110
+ docile (~> 1.1)
111
+ simplecov-html (~> 0.11)
112
+ simplecov_json_formatter (~> 0.1)
113
+ simplecov-cobertura (2.1.0)
114
+ rexml
115
+ simplecov (~> 0.19)
116
+ simplecov-html (0.12.3)
117
+ simplecov_json_formatter (0.1.4)
118
+ strscan (3.1.0)
119
+ thor (1.3.1)
120
+ unicode-display_width (2.5.0)
121
+ uri (0.13.0)
122
+ vcr (6.2.0)
123
+ vcr_better_binary (0.2.0)
124
+ vcr (>= 5.0)
125
+ webmock (3.23.1)
126
+ addressable (>= 2.8.0)
69
127
  crack (>= 0.3.2)
70
128
  hashdiff (>= 0.4.0, < 2.0.0)
129
+ yard (0.9.36)
71
130
 
72
131
  PLATFORMS
132
+ arm64-darwin-22
73
133
  ruby
134
+ x86_64-linux
74
135
 
75
136
  DEPENDENCIES
76
- appraisal!
137
+ appraisal (~> 2.5)
77
138
  bundler (~> 2.0)
78
- dotenv
79
- pry
80
- rake
139
+ pry (~> 0.14)
140
+ rake (~> 13.2)
81
141
  remove_bg!
82
- rspec (~> 3.8)
83
- rspec-with_params
84
- rspec_junit_formatter
85
- vcr
86
- webmock
142
+ rspec (~> 3.13)
143
+ rspec-sonarqube-formatter (~> 1.5)
144
+ rspec-with_params (~> 0.3)
145
+ rspec_junit_formatter (~> 0.6)
146
+ rubocop (~> 1.64)
147
+ rubocop-performance (~> 1.21)
148
+ rubocop-rake (~> 0.6)
149
+ rubocop-rspec (~> 3.0)
150
+ simplecov (~> 0.22)
151
+ simplecov-cobertura (~> 2.1)
152
+ simplecov_json_formatter (~> 0.1)
153
+ vcr (~> 6.2)
154
+ vcr_better_binary (~> 0.2)
155
+ webmock (~> 3.23)
156
+ yard (~> 0.9)
87
157
 
88
158
  BUNDLED WITH
89
- 2.1.4
159
+ 2.4.19
data/LICENSE.md ADDED
@@ -0,0 +1,25 @@
1
+ The MIT License (MIT)
2
+ =====================
3
+
4
+ Copyright © 2019–2024 Canva Austria GmbH
5
+
6
+ Permission is hereby granted, free of charge, to any person
7
+ obtaining a copy of this software and associated documentation
8
+ files (the “Software”), to deal in the Software without
9
+ restriction, including without limitation the rights to use,
10
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the
12
+ Software is furnished to do so, subject to the following
13
+ conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
+ OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,17 +1,77 @@
1
- [![RemoveBG](resources/logo_black.png)](https://www.remove.bg/)
1
+ [![RemoveBG](resources/removebgByCanva.svg)](https://www.remove.bg/)
2
2
 
3
- # Ruby library
3
+ # remove.bg Ruby Gem
4
4
 
5
- [![CircleCI](https://circleci.com/gh/remove-bg/ruby/tree/master.svg?style=shield)](https://circleci.com/gh/remove-bg/ruby/tree/master) [![Gem Version](https://badge.fury.io/rb/remove_bg.svg)](https://rubygems.org/gems/remove_bg)
5
+ <p align="center">
6
6
 
7
- ## Installation
7
+ [![Gem Version](https://img.shields.io/gem/v/remove_bg?style=for-the-badge&logo=rubygems&logoColor=aaa&color=367cd3)](https://rubygems.org/gems/remove_bg)
8
+ [![Gem Total Downloads](https://img.shields.io/gem/dt/remove_bg?style=for-the-badge&logo=ruby&logoColor=aaa&color=367cd3)](https://rubygems.org/gems/remove_bg)
9
+ [![CircleCI](https://img.shields.io/circleci/build/github/remove-bg/ruby?style=for-the-badge&logo=circleci&logoColor=aaa)](https://circleci.com/gh/remove-bg/ruby/tree/main)
10
+ [![GitHub License](https://img.shields.io/github/license/remove-bg/ruby?style=for-the-badge&logo=readthedocs&logoColor=aaa)](https://github.com/remove-bg/ruby/blob/main/LICENSE.md)
11
+ [![Codecov](https://img.shields.io/codecov/c/github/remove-bg/ruby?style=for-the-badge&logo=codecov&logoColor=aaa)](https://app.codecov.io/gh/remove-bg/ruby)
12
+ [![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/remove-bg_ruby?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonarcloud&logoColor=aaa)](https://sonarcloud.io/summary/overall?id=remove-bg_ruby)
13
+ [![Violations](https://img.shields.io/sonar/violations/remove-bg_ruby?server=https%3A%2F%2Fsonarcloud.io&format=short&style=for-the-badge&logo=sonarcloud&logoColor=aaa)](https://sonarcloud.io/summary/overall?id=remove-bg_ruby)
14
+ ![Depfu](https://img.shields.io/depfu/dependencies/github/remove-bg%2Fruby?style=for-the-badge&logo=dependabot&logoColor=aaa)
8
15
 
9
- - Add `gem "remove_bg"` to your application's Gemfile and then execute `bundle`.
10
- - Or install it yourself as: `gem install remove_bg`
16
+ </p>
11
17
 
12
- ## Usage
18
+ ## Requirements
13
19
 
14
- ### Configuring an API key
20
+ This gem is compatible with Ruby 3.1+ and can be used with
21
+ [Faraday](https://rubygems.org/gems/faraday/) version 2 and above
22
+
23
+ An API key (free) from [remove.bg](https://www.remove.bg/api) is required.
24
+
25
+ ## Quickstart Installation
26
+
27
+ Add the gem to your `Gemfile` and run `bundle install`:
28
+
29
+ ```ruby
30
+ gem "remove_bg"
31
+ ```
32
+
33
+ Or run `gem install remove_bg` to install globally.
34
+
35
+ Please note the base configuration has the following resolution limits:
36
+
37
+ | Output format | Resolution limit |
38
+ |---------------|------------------|
39
+ | PNG | 10 megapixels |
40
+ | JPG | 50 megapixels |
41
+
42
+ ## Full installation
43
+
44
+ For best performance and quality the gem requires an image processing library.
45
+ Please install one of the following libraries:
46
+
47
+ - [ImageMagick](https://www.imagemagick.org/)
48
+ - [GraphicsMagick](http://www.graphicsmagick.org/)
49
+ - [libvips](http://libvips.github.io/libvips/)
50
+
51
+ The gem will auto-detect any image processing libraries present. However, you can
52
+ also explicitly configure which library to use:
53
+
54
+ ```ruby
55
+ RemoveBg.configure do |config|
56
+ config.image_processor = :minimagick # For ImageMagick or GraphicsMagick
57
+ # or
58
+ config.image_processor = :vips
59
+ end
60
+ ```
61
+
62
+ The full installation has the following resolution limits:
63
+
64
+ | Output format | Resolution limit |
65
+ |---------------|------------------|
66
+ | PNG | 10 megapixels |
67
+ | JPG | 50 megapixels |
68
+ | ZIP | 50 megapixels |
69
+
70
+ # Usage
71
+
72
+ For more in-depth documentation please see [RubyDoc](https://www.rubydoc.info/gems/remove_bg)
73
+
74
+ ## Configuring an API key
15
75
 
16
76
  To configure a global API key (used by default unless overridden per request):
17
77
 
@@ -25,7 +85,7 @@ It's not recommended to commit your API key to version control. You may want to
25
85
  read the API key from an environment variable (e.g.
26
86
  `ENV.fetch("REMOVE_BG_API_KEY")`) or find an alternative method.
27
87
 
28
- ### Removing the background from an image
88
+ ## Removing the background from an image
29
89
 
30
90
  Currently the gem supports removing the background from a file or a URL:
31
91
 
@@ -34,7 +94,7 @@ RemoveBg.from_file("image.png")
34
94
  RemoveBg.from_url("http://example.com/image.png")
35
95
  ```
36
96
 
37
- #### Request options
97
+ ## Request options
38
98
 
39
99
  The processing options outlined in the [API reference](https://www.remove.bg/api)
40
100
  can be specified per request:
@@ -49,7 +109,7 @@ The API key can also be specified per request:
49
109
  RemoveBg.from_file("image.png", api_key: "<api-key>")
50
110
  ```
51
111
 
52
- #### Handling the result
112
+ ## Handling the result
53
113
 
54
114
  Background removal requests return a result object which includes the processed
55
115
  image data and the metadata about the operation.
@@ -66,33 +126,17 @@ There's also a `#save` convenience method:
66
126
 
67
127
  ```ruby
68
128
  result.save("processed/image.png")
69
- result.save("image.png", overwrite: true) # Careful!
129
+ # Overwrite any existing file
130
+ result.save!("processed/image.png")
70
131
  ```
71
132
 
72
- #### Processing images over 10 megapixels
73
-
74
- The Remove.bg API provides a [ZIP format](https://www.remove.bg/api#zip-format)
75
- which includes all the information required to efficiently composite a large
76
- image with transparency.
77
-
78
- The gem can handle this composition for you, but you'll need
79
- [ImageMagick]/[GraphicsMagick] or [libvips] available on your computer.
133
+ ## Producing transparent images over 10 megapixels
80
134
 
81
- [ImageMagick]: https://www.imagemagick.org
82
- [GraphicsMagick]: http://www.graphicsmagick.org
83
- [libvips]: http://libvips.github.io/libvips/
135
+ After configuring a full installation (detailed above) you can process images
136
+ over 10 megapixels with a transparent output.
84
137
 
85
- Please configure the image processing library you'd like to use:
86
-
87
- ```ruby
88
- RemoveBg.configure do |config|
89
- config.image_processor = :minimagick # For ImageMagick or GraphicsMagick
90
- # or
91
- config.image_processor = :vips
92
- end
93
- ```
94
-
95
- Then process images specifying the `zip` format:
138
+ Process images with either the `png` or `zip` format. If you specify the `zip`
139
+ format it's possible to save the archive and handle composition yourself.
96
140
 
97
141
  ```ruby
98
142
  result = RemoveBg.from_file("large-image.jpg", format: "zip")
@@ -102,7 +146,7 @@ result.save("result-with-transparency.png")
102
146
  result.save_zip("result.zip") # If you want to handle composition yourself
103
147
  ```
104
148
 
105
- #### Rate limits
149
+ ## Rate limits
106
150
 
107
151
  The [API has rate limits][rate-limits]. Image processing results include the
108
152
  rate limit information:
@@ -118,7 +162,7 @@ raised. This also contains further information via the `#rate_limit` method.
118
162
 
119
163
  [rate-limits]: https://www.remove.bg/api#rate-limit
120
164
 
121
- ### Fetching account information
165
+ ## Fetching account information
122
166
 
123
167
  To display the [account information][account-info] for the currently configured
124
168
  API key:
@@ -150,11 +194,22 @@ Bug reports and pull requests are welcome on GitHub at [remove-bg/ruby](https://
150
194
 
151
195
  ## Development
152
196
 
197
+ ### Setup
198
+
153
199
  After checking out the repo, run `bin/setup` to install dependencies. Then, run
154
200
  `rake spec` to run the tests.
155
201
 
156
- To install this gem onto your local machine, run `bundle exec rake install`. To
157
- release a new version, update the version number in `version.rb`, and then run
202
+ ### Releasing a new version
203
+ To release a new version, update the version number in `version.rb`, and then run
158
204
  `bundle exec rake release`, which will create a git tag for the version, push
159
205
  git commits and tags, and push the `.gem` file to
160
206
  [rubygems.org](https://rubygems.org).
207
+
208
+ ### Documentation
209
+
210
+ To preview the [YARD documentation](https://yardoc.org/) locally run:
211
+
212
+ ```
213
+ bundle exec yard server --reload
214
+ open http://localhost:8808/
215
+ ```
data/Rakefile CHANGED
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
8
+ Dir.glob("tasks/*.rake").each { |r| import r }
9
+
6
10
  task default: :spec
data/SECURITY.md ADDED
@@ -0,0 +1,36 @@
1
+ # Security Policy
2
+
3
+ We take the security of our software products and services seriously, including all of
4
+ the open source code repositories managed through our organization.
5
+
6
+ ## Supported Versions
7
+
8
+ We currently support these versions of this library with security updates.
9
+
10
+ | Version | Supported |
11
+ | -------- | ------------------ |
12
+ | `2.x.x` | :white_check_mark: |
13
+ | `<= 1.5` | :x: |
14
+
15
+ ## Reporting a Vulnerability
16
+
17
+ If you believe you have found a security vulnerability in this repository, please report
18
+ it to us through coordinated disclosure.
19
+
20
+ Please do not report security vulnerabilities through public GitHub issues, discussions,
21
+ or pull requests.
22
+
23
+ Instead, please contact us at https://www.remove.bg/support/contact
24
+
25
+ Please include as much of the information listed below as you can to help us better
26
+ understand and resolve the issue:
27
+
28
+ - The type of issue (e.g., buffer overflow, issue in a dependency,...)
29
+ - Full paths of source file(s) related to the manifestation of the issue
30
+ - The location of the affected source code (tag/branch/commit or direct URL)
31
+ - Any special configuration required to reproduce the issue
32
+ - Step-by-step instructions to reproduce the issue
33
+ - Proof-of-concept or exploit code (if possible)
34
+ - Impact of the issue, including how an attacker might exploit the issue
35
+
36
+ This information will help us triage your report more quickly.
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.0.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.2.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.3.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.4.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.5.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.6.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.7.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.8.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2.9.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faraday", "~> 2", "< 3"
6
+
7
+ gemspec path: "../"
@@ -1,6 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RemoveBg
2
4
  class AccountInfo
3
- attr_reader :api, :credits
5
+ # @return [RemoveBg::AccountInfo::ApiInfo]
6
+ attr_reader :api
7
+
8
+ # @return [RemoveBg::AccountInfo::CreditsInfo]
9
+ attr_reader :credits
4
10
 
5
11
  def initialize(attributes)
6
12
  @api = ApiInfo.new(**attributes.fetch(:api))
data/lib/remove_bg/api.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RemoveBg
2
4
  module Api
3
5
  URL = "https://api.remove.bg"