Skip to content

Commit a966137

Browse files
feat(api): update gem name
1 parent f99f77c commit a966137

File tree

658 files changed

+15389
-15132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

658 files changed

+15389
-15132
lines changed

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Layout/LineLength:
4040
AllowedPatterns:
4141
- "^\\s*#.*$"
4242
- ^require(_relative)?
43-
- "Imagekit::Internal::Type::BaseModel$"
43+
- "Imagekitio::Internal::Type::BaseModel$"
4444
- "^\\s*[A-Z0-9_]+ = :"
45-
- "Imagekit::(Models|Resources|Test)::"
45+
- "Imagekitio::(Models|Resources|Test)::"
4646
Max: 110
4747

4848
Layout/MultilineArrayLineBreaks:

.solargraph.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include:
55
- 'Rakefile'
66
- 'examples/**/*.rb'
77
- 'lib/**/*.rb'
8-
- 'test/imagekit/resource_namespaces.rb'
9-
- 'test/imagekit/test_helper.rb'
8+
- 'test/imagekitio/resource_namespaces.rb'
9+
- 'test/imagekitio/test_helper.rb'
1010
exclude:
1111
- 'rbi/**/*'

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-9d184cb502ab32a85db2889c796cdfebe812f2a55a604df79c85dd4b5e7e2add.yml
33
openapi_spec_hash: a9aa620376fce66532c84f9364209b0b
4-
config_hash: c2c1c0a5c85d678e5aa8996f3637b616
4+
config_hash: eb4cf65a4c6b26a2901076eff5810d5d

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This will install all the required dependencies.
1414

1515
## Modifying/Adding code
1616

17-
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of `lib/imagekit/helpers/` and `examples/` directory.
17+
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of `lib/imagekitio/helpers/` and `examples/` directory.
1818

1919
## Adding and running examples
2020

@@ -24,7 +24,7 @@ All files in the `examples/` directory are not modified by the generator and can
2424
#!/usr/bin/env ruby
2525
# frozen_string_literal: true
2626

27-
require_relative "../lib/imagekit"
27+
require_relative "../lib/imagekitio"
2828

2929
# ...
3030
```
@@ -43,7 +43,7 @@ If you’d like to use the repository from source, you can either install from g
4343
To install via git in your `Gemfile`:
4444

4545
```ruby
46-
gem "imagekit", git: "https://www.github.com/imagekit-developer/imagekit-ruby"
46+
gem "imagekitio", git: "https://www.github.com/imagekit-developer/imagekit-ruby"
4747
```
4848

4949
Alternatively, reference local copy of the repo:
@@ -53,7 +53,7 @@ $ git clone -- 'https://www.github.com/imagekit-developer/imagekit-ruby' '<path-
5353
```
5454

5555
```ruby
56-
gem "imagekit", path: "<path-to-repo>"
56+
gem "imagekitio", path: "<path-to-repo>"
5757
```
5858

5959
## Running commands

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
imagekit (0.0.1)
14+
imagekitio (0.0.1)
1515
connection_pool
1616

1717
GEM
@@ -203,7 +203,7 @@ PLATFORMS
203203

204204
DEPENDENCIES
205205
async
206-
imagekit!
206+
imagekitio!
207207
minitest
208208
minitest-focus
209209
minitest-hooks

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The Image Kit Ruby library provides convenient access to the Image Kit REST API
3434

3535
## Documentation
3636

37-
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/imagekit).
37+
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/imagekitio).
3838

