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 |
|---|---|---|---|---|---|---|---|---|
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/version.rb | lib/ethon/version.rb | # frozen_string_literal: true
module Ethon
# Ethon version.
VERSION = '0.18.0'
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/loggable.rb | lib/ethon/loggable.rb | # frozen_string_literal: true
module Ethon
# Contains logging behaviour.
module Loggable
# Get the logger.
#
# @note Will try to grab Rails' logger first before creating a new logger
# with stdout.
#
# @example Get the logger.
# Loggable.logger
#
# @return [ Logger ] The lo... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors.rb | lib/ethon/errors.rb | # frozen_string_literal: true
require 'ethon/errors/ethon_error'
require 'ethon/errors/global_init'
require 'ethon/errors/multi_timeout'
require 'ethon/errors/multi_fdset'
require 'ethon/errors/multi_add'
require 'ethon/errors/multi_remove'
require 'ethon/errors/select'
require 'ethon/errors/invalid_option'
require 'et... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/multi.rb | lib/ethon/multi.rb | # frozen_string_literal: true
require 'ethon/easy/util'
require 'ethon/multi/stack'
require 'ethon/multi/operations'
require 'ethon/multi/options'
module Ethon
# This class represents libcurl multi.
class Multi
include Ethon::Multi::Stack
include Ethon::Multi::Operations
include Ethon::Multi::Options
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/libc.rb | lib/ethon/libc.rb | # frozen_string_literal: true
module Ethon
# FFI Wrapper module for Libc.
#
# @api private
module Libc
extend FFI::Library
ffi_lib 'c'
# :nodoc:
def self.windows?
Gem.win_platform?
end
unless windows?
attach_function :getdtablesize, [], :int
attach_function :free, [:... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy.rb | lib/ethon/easy.rb | # frozen_string_literal: true
require 'ethon/easy/informations'
require 'ethon/easy/features'
require 'ethon/easy/callbacks'
require 'ethon/easy/options'
require 'ethon/easy/header'
require 'ethon/easy/util'
require 'ethon/easy/params'
require 'ethon/easy/form'
require 'ethon/easy/http'
require 'ethon/easy/operations'
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/multi_fdset.rb | lib/ethon/errors/multi_fdset.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raises when multi_fdset failed.
class MultiFdset < EthonError
def initialize(code)
super("An error occured getting the fdset: #{code}")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/multi_add.rb | lib/ethon/errors/multi_add.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raises when multi_add_handle failed.
class MultiAdd < EthonError
def initialize(code, easy)
super("An error occured adding the easy handle: #{easy} to the multi: #{code}")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/select.rb | lib/ethon/errors/select.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raised when select failed.
class Select < EthonError
def initialize(errno)
super("An error occured on select: #{errno}")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/multi_remove.rb | lib/ethon/errors/multi_remove.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raises when multi_remove_handle failed.
class MultiRemove < EthonError
def initialize(code, easy)
super("An error occured removing the easy handle: #{easy} from the multi: #{code}")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/ethon_error.rb | lib/ethon/errors/ethon_error.rb | # frozen_string_literal: true
module Ethon
module Errors
# Default Ethon error class for all custom errors.
class EthonError < StandardError
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/multi_timeout.rb | lib/ethon/errors/multi_timeout.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raised when multi_timeout failed.
class MultiTimeout < EthonError
def initialize(code)
super("An error occured getting the timeout: #{code}")
# "An error occured getting the timeout: #{code}: #{Curl.multi_strerror(code)}"
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/invalid_option.rb | lib/ethon/errors/invalid_option.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raises when option is invalid.
class InvalidOption < EthonError
def initialize(option)
super("The option: #{option} is invalid.")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/invalid_value.rb | lib/ethon/errors/invalid_value.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raises when option is invalid.
class InvalidValue < EthonError
def initialize(option, value)
super("The value: #{value} is invalid for option: #{option}.")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/errors/global_init.rb | lib/ethon/errors/global_init.rb | # frozen_string_literal: true
module Ethon
module Errors
# Raises when global_init failed.
class GlobalInit < EthonError
def initialize
super("An error occured initializing curl.")
end
end
end
end
| ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/multi/options.rb | lib/ethon/multi/options.rb | # frozen_string_literal: true
module Ethon
class Multi
# This module contains the logic and knowledge about the
# available options on multi.
module Options
# Sets max_total_connections option.
#
# @example Set max_total_connections option.
# multi.max_total_conections = $value... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/multi/operations.rb | lib/ethon/multi/operations.rb | # frozen_string_literal: true
module Ethon
class Multi # :nodoc
# This module contains logic to run a multi.
module Operations
STARTED_MULTI = "ETHON: started MULTI"
PERFORMED_MULTI = "ETHON: performed MULTI"
# Return the multi handle. Inititialize multi handle,
# in case it didn't ha... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/multi/stack.rb | lib/ethon/multi/stack.rb | # frozen_string_literal: true
module Ethon
class Multi
# This module provides the multi stack behaviour.
module Stack
# Return easy handles.
#
# @example Return easy handles.
# multi.easy_handles
#
# @return [ Array ] The easy handles.
def easy_handles
@ea... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/response_callbacks.rb | lib/ethon/easy/response_callbacks.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains the logic for the response callbacks.
# The on_complete callback is the only one at the moment.
#
# You can set multiple callbacks, which are then executed
# in the same order.
#
# easy.on_complete { p 1 }
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/options.rb | lib/ethon/easy/options.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains the logic and knowledge about the
# available options on easy.
module Options
attr_reader :url
def url=(value)
@url = value
Curl.set_option(:url, value, handle)
end
def escape=( b )
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/operations.rb | lib/ethon/easy/operations.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains the logic to prepare and perform
# an easy.
module Operations
# Returns a pointer to the curl easy handle.
#
# @example Return the handle.
# easy.handle
#
# @return [ FFI::Pointer ] A pointer... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/form.rb | lib/ethon/easy/form.rb | # frozen_string_literal: true
require 'ethon/easy/util'
require 'ethon/easy/queryable'
module Ethon
class Easy
# This class represents a form and is used to send a payload in the
# request body via POST/PUT.
# It handles multipart forms, too.
#
# @api private
class Form
include Ethon::... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/mirror.rb | lib/ethon/easy/mirror.rb | # frozen_string_literal: true
module Ethon
class Easy
class Mirror
attr_reader :options
alias_method :to_hash, :options
INFORMATIONS_TO_MIRROR = Informations::AVAILABLE_INFORMATIONS.keys +
[:return_code, :response_headers, :response_body, :debug_info]
INFORMATIONS_TO_LOG = [:ef... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/debug_info.rb | lib/ethon/easy/debug_info.rb | # frozen_string_literal: true
module Ethon
class Easy
# This class is used to store and retreive debug information,
# which is only saved when verbose is set to true.
#
# @api private
class DebugInfo
MESSAGE_TYPES = Ethon::Curl::DebugInfoType.to_h.keys
class Message
attr_rea... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/callbacks.rb | lib/ethon/easy/callbacks.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains all the logic around the callbacks,
# which are needed to interact with libcurl.
#
# @api private
module Callbacks
# :nodoc:
def self.included(base)
base.send(:attr_accessor, *[:response_body, :respo... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http.rb | lib/ethon/easy/http.rb | # frozen_string_literal: true
require 'ethon/easy/http/actionable'
require 'ethon/easy/http/post'
require 'ethon/easy/http/get'
require 'ethon/easy/http/head'
require 'ethon/easy/http/put'
require 'ethon/easy/http/delete'
require 'ethon/easy/http/patch'
require 'ethon/easy/http/options'
require 'ethon/easy/http/custom'... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/params.rb | lib/ethon/easy/params.rb | # frozen_string_literal: true
require 'ethon/easy/util'
require 'ethon/easy/queryable'
module Ethon
class Easy
# This class represents HTTP request parameters.
#
# @api private
class Params
include Ethon::Easy::Util
include Ethon::Easy::Queryable
# Create a new Params.
#
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/queryable.rb | lib/ethon/easy/queryable.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains logic about building
# query parameters for url or form.
module Queryable
# :nodoc:
def self.included(base)
base.send(:attr_accessor, :escape)
base.send(:attr_accessor, :params_encoding)
end
... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/informations.rb | lib/ethon/easy/informations.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains the methods to return informations
# from the easy handle. See http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
# for more information.
module Informations
# Holds available informations and their type, which is n... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/features.rb | lib/ethon/easy/features.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains class methods for feature checks
module Features
# Returns true if this curl version supports zlib.
#
# @example Return wether zlib is supported.
# Ethon::Easy.supports_zlib?
#
# @return [ Boole... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/header.rb | lib/ethon/easy/header.rb | # frozen_string_literal: true
module Ethon
class Easy
# This module contains the logic around adding headers to libcurl.
#
# @api private
module Header
# Return headers, return empty hash if none.
#
# @example Return the headers.
# easy.headers
#
# @return [ Hash ... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/util.rb | lib/ethon/easy/util.rb | # frozen_string_literal: true
module Ethon
class Easy # :nodoc:
# This module contains small helpers.
#
# @api private
module Util
# Escapes zero bytes in strings.
#
# @example Escape zero bytes.
# Util.escape_zero_byte("1\0")
# #=> "1\\0"
#
# @param [ O... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/postable.rb | lib/ethon/easy/http/postable.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This module contains logic for setting up a [multipart] POST body.
module Postable
# Set things up when form is provided.
# Deals with multipart forms.
#
# @example Setup.
# post.set_form(ea... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/delete.rb | lib/ethon/easy/http/delete.rb | # frozen_string_literal: true
module Ethon
class Easy
module Http
# This class knows everything about making DELETE requests.
class Delete
include Ethon::Easy::Http::Actionable
include Ethon::Easy::Http::Postable
# Setup easy to make a DELETE request.
#
# @exa... | ruby | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/actionable.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/options.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/putable.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/patch.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/head.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/post.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/get.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/custom.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/easy/http/put.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/options.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/constants.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/infos.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/classes.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/settings.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/messages.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/codes.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/form_options.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
typhoeus/ethon | https://github.com/typhoeus/ethon/blob/cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab/lib/ethon/curls/functions.rb | 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 | MIT | cb1d7ea0cda12762ed0c745b3d44839ac1d0bbab | 2026-01-04T17:42:32.128565Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/support/step_definition_file.rb | support/step_definition_file.rb | require File.expand_path('../step_definition', __FILE__)
require File.expand_path('../parser', __FILE__)
class StepDefinitionFile
FILE_COMMENT_END = 'FILE_COMMENT_END'
attr_accessor :steps
def initialize(filename)
@filename = filename
@code = File.read(filename)
self.steps = []
extract_comment... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/support/parser.rb | support/parser.rb | class Parser
ANYTHINGS = %w[([^\"]*) ([^"]+) ([^"]*) (.*) (.*?) [^"]+ ([^\"]+) ([^']*)
([^\/]*) (.+) (.*[^:]) (.+?) .+].map &Regexp.method(:escape)
def self.human_regex(regex)
regex.
sub(/^\(?\/\^?/, ''). # Strip Regex beginning
sub(/\$?\/\)?$/, ''). # Strip Regex end
gsub(' ?', ' ').
... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/support/step_manager.rb | support/step_manager.rb | require File.expand_path('../step_definition_file', __FILE__)
class StepManager
STEP_KINDS = %w[Given When Then]
attr_accessor :directories, :step_files
def initialize(*directories)
self.directories = directories
self.step_files = directories.map(&method(:collect_files)).flatten.compact
end
def to... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/support/paths_manager.rb | support/paths_manager.rb | require File.expand_path('../parser', __FILE__)
class PathsManager
def initialize(file_path)
@file_path = file_path
read_paths
end
def paths(search = nil)
paths = @raw_paths.map do |raw_path|
path = raw_path.sub(/^\s+when/, '').strip
if path.start_with? '/'
Parser.human_regex(p... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/support/step_definition.rb | support/step_definition.rb | require File.expand_path('../parser', __FILE__)
class StepDefinition
attr_accessor :kind, :step, :comment
def self.new_from_raw(raw_step)
raw_step =~ /^\s*(When|Then|Given|AfterStep)(.*)do/
kind, step = $1, $2
return unless step
comment = Parser.format_comment(raw_step)
return if comment =~ ... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/app/models/application_record.rb | tests/rails-8_capybara-3/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/app/mailers/application_mailer.rb | tests/rails-8_capybara-3/app/mailers/application_mailer.rb | class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/app/mailers/spreewald_mailer.rb | tests/rails-8_capybara-3/app/mailers/spreewald_mailer.rb | class SpreewaldMailer < ApplicationMailer
REPLY_TO = "reply-to@example.com"
TO = "to@example.com"
CC = "cc@example.com"
BCC = "bcc@example.com"
FROM = "from@example.com"
SUBJECT = "SUBJECT"
def email
attachments['attached_file.pdf'] = File.open("#{Rails.root}/public/fixture_files/attachment.pdf", "w"... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/support/selenium.rb | tests/rails-8_capybara-3/features/support/selenium.rb | Capybara.register_driver :selenium do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument('--headless') unless ENV.key?('NO_HEADLESS')
options.add_argument('--disable-infobars')
# options.add_option('w3c', false)
options.add_emulation(device_metrics: { width: 1280, height: 960, touch... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/support/env.rb | tests/rails-8_capybara-3/features/support/env.rb | # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/support/paths.rb | tests/rails-8_capybara-3/features/support/paths.rb | module NavigationHelpers
def path_to(page_name)
case page_name
when /^"(.*)"$/
$1
else
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"Now, go and add a mapping in #{__FILE__}"
end
end
end
World(NavigationHelpers)
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/support/selectors.rb | tests/rails-8_capybara-3/features/support/selectors.rb | module HtmlSelectorsHelpers
# Maps a name to a selector. Used primarily by the
#
# When /^(.+) within (.+)$/ do |step, scope|
#
# step definitions in web_steps.rb
#
def selector_for(locator)
case locator
when /^a panel?$/
'.panel'
when /^a panels nested contents?$/
'.panel--nes... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/step_definitions/overriding_steps.rb | tests/rails-8_capybara-3/features/step_definitions/overriding_steps.rb | Then /^I should see "overridden value"$/ do
expect(page).to have_content('overridden value')
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/step_definitions/test_steps.rb | tests/rails-8_capybara-3/features/step_definitions/test_steps.rb | require 'cucumber/rspec/doubles'
RSPEC_EXPECTATION_NOT_MET_ERROR = RSpec::Expectations::ExpectationNotMetError
Then /^the following steps? should (fail|succeed):$/ do |expectation, steps_table|
steps = steps_table.raw.flatten
steps.each do |step|
if expectation == 'fail'
expect { step(step) }.to rais... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/features/step_definitions/field_error_steps.rb | tests/rails-8_capybara-3/features/step_definitions/field_error_steps.rb | Then /^I set the custom field error class to "([^"]+)"$/ do |error_class|
Spreewald.field_error_class = error_class
end
Then /^I set the custom error message xpath to "(.+)"$/ do |error_message_xpath|
Spreewald.error_message_xpath_selector = error_message_xpath
end
After('@field_errors') do
Spreewald.field_erro... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/application.rb | tests/rails-8_capybara-3/config/application.rb | require_relative 'boot'
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "action_mailbox/engine"
# require "action_t... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/environment.rb | tests/rails-8_capybara-3/config/environment.rb | # Load the Rails application.
require_relative 'application'
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/routes.rb | tests/rails-8_capybara-3/config/routes.rb | Rails.application.routes.draw do
get '/authenticated/page', to: 'authenticated#page'
get '/downloads/spreadsheet', to: 'downloads#spreadsheet'
get '/downloads/spreadsheet', to: 'downloads#spreadsheet'
get '/emails/do_nothing', to: 'emails#do_nothing'
get '/emails/send_email', to: 'emails#send_email'
get '... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/boot.rb | tests/rails-8_capybara-3/config/boot.rb | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/content_security_policy.rb | tests/rails-8_capybara-3/config/initializers/content_security_policy.rb | # Be sure to restart your server when you modify this file.
# Define an application-wide content security policy
# For further information see the following documentation
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
# Rails.application.config.content_security_policy do |policy|
... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/filter_parameter_logging.rb | tests/rails-8_capybara-3/config/initializers/filter_parameter_logging.rb | # Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/application_controller_renderer.rb | tests/rails-8_capybara-3/config/initializers/application_controller_renderer.rb | # Be sure to restart your server when you modify this file.
# ActiveSupport::Reloader.to_prepare do
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )
# end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/wrap_parameters.rb | tests/rails-8_capybara-3/config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters f... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/inflections.rb | tests/rails-8_capybara-3/config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflec... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/cookies_serializer.rb | tests/rails-8_capybara-3/config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/permissions_policy.rb | tests/rails-8_capybara-3/config/initializers/permissions_policy.rb | # Define an application-wide HTTP permissions policy. For further
# information see https://developers.google.com/web/updates/2018/06/feature-policy
#
# Rails.application.config.permissions_policy do |f|
# f.camera :none
# f.gyroscope :none
# f.microphone :none
# f.usb :none
# f.fullscreen :s... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/backtrace_silencers.rb | tests/rails-8_capybara-3/config/initializers/backtrace_silencers.rb | # Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
# You can also remove all the silencers if you're trying to debug a ... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/mime_types.rb | tests/rails-8_capybara-3/config/initializers/mime_types.rb | # Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/initializers/new_framework_defaults_6_1.rb | tests/rails-8_capybara-3/config/initializers/new_framework_defaults_6_1.rb | # Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 6.1 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# Support for inversing belongs_to ... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/environments/test.rb | tests/rails-8_capybara-3/config/environments/test.rb | require "active_support/core_ext/integer/time"
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data the... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-8_capybara-3/config/environments/development.rb | tests/rails-8_capybara-3/config/environments/development.rb | require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for developme... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/tables_controller.rb | tests/shared/app/controllers/tables_controller.rb | class TablesController < ApplicationController
def table1
end
def table_with_weird_spaces
end
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/forms_controller.rb | tests/shared/app/controllers/forms_controller.rb | class FormsController < ApplicationController
def checkbox_form
end
def disabled_elements
end
def form1
end
def form2
end
def form_with_two_inputs_in_separate_css_blocks_with_the_same_selector
end
def select_fields
end
def invalid_rails_form
end
def invalid_bootstrap3_form
end
... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/emails_controller.rb | tests/shared/app/controllers/emails_controller.rb | class EmailsController < ApplicationController
def do_nothing
render_nothing
end
def send_email
deliver :email
render_nothing
end
def send_crlf_email
deliver :email_crlf
render_nothing
end
def send_email_with_umlauts
deliver :email_with_umlauts
render_nothing
end
def s... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/authenticated_controller.rb | tests/shared/app/controllers/authenticated_controller.rb | class AuthenticatedController < ApplicationController
if Rails.version.to_i >= 5
before_action :authenticate
else
before_filter :authenticate
end
def page
if Rails.version.to_i >= 5
render :plain => 'Action reached'
else
render :text => 'Action reached'
end
end
private
... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/downloads_controller.rb | tests/shared/app/controllers/downloads_controller.rb | class DownloadsController < ApplicationController
def spreadsheet
send_data File.read("#{Rails.root}/public/fixture_files/spreadsheet.ods"), filename: 'test - example (today).ods'
end
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/static_pages_controller.rb | tests/shared/app/controllers/static_pages_controller.rb | class StaticPagesController < ApplicationController
def click_on
end
def home
end
def iframe
render 'static_pages/iframe', layout: false
end
def link_target
render_nothing
end
def link_to_home
end
def links
end
def numbers
end
def overriden
end
def second_link_target
... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/iframes_controller.rb | tests/shared/app/controllers/iframes_controller.rb | class IframesController < ApplicationController
def iframe_1_content
render 'iframes/iframe_1_content', layout: false
end
def iframe_2_content
render 'iframes/iframe_2_content', layout: false
end
end | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/controllers/application_controller.rb | tests/shared/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
def render_nothing
if Rails.version.to_i >= 5
render body: nil
else
render nothing: true
end
end
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/app/models/mailer.rb | tests/shared/app/models/mailer.rb | class Mailer < ActionMailer::Base
REPLY_TO = "reply-to@example.com"
TO = "to@example.com"
CC = "cc@example.com"
BCC = "bcc@example.com"
FROM = "from@example.com"
SUBJECT = "SUBJECT"
def email
attachments['attached_file.pdf'] = File.open("#{Rails.root}/public/fixture_files/attachment.pdf") {}
mai... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/db/schema.rb | tests/shared/db/schema.rb | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/features/support/selenium.rb | tests/shared/features/support/selenium.rb | Capybara.register_driver :selenium do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument('--headless') unless ENV.key?('NO_HEADLESS')
options.add_argument('--disable-infobars')
# options.add_option('w3c', false)
options.add_emulation(device_metrics: { width: 1280, height: 960, touch... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/features/support/paths.rb | tests/shared/features/support/paths.rb | module NavigationHelpers
def path_to(page_name)
case page_name
when /^"(.*)"$/
$1
else
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"Now, go and add a mapping in #{__FILE__}"
end
end
end
World(NavigationHelpers)
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/features/support/selectors.rb | tests/shared/features/support/selectors.rb | module HtmlSelectorsHelpers
# Maps a name to a selector. Used primarily by the
#
# When /^(.+) within (.+)$/ do |step, scope|
#
# step definitions in web_steps.rb
#
def selector_for(locator)
case locator
when /^a panel?$/
'.panel'
when /^a panels nested contents?$/
'.panel--nes... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/features/shared/step_definitions/overriding_steps.rb | tests/shared/features/shared/step_definitions/overriding_steps.rb | Then /^I should see "overridden value"$/ do
expect(page).to have_content('overridden value')
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/features/shared/step_definitions/test_steps.rb | tests/shared/features/shared/step_definitions/test_steps.rb | require 'cucumber/rspec/doubles'
RSPEC_EXPECTATION_NOT_MET_ERROR = RSpec::Expectations::ExpectationNotMetError
Then /^the following steps? should (fail|succeed):$/ do |expectation, steps_table|
steps = steps_table.raw.flatten
steps.each do |step|
if expectation == 'fail'
expect { step(step) }.to rais... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/shared/config/routes.rb | tests/shared/config/routes.rb | Rails.application.routes.draw do
get '/authenticated/page', to: 'authenticated#page'
get '/downloads/spreadsheet', to: 'downloads#spreadsheet'
get '/downloads/spreadsheet', to: 'downloads#spreadsheet'
get '/emails/do_nothing', to: 'emails#do_nothing'
get '/emails/send_email', to: 'emails#send_email'
get '... | ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
makandra/spreewald | https://github.com/makandra/spreewald/blob/04cdad6e318ea3ce16ab9bbf1c71182dc10165ee/tests/rails-7_capybara-3/app/models/application_record.rb | tests/rails-7_capybara-3/app/models/application_record.rb | class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
| ruby | MIT | 04cdad6e318ea3ce16ab9bbf1c71182dc10165ee | 2026-01-04T17:42:32.649845Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.