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
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/lib/time_tracker.rb
lib/time_tracker.rb
class TimeTracker attr_accessor :elapsed_time, :result def self.track start = Process.clock_gettime(Process::CLOCK_MONOTONIC) result = yield new(Process.clock_gettime(Process::CLOCK_MONOTONIC) - start, result) end def initialize(elapsed_time, result) @elapsed_time = elapsed_time @result = ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/lib/capistrano/sync.rb
lib/capistrano/sync.rb
require 'yaml' require 'pathname' require 'dotenv' # Edited by Andrew Cantino. Based on: https://gist.github.com/339471 # Original info: # # Capistrano sync.rb task for syncing databases and directories between the # local development environment and different multi_stage environments. You # cannot sync directly bet...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/lib/utils/html_transformer.rb
lib/utils/html_transformer.rb
module Utils module HtmlTransformer SINGLE = 1 MULTIPLE = 2 COMMA_SEPARATED = 3 SRCSET = 4 URI_ATTRIBUTES = { 'a' => { 'href' => SINGLE }, 'applet' => { 'archive' => COMMA_SEPARATED, 'codebase' => SINGLE }, 'area' => { 'href' => SINGLE }, 'audio' => { 'src' => SINGLE }, ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/application.rb
config/application.rb
require_relative 'boot' require 'rails' 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_view/railtie' # require "action_cable/engine" require 'sprockets/rai...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/environment.rb
config/environment.rb
# Load the Rails application. require_relative 'application' # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/routes.rb
config/routes.rb
Rails.application.routes.draw do resources :agents do member do post :run post :handle_details_post put :leave_scenario post :reemit_events delete :remove_events delete :memory, action: :destroy_memory end collection do put :toggle_visibility post :propagat...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/deploy.rb
config/deploy.rb
require 'dotenv' Dotenv.load # config valid only for current version of Capistrano lock '3.11.0' set :application, 'huginn' set :repo_url, ENV['CAPISTRANO_DEPLOY_REPO_URL'] || 'https://github.com/huginn/huginn.git' # Default branch is :master set :branch, ENV['CAPISTRANO_DEPLOY_BRANCH'] || ENV['BRANCH'] || 'master' ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/spring.rb
config/spring.rb
Spring.watch( ".ruby-version", ".rbenv-vars", "tmp/restart.txt", "tmp/caching-dev.txt" )
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/boot.rb
config/boot.rb
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. autoload :Logger, "logger"
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/content_security_policy.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/filter_parameter_logging.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/application_controller_renderer.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/mail_encoding_patch.rb
config/initializers/mail_encoding_patch.rb
require 'mail' module Mail module Utilities class ImprovedEncoder < BestEffortCharsetEncoder def pick_encoding(charset) case charset when /\Aiso-2022-jp\z/i Encoding::CP50220 when /\Ashift_jis\z/i Encoding::Windows_31J else super end ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/session_store.rb
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_rails_session'
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/devise.rb
config/initializers/devise.rb
require 'utils' # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwrit...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/timezone.rb
config/initializers/timezone.rb
# Set the timezone for the JavascriptAgent (libv8 only relies on the TZ variable) ENV['TZ'] = Time.zone.tzinfo.canonical_identifier
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/requires.rb
config/initializers/requires.rb
require 'pp' Rails.application.config.to_prepare do HuginnAgent.require! end
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/wrap_parameters.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/aws.rb
config/initializers/aws.rb
if defined?(RTurk) && !Rails.env.test? RTurk::logger.level = Logger::DEBUG RTurk.setup(ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_ACCESS_KEY'], :sandbox => ENV['AWS_SANDBOX'] == "true") end
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/inflections.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/liquid.rb
config/initializers/liquid.rb
module Liquid # https://github.com/Shopify/liquid/pull/623 remove_const :PartialTemplateParser remove_const :TemplateParser PartialTemplateParser = /#{TagStart}.*?#{TagEnd}|#{VariableStart}(?:(?:[^'"{}]+|#{QuotedString})*?|.*?)#{VariableIncompleteEnd}/m TemplateParser = /(#{PartialTemplate...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/mysqlpls.rb
config/initializers/mysqlpls.rb
# see https://github.com/rails/rails/issues/9855#issuecomment-28874587 # circumvents the default InnoDB limitation for index prefix bytes maximum when using proper 4byte UTF8 (utf8mb4) # (for server-side workaround see http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_large_prefix) if ENV['ON_...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/delayed_job.rb
config/initializers/delayed_job.rb
Delayed::Worker.destroy_failed_jobs = false Delayed::Worker.max_attempts = 5 Delayed::Worker.max_run_time = (ENV['DELAYED_JOB_MAX_RUNTIME'].presence || 2).to_i.minutes Delayed::Worker.read_ahead = 5 Delayed::Worker.default_priority = 10 Delayed::Worker.delay_jobs = !Rails.env.test? Delayed::Worker.sleep_delay = (ENV['D...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/cookies_serializer.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/permissions_policy.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/faraday_patch.rb
config/initializers/faraday_patch.rb
# Monkey patch https://github.com/lostisland/faraday/pull/513 # Fixes encoding issue when passing an URL with non UTF-8 characters module Faraday module Utils def unescape(s) string = s.to_s string.force_encoding(Encoding::BINARY) if RUBY_VERSION >= '1.9' CGI.unescape string end end end
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/silence_worker_status_logger.rb
config/initializers/silence_worker_status_logger.rb
module SilencedLogger def call(env) return super(env) if env['PATH_INFO'] !~ %r{^/worker_status} Rails.logger.silence(Logger::ERROR) do super(env) end end end Rails::Rack::Logger.send(:prepend, SilencedLogger)
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/assets.rb
config/initializers/assets.rb
# Be sure to restart your server when you modify this file. Rails.application.config.assets.enabled = true Rails.application.config.assets.initialize_on_precompile = false # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' # Add additional ass...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/multi_xml_patch.rb
config/initializers/multi_xml_patch.rb
# Same vulnerability as CVE-2013-0156 # https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion # Code has been submitted back to the project: # https://github.com/sferik/multi_xml/pull/34 # Until the fix is released, use this monkey-patch. require "multi_xml" module MultiXml class...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/action_mailer.rb
config/initializers/action_mailer.rb
ActionMailer::Base.smtp_settings = {}.tap { |config| config[:address] = ENV['SMTP_SERVER'] || 'smtp.gmail.com' config[:port] = ENV['SMTP_PORT']&.to_i || 587 config[:domain] = ENV['SMTP_DOMAIN'] authentication = ENV['SMTP_AUTHENTICATION'].presence || 'plain' user_name = ENV['SMTP_USER_NAME'].presence || 'none...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/backtrace_silencers.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/mime_types.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/initializers/secret_token.rb
config/initializers/secret_token.rb
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/deploy/production.rb
config/deploy/production.rb
server ENV['CAPISTRANO_DEPLOY_SERVER'], user: ENV['CAPISTRANO_DEPLOY_USER'] || 'huginn', port: ENV['CAPISTRANO_DEPLOY_PORT'] || 22, roles: %w{app db web}
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/environments/test.rb
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
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/environments/development.rb
config/environments/development.rb
require "active_support/core_ext/integer/time" $stdout.sync = true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. config.hosts << ENV['DOMAIN'] # In the development environment your application's code is reloaded any time # it changes. This ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/config/environments/production.rb
config/environments/production.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your applica...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/doc/deployment/capistrano/deploy.rb
doc/deployment/capistrano/deploy.rb
# This is an example Capistrano deployment script for Huginn. It # assumes you're running on an Ubuntu box and want to use Foreman, # Upstart, and Unicorn. default_run_options[:pty] = true set :application, "huginn" set :deploy_to, "/home/you/app" set :user, "you" set :use_sudo, false set :scm, :git set :rails_env, ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/doc/deployment/unicorn/production.rb
doc/deployment/unicorn/production.rb
app_path = "/home/you/app/current" worker_processes 2 preload_app true timeout 180 listen '/home/you/app/shared/pids/unicorn.socket' working_directory app_path rails_env = ENV['RAILS_ENV'] || 'production' # Log everything to one file stderr_path "log/unicorn.log" stdout_path "log/unicorn.log" # Set master PID loca...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/doc/deployment/backup/example_backup.rb
doc/deployment/backup/example_backup.rb
# This file contains an example template for using the Backup gem for backing up your Huginn installation to S3. # In your crontab do something like: # 0 0,12 * * * /bin/bash -l -c "RAILS_ENV=production backup perform -t huginn_backup --config_file /home/you/huginn_backup.rb" 2>&1 >> /home/you/huginn_backup_log.txt #...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
huginn/huginn
https://github.com/huginn/huginn/blob/8edec55aab03d4e3f13b205db02d21dc36e34e4f/deployment/heroku/unicorn.rb
deployment/heroku/unicorn.rb
require "net/http" worker_processes Integer(ENV["WEB_CONCURRENCY"] || 2) timeout 15 preload_app true # Note that this will only work correctly when running Heroku with ONE web worker. # If you want to run more than one, use the standard Huginn Procfile instead, with separate web and job entries. # You'll need to set ...
ruby
MIT
8edec55aab03d4e3f13b205db02d21dc36e34e4f
2026-01-04T15:37:27.328445Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/support/docker_gateway.rb
features/support/docker_gateway.rb
# Ensure Docker container is completely stopped when Ruby exits. at_exit do DockerGateway.new.stop end # Manages the Docker-based SSH server that is declared in docker-compose.yml. class DockerGateway def initialize(log_proc=$stderr.method(:puts)) @log_proc = log_proc end def start run_compose_command...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/support/env.rb
features/support/env.rb
require_relative "../../spec/support/test_app"
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/support/remote_command_helpers.rb
features/support/remote_command_helpers.rb
module RemoteCommandHelpers def test_dir_exists(path) exists?("d", path) end def test_symlink_exists(path) exists?("L", path) end def test_file_exists(path) exists?("f", path) end def exists?(type, path) %Q{[[ -#{type} "#{path}" ]]} end def symlinked?(symlink_path, target_path) ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/support/remote_ssh_helpers.rb
features/support/remote_ssh_helpers.rb
require "open3" require "socket" require_relative "docker_gateway" module RemoteSSHHelpers extend self class RemoteSSHCommandError < RuntimeError; end def start_ssh_server docker_gateway.start end def wait_for_ssh_server(retries=3) Socket.tcp("localhost", 2022, connect_timeout: 1).close rescue E...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/step_definitions/assertions.rb
features/step_definitions/assertions.rb
require "shellwords" Then(/^references in the remote repo are listed$/) do expect(@output).to include("refs/heads/master") end Then(/^git wrapper permissions are 0700$/) do permissions_test = %Q([ $(stat -c "%a" #{TestApp.git_wrapper_path_glob}) == "700" ]) expect { run_remote_ssh_command(permissions_test) }.no...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/step_definitions/setup.rb
features/step_definitions/setup.rb
Given(/^a test app with the default configuration$/) do TestApp.install end Given(/^a test app without any configuration$/) do TestApp.create_test_app end Given(/^servers with the roles app and web$/) do start_ssh_server wait_for_ssh_server end Given(/^a linked file "(.*?)"$/) do |file| # ignoring other li...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/features/step_definitions/cap_commands.rb
features/step_definitions/cap_commands.rb
When(/^I run cap "(.*?)"$/) do |task| @success, @output = TestApp.cap(task) end When(/^I run cap "(.*?)" within the "(.*?)" directory$/) do |task, directory| @success, @output = TestApp.cap(task, directory) end When(/^I run cap "(.*?)" as part of a release$/) do |task| TestApp.cap("deploy:new_release_path #{tas...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/integration_spec_helper.rb
spec/integration_spec_helper.rb
require "spec_helper" require "support/test_app" require "support/matchers" include TestApp
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) $LOAD_PATH.unshift(File.dirname(__FILE__)) require "capistrano/all" require "rspec" require "mocha/api" require "time" # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir['#{File.dirname(__FILE_...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/support/test_app.rb
spec/support/test_app.rb
require "English" require "fileutils" require "pathname" require "open3" module TestApp extend self def install install_test_app_with(default_config) end def default_config <<-CONFIG set :deploy_to, '#{deploy_to}' set :repo_url, 'https://github.com/capistrano/capistrano.git' set :br...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/support/matchers.rb
spec/support/matchers.rb
RSpec::Matchers.define :be_a_symlink_to do |expected| match do |actual| File.identical?(expected, actual) end end
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/integration/dsl_spec.rb
spec/integration/dsl_spec.rb
require "spec_helper" describe Capistrano::DSL do let(:dsl) { Class.new.extend Capistrano::DSL } before do Capistrano::Configuration.reset! end describe "setting and fetching hosts" do describe "when defining a host using the `server` syntax" do before do dsl.server "example1.com", role...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano_spec.rb
spec/lib/capistrano_spec.rb
require "spec_helper" module Capistrano describe Application do let(:app) { Application.new } end end
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/upload_task_spec.rb
spec/lib/capistrano/upload_task_spec.rb
require "spec_helper" describe Capistrano::UploadTask do let(:app) { Rake.application = Rake::Application.new } subject(:upload_task) { described_class.define_task("path/file.yml") } it { is_expected.to be_a(Rake::FileCreationTask) } it { is_expected.to be_needed } context "inside namespace" do let(:n...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/dsl_spec.rb
spec/lib/capistrano/dsl_spec.rb
require "spec_helper" module Capistrano class DummyDSL include DSL end # see also - spec/integration/dsl_spec.rb describe DSL do let(:dsl) { DummyDSL.new } describe "#t" do before do I18n.expects(:t).with(:phrase, count: 2, scope: :capistrano) end it "delegates to I18n"...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration_spec.rb
spec/lib/capistrano/configuration_spec.rb
require "spec_helper" module Capistrano describe Configuration do let(:config) { Configuration.new } let(:servers) { stub } describe ".new" do it "accepts initial hash" do configuration = described_class.new(custom: "value") expect(configuration.fetch(:custom)).to eq("value") ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/plugin_spec.rb
spec/lib/capistrano/plugin_spec.rb
require "spec_helper" require "capistrano/plugin" module Capistrano describe Plugin do include Rake::DSL include Capistrano::DSL class DummyPlugin < Capistrano::Plugin def define_tasks task :hello do end end def register_hooks before "deploy:published", "hello"...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/application_spec.rb
spec/lib/capistrano/application_spec.rb
require "spec_helper" describe Capistrano::Application do it "provides a --trace option which enables SSHKit/NetSSH trace output" it "provides a --format option which enables the choice of output formatting" it "displays documentation URL as help banner", capture_io: true do flags "--help", "-h" expect...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/scm_spec.rb
spec/lib/capistrano/scm_spec.rb
require "spec_helper" require "capistrano/scm" module RaiseNotImplementedMacro def raise_not_implemented_on(method) it "should raise NotImplemented on #{method}" do expect do subject.send(method) end.to raise_error(NotImplementedError) end end end RSpec.configure do include RaiseNot...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/version_validator_spec.rb
spec/lib/capistrano/version_validator_spec.rb
require "spec_helper" module Capistrano describe VersionValidator do let(:validator) { VersionValidator.new(version) } let(:version) { stub } describe "#new" do it "takes a version" do expect(validator) end end describe "#verify" do let(:current_version) { "3.0.1" } ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/immutable_task_spec.rb
spec/lib/capistrano/immutable_task_spec.rb
require "spec_helper" require "rake" require "capistrano/immutable_task" module Capistrano describe ImmutableTask do after do # Ensure that any tasks we create in these tests don't pollute other tests Rake::Task.clear end it "prints warning and raises when task is enhanced" do extend(R...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/dsl/task_enhancements_spec.rb
spec/lib/capistrano/dsl/task_enhancements_spec.rb
require "spec_helper" module Capistrano class DummyTaskEnhancements include TaskEnhancements end describe TaskEnhancements do let(:task_enhancements) { DummyTaskEnhancements.new } describe "ordering" do after do task.clear before_task.clear after_task.clear Rak...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/dsl/paths_spec.rb
spec/lib/capistrano/dsl/paths_spec.rb
require "spec_helper" describe Capistrano::DSL::Paths do let(:dsl) { Class.new.extend Capistrano::DSL } let(:parent) { Pathname.new("/var/shared") } let(:paths) { Class.new.extend Capistrano::DSL::Paths } let(:linked_dirs) { %w{log public/system} } let(:linked_files) { %w{config/database.yml log/my.log log/...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/plugin_installer_spec.rb
spec/lib/capistrano/configuration/plugin_installer_spec.rb
require "spec_helper" require "capistrano/plugin" require "capistrano/scm/plugin" module Capistrano class Configuration class ExamplePlugin < Capistrano::Plugin def set_defaults set_if_empty :example_variable, "foo" end def define_tasks task :example task :example_prere...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/scm_resolver_spec.rb
spec/lib/capistrano/configuration/scm_resolver_spec.rb
require "spec_helper" require "capistrano/scm" module Capistrano class Configuration describe SCMResolver do include Capistrano::DSL let(:resolver) { SCMResolver.new } before do Rake::Task.define_task("deploy:check") Rake::Task.define_task("deploy:new_release_path") Ra...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/null_filter_spec.rb
spec/lib/capistrano/configuration/null_filter_spec.rb
require "spec_helper" module Capistrano class Configuration describe NullFilter do subject(:null_filter) { NullFilter.new } describe "#filter" do let(:servers) { mock("servers") } it "returns the servers passed in as arguments" do expect(null_filter.filter(servers)).to eq(...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/question_spec.rb
spec/lib/capistrano/configuration/question_spec.rb
require "spec_helper" module Capistrano class Configuration describe Question do let(:question) { Question.new(key, default, stdin: stdin) } let(:question_without_echo) { Question.new(key, default, echo: false, stdin: stdin) } let(:question_without_default) { Question.new(key, nil, stdin: stdin...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/empty_filter_spec.rb
spec/lib/capistrano/configuration/empty_filter_spec.rb
require "spec_helper" module Capistrano class Configuration describe EmptyFilter do subject(:empty_filter) { EmptyFilter.new } describe "#filter" do let(:servers) { mock("servers") } it "returns an empty array" do expect(empty_filter.filter(servers)).to eq([]) end ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/filter_spec.rb
spec/lib/capistrano/configuration/filter_spec.rb
require "spec_helper" module Capistrano class Configuration describe Filter do let(:available) do [ Server.new("server1").add_roles(%i(web db)), Server.new("server2").add_role(:web), Server.new("server3").add_role(:redis), Server.new("server4").add_role(:db),...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/role_filter_spec.rb
spec/lib/capistrano/configuration/role_filter_spec.rb
require "spec_helper" module Capistrano class Configuration describe RoleFilter do subject(:role_filter) { RoleFilter.new(values) } let(:available) do [ Server.new("server1").add_roles(%i(web db)), Server.new("server2").add_role(:web), Server.new("server3").add_...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/servers_spec.rb
spec/lib/capistrano/configuration/servers_spec.rb
require "spec_helper" module Capistrano class Configuration describe Servers do let(:servers) { Servers.new } describe "adding a role" do it "adds two new server instances" do expect { servers.add_role(:app, %w{1 2}) } .to change { servers.count }.from(0).to(2) ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/host_filter_spec.rb
spec/lib/capistrano/configuration/host_filter_spec.rb
require "spec_helper" module Capistrano class Configuration describe HostFilter do subject(:host_filter) { HostFilter.new(values) } let(:available) do [Server.new("server1"), Server.new("server2"), Server.new("server3"), Server.new("server4"), Server.new("...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/configuration/server_spec.rb
spec/lib/capistrano/configuration/server_spec.rb
require "spec_helper" module Capistrano class Configuration describe Server do let(:server) { Server.new("root@hostname:1234") } describe "adding a role" do subject { server.add_role(:test) } it "adds the role" do expect { subject }.to change { server.roles.size }.from(0).t...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/doctor/gems_doctor_spec.rb
spec/lib/capistrano/doctor/gems_doctor_spec.rb
require "spec_helper" require "capistrano/doctor/gems_doctor" require "airbrussh/version" require "sshkit/version" require "net/ssh/version" module Capistrano module Doctor describe GemsDoctor do let(:doc) { GemsDoctor.new } it "prints using 4-space indentation" do expect { doc.call }.to out...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/doctor/output_helpers_spec.rb
spec/lib/capistrano/doctor/output_helpers_spec.rb
require "spec_helper" require "capistrano/doctor/output_helpers" module Capistrano module Doctor describe OutputHelpers do include OutputHelpers # Force color for the purpose of these tests before { ENV.stubs(:[]).with("SSHKIT_COLOR").returns("1") } it "prints titles in blue with newlin...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/doctor/variables_doctor_spec.rb
spec/lib/capistrano/doctor/variables_doctor_spec.rb
require "spec_helper" require "capistrano/doctor/variables_doctor" module Capistrano module Doctor describe VariablesDoctor do include Capistrano::DSL let(:doc) { VariablesDoctor.new } before do set :branch, "master" set :pty, false env.variables.untrusted! do ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/doctor/servers_doctor_spec.rb
spec/lib/capistrano/doctor/servers_doctor_spec.rb
require "spec_helper" require "capistrano/doctor/servers_doctor" module Capistrano module Doctor describe ServersDoctor do include Capistrano::DSL let(:doc) { ServersDoctor.new } before { Capistrano::Configuration.reset! } after { Capistrano::Configuration.reset! } it "prints usin...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/doctor/environment_doctor_spec.rb
spec/lib/capistrano/doctor/environment_doctor_spec.rb
require "spec_helper" require "capistrano/doctor/environment_doctor" module Capistrano module Doctor describe EnvironmentDoctor do let(:doc) { EnvironmentDoctor.new } it "prints using 4-space indentation" do expect { doc.call }.to output(/^ {4}/).to_stdout end it "prints the Rub...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/scm/git_spec.rb
spec/lib/capistrano/scm/git_spec.rb
require "spec_helper" require "capistrano/scm/git" module Capistrano describe SCM::Git do subject { Capistrano::SCM::Git.new } # This allows us to easily use `set`, `fetch`, etc. in the examples. let(:env) { Capistrano::Configuration.env } # Stub the SSHKit backend so we can set up expectations wi...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/scm/hg_spec.rb
spec/lib/capistrano/scm/hg_spec.rb
require "spec_helper" require "capistrano/scm/hg" module Capistrano describe SCM::Hg do subject { Capistrano::SCM::Hg.new } # This allows us to easily use `set`, `fetch`, etc. in the examples. let(:env) { Capistrano::Configuration.env } # Stub the SSHKit backend so we can set up expectations witho...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/spec/lib/capistrano/scm/svn_spec.rb
spec/lib/capistrano/scm/svn_spec.rb
require "spec_helper" require "capistrano/scm/svn" module Capistrano describe SCM::Svn do subject { Capistrano::SCM::Svn.new } # This allows us to easily use `set`, `fetch`, etc. in the examples. let(:env) { Capistrano::Configuration.env } # Stub the SSHKit backend so we can set up expectations wi...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano.rb
lib/capistrano.rb
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/version.rb
lib/capistrano/version.rb
module Capistrano VERSION = "3.20.0".freeze end
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/application.rb
lib/capistrano/application.rb
module Capistrano class Application < Rake::Application def initialize super @rakefiles = %w{capfile Capfile capfile.rb Capfile.rb} end def name "cap" end def run Rake.application = self super end def sort_options(options) not_applicable_to_capistrano...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/doctor.rb
lib/capistrano/doctor.rb
require "capistrano/doctor/environment_doctor" require "capistrano/doctor/gems_doctor" require "capistrano/doctor/variables_doctor" require "capistrano/doctor/servers_doctor" load File.expand_path("../tasks/doctor.rake", __FILE__)
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/setup.rb
lib/capistrano/setup.rb
require "capistrano/doctor" require "capistrano/immutable_task" include Capistrano::DSL namespace :load do task :defaults do load "capistrano/defaults.rb" end end require "airbrussh/capistrano" # We don't need to show the "using Airbrussh" banner announcement since # Airbrussh is now the built-in formatter. A...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/version_validator.rb
lib/capistrano/version_validator.rb
module Capistrano class VersionValidator def initialize(version) @version = version end def verify return self if match? raise "Capfile locked at #{version}, but #{current_version} is loaded" end private attr_reader :version def match? available =~ requested ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/upload_task.rb
lib/capistrano/upload_task.rb
require "rake/file_creation_task" module Capistrano class UploadTask < Rake::FileCreationTask def needed? true # always needed because we can't check remote hosts end end end
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/scm.rb
lib/capistrano/scm.rb
module Capistrano # Base class for SCM strategy providers. # # @abstract # # @attr_reader [Rake] context # # @author Hartog de Mik # class SCM attr_reader :context # Provide a wrapper for the SCM that loads a strategy for the user. # # @param [Rake] context The context in which th...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/plugin.rb
lib/capistrano/plugin.rb
require "capistrano/all" require "rake/tasklib" # IMPORTANT: The Capistrano::Plugin system is not yet considered a stable, # public API, and is subject to change without notice. Eventually it will be # officially documented and supported, but for now, use it at your own risk. # # Base class for Capistrano plugins. Mak...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/console.rb
lib/capistrano/console.rb
load File.expand_path("../tasks/console.rake", __FILE__)
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/dsl.rb
lib/capistrano/dsl.rb
require "capistrano/dsl/task_enhancements" require "capistrano/dsl/paths" require "capistrano/dsl/stages" require "capistrano/dsl/env" require "capistrano/configuration/filter" module Capistrano module DSL include TaskEnhancements include Env include Paths include Stages def invoke(task_name, *a...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/immutable_task.rb
lib/capistrano/immutable_task.rb
module Capistrano # This module extends a Rake::Task to freeze it to prevent it from being # enhanced. This is used to prevent users from enhancing a task at the wrong # point of Capistrano's boot process, which can happen if a Capistrano plugin # is loaded in deploy.rb by mistake (instead of in the Capfile). ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/configuration.rb
lib/capistrano/configuration.rb
require_relative "configuration/filter" require_relative "configuration/question" require_relative "configuration/plugin_installer" require_relative "configuration/server" require_relative "configuration/servers" require_relative "configuration/validated_variables" require_relative "configuration/variables" module Cap...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/i18n.rb
lib/capistrano/i18n.rb
require "i18n" en = { starting: "Starting", capified: "Capified", start: "Start", update: "Update", finalize: "Finalise", finishing: "Finishing", finished: "Finished", stage_not_set: "Stage not set, please call something such as `cap production deploy`, where production is a stage you have defined.", ...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/dotfile.rb
lib/capistrano/dotfile.rb
dotfile = Pathname.new(File.join(Dir.home, ".capfile")) load dotfile if dotfile.file?
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/deploy.rb
lib/capistrano/deploy.rb
require "capistrano/framework" load File.expand_path("../tasks/deploy.rake", __FILE__)
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/defaults.rb
lib/capistrano/defaults.rb
validate :application do |_key, value| changed_value = value.gsub(/[^A-Z0-9\.\-]/i, "_") if value != changed_value warn %Q(The :application value "#{value}" is invalid!) warn "Use only letters, numbers, hyphens, dots, and underscores. For example:" warn " set :application, '#{changed_value}'" raise...
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false
capistrano/capistrano
https://github.com/capistrano/capistrano/blob/dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334/lib/capistrano/install.rb
lib/capistrano/install.rb
load File.expand_path(File.join(File.dirname(__FILE__), "tasks/install.rake"))
ruby
MIT
dfe3133012d7d7d4fcd3f34d2790bcaeb4e8c334
2026-01-04T15:37:35.862177Z
false