3939
The REST API documentation can be found on [imagekit.io](https://imagekit.io/docs/api-reference).
4040

@@ -45,7 +45,7 @@ To use this gem, install via Bundler by adding the following to your application
4545
<!-- x-release-please-start-version -->
4646

4747
```ruby
48-
gem "imagekit", "~> 0.0.1"
48+
gem "imagekitio", "~> 0.0.1"
4949
```
5050

5151
<!-- x-release-please-end -->
@@ -54,10 +54,10 @@ gem "imagekit", "~> 0.0.1"
5454

5555
```ruby
5656
require "bundler/setup"
57-
require "imagekit"
57+
require "imagekitio"
5858

59-
image_kit = Imagekit::Client.new(
60-
private_key: ENV["IMAGEKIT_PRIVATE_KEY"] # This is the default and can be omitted
59+
image_kit = Imagekitio::Client.new(
60+
private_key: ENV["IMAGEKIT_PRIVATE_KEY"], # This is the default and can be omitted
6161
)
6262

6363
response = image_kit.files.upload(
@@ -81,8 +81,8 @@ response = image_kit.files.upload(file: Pathname("/path/to/file"))
8181
# Or pass file contents directly
8282
response = image_kit.files.upload(file: File.read("/path/to/file"))
8383

84-
# Or control filename and content type with FilePart:
85-
file = Imagekit::FilePart.new(File.read("/path/to/file"), filename: "custom.jpg", content_type: "image/jpeg")
84+
# Or, to control the filename and/or content type:
85+
file = Imagekitio::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "")
8686
response = image_kit.files.upload(file: file)
8787

8888
puts(response.file_id)
@@ -528,20 +528,20 @@ attrs = image_kit.helper.get_responsive_image_attributes({
528528

529529
### Handling errors
530530

531-
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Imagekit::Errors::APIError` will be thrown:
531+
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Imagekitio::Errors::APIError` will be thrown:
532532

533533
```ruby
534534
begin
535535
file = image_kit.files.upload(
536536
file: File.read("/path/to/file.jpg"),
537537
file_name: "file-name.jpg"
538538
)
539-
rescue Imagekit::Errors::APIConnectionError => e
539+
rescue Imagekitio::Errors::APIConnectionError => e
540540
puts("The server could not be reached")
541541
puts(e.cause) # an underlying Exception, likely raised within `net/http`
542-
rescue Imagekit::Errors::RateLimitError => e
542+
rescue Imagekitio::Errors::RateLimitError => e
543543
puts("A 429 status code was received; we should back off a bit.")
544-
rescue Imagekit::Errors::APIStatusError => e
544+
rescue Imagekitio::Errors::APIStatusError => e
545545
puts("Another non-200-range status code was received")
546546
puts(e.status)
547547
end
@@ -573,7 +573,7 @@ You can use the `max_retries` option to configure or disable this:
573573

574574
```ruby
575575
# Configure the default for all requests:
576-
image_kit = Imagekit::Client.new(
576+
image_kit = Imagekitio::Client.new(
577577
max_retries: 0 # default is 2
578578
)
579579

@@ -591,7 +591,7 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
591591

592592
```ruby
593593
# Configure the default for all requests:
594-
image_kit = Imagekit::Client.new(
594+
image_kit = Imagekitio::Client.new(
595595
timeout: nil # default is 60
596596
)
597597

@@ -603,15 +603,15 @@ image_kit.files.upload(
603603
)
604604
```
605605

606-
On timeout, `Imagekit::Errors::APITimeoutError` is raised.
606+
On timeout, `Imagekitio::Errors::APITimeoutError` is raised.
607607

608608
Note that requests that time out are retried by default.
609609

610610
## Advanced concepts
611611

612612
### BaseModel
613613

614-
All parameter and response objects inherit from `Imagekit::Internal::Type::BaseModel`, which provides several conveniences, including:
614+
All parameter and response objects inherit from `Imagekitio::Internal::Type::BaseModel`, which provides several conveniences, including:
615615

616616
1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.
617617

@@ -664,9 +664,9 @@ response = client.request(
664664

665665
### Concurrency & connection pooling
666666

667-
The `Imagekit::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
667+
The `Imagekitio::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
668668

669-
Each instance of `Imagekit::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
669+
Each instance of `Imagekitio::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
670670

671671
When all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.
672672

@@ -695,7 +695,7 @@ image_kit.files.upload(
695695
)
696696

697697
# You can also splat a full Params class:
698-
params = Imagekit::FileUploadParams.new(
698+
params = Imagekitio::FileUploadParams.new(
699699
file: File.read("/path/to/file.jpg"),
700700
file_name: "file-name.jpg"
701701
)
@@ -708,18 +708,18 @@ Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::E
708708

709709
```ruby
710710
# :all
711-
puts(Imagekit::AssetListParams::FileType::ALL)
711+
puts(Imagekitio::AssetListParams::FileType::ALL)
712712

713-
# Revealed type: `T.all(Imagekit::AssetListParams::FileType, Symbol)`
714-
T.reveal_type(Imagekit::AssetListParams::FileType::ALL)
713+
# Revealed type: `T.all(Imagekitio::AssetListParams::FileType, Symbol)`
714+
T.reveal_type(Imagekitio::AssetListParams::FileType::ALL)
715715
```
716716

717717
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
718718

719719
```ruby
720720
# Using the enum constants preserves the tagged type information:
721721
image_kit.assets.list(
722-
file_type: Imagekit::AssetListParams::FileType::ALL,
722+
file_type: Imagekitio::AssetListParams::FileType::ALL,
723723
#
724724
)
725725

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ multitask(:"build:gem") do
162162
sig/*
163163
GLOB
164164

165-
sh(*%w[gem build -- imagekit.gemspec])
165+
sh(*%w[gem build -- imagekitio.gemspec])
166166
rm_rf(ignore_file)
167167
end
168168

imagekit.gemspec renamed to imagekitio.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# frozen_string_literal: true
22

3-
require_relative "lib/imagekit/version"
3+
require_relative "lib/imagekitio/version"
44

55
Gem::Specification.new do |s|
6-
s.name = "imagekit"
7-
s.version = Imagekit::VERSION
6+
s.name = "imagekitio"
7+
s.version = Imagekitio::VERSION
88
s.summary = "Ruby library to access the Image Kit API"
99
s.authors = ["Image Kit"]
1010
s.email = "[email protected]"
11-
s.homepage = "https://gemdocs.org/gems/imagekit"
11+
s.homepage = "https://gemdocs.org/gems/imagekitio"
1212
s.metadata["homepage_uri"] = s.homepage
1313
s.metadata["source_code_uri"] = "https://github.com/imagekit-developer/imagekit-ruby"
1414
s.metadata["rubygems_mfa_required"] = false.to_s

0 commit comments

Comments
 (0)