source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/application_controller.rb
Ruby
mit
19
master
536
# This class defines class to control application class ApplicationController < ActionController::API # protect_from_forgery with: :exception include Response include ExceptionHandler before_action :authorize_request attr_reader :current_user def set_default_request_format request.format = :json end...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/api/v1/profiles_controller.rb
Ruby
mit
19
master
654
class Api::V1::ProfilesController < ApplicationController # application_controller.rb contains before action for all controllers # these are :authorize_request, and defines current user. # GET /profile/ def show @current_user = current_user end # PUT /profile/ def update @current_user = current_...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/api/v1/wishes_controller.rb
Ruby
mit
19
master
1,983
require 'uri' # require 'pry' class Api::V1::WishesController < ApplicationController before_action :set_api_user before_action :set_api_user_wish, only: %i[show update destroy] # GET /api_users/:api_user_id/wishes def index @wishes = @api_user.wishes.includes(:programminglanguage, :meetinginterval) @w...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/api/v1/experiences_controller.rb
Ruby
mit
19
master
2,111
require 'uri' class Api::V1::ExperiencesController < ApplicationController before_action :set_api_user before_action :set_api_user_experience, only: %i[show update destroy] # GET /api_users/:api_user_id/experiences def index @experiences = @api_user.experiences.includes(:programminglanguage, :meetinginter...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/api/v1/api_users_controller.rb
Ruby
mit
19
master
1,251
class Api::V1::ApiUsersController < ApplicationController skip_before_action :authorize_request, only: [:create] # GET /api_users def index @api_users = ApiUser.includes(wishes: %i[programminglanguage meetinginterval], experiences: %i[programminglanguage meetinginterval]).al...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/api/v1/meetingintervals_controller.rb
Ruby
mit
19
master
905
class Api::V1::MeetingintervalsController < ApplicationController before_action :set_meetinginterval, only: %i[show update destroy] # GET /meetingintervals def index @meetingintervals = Meetinginterval.all json_response(@meetingintervals) end # POST /meetingintervals def create @meetinginterva...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/api/v1/programminglanguages_controller.rb
Ruby
mit
19
master
1,013
class Api::V1::ProgramminglanguagesController < ApplicationController before_action :set_programminglanguage, only: %i[show update destroy] # GET /programminglanguages def index @programminglanguages = Programminglanguage.all json_response(@programminglanguages) end # POST /programminglanguages de...
github
RailsGirlsCPH/mentor-mentee-platform
https://github.com/RailsGirlsCPH/mentor-mentee-platform
server/app/controllers/concerns/exception_handler.rb
Ruby
mit
19
master
1,353
module ExceptionHandler extend ActiveSupport::Concern # Define custom error subclasses - rescue catches `StandardErrors` class AuthenticationError < StandardError; end class MissingToken < StandardError; end class InvalidToken < StandardError; end included do rescue_from ActiveRecord::RecordInvalid,...
github
stevenleeg/harvest-touchbar
https://github.com/stevenleeg/harvest-touchbar
harvest.rb
Ruby
mit
19
master
2,629
require 'http' require 'date' require 'json' require 'yaml' # Create new token on harvest dev account to get your credentials ROOT_PATH = File.expand_path(File.dirname(__FILE__)) CONFIG = YAML.load_file(File.join(ROOT_PATH, 'config.yml')) def generate_request HTTP.headers({ 'Authorization' => "Bearer #{CONFIG[...
github
altivi/lz_string
https://github.com/altivi/lz_string
Rakefile
Ruby
mit
19
master
244
require "rubygems" require "bundler" Bundler.setup(:default, :development) require "rspec/core" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList["spec/**/*_spec.rb"] end task default: :spec
github
altivi/lz_string
https://github.com/altivi/lz_string
lz_string.gemspec
Ruby
mit
19
master
817
require File.expand_path("../lib/lz_string/version", __FILE__) Gem::Specification.new do |s| s.name = "lz_string" s.version = LZString::VERSION s.licenses = ["MIT"] s.authors = ["Altivi"] s.email = ["altivi.prog@gmail.com"] s.homepage = "https://github.com/Altivi/lz-string" s.s...
github
altivi/lz_string
https://github.com/altivi/lz_string
lib/lz_string.rb
Ruby
mit
19
master
607
require "lz_string/base" require "lz_string/base64" require "lz_string/utf16" require "lz_string/urisafe" require "lz_string/version" # LZ-based compression algorithm. module LZString # @param input [String] def self.compress(input) return "" if input.nil? LZString::Base.compress(input, 16, lambda { |a| a...
github
altivi/lz_string
https://github.com/altivi/lz_string
lib/lz_string/urisafe.rb
Ruby
mit
19
master
1,100
module LZString class UriSafe # Base64 alphabet. KEY_STR_URISAFE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$" # @param input [String] def self.compress(input) return "" if input.nil? LZString::Base.compress(input, 6, lambda { |a| KEY_STR_URISAFE[a] }) end ...
github
altivi/lz_string
https://github.com/altivi/lz_string
lib/lz_string/base64.rb
Ruby
mit
19
master
1,285
module LZString # Base64 compressing algorithm. class Base64 # Base64 alphabet. KEY_STR_BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" # @param input [String] def self.compress(input) return "" if input.nil? res = LZString::Base.compress(input, 6, lambda {...
github
altivi/lz_string
https://github.com/altivi/lz_string
lib/lz_string/utf16.rb
Ruby
mit
19
master
569
module LZString # UTF16 compressing algorithm. class UTF16 # @param input [String] def self.compress(input) return "" if (input == nil) LZString::Base.compress(input, 15, lambda { |a| (a + 32).chr("UTF-8") }) + " " end # @param compressed [String] def self.decompress(compressed) ...
github
altivi/lz_string
https://github.com/altivi/lz_string
lib/lz_string/base.rb
Ruby
mit
19
master
12,333
module LZString # Base compression class. class Base # @param uncompressed [String] # @param bits_per_char [Integer] # @param get_char_from_int [Integer] def self.compress(uncompressed, bits_per_char, get_char_from_int) return "" if uncompressed.nil? || uncompressed.empty? i, v...
github
altivi/lz_string
https://github.com/altivi/lz_string
spec/spec_helper.rb
Ruby
mit
19
master
230
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "rspec" require "simplecov" require "lz_string" Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f } RSpec.configure do |config| end
github
altivi/lz_string
https://github.com/altivi/lz_string
spec/lib/lz_string_spec.rb
Ruby
mit
19
master
620
describe LZString do let(:text) { "Hello world!" } let(:compressed) { "҅〶惶@✰Ӏ葀" } describe ".compress" do it "compresses string" do expect(described_class.compress(text)).to eq compressed end it "compresses emoji" do expect(described_class.compress("❤")).to eq "覹က" ...
github
altivi/lz_string
https://github.com/altivi/lz_string
spec/lib/lz_string/utf16_spec.rb
Ruby
mit
19
master
538
describe LZString::UTF16 do let(:text) { '{"some": "json", "foo": [{"bar": "؋", "key": "؄"}], "ঞᕠ": "൱ඵቜ"}' } let(:compressed) { "ᯡࡓ䈌\u0B80匰ᜠр\u0AF2Ǹ䀺㈦イ\u0530්C¦¼䒨ᨬිnj〩痐࠸С㸢璑Ч䲤U⋴ҕ䈥㛢ĉ႙ " } describe ".compress" do it "compresses string" do expect(described_class.compress(text)).to eq compressed ...
github
altivi/lz_string
https://github.com/altivi/lz_string
spec/lib/lz_string/base64_spec.rb
Ruby
mit
19
master
1,205
describe LZString::Base64 do let(:text) { "Hello world!!!!!!!" } let(:compressed) { "BIUwNmD2AEDukCcwBMCE6OqA" } describe ".compress" do context "when res.length == 0" do it "compresses string" do expect(described_class.compress(text)).to eq compressed end end context "when...
github
altivi/lz_string
https://github.com/altivi/lz_string
spec/lib/lz_string/urisafe_spec.rb
Ruby
mit
19
master
455
describe LZString::UriSafe do let(:text) { '{"some": "json", "foo": [{"bar": "baz"}]}' } let(:compressed) { "N4Igzg9gtgpiBcACEArSA7EAaZAzCECiA2qAEYCGATkSJQF4gC+Auk0A" } describe ".compress" do it "compresses string" do expect(described_class.compress(text)).to eq compressed end end descr...
github
lostisland/faraday-net_http
https://github.com/lostisland/faraday-net_http
Gemfile
Ruby
mit
19
main
265
# frozen_string_literal: true source 'https://rubygems.org' gemspec gem 'faraday', github: 'lostisland/faraday' gem 'rake', '~> 13.0' gem 'rspec', '~> 3.0' gem 'simplecov' gem 'webmock', '~> 3.4' gem 'rubocop' gem 'rubocop-packaging' gem 'rubocop-performance'
github
lostisland/faraday-net_http
https://github.com/lostisland/faraday-net_http
faraday-net_http.gemspec
Ruby
mit
19
main
1,058
# frozen_string_literal: true lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'faraday/net_http/version' Gem::Specification.new do |spec| spec.name = 'faraday-net_http' spec.version = Faraday::NetHttp::VERSION spec.authors = ['Jan van der Pas'] spec.email...
github
lostisland/faraday-net_http
https://github.com/lostisland/faraday-net_http
spec/spec_helper.rb
Ruby
mit
19
main
453
# frozen_string_literal: true require 'faraday' require 'faraday/net_http' require 'faraday_specs_setup' RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = '.rspec_status' # Disable RSpec exposing methods globally on `Module` and `ma...
github
lostisland/faraday-net_http
https://github.com/lostisland/faraday-net_http
spec/faraday/adapter/net_http_spec.rb
Ruby
mit
19
main
6,981
# frozen_string_literal: true RSpec.describe Faraday::Adapter::NetHttp do features :request_body_on_query_methods, :reason_phrase_parse, :compression, :streaming, :trace_method it_behaves_like 'an adapter' context 'checking http' do let(:url) { URI('http://exampl...
github
lostisland/faraday-net_http
https://github.com/lostisland/faraday-net_http
lib/faraday/adapter/net_http.rb
Ruby
mit
19
main
6,400
# frozen_string_literal: true begin require 'net/https' rescue LoadError warn 'Warning: no such file to load -- net/https. ' \ 'Make sure openssl is installed if you want ssl support' require 'net/http' end require 'zlib' module Faraday class Adapter class NetHttp < Faraday::Adapter exceptions =...
github
b/rack-geoip
https://github.com/b/rack-geoip
Rakefile
Ruby
apache-2.0
19
master
1,303
require 'rubygems' require 'rake/gempackagetask' require 'rubygems/specification' require 'date' require 'spec/rake/spectask' GEM = "rack-geoip" GEM_VERSION = "0.0.1" AUTHOR = "Benjamin Black" EMAIL = "bb@opscode.com" HOMEPAGE = "http://opscode.com" SUMMARY = "Rack middleware to perform IP to geo lookups on HTTP clien...
github
b/rack-geoip
https://github.com/b/rack-geoip
lib/rack-geoip.rb
Ruby
apache-2.0
19
master
767
# # Author:: Adam Jacob (<adam@opscode.com>) # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ht...
github
b/rack-geoip
https://github.com/b/rack-geoip
lib/rack/geoip.rb
Ruby
apache-2.0
19
master
2,570
# # Author:: Benjamin Black (<bb@opscode.com>) # Copyright:: Copyright (c) 2009 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
imagekitio.gemspec
Ruby
apache-2.0
19
master
850
# frozen_string_literal: true require_relative "lib/imagekitio/version" Gem::Specification.new do |s| s.name = "imagekitio" s.version = Imagekitio::VERSION s.summary = "Ruby library to access the ImageKit API" s.authors = ["ImageKit"] s.email = "developer@imagekit.io" s.homepage = "https://gemdocs.org/gem...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
Rakefile
Ruby
apache-2.0
19
master
4,962
# frozen_string_literal: true require "pathname" require "securerandom" require "shellwords" require "minitest/test_task" require "rake/clean" require "rubocop/rake_task" tapioca = "sorbet/tapioca" examples = "examples" ignore_file = ".ignore" FILES_ENV = "FORMAT_FILE" CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resource_namespaces.rb
Ruby
apache-2.0
19
master
312
# frozen_string_literal: true module Imagekitio module Test module Resources module Accounts end module Beta module V2 end end module Cache end module Files end module Folders end module V2 end end end end
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/test_helper.rb
Ruby
apache-2.0
19
master
2,003
# frozen_string_literal: true # Requiring this file from each test file ensures we always do the following, even # when running a single-file test: # - Load the whole gem (as one would in production) # - Define shared testing namespace so that we don't need to indent test files as much # - Setting up testing dependenc...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/file_part_test.rb
Ruby
apache-2.0
19
master
323
# frozen_string_literal: true require_relative "test_helper" class Imagekitio::Test::FilePartTest < Minitest::Test def test_to_json text = "gray" filepart = Imagekitio::FilePart.new(StringIO.new(text)) assert_equal(text.to_json, filepart.to_json) assert_equal(text.to_yaml, filepart.to_yaml) end e...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/client_test.rb
Ruby
apache-2.0
19
master
12,085
# frozen_string_literal: true require_relative "test_helper" class ImagekitioTest < Minitest::Test extend Minitest::Serial include WebMock::API def before_all super WebMock.enable! end def setup super Thread.current.thread_variable_set(:mock_sleep, []) end def teardown Thread.curr...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/custom_metadata_fields_test.rb
Ruby
apache-2.0
19
master
1,565
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::Resources::CustomMetadataFieldsTest < Imagekitio::Test::ResourceTest def test_create_required_params skip("Mock server tests are disabled") response = @image_kit.custom_metadata_fields.create(label: "price", name:...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/assets_test.rb
Ruby
apache-2.0
19
master
391
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::Resources::AssetsTest < Imagekitio::Test::ResourceTest def test_list skip("Mock server tests are disabled") response = @image_kit.assets.list assert_pattern do response => ^(Imagekitio::Internal::Type::ArrayO...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/files_test.rb
Ruby
apache-2.0
19
master
4,871
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::Resources::FilesTest < Imagekitio::Test::ResourceTest def test_update_required_params skip("Mock server tests are disabled") response = @image_kit.files.update("fileId", update_file_request: {}) assert_pattern do ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/webhooks_test.rb
Ruby
apache-2.0
19
master
1,468
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::Resources::WebhooksTest < Imagekitio::Test::ResourceTest def test_unwrap key = "whsec_c2VjcmV0Cg==" webhook = StandardWebhooks::Webhook.new(key) data = "{\"id\":\"id\",\"type\":\"video.transformation.accepted...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/saved_extensions_test.rb
Ruby
apache-2.0
19
master
2,141
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::Resources::SavedExtensionsTest < Imagekitio::Test::ResourceTest def test_create_required_params skip("Mock server tests are disabled") response = @image_kit.saved_extensions.create( config: {name: :"remove...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/folders_test.rb
Ruby
apache-2.0
19
master
2,021
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::Resources::FoldersTest < Imagekitio::Test::ResourceTest def test_create_required_params skip("Mock server tests are disabled") response = @image_kit.folders.create(folder_name: "summer", parent_folder_path: "/product/im...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/accounts/origins_test.rb
Ruby
apache-2.0
19
master
10,006
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Accounts::OriginsTest < Imagekitio::Test::ResourceTest def test_create_required_params skip("Mock server tests are disabled") response = @image_kit.accounts.origins.create( origin_request: { ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/accounts/usage_test.rb
Ruby
apache-2.0
19
master
735
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Accounts::UsageTest < Imagekitio::Test::ResourceTest def test_get_required_params skip("Mock server tests are disabled") response = @image_kit.accounts.usage.get(end_date: "2019-12-27", start_date: "2019-1...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/accounts/url_endpoints_test.rb
Ruby
apache-2.0
19
master
2,219
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Accounts::URLEndpointsTest < Imagekitio::Test::ResourceTest def test_create_required_params skip("Mock server tests are disabled") response = @image_kit.accounts.url_endpoints.create(description: "My custo...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/beta/v2/files_test.rb
Ruby
apache-2.0
19
master
1,808
# frozen_string_literal: true require_relative "../../../test_helper" class Imagekitio::Test::Resources::Beta::V2::FilesTest < Imagekitio::Test::ResourceTest def test_upload_required_params skip("Mock server tests are disabled") response = @image_kit.beta.v2.files.upload(file: StringIO.new("Example data"),...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/files/metadata_test.rb
Ruby
apache-2.0
19
master
1,786
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Files::MetadataTest < Imagekitio::Test::ResourceTest def test_get skip("Mock server tests are disabled") response = @image_kit.files.metadata.get("fileId") assert_pattern do response => Imagekit...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/files/versions_test.rb
Ruby
apache-2.0
19
master
3,991
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Files::VersionsTest < Imagekitio::Test::ResourceTest def test_list skip("Mock server tests are disabled") response = @image_kit.files.versions.list("fileId") assert_pattern do response => ^(Imag...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/files/bulk_test.rb
Ruby
apache-2.0
19
master
2,173
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Files::BulkTest < Imagekitio::Test::ResourceTest def test_delete_required_params skip("Mock server tests are disabled") response = @image_kit.files.bulk.delete(file_ids: %w[598821f949c0a938d57563bd 5...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/cache/invalidation_test.rb
Ruby
apache-2.0
19
master
936
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Cache::InvalidationTest < Imagekitio::Test::ResourceTest def test_create_required_params skip("Mock server tests are disabled") response = @image_kit.cache.invalidation.create(url: "https://ik.imagek...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/resources/folders/job_test.rb
Ruby
apache-2.0
19
master
641
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::Resources::Folders::JobTest < Imagekitio::Test::ResourceTest def test_get skip("Mock server tests are disabled") response = @image_kit.folders.job.get("jobId") assert_pattern do response => Imagekitio::Mod...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/helper_authentication_test.rb
Ruby
apache-2.0
19
master
4,555
# frozen_string_literal: true require_relative "../test_helper" class HelperAuthenticationTest < Minitest::Test def test_should_return_correct_authentication_parameters_with_provided_token_and_expire private_key = "private_key_test" client = Imagekitio::Client.new(private_key: private_key) token = "you...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/responsive_image_attributes_test.rb
Ruby
apache-2.0
19
master
13,476
# frozen_string_literal: true require_relative "../test_helper" class ResponsiveImageAttributesTest < Minitest::Test def setup @client = Imagekitio::Client.new( private_key: "private_key_test", password: "test_password" ) end def test_bare_minimum_input result = @client.helper.get_respo...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/url-generation/overlay_test.rb
Ruby
apache-2.0
19
master
27,281
# frozen_string_literal: true require_relative "../../test_helper" class OverlayTest < Minitest::Test def setup @client = Imagekitio::Client.new( private_key: "My Private API Key" ) end # Basic overlay tests def test_should_ignore_overlay_when_type_property_is_missing transformation = [ ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/url-generation/basic_url_generation_test.rb
Ruby
apache-2.0
19
master
12,079
# frozen_string_literal: true require_relative "../../test_helper" class BasicURLGenerationTest < Minitest::Test def setup @client = Imagekitio::Client.new( private_key: "My Private API Key" ) end def test_should_return_an_empty_string_when_src_is_not_provided url = @client.helper.build_url( ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/url-generation/build_transformation_string_test.rb
Ruby
apache-2.0
19
master
3,415
# frozen_string_literal: true require_relative "../../test_helper" class BuildTransformationStringTest < Minitest::Test def setup @client = Imagekitio::Client.new( private_key: "test-key" ) end def test_should_return_empty_string_for_empty_transformation_array result = @client.helper.build_tr...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/url-generation/advanced_url_generation_test.rb
Ruby
apache-2.0
19
master
15,556
# frozen_string_literal: true require_relative "../../test_helper" class AdvancedURLGenerationTest < Minitest::Test def setup @client = Imagekitio::Client.new( private_key: "My Private API Key" ) end # AI Transformation Tests def test_should_generate_the_correct_url_for_ai_background_removal_wh...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/custom-tests/url-generation/signing_test.rb
Ruby
apache-2.0
19
master
7,770
# frozen_string_literal: true require_relative "../../test_helper" class SigningTest < Minitest::Test def setup @client = Imagekitio::Client.new( private_key: "dummy-key" ) end def test_should_generate_a_signed_url_when_signed_is_true_without_expires_in url = @client.helper.build_url( I...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/internal/util_test.rb
Ruby
apache-2.0
19
master
17,130
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::UtilDataHandlingTest < Minitest::Test def test_left_map assert_pattern do Imagekitio::Internal::Util.deep_merge({a: 1}, nil) => nil end end def test_right_map assert_pattern do Imagekitio::Internal::...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/internal/sorbet_runtime_support_test.rb
Ruby
apache-2.0
19
master
1,765
# frozen_string_literal: true require_relative "../test_helper" class Imagekitio::Test::SorbetRuntimeSupportTest < Minitest::Test extend Minitest::Serial i_suck_and_my_tests_are_order_dependent! module E extend Imagekitio::Internal::Type::Enum define_sorbet_constant!(:TaggedSymbol) { 1 } end mod...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
test/imagekitio/internal/type/base_model_test.rb
Ruby
apache-2.0
19
master
19,322
# frozen_string_literal: true require_relative "../../test_helper" class Imagekitio::Test::PrimitiveModelTest < Minitest::Test A = Imagekitio::Internal::Type::ArrayOf[-> { Integer }] H = Imagekitio::Internal::Type::HashOf[-> { Integer }, nil?: true] module E extend Imagekitio::Internal::Type::Enum end ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio.rb
Ruby
apache-2.0
19
master
10,708
# frozen_string_literal: true # Standard libraries. # rubocop:disable Lint/RedundantRequireStatement require "English" require "base64" require "cgi" require "date" require "erb" require "etc" require "json" require "net/http" require "openssl" require "pathname" require "rbconfig" require "securerandom" require "set"...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/client.rb
Ruby
apache-2.0
19
master
5,422
# frozen_string_literal: true module Imagekitio class Client < Imagekitio::Internal::Transport::BaseClient # Default max number of retries to attempt after a failed retryable request. DEFAULT_MAX_RETRIES = 2 # Default per-request timeout. DEFAULT_TIMEOUT_IN_SECONDS = 60.0 # Default initial retr...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/internal.rb
Ruby
apache-2.0
19
master
518
# frozen_string_literal: true module Imagekitio module Internal extend Imagekitio::Internal::Util::SorbetRuntimeSupport OMIT = Object.new.tap do _1.define_singleton_method(:inspect) { "#<#{Imagekitio::Internal}::OMIT>" } end .freeze define_sorbet_constant!(:AnyHash) do ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/errors.rb
Ruby
apache-2.0
19
master
6,010
# frozen_string_literal: true module Imagekitio module Errors class Error < StandardError # @!attribute cause # # @return [StandardError, nil] end class ConversionError < Imagekitio::Errors::Error # @return [StandardError, nil] def cause = @cause.nil? ? super : @cause ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/file_part.rb
Ruby
apache-2.0
19
master
1,248
# frozen_string_literal: true module Imagekitio class FilePart # @return [Pathname, StringIO, IO, String] attr_reader :content # @return [String, nil] attr_reader :content_type # @return [String, nil] attr_reader :filename # @api private # # @return [String] private def rea...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/request_options.rb
Ruby
apache-2.0
19
master
2,720
# frozen_string_literal: true module Imagekitio # Specify HTTP behaviour to use for a specific request. These options supplement # or override those provided at the client level. # # When making a request, you can pass an actual {RequestOptions} instance, or # simply pass a Hash with symbol keys matching the...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models.rb
Ruby
apache-2.0
19
master
6,727
# frozen_string_literal: true module Imagekitio [Imagekitio::Internal::Type::BaseModel, *Imagekitio::Internal::Type::BaseModel.subclasses].each do |cls| cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Imagekitio::Internal::AnyHash) } } end Imagekitio::Internal::Util.walk_namespaces(Imagekit...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/unsafe_unwrap_webhook_event.rb
Ruby
apache-2.0
19
master
3,455
# frozen_string_literal: true module Imagekitio module Models # Triggered when a new video transformation request is accepted for processing. # This event confirms that ImageKit has received and queued your transformation # request. Use this for debugging and tracking transformation lifecycle. module...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/image_overlay.rb
Ruby
apache-2.0
19
master
3,268
# frozen_string_literal: true module Imagekitio module Models class ImageOverlay < Imagekitio::Models::BaseOverlay # @!attribute input # Specifies the relative path to the image used as an overlay. # # @return [String] required :input, String # @!attribute type # ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/custom_metadata_field_list_response.rb
Ruby
apache-2.0
19
master
247
# frozen_string_literal: true module Imagekitio module Models # @type [Imagekitio::Internal::Type::Converter] CustomMetadataFieldListResponse = Imagekitio::Internal::Type::ArrayOf[-> { Imagekitio::CustomMetadataField }] end end
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_rename_params.rb
Ruby
apache-2.0
19
master
2,692
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#rename class FileRenameParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters # @!...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/folder_rename_params.rb
Ruby
apache-2.0
19
master
2,630
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Folders#rename class FolderRenameParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/saved_extension_update_params.rb
Ruby
apache-2.0
19
master
2,041
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::SavedExtensions#update class SavedExtensionUpdateParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestPa...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/saved_extension.rb
Ruby
apache-2.0
19
master
2,456
# frozen_string_literal: true module Imagekitio module Models class SavedExtension < Imagekitio::Internal::Type::BaseModel # @!attribute id # Unique identifier of the saved extension. # # @return [String, nil] optional :id, String # @!attribute config # Configurat...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/upload_pre_transform_success_event.rb
Ruby
apache-2.0
19
master
19,673
# frozen_string_literal: true module Imagekitio module Models class UploadPreTransformSuccessEvent < Imagekitio::Models::BaseWebhookEvent # @!attribute created_at # Timestamp of when the event occurred in ISO8601 format. # # @return [Time] required :created_at, Time # @!a...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/base_overlay.rb
Ruby
apache-2.0
19
master
4,906
# frozen_string_literal: true module Imagekitio module Models class BaseOverlay < Imagekitio::Internal::Type::BaseModel # @!attribute layer_mode # Controls how the layer blends with the base image or underlying content. Maps to # `lm` in the URL. By default, layers completely cover the base...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/video_transformation_error_event.rb
Ruby
apache-2.0
19
master
14,922
# frozen_string_literal: true module Imagekitio module Models class VideoTransformationErrorEvent < Imagekitio::Models::BaseWebhookEvent # @!attribute created_at # Timestamp when the event was created in ISO8601 format. # # @return [Time] required :created_at, Time # @!at...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_move_params.rb
Ruby
apache-2.0
19
master
1,249
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#move class FileMoveParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters # @!attr...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/folder_rename_response.rb
Ruby
apache-2.0
19
master
792
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Folders#rename class FolderRenameResponse < Imagekitio::Internal::Type::BaseModel # @!attribute job_id # Unique identifier of the bulk job. This can be used to check the status of the # bulk job....
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/metadata.rb
Ruby
apache-2.0
19
master
17,655
# frozen_string_literal: true module Imagekitio module Models class Metadata < Imagekitio::Internal::Type::BaseModel # @!attribute audio_codec # The audio codec used in the video (only for video). # # @return [String, nil] optional :audio_codec, String, api_name: :audioCodec ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/get_image_attributes_options.rb
Ruby
apache-2.0
19
master
2,943
# frozen_string_literal: true module Imagekitio module Models class GetImageAttributesOptions < Imagekitio::Models::SrcOptions # @!attribute device_breakpoints # Custom list of **device-width breakpoints** in pixels. These define common # screen widths for responsive image generation. ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_get_params.rb
Ruby
apache-2.0
19
master
595
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#get class FileGetParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters # @!attrib...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/custom_metadata_field_delete_params.rb
Ruby
apache-2.0
19
master
611
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::CustomMetadataFields#delete class CustomMetadataFieldDeleteParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type:...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/extension_item.rb
Ruby
apache-2.0
19
master
32,212
# frozen_string_literal: true module Imagekitio module Models module ExtensionItem extend Imagekitio::Internal::Type::Union discriminator :name variant :"remove-bg", -> { Imagekitio::ExtensionItem::RemoveBg } variant :"ai-auto-description", -> { Imagekitio::ExtensionItem::AIAutoDescrip...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/folder_delete_params.rb
Ruby
apache-2.0
19
master
959
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Folders#delete class FolderDeleteParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_delete_params.rb
Ruby
apache-2.0
19
master
601
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#delete class FileDeleteParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters # @!...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_copy_params.rb
Ruby
apache-2.0
19
master
1,819
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#copy class FileCopyParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters # @!attr...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/saved_extension_delete_params.rb
Ruby
apache-2.0
19
master
601
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::SavedExtensions#delete class SavedExtensionDeleteParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestPa...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/custom_metadata_field.rb
Ruby
apache-2.0
19
master
9,527
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::CustomMetadataFields#create class CustomMetadataField < Imagekitio::Internal::Type::BaseModel # @!attribute id # Unique identifier for the custom metadata field. Use this to update the field. # ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_upload_params.rb
Ruby
apache-2.0
19
master
25,285
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#upload class FileUploadParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParameters # Se...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/folder_move_response.rb
Ruby
apache-2.0
19
master
786
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Folders#move class FolderMoveResponse < Imagekitio::Internal::Type::BaseModel # @!attribute job_id # Unique identifier of the bulk job. This can be used to check the status of the # bulk job. ...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/file_move_response.rb
Ruby
apache-2.0
19
master
223
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Files#move class FileMoveResponse < Imagekitio::Internal::Type::BaseModel # @!method initialize end end end
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/subtitle_overlay_transformation.rb
Ruby
apache-2.0
19
master
5,384
# frozen_string_literal: true module Imagekitio module Models class SubtitleOverlayTransformation < Imagekitio::Internal::Type::BaseModel # @!attribute background # Specifies the subtitle background color using a standard color name, an RGB # color code (e.g., FF0000), or an RGBA color code...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/extensions.rb
Ruby
apache-2.0
19
master
221
# frozen_string_literal: true module Imagekitio module Models # @type [Imagekitio::Internal::Type::Converter] Extensions = Imagekitio::Internal::Type::ArrayOf[union: -> { Imagekitio::ExtensionItem }] end end
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/upload_pre_transform_error_event.rb
Ruby
apache-2.0
19
master
4,014
# frozen_string_literal: true module Imagekitio module Models class UploadPreTransformErrorEvent < Imagekitio::Models::BaseWebhookEvent # @!attribute created_at # Timestamp of when the event occurred in ISO8601 format. # # @return [Time] required :created_at, Time # @!att...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/saved_extension_get_params.rb
Ruby
apache-2.0
19
master
595
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::SavedExtensions#get class SavedExtensionGetParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestParamete...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/update_file_request.rb
Ruby
apache-2.0
19
master
8,293
# frozen_string_literal: true module Imagekitio module Models # Schema for update file update request. module UpdateFileRequest extend Imagekitio::Internal::Type::Union variant -> { Imagekitio::UpdateFileRequest::UpdateFileDetails } variant -> { Imagekitio::UpdateFileRequest::ChangePublic...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/embedded_metadata.rb
Ruby
apache-2.0
19
master
222
# frozen_string_literal: true module Imagekitio module Models # @type [Imagekitio::Internal::Type::Converter] EmbeddedMetadata = Imagekitio::Internal::Type::HashOf[Imagekitio::Internal::Type::Unknown] end end
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/video_transformation_ready_event.rb
Ruby
apache-2.0
19
master
17,026
# frozen_string_literal: true module Imagekitio module Models class VideoTransformationReadyEvent < Imagekitio::Models::BaseWebhookEvent # @!attribute created_at # Timestamp when the event was created in ISO8601 format. # # @return [Time] required :created_at, Time # @!at...
github
imagekit-developer/imagekit-ruby
https://github.com/imagekit-developer/imagekit-ruby
lib/imagekitio/models/webhook_unsafe_unwrap_params.rb
Ruby
apache-2.0
19
master
480
# frozen_string_literal: true module Imagekitio module Models # @see Imagekitio::Resources::Webhooks#unsafe_unwrap class WebhookUnsafeUnwrapParams < Imagekitio::Internal::Type::BaseModel extend Imagekitio::Internal::Type::RequestParameters::Converter include Imagekitio::Internal::Type::RequestPar...