repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb | # frozen_string_literal: true
require 'ethon/easy/http/putable'
require 'ethon/easy/http/postable'
module Ethon
class Easy
module Http
# This module represents a Http Action and is a factory
# for more real actions like GET, HEAD, POST and PUT.
module Actionable
QUERY_OPTIONS = [ :para... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making OPTIONS requests.
class Options
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
# Setup easy to make a OPTIONS request.
#
# @... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This module contains logic about setting up a PUT body.
module Putable
# Set things up when form is provided.
# Deals with multipart forms.
#
# @example Setup.
# put.set_form(easy)
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making PATCH requests.
class Patch
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
# Setup easy to make a PATCH request.
#
# @exampl... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making HEAD requests.
class Head
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
# Setup easy to make a HEAD request.
#
# @example S... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making POST requests.
class Post
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
# Setup easy to make a POST request.
#
# @example Se... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making GET requests.
class Get
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
# Setup easy to make a GET request.
#
# @example Setu... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making requests for custom HTTP verbs.
class Custom
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
def initialize(verb, url, options)
@ve... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making PUT requests.
class Put
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Putable
# Setup easy to make a PUT request.
#
# @example Setup... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb | # frozen_string_literal: true
module Ethon
module Curls
# This module contains logic for setting options on
# easy or multi interface.
module Options
OPTION_STRINGS = { :easy => 'easy_options', :multi => 'multi_options' }.freeze
FOPTION_STRINGS = { :easy => 'EASY_OPTIONS', :multi => 'MULTI_O... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb | # frozen_string_literal: true
module Ethon
module Curl
# :nodoc:
VERSION_NOW = 3
# Flag. Initialize SSL.
GLOBAL_SSL = 0x01
# Flag. Initialize win32 socket libraries.
GLOBAL_WIN32 = 0x02
# Flag. Initialize everything possible.
GLOBAL_ALL = (GLOBAL_SSL | GLOBAL_WIN32)
# Fl... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb | # frozen_string_literal: true
module Ethon
module Curls
# This module contains logic for the available informations
# on an easy, eg.: connect_time.
module Infos
# Return info types.
#
# @example Return info types.
# Ethon::Curl.info_types
#
# @return [ Hash ] The i... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb | # frozen_string_literal: true
module Ethon
module Curl
# :nodoc:
class MsgData < ::FFI::Union
layout :whatever, :pointer, :code, :easy_code
end
# :nodoc:
class Msg < ::FFI::Struct
layout :code, :msg_code, :easy_handle, :pointer, :data, MsgData
end
class VersionInfoData < ::FF... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb | # frozen_string_literal: true
module Ethon
module Curl
callback :callback, [:pointer, :size_t, :size_t, :pointer], :size_t
callback :socket_callback, [:pointer, :int, :poll_action, :pointer, :pointer], :multi_code
callback :timer_callback, [:pointer, :long, :pointer], :multi_code
callback :debug_callb... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb | # frozen_string_literal: true
module Ethon
module Curls
# This module contains available message codes.
module Messages
# Return message codes.
#
# @example Return message codes.
# Ethon::Curl.msg_codes
#
# @return [ Array ] The messages codes.
def msg_codes
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb | # frozen_string_literal: true
module Ethon
module Curls # :nodoc:
# This module contains all easy and
# multi return codes.
module Codes
# Libcurl error codes, refer
# https://github.com/bagder/curl/blob/master/include/curl/curl.h for details
def easy_codes
[
:ok,
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb | # frozen_string_literal: true
module Ethon
module Curls
# This module contains the available options for forms.
module FormOptions
# Form options, used by FormAdd for temporary storage, refer
# https://github.com/bagder/curl/blob/master/lib/formdata.h#L51 for details
def form_options
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb | .bundles_cache/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb | # frozen_string_literal: true
module Ethon
module Curls
# This module contains the functions to be attached in order to work with
# libcurl.
module Functions
# :nodoc:
def self.extended(base)
base.attach_function :global_init, :curl_global_init, [:long], ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday do
it 'has a version number' do
expect(Faraday::VERSION).not_to be nil
end
context 'proxies to default_connection' do
let(:mock_connection) { double('Connection') }
before do
Faraday.default_connection = mock_connection
end
it 'prox... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/spec_helper.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/spec_helper.rb | # frozen_string_literal: true
# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file to always be loaded, without a need to expl... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/helper_methods.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/helper_methods.rb | # frozen_string_literal: true
module Faraday
module HelperMethods
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def features(*features)
@features = features
end
def on_feature(name)
yield if block_given? && feature?(name)
end
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/streaming_response_checker.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/streaming_response_checker.rb | # frozen_string_literal: true
module Faraday
module StreamingResponseChecker
def check_streaming_response(streamed, options = {})
opts = {
prefix: '',
streaming?: true
}.merge(options)
expected_response = opts[:prefix] + big_string
chunks, sizes = streamed.transpose
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/disabling_stub.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/disabling_stub.rb | # frozen_string_literal: true
# Allows to disable WebMock stubs
module DisablingStub
def disable
@disabled = true
end
def disabled?
@disabled
end
WebMock::RequestStub.prepend self
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/fake_safe_buffer.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/fake_safe_buffer.rb | # frozen_string_literal: true
# emulates ActiveSupport::SafeBuffer#gsub
FakeSafeBuffer = Struct.new(:string) do
def to_s
self
end
def gsub(regex)
string.gsub(regex) do
match, = Regexp.last_match(0), '' =~ /a/ # rubocop:disable Performance/StringInclude
yield(match)
end
end
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/shared_examples/request_method.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/shared_examples/request_method.rb | # frozen_string_literal: true
shared_examples 'proxy examples' do
it 'handles requests with proxy' do
res = conn.public_send(http_method, '/')
expect(res.status).to eq(200)
end
it 'handles proxy failures' do
request_stub.to_return(status: 407)
expect { conn.public_send(http_method, '/') }.to r... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/shared_examples/adapter.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/shared_examples/adapter.rb | # frozen_string_literal: true
shared_examples 'an adapter' do |**options|
before { skip } if options[:skip]
context 'with SSL enabled' do
before { ENV['SSL'] = 'yes' }
include_examples 'adapter examples', options
end
context 'with SSL disabled' do
before { ENV['SSL'] = 'no' }
include_examples... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/shared_examples/params_encoder.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/support/shared_examples/params_encoder.rb | # frozen_string_literal: true
shared_examples 'a params encoder' do
it 'escapes safe buffer' do
monies = FakeSafeBuffer.new('$32,000.00')
expect(subject.encode('a' => monies)).to eq('a=%2432%2C000.00')
end
it 'raises type error for empty string' do
expect { subject.encode('') }.to raise_error(TypeEr... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/external_adapters/faraday_specs_setup.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/external_adapters/faraday_specs_setup.rb | # frozen_string_literal: true
require 'webmock/rspec'
WebMock.disable_net_connect!(allow_localhost: true)
require_relative '../support/helper_methods'
require_relative '../support/disabling_stub'
require_relative '../support/streaming_response_checker'
require_relative '../support/shared_examples/adapter'
require_rel... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Response do
subject { Faraday::Response.new(env) }
let(:env) do
Faraday::Env.from(status: 404, body: 'yikes', url: Faraday::Utils.URI('https://lostisland.github.io/faraday'),
response_headers: { 'Content-Type' => 'text/plain' })
end... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/middleware_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/middleware_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Middleware do
subject { described_class.new(app) }
let(:app) { double }
describe 'options' do
context 'when options are passed to the middleware' do
subject { described_class.new(app, options) }
let(:options) { { field: 'value' } }
it ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Request do
let(:conn) do
Faraday.new(url: 'http://httpbingo.org/api',
headers: { 'Mime-Version' => '1.0' },
request: { oauth: { consumer_key: 'anonymous' } })
end
let(:http_method) { :get }
let(:block) { nil }
subject ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/rack_builder_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/rack_builder_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::RackBuilder do
# mock handler classes
(Handler = Struct.new(:app)).class_eval do
def call(env)
env[:request_headers]['X-Middleware'] ||= ''
env[:request_headers]['X-Middleware'] += ":#{self.class.name.split('::').last}"
app.call(env)
e... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/utils_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/utils_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Utils do
describe 'headers parsing' do
let(:multi_response_headers) do
"HTTP/1.x 500 OK\r\nContent-Type: text/html; charset=UTF-8\r\n" \
"HTTP/1.x 200 OK\r\nContent-Type: application/json; charset=UTF-8\r\n\r\n"
end
it 'parse headers fo... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/middleware_registry_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/middleware_registry_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::MiddlewareRegistry do
before do
stub_const('CustomMiddleware', custom_middleware_klass)
end
let(:custom_middleware_klass) { Class.new(Faraday::Middleware) }
let(:dummy) { Class.new { extend Faraday::MiddlewareRegistry } }
after { dummy.unregister_mid... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/connection_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/connection_spec.rb | # frozen_string_literal: true
class CustomEncoder
def encode(params)
params.map { |k, v| "#{k.upcase}-#{v.to_s.upcase}" }.join(',')
end
def decode(params)
params.split(',').to_h { |pair| pair.split('-') }
end
end
shared_examples 'initializer with url' do
context 'with simple url' do
let(:addres... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/adapter_registry_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/adapter_registry_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::AdapterRegistry do
describe '#initialize' do
subject(:registry) { described_class.new }
it { expect { registry.get(:FinFangFoom) }.to raise_error(NameError) }
it { expect { registry.get('FinFangFoom') }.to raise_error(NameError) }
it 'looks up c... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/error_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/error_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::ClientError do
describe '.initialize' do
subject { described_class.new(exception, response) }
let(:response) { nil }
context 'with exception only' do
let(:exception) { RuntimeError.new('test') }
it { expect(subject.wrapped_exception).to ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/adapter_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/adapter_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Adapter do
let(:adapter) { Faraday::Adapter.new }
let(:request) { {} }
context '#request_timeout' do
it 'gets :read timeout' do
expect(timeout(:read)).to eq(nil)
request[:timeout] = 5
request[:write_timeout] = 1
expect(timeout(:... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/env_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/env_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Env do
subject(:env) { described_class.new }
it 'allows to access members' do
expect(env.method).to be_nil
env.method = :get
expect(env.method).to eq(:get)
end
it 'allows to access symbol non members' do
expect(env[:custom]).to be_nil
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/proxy_options_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/proxy_options_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::ProxyOptions do
describe '#from' do
it 'works with string' do
options = Faraday::ProxyOptions.from 'http://user:pass@example.org'
expect(options.user).to eq('user')
expect(options.password).to eq('pass')
expect(options.uri).to be_a_kin... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/request_options_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/request_options_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::RequestOptions do
subject(:options) { Faraday::RequestOptions.new }
it 'allows to set the request proxy' do
expect(options.proxy).to be_nil
expect { options[:proxy] = { booya: 1 } }.to raise_error(NoMethodError)
options[:proxy] = { user: 'user' }... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/options_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/options/options_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Options do
SubOptions = Class.new(Faraday::Options.new(:sub_a, :sub_b))
class ParentOptions < Faraday::Options.new(:a, :b, :c)
options c: SubOptions
end
describe '#merge' do
it 'merges options with hashes' do
options = ParentOptions.new(1)
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/utils/headers_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/utils/headers_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Utils::Headers do
subject { Faraday::Utils::Headers.new }
context 'when Content-Type is set to application/json' do
before { subject['Content-Type'] = 'application/json' }
it { expect(subject.keys).to eq(['Content-Type']) }
it { expect(subject['Co... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/params_encoders/flat_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/params_encoders/flat_spec.rb | # frozen_string_literal: true
require 'rack/utils'
RSpec.describe Faraday::FlatParamsEncoder do
it_behaves_like 'a params encoder'
it 'decodes arrays' do
query = 'a=one&a=two&a=three'
expected = { 'a' => %w[one two three] }
expect(subject.decode(query)).to eq(expected)
end
it 'decodes boolean va... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/params_encoders/nested_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/params_encoders/nested_spec.rb | # frozen_string_literal: true
require 'rack/utils'
RSpec.describe Faraday::NestedParamsEncoder do
it_behaves_like 'a params encoder'
it 'decodes arrays' do
query = 'a[1]=one&a[2]=two&a[3]=three'
expected = { 'a' => %w[one two three] }
expect(subject.decode(query)).to eq(expected)
end
it 'deco... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/adapter/test_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/adapter/test_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Adapter::Test do
let(:stubs) do
described_class::Stubs.new do |stub|
stub.get('http://domain.test/hello') do
[200, { 'Content-Type' => 'text/html' }, 'domain: hello']
end
stub.get('http://wrong.test/hello') do
[200, { 'Conte... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response/logger_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response/logger_spec.rb | # frozen_string_literal: true
require 'stringio'
require 'logger'
RSpec.describe Faraday::Response::Logger do
let(:string_io) { StringIO.new }
let(:logger) { Logger.new(string_io) }
let(:logger_options) { {} }
let(:conn) do
rubbles = ['Barney', 'Betty', 'Bam Bam']
Faraday.new do |b|
b.response ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response/json_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response/json_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Response::Json, type: :response do
let(:options) { {} }
let(:headers) { {} }
let(:middleware) do
described_class.new(lambda { |env|
Faraday::Response.new(env)
}, **options)
end
def process(body, content_type = 'application/json', options = ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response/raise_error_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/response/raise_error_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Response::RaiseError do
let(:conn) do
Faraday.new do |b|
b.response :raise_error
b.adapter :test do |stub|
stub.get('ok') { [200, { 'Content-Type' => 'text/html' }, '<body></body>'] }
stub.get('bad-request') { [400, { 'X-Reason' =>... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/authorization_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/authorization_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Request::Authorization do
let(:conn) do
Faraday.new do |b|
b.request :authorization, auth_type, *auth_config
b.adapter :test do |stub|
stub.get('/auth-echo') do |env|
[200, {}, env[:request_headers]['Authorization']]
end
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/instrumentation_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/instrumentation_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Request::Instrumentation do
class FakeInstrumenter
attr_reader :instrumentations
def initialize
@instrumentations = []
end
def instrument(name, env)
@instrumentations << [name, env]
yield
end
end
let(:config) { {} }
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/json_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/json_spec.rb | # frozen_string_literal: true
RSpec.describe Faraday::Request::Json do
let(:middleware) { described_class.new(->(env) { Faraday::Response.new(env) }) }
def process(body, content_type = nil)
env = { body: body, request_headers: Faraday::Utils::Headers.new }
env[:request_headers]['content-type'] = content_t... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/url_encoded_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/spec/faraday/request/url_encoded_spec.rb | # frozen_string_literal: true
require 'stringio'
RSpec.describe Faraday::Request::UrlEncoded do
let(:conn) do
Faraday.new do |b|
b.request :url_encoded
b.adapter :test do |stub|
stub.post('/echo') do |env|
posted_as = env[:request_headers]['Content-Type']
body = env[:body... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/examples/client_spec.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/examples/client_spec.rb | # frozen_string_literal: true
# Requires Ruby with rspec and faraday gems.
# rspec client_spec.rb
require 'faraday'
require 'json'
# Example API client
class Client
def initialize(conn)
@conn = conn
end
def httpbingo(jname, params: {})
res = @conn.get("/#{jname}", params)
data = JSON.parse(res.bod... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/examples/client_test.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/examples/client_test.rb | # frozen_string_literal: true
# Requires Ruby with test-unit and faraday gems.
# ruby client_test.rb
require 'faraday'
require 'json'
require 'test/unit'
# Example API client
class Client
def initialize(conn)
@conn = conn
end
def httpbingo(jname, params: {})
res = @conn.get("/#{jname}", params)
da... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday.rb | # frozen_string_literal: true
require 'cgi'
require 'date'
require 'set'
require 'forwardable'
require 'faraday/version'
require 'faraday/methods'
require 'faraday/error'
require 'faraday/middleware_registry'
require 'faraday/utils'
require 'faraday/options'
require 'faraday/connection'
require 'faraday/rack_builder'
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/methods.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/methods.rb | # frozen_string_literal: true
module Faraday
METHODS_WITH_QUERY = %w[get head delete trace].freeze
METHODS_WITH_BODY = %w[post put patch].freeze
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/version.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/version.rb | # frozen_string_literal: true
module Faraday
VERSION = '2.7.4'
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/middleware.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/middleware.rb | # frozen_string_literal: true
module Faraday
# Middleware is the basic base class of any Faraday middleware.
class Middleware
extend MiddlewareRegistry
attr_reader :app, :options
def initialize(app = nil, options = {})
@app = app
@options = options
end
def call(env)
on_requ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options.rb | # frozen_string_literal: true
module Faraday
# Subclasses Struct with some special helpers for converting from a Hash to
# a Struct.
class Options < Struct
# Public
def self.from(value)
value ? new.update(value) : new
end
# Public
def each
return to_enum(:each) unless block_given... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/middleware_registry.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/middleware_registry.rb | # frozen_string_literal: true
require 'monitor'
module Faraday
# Adds the ability for other modules to register and lookup
# middleware classes.
module MiddlewareRegistry
def registered_middleware
@registered_middleware ||= {}
end
# Register middleware class(es) on the current module.
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/utils.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/utils.rb | # frozen_string_literal: true
require 'base64'
require 'uri'
require 'faraday/utils/headers'
require 'faraday/utils/params_hash'
module Faraday
# Utils contains various static helper methods.
module Utils
module_function
def build_query(params)
FlatParamsEncoder.encode(params)
end
def buil... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response.rb | # frozen_string_literal: true
require 'forwardable'
module Faraday
# Response represents an HTTP response from making an HTTP request.
class Response
extend Forwardable
extend MiddlewareRegistry
def initialize(env = nil)
@env = Env.from(env) if env
@on_complete_callbacks = []
end
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/adapter.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/adapter.rb | # frozen_string_literal: true
module Faraday
# Base class for all Faraday adapters. Adapters are
# responsible for fulfilling a Faraday request.
class Adapter
extend MiddlewareRegistry
CONTENT_LENGTH = 'Content-Length'
# This module marks an Adapter as supporting parallel requests.
module Paral... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/rack_builder.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/rack_builder.rb | # frozen_string_literal: true
require 'ruby2_keywords'
require 'faraday/adapter_registry'
module Faraday
# A Builder that processes requests into responses by passing through an inner
# middleware stack (heavily inspired by Rack).
#
# @example
# Faraday::Connection.new(url: 'http://httpbingo.org') do |bui... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/parameters.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/parameters.rb | # frozen_string_literal: true
require 'forwardable'
require 'faraday/encoders/nested_params_encoder'
require 'faraday/encoders/flat_params_encoder'
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/connection.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/connection.rb | # frozen_string_literal: true
module Faraday
# Connection objects manage the default properties and the middleware
# stack for fulfilling an HTTP request.
#
# @example
#
# conn = Faraday::Connection.new 'http://httpbingo.org'
#
# # GET http://httpbingo.org/nigiri
# conn.get 'nigiri'
# # => ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request.rb | # frozen_string_literal: true
module Faraday
# Used to setup URLs, params, headers, and the request body in a sane manner.
#
# @example
# @connection.post do |req|
# req.url 'http://localhost', 'a' => '1' # 'http://localhost?a=1'
# req.headers['b'] = '2' # Header
# req.params['c'] = '3' # ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/adapter_registry.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/adapter_registry.rb | # frozen_string_literal: true
require 'monitor'
module Faraday
# AdapterRegistry registers adapter class names so they can be looked up by a
# String or Symbol name.
class AdapterRegistry
def initialize
@lock = Monitor.new
@constants = {}
end
def get(name)
klass = @lock.synchroniz... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/error.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/error.rb | # frozen_string_literal: true
# Faraday namespace.
module Faraday
# Faraday error base class.
class Error < StandardError
attr_reader :response, :wrapped_exception
def initialize(exc = nil, response = nil)
@wrapped_exception = nil unless defined?(@wrapped_exception)
@response = nil unless defi... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/ssl_options.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/ssl_options.rb | # frozen_string_literal: true
module Faraday
# SSL-related options.
#
# @!attribute verify
# @return [Boolean] whether to verify SSL certificates or not
#
# @!attribute verify_hostname
# @return [Boolean] whether to enable hostname verification on server certificates
# during the handshak... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/env.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/env.rb | # frozen_string_literal: true
module Faraday
# @!attribute method
# @return [Symbol] HTTP method (`:get`, `:post`)
#
# @!attribute body
# @return [String] The request body that will eventually be converted to a
# string.
#
# @!attribute url
# @return [URI] URI instance for the current request... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/connection_options.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/connection_options.rb | # frozen_string_literal: true
module Faraday
# ConnectionOptions contains the configurable properties for a Faraday
# connection object.
class ConnectionOptions < Options.new(:request, :proxy, :ssl, :builder, :url,
:parallel_manager, :params, :headers,
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/request_options.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/request_options.rb | # frozen_string_literal: true
module Faraday
# RequestOptions contains the configurable properties for a Faraday request.
class RequestOptions < Options.new(:params_encoder, :proxy, :bind,
:timeout, :open_timeout, :read_timeout,
:write_timeo... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/proxy_options.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/options/proxy_options.rb | # frozen_string_literal: true
module Faraday
# ProxyOptions contains the configurable properties for the proxy
# configuration used when making an HTTP request.
class ProxyOptions < Options.new(:uri, :user, :password)
extend Forwardable
def_delegators :uri, :scheme, :scheme=, :host, :host=, :port, :port=... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/logging/formatter.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/logging/formatter.rb | # frozen_string_literal: true
require 'pp' # rubocop:disable Lint/RedundantRequireStatement
module Faraday
module Logging
# Serves as an integration point to customize logging
class Formatter
extend Forwardable
DEFAULT_OPTIONS = { headers: true, bodies: false, errors: false,
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/encoders/flat_params_encoder.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/encoders/flat_params_encoder.rb | # frozen_string_literal: true
module Faraday
# FlatParamsEncoder manages URI params as a flat hash. Any Array values repeat
# the parameter multiple times.
module FlatParamsEncoder
class << self
extend Forwardable
def_delegators :'Faraday::Utils', :escape, :unescape
end
# Encode converts... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/encoders/nested_params_encoder.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/encoders/nested_params_encoder.rb | # frozen_string_literal: true
module Faraday
# Sub-module for encoding parameters into query-string.
module EncodeMethods
# @param params [nil, Array, #to_hash] parameters to be encoded
#
# @return [String] the encoded params
#
# @raise [TypeError] if params can not be converted to a Hash
d... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/utils/params_hash.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/utils/params_hash.rb | # frozen_string_literal: true
module Faraday
module Utils
# A hash with stringified keys.
class ParamsHash < Hash
def [](key)
super(convert_key(key))
end
def []=(key, value)
super(convert_key(key), value)
end
def delete(key)
super(convert_key(key))
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/utils/headers.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/utils/headers.rb | # frozen_string_literal: true
module Faraday
module Utils
# A case-insensitive Hash that preserves the original case of a header
# when set.
#
# Adapted from Rack::Utils::HeaderHash
class Headers < ::Hash
def self.from(value)
new(value)
end
def self.allocate
new... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/adapter/test.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/adapter/test.rb | # frozen_string_literal: true
require 'timeout'
module Faraday
class Adapter
# @example
# test = Faraday::Connection.new do
# use Faraday::Adapter::Test do |stub|
# # Define matcher to match the request
# stub.get '/resource.json' do
# # return static content
# ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response/raise_error.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response/raise_error.rb | # frozen_string_literal: true
module Faraday
class Response
# RaiseError is a Faraday middleware that raises exceptions on common HTTP
# client or server error responses.
class RaiseError < Middleware
# rubocop:disable Naming/ConstantName
ClientErrorStatuses = (400...500).freeze
ServerE... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response/logger.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response/logger.rb | # frozen_string_literal: true
require 'forwardable'
require 'logger'
require 'faraday/logging/formatter'
module Faraday
class Response
# Logger is a middleware that logs internal events in the HTTP request
# lifecycle to a given Logger object. By default, this logs to STDOUT. See
# Faraday::Logging::For... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response/json.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/response/json.rb | # frozen_string_literal: true
require 'json'
module Faraday
class Response
# Parse response bodies as JSON.
class Json < Middleware
def initialize(app = nil, parser_options: nil, content_type: /\bjson$/, preserve_raw: false)
super(app)
@parser_options = parser_options
@content_... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/url_encoded.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/url_encoded.rb | # frozen_string_literal: true
module Faraday
class Request
# Middleware for supporting urlencoded requests.
class UrlEncoded < Faraday::Middleware
unless defined?(::Faraday::Request::UrlEncoded::CONTENT_TYPE)
CONTENT_TYPE = 'Content-Type'
end
class << self
attr_accessor :mi... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/json.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/json.rb | # frozen_string_literal: true
require 'json'
module Faraday
class Request
# Request middleware that encodes the body as JSON.
#
# Processes only requests with matching Content-type or those without a type.
# If a request doesn't have a type but has a body, it sets the Content-type
# to JSON MIME... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/authorization.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/authorization.rb | # frozen_string_literal: true
module Faraday
class Request
# Request middleware for the Authorization HTTP header
class Authorization < Faraday::Middleware
KEY = 'Authorization'
# @param app [#call]
# @param type [String, Symbol] Type of Authorization
# @param params [Array<String, P... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/instrumentation.rb | .bundles_cache/ruby/2.6.0/gems/faraday-2.7.4/lib/faraday/request/instrumentation.rb | # frozen_string_literal: true
module Faraday
class Request
# Middleware for instrumenting Requests.
class Instrumentation < Faraday::Middleware
# Options class used in Request::Instrumentation class.
class Options < Faraday::Options.new(:name, :instrumenter)
# @return [String]
def... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/spec/pagination_spec.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/spec/pagination_spec.rb | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false | |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/spec/spec_helper.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/spec/spec_helper.rb | require 'jekyll'
require File.expand_path("../lib/jekyll-paginate", File.dirname(__FILE__))
module TestMethods
def test_dir(*subdirs)
File.join(File.dirname(__FILE__), *subdirs)
end
def dest_dir(*subdirs)
test_dir('dest', *subdirs)
end
def source_dir(*subdirs)
test_dir('source', *subdirs)
end... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/spec/pager_spec.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/spec/pager_spec.rb | require 'spec_helper'
RSpec.describe(Jekyll::Paginate::Pager) do
it "calculate number of pages" do
expect(described_class.calculate_pages([], '2')).to eql(0)
expect(described_class.calculate_pages([1], '2')).to eql(1)
expect(described_class.calculate_pages([1,2], '2')).to eql(1)
expect(described_cla... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate.rb | require "jekyll-paginate/version"
require "jekyll-paginate/pager"
require "jekyll-paginate/pagination"
module Jekyll
module Paginate
end
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/version.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/version.rb | module Jekyll
module Paginate
VERSION = "1.1.0"
end
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pagination.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pagination.rb | module Jekyll
module Paginate
class Pagination < Generator
# This generator is safe from arbitrary code execution.
safe true
# This generator should be passive with regard to its execution
priority :lowest
# Generate paginated pages if necessary.
#
# site - The Site.
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb | .bundles_cache/ruby/2.6.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb | module Jekyll
module Paginate
class Pager
attr_reader :page, :per_page, :posts, :total_posts, :total_pages,
:previous_page, :previous_page_path, :next_page, :next_page_path
# Calculate the number of pages.
#
# all_posts - The Array of all Posts.
# per_page - The Integer of ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline.rb | .bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline.rb | # frozen_string_literal: true
require 'nokogiri'
require 'active_support/xml_mini/nokogiri' # convert Documents to hashes
module HTML
# GitHub HTML processing filters and utilities. This module includes a small
# framework for defining DOM based content filters and applying them to user
# provided content.
#
... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/version.rb | .bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/version.rb | # frozen_string_literal: true
module HTML
class Pipeline
VERSION = '2.14.3'
end
end
| ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/markdown_filter.rb | .bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/markdown_filter.rb | # frozen_string_literal: true
HTML::Pipeline.require_dependency('commonmarker', 'MarkdownFilter')
module HTML
class Pipeline
# HTML Filter that converts Markdown text into HTML and converts into a
# DocumentFragment. This is different from most filters in that it can take a
# non-HTML as input. It must ... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@team_mention_filter.rb | .bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/@team_mention_filter.rb | # frozen_string_literal: true
require 'set'
module HTML
class Pipeline
# HTML filter that replaces @org/team mentions with links. Mentions within
# <pre>, <code>, <a>, <style>, and <script> elements are ignored.
#
# Context options:
# :base_url - Used to construct links to team profile pages f... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
collabnix/kubelabs | https://github.com/collabnix/kubelabs/blob/d43118c4af2adeb708d26658615319d6493e6077/.bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/absolute_source_filter.rb | .bundles_cache/ruby/2.6.0/gems/html-pipeline-2.14.3/lib/html/pipeline/absolute_source_filter.rb | # frozen_string_literal: true
require 'uri'
module HTML
class Pipeline
class AbsoluteSourceFilter < Filter
# HTML Filter for replacing relative and root relative image URLs with
# fully qualified URLs
#
# This is useful if an image is root relative but should really be going
# thro... | ruby | Apache-2.0 | d43118c4af2adeb708d26658615319d6493e6077 | 2026-01-04T15:51:47.325668Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.