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 |
|---|---|---|---|---|---|---|---|---|
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/stashes.rb | lib/sensu/api/routes/stashes.rb | module Sensu
module API
module Routes
module Stashes
STASHES_URI = /^\/stashes$/
STASH_URI = /^\/stash(?:es)?\/(.*)$/
# POST /stash/:path or /stashes/:path
def post_stash
path = parse_uri(STASH_URI).first
read_data do |data|
@redis.set("stash:... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/silenced.rb | lib/sensu/api/routes/silenced.rb | module Sensu
module API
module Routes
module Silenced
SILENCED_URI = /^\/silenced$/
SILENCED_ID_URI = /^\/silenced\/ids\/([\w\.\-\*\:]+)$/
SILENCED_SUBSCRIPTION_URI = /^\/silenced\/subscriptions\/([\w\.\-:]+)$/
SILENCED_CHECK_URI = /^\/silenced\/checks\/([\w\.\-]+)$/
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/settings.rb | lib/sensu/api/routes/settings.rb | require "sensu/utilities"
module Sensu
module API
module Routes
module Settings
include Utilities
SETTINGS_URI = /^\/settings$/
# GET /settings
def get_settings
if @params[:redacted] == "false"
@response_content = @settings.to_hash
else
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/info.rb | lib/sensu/api/routes/info.rb | require "sensu/api/utilities/transport_info"
require "sensu/api/utilities/servers_info"
module Sensu
module API
module Routes
module Info
include Utilities::TransportInfo
include Utilities::ServersInfo
INFO_URI = /^\/info$/
# GET /info
def get_info
transp... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/results.rb | lib/sensu/api/routes/results.rb | require "sensu/api/validators/check"
require "sensu/api/utilities/publish_check_result"
module Sensu
module API
module Routes
module Results
include Utilities::PublishCheckResult
RESULTS_URI = /^\/results$/
RESULTS_CLIENT_URI = /^\/results\/([\w\.-]+)$/
RESULT_URI = /^\/res... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/health.rb | lib/sensu/api/routes/health.rb | require "sensu/api/utilities/transport_info"
module Sensu
module API
module Routes
module Health
include Utilities::TransportInfo
HEALTH_URI = /^\/health$/
# GET /health
def get_health
@response_content = []
if @redis.connected? && @transport.connected?... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/clients.rb | lib/sensu/api/routes/clients.rb | require "sensu/api/validators/client"
require "sensu/api/utilities/resolve_event"
module Sensu
module API
module Routes
module Clients
include Utilities::ResolveEvent
CLIENTS_URI = /^\/clients$/
CLIENT_URI = /^\/clients\/([\w\.-]+)$/
CLIENT_HISTORY_URI = /^\/clients\/([\w\.... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/request.rb | lib/sensu/api/routes/request.rb | require "sensu/api/utilities/publish_check_request"
module Sensu
module API
module Routes
module Request
include Utilities::PublishCheckRequest
REQUEST_URI = /^\/request$/
# POST /request
def post_request
rules = {
:check => {:type => String, :nil_ok ... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/aggregates.rb | lib/sensu/api/routes/aggregates.rb | module Sensu
module API
module Routes
module Aggregates
AGGREGATES_URI = /^\/aggregates$/
AGGREGATE_URI = /^\/aggregates\/([\w\.-]+)$/
AGGREGATE_CLIENTS_URI = /^\/aggregates\/([\w\.-]+)\/clients$/
AGGREGATE_CHECKS_URI = /^\/aggregates\/([\w\.-]+)\/checks$/
AGGREGATE_R... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/routes/checks.rb | lib/sensu/api/routes/checks.rb | module Sensu
module API
module Routes
module Checks
CHECKS_URI = /^\/checks$/
CHECK_URI = /^\/checks\/([\w\.-]+)$/
# GET /checks
def get_checks
checks = @settings.checks.reject { |check| check[:standalone] }
@response_content = pagination(checks)
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/utilities/publish_check_result.rb | lib/sensu/api/utilities/publish_check_result.rb | module Sensu
module API
module Utilities
module PublishCheckResult
# Publish a check result to the Transport for processing. A
# check result is composed of a client name and a check
# definition, containing check `:output` and `:status`. A client
# signature is added to the ... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/utilities/publish_check_request.rb | lib/sensu/api/utilities/publish_check_request.rb | require "sensu/utilities"
module Sensu
module API
module Utilities
module PublishCheckRequest
include Sensu::Utilities
# Determine the Sensu Transport publish options for a
# subscription. If a subscription begins with a Transport pipe
# type, either "direct:" or "roundrobi... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/utilities/transport_info.rb | lib/sensu/api/utilities/transport_info.rb | module Sensu
module API
module Utilities
module TransportInfo
# Retreive the Sensu Transport info, if the API is connected
# to it, keepalive messages and consumers, and results
# messages and consumers.
#
# @yield [Hash] passes Transport info to the callback/block.
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/utilities/servers_info.rb | lib/sensu/api/utilities/servers_info.rb | module Sensu
module API
module Utilities
module ServersInfo
# Retreive the Sensu servers info.
#
# @yield [Hash] passes servers info to the callback/block.
def servers_info
info = []
if @redis.connected?
@redis.smembers("servers") do |servers|
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/utilities/filter_response_content.rb | lib/sensu/api/utilities/filter_response_content.rb | require "sensu/utilities"
module Sensu
module API
module Utilities
module FilterResponseContent
include Sensu::Utilities
# Create a nested hash from a dot notation key and value.
#
# @param dot_notation [String]
# @param value [Object]
# @return [Hash]
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/api/utilities/resolve_event.rb | lib/sensu/api/utilities/resolve_event.rb | require "sensu/api/utilities/publish_check_result"
module Sensu
module API
module Utilities
module ResolveEvent
include PublishCheckResult
# Resolve an event. This method publishes a check result with
# a check status of `0` (OK) to resolve the event. The
# published check ... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/server/handle.rb | lib/sensu/server/handle.rb | require "sensu/server/socket"
module Sensu
module Server
module Handle
# Create a handler error callback, for logging the error and
# decrementing the `@in_progress[:events]` by `1`.
#
# @param handler [Object]
# @param event_data [Object]
# @param event_id [String] event UUID... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/server/socket.rb | lib/sensu/server/socket.rb | module Sensu
module Server
class Socket < EM::Connection
# @!attribute [rw] on_success
# @return [Proc] callback to be called after the data has been
# transmitted successfully.
attr_accessor :on_success
# @!attribute [rw] on_error
# @return [Proc] callback to be called when... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/server/filter.rb | lib/sensu/server/filter.rb | module Sensu
module Server
module Filter
# Determine if an event handler is silenced.
#
# @param handler [Hash] definition.
# @param event [Hash]
# @return [TrueClass, FalseClass]
def handler_silenced?(handler, event)
event[:silenced] && !handler[:handle_silenced]
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/server/mutate.rb | lib/sensu/server/mutate.rb | module Sensu
module Server
module Mutate
# Create a mutator callback (Proc). A mutator callback takes two
# parameters, for the mutator output and status code. The
# created callback can be used for standard mutators and mutator
# extensions. The provided callback will only be called when ... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/server/process.rb | lib/sensu/server/process.rb | require "sensu/daemon"
require "sensu/server/filter"
require "sensu/server/mutate"
require "sensu/server/handle"
require "sensu/server/tessen"
module Sensu
module Server
class Process
include Daemon
include Filter
include Mutate
include Handle
attr_reader :tasks, :in_progress
... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | true |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/server/tessen.rb | lib/sensu/server/tessen.rb | gem "em-http-request", "1.1.5"
require "em-http-request"
require "sensu/constants"
module Sensu
module Server
class Tessen
attr_accessor :settings, :logger, :redis, :options
attr_reader :timers
# Create a new instance of Tessen. The instance variable
# `@timers` is use to track EventMac... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/client/http_socket.rb | lib/sensu/client/http_socket.rb | require "base64"
require "em-http-server"
require "sensu/json"
require "sensu/utilities"
require "sensu/api/utilities/transport_info"
require "sensu/client/utils"
module Sensu
module Client
# EventMachine connection handler for the Sensu HTTP client's socket.
#
# The Sensu client listens on localhost, po... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/client/socket.rb | lib/sensu/client/socket.rb | require "sensu/json"
require "sensu/client/utils"
module Sensu
module Client
# EventMachine connection handler for the Sensu client"s socket.
#
# The Sensu client listens on localhost, port 3030 (by default), for
# UDP and TCP traffic. This allows software running on the host to
# push check resu... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/client/utils.rb | lib/sensu/client/utils.rb | require "sensu/json"
require "sensu/client/validators/check"
module Sensu
module Client
module CheckUtils
class DataError < StandardError; end
# Validate check result attributes.
#
# @param [Hash] check result to validate.
def validate_check_result(check)
validator = Valida... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/client/process.rb | lib/sensu/client/process.rb | require "sensu/daemon"
require "sensu/client/socket"
require "sensu/client/http_socket"
module Sensu
module Client
class Process
include Daemon
attr_accessor :safe_mode
# Create an instance of the Sensu client process, start the
# client within the EventMachine event loop, and set up cl... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
sensu/sensu | https://github.com/sensu/sensu/blob/1cb846745469489b0644a303c34cd32adc3f4100/lib/sensu/client/validators/check.rb | lib/sensu/client/validators/check.rb | require "sensu/settings/rules"
require "sensu/settings/validators/check"
module Sensu
module Client
module Validators
class Check
# Include Sensu Settings rules and check validator.
include Sensu::Settings::Rules
include Sensu::Settings::Validators::Check
attr_reader :failu... | ruby | MIT | 1cb846745469489b0644a303c34cd32adc3f4100 | 2026-01-04T15:52:31.810392Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/testdrive/vagrant-vbguest-unikorn/lib/vagrant-vbguest-unikorn.rb | testdrive/vagrant-vbguest-unikorn/lib/vagrant-vbguest-unikorn.rb | begin
require "vagrant-vbguest"
rescue LoadError
raise "This Vagrant plugin requires the vagrant-vbguest plugin."
end
require "vagrant-vbguest-unikorn/version"
require "vagrant-vbguest-unikorn/installer"
module VagrantVbguestUnikorn
class Plugin < Vagrant.plugin("2")
name "vagrant-vbguest-unikorn"
desc... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/testdrive/vagrant-vbguest-unikorn/lib/vagrant-vbguest-unikorn/version.rb | testdrive/vagrant-vbguest-unikorn/lib/vagrant-vbguest-unikorn/version.rb | module VagrantVbguestUnikorn
VERSION = "0.1.0"
end
| ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/testdrive/vagrant-vbguest-unikorn/lib/vagrant-vbguest-unikorn/installer.rb | testdrive/vagrant-vbguest-unikorn/lib/vagrant-vbguest-unikorn/installer.rb | module VagrantVbguestUnikorn
# This installer overwrites the matching and installing methods only.
# Please have a look at the VagrantVbguest::Installers::Linux class
# (https://github.com/dotless-de/vagrant-vbguest/blob/main/lib/vagrant-vbguest/installers/linux.rb)
# for possibly other interesting methods wort... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest.rb | lib/vagrant-vbguest.rb | begin
require "vagrant"
rescue LoadError
raise "The Vagrant VBGuest plugin must be run within Vagrant."
end
# Add our custom translations to the load path
I18n.load_path += Dir[File.expand_path("../../locales/*.yml", __FILE__)]
I18n.reload!
require "vagrant-vbguest/version"
require "vagrant-vbguest/errors"
requir... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/command.rb | lib/vagrant-vbguest/command.rb | require 'optparse'
require Vagrant.source_root.join("plugins/commands/up/start_mixins")
require 'vagrant-vbguest/helpers/rebootable'
module VagrantVbguest
class Command < Vagrant.plugin("2", :command)
include VagrantPlugins::CommandUp::StartMixins
include VagrantVbguest::Helpers::Rebootable
# Runs the v... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/download.rb | lib/vagrant-vbguest/download.rb | module VagrantVbguest
class Download
attr_reader :source, :destination, :downloader
def initialize(source, destination, options=nil)
@downloader = nil
@source = source
@destination = destination
if File.directory?(destination)
@destination = File.join(destination, "vbguest_dow... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/version.rb | lib/vagrant-vbguest/version.rb | require "delegate"
module VagrantVbguest
VERSION = File.read(File.expand_path("../../../VERSION", __FILE__)).chop
# Helper to create a new Gem::Version by parsing the common version pattern.
# When overwriting the pattern, make sure that the matched version string is
# the capture `1`
#
# @param input [St... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/errors.rb | lib/vagrant-vbguest/errors.rb | module VagrantVbguest
class VbguestError < Vagrant::Errors::VagrantError
def error_namespace; "vagrant_vbguest.errors"; end
end
class IsoPathAutodetectionError < VagrantVbguest::VbguestError
error_key :autodetect_iso_path
end
class DownloadingDisabledError < VagrantVbguest::VbguestError
error_k... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/middleware.rb | lib/vagrant-vbguest/middleware.rb | require 'vagrant-vbguest/helpers/rebootable'
module VagrantVbguest
# A Vagrant middleware which checks the installed VirtualBox Guest
# Additions to match the installed VirtualBox installation on the
# host system.
class Middleware
include VagrantVbguest::Helpers::Rebootable
def initialize(app, env)
... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/machine.rb | lib/vagrant-vbguest/machine.rb | module VagrantVbguest
class Machine
require 'micromachine'
attr_reader :installer, :env, :vm, :options
def initialize vm, options
@vm = vm
@env = vm.env
@options = options
@logger = Log4r::Logger.new("vagrant::plugins::vbguest-machine")
@logger.debug("initiali... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installer.rb | lib/vagrant-vbguest/installer.rb | module VagrantVbguest
##
# Dispatches the installation process to a rigistered
# Installer implementation.
class Installer
class NoInstallerFoundError < Vagrant::Errors::VagrantError
error_namespace "vagrant_vbguest.errors.installer"
error_key "no_installer_for_platform"
end
class << ... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/config.rb | lib/vagrant-vbguest/config.rb | module VagrantVbguest
class Config < Vagrant.plugin("2", :config)
module Attributes
attr_accessor :auto_update, :auto_reboot, :no_install, :no_remote,
:installer, :installer_arguments, :installer_options,
:installer_hooks, :allow_downgrade,
:iso_... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/redhat.rb | lib/vagrant-vbguest/installers/redhat.rb | module VagrantVbguest
module Installers
class RedHat < Linux
# Scientific Linux and CentOS show up as :redhat (or "centos7")
# fortunately they're probably both similar enough to RHEL
# (RedHat Enterprise Linux) not to matter.
def self.match?(vm)
/\A(redhat|centos|amazon|rocky|alma... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/archlinux.rb | lib/vagrant-vbguest/installers/archlinux.rb | module VagrantVbguest
module Installers
class Archlinux < Linux
def self.match?(vm)
:arch == self.distro(vm)
end
# Install missing deps and yield up to regular linux installation
def install(opts=nil, &block)
# Update the package list
communicate.sudo("pacman -Sy"... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/fedora.rb | lib/vagrant-vbguest/installers/fedora.rb | module VagrantVbguest
module Installers
class Fedora < Linux
def self.match?(vm)
:fedora == self.distro(vm)
end
# Install missing deps and yield up to regular linux installation
def install(opts=nil, &block)
communicate.sudo(install_dependencies_cmd, opts, &block)
... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/oracle.rb | lib/vagrant-vbguest/installers/oracle.rb | module VagrantVbguest
module Installers
class Oracle < RedHat
def self.match?(vm)
:redhat == self.distro(vm) &&
communicate_to(vm).test('test -f /etc/oracle-release')
end
protected
def dependencies
[
'kernel-`uname -a | grep -q "uek." && echo "uek-"`d... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/base.rb | lib/vagrant-vbguest/installers/base.rb | require 'vagrant-vbguest/helpers/vm_compatible'
module VagrantVbguest
module Installers
class Error < Vagrant::Errors::VagrantError
error_namespace "vagrant_vbguest.errors.installer"
end
# This is the base class all installers must inherit from
# It defines the basic structure of an Installer ... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/opensuse.rb | lib/vagrant-vbguest/installers/opensuse.rb | module VagrantVbguest
module Installers
class OpenSuse < Linux
# OpenSuse shows up as "suse", check for presence of the zypper
# package manager as well.
def self.match?(vm)
:suse == self.distro(vm) && has_zypper?(vm)
end
# Install missing deps and yield up to regular linux ... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/suse.rb | lib/vagrant-vbguest/installers/suse.rb | module VagrantVbguest
module Installers
class Suse < Linux
# To distingish between OpenSuse and SLEs (both shows up as "suse"),
# check for presence of the zypper and entry on os-release
def self.match?(vm)
:suse == self.distro(vm) && has_zypper?(vm) && sles?(vm)
end
# Inst... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/centos.rb | lib/vagrant-vbguest/installers/centos.rb | module VagrantVbguest
module Installers
class CentOS < RedHat
def self.match?(vm)
super && communicate_to(vm).test('test -f /etc/centos-release')
end
# Install missing deps and yield up to regular linux installation
def install(opts=nil, &block)
if upgrade_kernel?
... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/linux.rb | lib/vagrant-vbguest/installers/linux.rb | require 'vagrant-vbguest/helpers/os_release'
module VagrantVbguest
module Installers
# A basic Installer implementation for vanilla or
# unknown Linux based systems.
class Linux < Base
# Matches if the operating system name prints "Linux"
# Raises an Error if this class is beeing subclassed b... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/ubuntu.rb | lib/vagrant-vbguest/installers/ubuntu.rb | module VagrantVbguest
module Installers
class Ubuntu < Debian
def self.match?(vm)
:ubuntu == self.distro(vm)
end
def install(opts=nil, &block)
if packaged_additions?
unload_packaged_additions(opts, &block)
begin
remove_packaged_additions(opts, &b... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/debian.rb | lib/vagrant-vbguest/installers/debian.rb | module VagrantVbguest
module Installers
class Debian < Linux
def self.match?(vm)
/\Adebian\d*\Z/ =~ self.distro(vm)
end
# installs the correct linux-headers package
# installs `dkms` package for dynamic kernel module loading
# @param opts [Hash] Optional options Hash which ... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/installers/windows.rb | lib/vagrant-vbguest/installers/windows.rb | require "vagrant-vbguest/helpers/os_release"
module VagrantVbguest
module Installers
class Windows < Base
def self.match?(vm)
raise Error, _key: :do_not_inherit_match_method if self != Windows
communicate_to(vm).test("(Get-WMIObject win32_operatingsystem).name")
end
def self.o... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/hosts/virtualbox.rb | lib/vagrant-vbguest/hosts/virtualbox.rb | module VagrantVbguest
module Hosts
class VirtualBox < Base
def read_guest_additions_version
# this way of checking for the GuestAdditionsVersion is taken from Vagrant's
# `read_guest_additions_version` method introduced via
# https://github.com/hashicorp/vagrant/commit/d8ff2cb5adca2... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/hosts/base.rb | lib/vagrant-vbguest/hosts/base.rb | require 'uri'
require 'vagrant-vbguest/helpers/vm_compatible'
module VagrantVbguest
module Hosts
class Base
include VagrantVbguest::Helpers::VmCompatible
attr_reader :env, :vm, :options
def initialize(vm, options=nil)
@vm = vm
@env = vm.env
@options = options
end... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/helpers/os_release.rb | lib/vagrant-vbguest/helpers/os_release.rb | # This file uses a the parsing component of the environment file parser
# dotenv (https://github.com/bkeepers/dotenv) in order to parse the
# `/etc/os-release` file of systemd, which uses loosely the same format.
#
# This parser will only substitute env variables in values which are already
# present in the parsed Hash... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/helpers/rebootable.rb | lib/vagrant-vbguest/helpers/rebootable.rb | require 'vagrant-vbguest/helpers/vm_compatible'
module VagrantVbguest
module Helpers
module Rebootable
include VmCompatible
def self.included(base)
base.extend(ClassMethods)
end
@@rebooted = {}
def rebooted?(vm)
!!@@rebooted[ self.class.vm_id(vm) ]
end
... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
dotless-de/vagrant-vbguest | https://github.com/dotless-de/vagrant-vbguest/blob/e3da79581df4356c0052e8771f572d1825e35024/lib/vagrant-vbguest/helpers/vm_compatible.rb | lib/vagrant-vbguest/helpers/vm_compatible.rb | module VagrantVbguest
module Helpers
module VmCompatible
def communicate
vm.communicate
end
def driver
vm.provider.driver
end
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def vm_id(vm)
vm.id
... | ruby | MIT | e3da79581df4356c0052e8771f572d1825e35024 | 2026-01-04T15:52:32.515638Z | false |
rspec/rspec-metagem | https://github.com/rspec/rspec-metagem/blob/707eea1a6497fa0eafb442289952a29c5a84c54f/lib/rspec.rb | lib/rspec.rb | require 'rspec/core'
require 'rspec/version'
| ruby | MIT | 707eea1a6497fa0eafb442289952a29c5a84c54f | 2026-01-04T15:52:46.594955Z | false |
rspec/rspec-metagem | https://github.com/rspec/rspec-metagem/blob/707eea1a6497fa0eafb442289952a29c5a84c54f/lib/rspec/version.rb | lib/rspec/version.rb | module RSpec # :nodoc:
module Version # :nodoc:
STRING = '3.14.0.pre'
end
end
| ruby | MIT | 707eea1a6497fa0eafb442289952a29c5a84c54f | 2026-01-04T15:52:46.594955Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/test_helper.rb | test/test_helper.rb | # Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"
ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rails/test_help"
ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/wicked_test.rb | test/wicked_test.rb | require 'test_helper'
class WickedTest < ActiveSupport::TestCase
test "truth" do
assert_kind_of Module, Wicked
end
test "protected steps" do
error = assert_raise WickedProtectedStepError do
class ProtectedBadStepsController < ApplicationController
include Wicked::Wizard
steps :wha... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/support/integration_case.rb | test/support/integration_case.rb | # Define a bare test case to use with Capybara
class ActiveSupport::IntegrationCase < ActiveSupport::TestCase
include Capybara::DSL
include Rails.application.routes.url_helpers
end | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/support/wicked_controller_test_case.rb | test/support/wicked_controller_test_case.rb | class WickedControllerTestCase < ActionController::TestCase
if ActionPack::VERSION::MAJOR < 5
%w{get post put update}.each do |meth|
define_method meth do |action, args={}|
super(action, args[:params], args[:session], args[:flash])
end
end
end
end | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/navigation_test.rb | test/integration/navigation_test.rb | require 'test_helper'
class IncludeNavigationTest < ActiveSupport::IntegrationCase
test 'index forwards to first step by default' do
visit(bar_index_path)
assert_has_content?("first")
end
test 'index forwards params to first step' do
visit(bar_index_path(:foo => "first"))
assert_has_content?("p... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/redirect_to_finish_flash_test.rb | test/integration/redirect_to_finish_flash_test.rb | require 'test_helper'
class RedirectToFinishFlashTest < ActiveSupport::IntegrationCase
test 'redirect_to_next when in last step' do
step = :last_step
visit(redirect_to_finish_flash_path(step))
click_link 'Next'
assert has_content?('redirect_to_finish_flash/index')
assert has_content?('Flash messa... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/steps_test.rb | test/integration/steps_test.rb | require 'test_helper'
class StepPositionsTest < ActiveSupport::IntegrationCase
test 'on first' do
step = :first
visit(step_position_path(step))
assert_has_content?('first step is the current step') # current_step?
assert true # past_step?
assert_has_... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/updates_test.rb | test/integration/updates_test.rb | require 'test_helper'
class UpdatesTest < ActiveSupport::IntegrationCase
test 'on first' do
step = :first
visit(update_path(step))
click_button("Next")
assert_equal page.current_path, update_path(:second)
assert_has_content?("notice:Thing was updated from step first.")
click_button("Next")
... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/dynamic_steps_test.rb | test/integration/dynamic_steps_test.rb | require 'test_helper'
class DynamicStepsTest < ActiveSupport::IntegrationCase
test 'set dynamic steps from params using prepend' do
steps = ['first', 'second']
visit dynamic_steps_path(:steps => steps)
assert_has_content?(steps.first.inspect)
assert_has_content?(steps.inspect)
end
test 'set dyna... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/jump_test.rb | test/integration/jump_test.rb | require 'test_helper'
class JumpNavigationTest < ActiveSupport::IntegrationCase
test 'consider jump_to when calling render_wizard with resource' do
step = :first
visit(jump_path(step, :resource => {:save => true}, :jump_to => :last_step))
assert_has_content?('last_step')
end
test 'disregard jump_to ... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/nested_builder_test.rb | test/integration/nested_builder_test.rb | require 'test_helper'
class NestedBuilderTest < ActiveSupport::IntegrationCase
test 'can use nested ids' do
visit nested_builder_path(:id => :last_step, :nested_id => "foo")
assert_has_content?("last")
assert_has_content?("params[:nested_id] foo")
end
test 'forwards nested ids' do
visit nested_... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/security_test.rb | test/integration/security_test.rb | require 'test_helper'
class SecurityTest < ActiveSupport::IntegrationCase
test 'does not show database.yml' do
step = "%2E%2F%2E%2E%2F%2E%2E%2Fconfig%2Fdatabase%2Eyml"
assert_raise(Wicked::Wizard::InvalidStepError) do
visit(bar_path(step))
end
end
# only works on *nix systems
test 'does not... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/update_params_test.rb | test/integration/update_params_test.rb | require 'test_helper'
class UpdateParamsTest < ActiveSupport::IntegrationCase
test 'on first' do
step = :first
visit(update_param_path(step))
click_button("Next")
assert_equal page.current_path, update_param_path(:second)
assert_has_content?("notice:Thing was updated from step first.")
clic... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/redirect_to_next_test.rb | test/integration/redirect_to_next_test.rb | require 'test_helper'
class RedirectToNextTest < ActiveSupport::IntegrationCase
test 'redirect_to_next without options' do
step = :first
visit(redirect_to_next_path(step, :jump_to => :last_step))
assert_has_content?('last_step')
end
test 'redirect_to_next with options' do
step = :first
visit... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/helpers_test.rb | test/integration/helpers_test.rb | require 'test_helper'
class HelpersTest < ActiveSupport::IntegrationCase
test 'next_wizard_path' do
step = :first
visit(bar_path(step))
assert has_link?('skip', href: '/bar/second')
click_link 'skip'
assert_has_content?('second')
end
test 'next_wizard_url' do
step = :first
visit(bar... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/integration/i18n_test.rb | test/integration/i18n_test.rb | # encoding: UTF-8
require 'test_helper'
class I18nTest < ActiveSupport::IntegrationCase
test 'renders in spanish' do
step = :uno
visit(i18n_path(step, :locale => :es))
assert_has_content?("Hey ya'll we're looking at: uno")
assert has_link?('hello', :href => i18n_path(:dos))
assert_has_content?(... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/controllers/status_codes_controller_test.rb | test/controllers/status_codes_controller_test.rb | require 'test_helper'
class StatusCodesControllerTest < WickedControllerTestCase
test 'returns successful status code for show' do
get :show, params: { id: 'good' }
assert_response(:success)
end
test 'returns correct status code for successfuly update' do
put :update, params: { id: 'good' }
asse... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/controllers/bar_controller_test.rb | test/controllers/bar_controller_test.rb | require 'test_helper'
class BarControllerTest < WickedControllerTestCase
test 'index redirects to the first step' do
get :index
assert_redirected_to bar_path(:first)
end
test 'index redirects to the first step, preserving query args' do
get :index, params: { :some => 'arguments', :were => 'passed' ... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/controllers/updates_controller_test.rb | test/controllers/updates_controller_test.rb | require 'test_helper'
class UpdatesControllerTest < WickedControllerTestCase
test 'redirect from first step to second step' do
put :update, params: {:id => 'first'}
assert_redirected_to update_path(:second)
assert_equal 'Thing was updated from step first.', flash[:notice]
end
test 'redirect from sec... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/helpers/application_helper.rb | test/dummy/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/status_codes_controller.rb | test/dummy/app/controllers/status_codes_controller.rb | class StatusCodesController < ApplicationController
include Wicked::Wizard
class GoodThing
def save
true
end
end
class BadThing
def save
false
end
end
steps :good, :bad
def index; end
def show
render_wizard
end
def update
case step
when :good
@thin... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/string_steps_controller.rb | test/dummy/app/controllers/string_steps_controller.rb | class StringStepsController < ApplicationController
include Wicked::Wizard
steps 'first', 'second', 'last_step'
def show
render_wizard
end
def update
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/updates_controller.rb | test/dummy/app/controllers/updates_controller.rb | class UpdatesController < ApplicationController
include Wicked::Wizard
class Thing
def save
true
end
end
steps :first, :second, :last_step
def index
end
def show
render_wizard
end
def update
@thing = Thing.new
render_wizard(@thing, notice: "Thing was updated from step #... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/step_positions_controller.rb | test/dummy/app/controllers/step_positions_controller.rb | ## This controller uses includes
class StepPositionsController < ApplicationController
include Wicked::Wizard
steps :first, :second, :last_step
def show
case step
when :first
when :second
when :last_step
else
raise "error #{step.inspect}"
end
render_wizard
end
def update
... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/i18n_controller.rb | test/dummy/app/controllers/i18n_controller.rb | class I18nController < ApplicationController
include Wicked::Wizard::Translated
steps :first, :second, :last_step
def show
render_wizard
end
def update
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/dynamic_different_steps_controller.rb | test/dummy/app/controllers/dynamic_different_steps_controller.rb | class DynamicDifferentStepsController < ApplicationController
include Wicked::Wizard
before_action :set_steps
before_action :setup_wizard
def show
render_wizard
end
private
def set_steps
self.steps = if params[:steps]
params[:steps]
end
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/update_params_controller.rb | test/dummy/app/controllers/update_params_controller.rb | class UpdateParamsController < ApplicationController
include Wicked::Wizard
class Thing
def save
true
end
end
steps :first, :second, :last_step
def index
end
def show
render_wizard(nil, {}, { one: 'two' })
end
def update
@thing = Thing.new
render_wizard(@thing, { notice... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/redirect_to_finish_flash_controller.rb | test/dummy/app/controllers/redirect_to_finish_flash_controller.rb | class RedirectToFinishFlashController < ApplicationController
include Wicked::Wizard
steps :first, :second, :last_step
def index
end
def show
render_wizard
end
def update
render_wizard(nil, notice: 'Flash message notice')
end
def finish_wizard_path
redirect_to_finish_flash_index_path... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/redirect_to_next_controller.rb | test/dummy/app/controllers/redirect_to_next_controller.rb | class RedirectToNextController < ApplicationController
include Wicked::Wizard
steps :first, :second, :last_step
def show
if params[:jump_to]
if params[:jump_to] == 'finish_wizard'
redirect_to_finish_wizard :notice => params[:notice]
else
redirect_to_next params[:jump_to], :notice ... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/dynamic_steps_controller.rb | test/dummy/app/controllers/dynamic_steps_controller.rb | class DynamicStepsController < ApplicationController
include Wicked::Wizard
prepend_before_action :set_steps
def show
render_wizard
end
private
def set_steps
self.steps = if params[:steps]
params[:steps]
end
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/pages_controller.rb | test/dummy/app/controllers/pages_controller.rb | class PagesController < ApplicationController
def index
end
end | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/bar_controller.rb | test/dummy/app/controllers/bar_controller.rb | ## This controller uses includes
class BarController < ApplicationController
include Wicked::Wizard
steps :first, :second, :last_step
def show
skip_step if params[:skip_step]
flash[:notice] = params[:notice] if params[:notice]
render_wizard
end
def update
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/jump_controller.rb | test/dummy/app/controllers/jump_controller.rb | ## This controller uses includes
class JumpController < ApplicationController
include Wicked::Wizard
steps :first, :second, :last_step
def show
skip_step(skip_step_options) if params[:skip_step]
jump_to :last_step, skip_step_options if params[:jump_to]
if params[:resource]
value = params[:reso... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/application_controller.rb | test/dummy/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery
if respond_to? :before_action
before_action :pull_out_locale
else
before_filter :pull_out_locale
end
def pull_out_locale
I18n.locale = params[:locale] if params[:locale].present?
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/controllers/nested/builder_controller.rb | test/dummy/app/controllers/nested/builder_controller.rb | ## This controller uses includes
class Nested::BuilderController < ApplicationController
include Wicked::Wizard
steps :first, :second, :last_step
# nested_builder GET /nested/:nested_id/builder/:id(.:format) {:action=>"show", :controller=>"builder"}
def show
raise "no nested_id: #{params.inspect}... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/app/models/bar.rb | test/dummy/app/models/bar.rb | class Bar
def initialize(value)
@value = value
end
def save
@value
end
end
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/config/application.rb | test/dummy/config/application.rb | require File.expand_path('../boot', __FILE__)
require "active_model/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_view/railtie"
require "action_mailer/railtie"
Bundler.require
require "wicked"
module Dummy
class Application < Rails::Application
# Settings in confi... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/config/environment.rb | test/dummy/config/environment.rb | # Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Dummy::Application.initialize!
| ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/config/routes.rb | test/dummy/config/routes.rb | Dummy::Application.routes.draw do
resources :i18n
resources :bar
resources :jump
resources :step_positions
resources :dynamic_steps
resources :dynamic_different_steps
resources :string_steps
resources :redirect_to_next
resources :redirect_to_finish_flash
resources :status_codes
resources :updates
... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/config/boot.rb | test/dummy/config/boot.rb | require 'rubygems'
gemfile = File.expand_path('../../../../Gemfile', __FILE__)
if File.exist?(gemfile)
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
end
$:.unshift File.expand_path('../../../../lib', __FILE__) | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/config/initializers/session_store.rb | test/dummy/config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails ge... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
zombocom/wicked | https://github.com/zombocom/wicked/blob/2e7114d7027d71b9a10c7d8eee78717cc3e617d6/test/dummy/config/initializers/inflections.rb | test/dummy/config/initializers/inflections.rb | # Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', ... | ruby | MIT | 2e7114d7027d71b9a10c7d8eee78717cc3e617d6 | 2026-01-04T15:52:45.989568Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.