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 |
|---|---|---|---|---|---|---|---|---|
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb | lib/bundler/vendor/thor/lib/thor/actions/create_file.rb | require_relative "empty_directory"
class Bundler::Thor
module Actions
# Create a new file relative to the destination root with the given data,
# which is the return value of a block or a data string.
#
# ==== Parameters
# destination<String>:: the relative path to the destination root.
# dat... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb | lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb | require "erb"
class Bundler::Thor
module Actions
# Copies the file from the relative source to the relative destination. If
# the destination is not given it's assumed to be equal to the source.
#
# ==== Parameters
# source<String>:: the relative path to the source root.
# destination<String>... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb | lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb | require_relative "empty_directory"
class Bundler::Thor
module Actions
# Injects the given content into a file. Different from gsub_file, this
# method is reversible.
#
# ==== Parameters
# destination<String>:: Relative path to the destination root
# data<String>:: Data to add to the file. Can... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb | lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb | class Bundler::Thor
module Actions
# Creates an empty directory.
#
# ==== Parameters
# destination<String>:: the relative path to the destination root.
# config<Hash>:: give :verbose => false to not log the status.
#
# ==== Examples
#
# empty_directory "doc"
#
def empty_d... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb | lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb | class Bundler::Thor
module CoreExt #:nodoc:
# A hash with indifferent access and magic predicates.
#
# hash = Bundler::Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true
#
# hash[:foo] #=> 'bar'
# hash['foo'] #=> 'bar'
# hash.foo? #=> tr... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/shell/color.rb | lib/bundler/vendor/thor/lib/thor/shell/color.rb | require_relative "basic"
class Bundler::Thor
module Shell
# Inherit from Bundler::Thor::Shell::Basic and add set_color behavior. Check
# Bundler::Thor::Shell::Basic to see all available methods.
#
class Color < Basic
# Embed in a String to clear all previous ANSI sequences.
CLEAR = "... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/shell/basic.rb | lib/bundler/vendor/thor/lib/thor/shell/basic.rb | class Bundler::Thor
module Shell
class Basic
DEFAULT_TERMINAL_WIDTH = 80
attr_accessor :base
attr_reader :padding
# Initialize base, mute and padding to nil.
#
def initialize #:nodoc:
@base = nil
@mute = false
@padding = 0
@always_force = fal... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/shell/html.rb | lib/bundler/vendor/thor/lib/thor/shell/html.rb | require_relative "basic"
class Bundler::Thor
module Shell
# Inherit from Bundler::Thor::Shell::Basic and add set_color behavior. Check
# Bundler::Thor::Shell::Basic to see all available methods.
#
class HTML < Basic
# The start of an HTML bold sequence.
BOLD = "font-weight: bold"
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/parser/options.rb | lib/bundler/vendor/thor/lib/thor/parser/options.rb | class Bundler::Thor
class Options < Arguments #:nodoc: # rubocop:disable ClassLength
LONG_RE = /^(--\w+(?:-\w+)*)$/
SHORT_RE = /^(-[a-z])$/i
EQ_RE = /^(--\w+(?:-\w+)*|-[a-z])=(.*)$/i
SHORT_SQ_RE = /^-([a-z]{2,})$/i # Allow either -x -v or -xv style for single char args
SHORT_NUM = /... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb | lib/bundler/vendor/thor/lib/thor/parser/arguments.rb | class Bundler::Thor
class Arguments #:nodoc: # rubocop:disable ClassLength
NUMERIC = /[-+]?(\d*\.\d+|\d+)/
# Receives an array of args and returns two arrays, one with arguments
# and one with switches.
#
def self.split(args)
arguments = []
args.each do |item|
break if item.i... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/parser/option.rb | lib/bundler/vendor/thor/lib/thor/parser/option.rb | class Bundler::Thor
class Option < Argument #:nodoc:
attr_reader :aliases, :group, :lazy_default, :hide, :repeatable
VALID_TYPES = [:boolean, :numeric, :hash, :array, :string]
def initialize(name, options = {})
@check_default_type = options[:check_default_type]
options[:required] = false unl... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/thor/lib/thor/parser/argument.rb | lib/bundler/vendor/thor/lib/thor/parser/argument.rb | class Bundler::Thor
class Argument #:nodoc:
VALID_TYPES = [:numeric, :hash, :array, :string]
attr_reader :name, :description, :enum, :required, :type, :default, :banner
alias_method :human_name, :name
def initialize(name, options = {})
class_name = self.class.name.split("::").last
type ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb | require 'net/http'
require_relative '../../../../uri/lib/uri'
require 'cgi' # for escaping
require_relative '../../../../connection_pool/lib/connection_pool'
autoload :OpenSSL, 'openssl'
##
# Persistent connections for Net::HTTP
#
# Bundler::Persistent::Net::HTTP::Persistent maintains persistent connections across al... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb | class Bundler::Persistent::Net::HTTP::Persistent::Pool < Bundler::ConnectionPool # :nodoc:
attr_reader :available # :nodoc:
attr_reader :key # :nodoc:
def initialize(options = {}, &block)
super
@available = Bundler::Persistent::Net::HTTP::Persistent::TimedStackMulti.new(@size, &block)
@key = "curre... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb | class Bundler::Persistent::Net::HTTP::Persistent::TimedStackMulti < Bundler::ConnectionPool::TimedStack # :nodoc:
##
# Returns a new hash that has arrays for keys
#
# Using a class method to limit the bindings referenced by the hash's
# default_proc
def self.hash_of_arrays # :nodoc:
Hash.new { |h,k| h... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb | lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb | ##
# A Net::HTTP connection wrapper that holds extra information for managing the
# connection's lifetime.
class Bundler::Persistent::Net::HTTP::Persistent::Connection # :nodoc:
attr_accessor :http
attr_accessor :last_use
attr_accessor :requests
attr_accessor :ssl_generation
def initialize http_class, h... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo.rb | lib/bundler/vendor/molinillo/lib/molinillo.rb | # frozen_string_literal: true
require_relative 'molinillo/compatibility'
require_relative 'molinillo/gem_metadata'
require_relative 'molinillo/errors'
require_relative 'molinillo/resolver'
require_relative 'molinillo/modules/ui'
require_relative 'molinillo/modules/specification_provider'
# Bundler::Molinillo is a gen... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb | # frozen_string_literal: true
require 'set'
require 'tsort'
require_relative 'dependency_graph/log'
require_relative 'dependency_graph/vertex'
module Bundler::Molinillo
# A directed acyclic graph that is tuned to hold named dependencies
class DependencyGraph
include Enumerable
# Enumerates through the v... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb | lib/bundler/vendor/molinillo/lib/molinillo/errors.rb | # frozen_string_literal: true
module Bundler::Molinillo
# An error that occurred during the resolution process
class ResolverError < StandardError; end
# An error caused by searching for a dependency that is completely unknown,
# i.e. has no versions available whatsoever.
class NoSuchDependencyError < Resol... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/state.rb | lib/bundler/vendor/molinillo/lib/molinillo/state.rb | # frozen_string_literal: true
module Bundler::Molinillo
# A state that a {Resolution} can be in
# @attr [String] name the name of the current requirement
# @attr [Array<Object>] requirements currently unsatisfied requirements
# @attr [DependencyGraph] activated the graph of activated dependencies
# @attr [Ob... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb | lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb | # frozen_string_literal: true
require_relative 'dependency_graph'
module Bundler::Molinillo
# This class encapsulates a dependency resolver.
# The resolver is responsible for determining which set of dependencies to
# activate, with feedback from the {#specification_provider}
#
#
class Resolver
requir... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb | lib/bundler/vendor/molinillo/lib/molinillo/compatibility.rb | # frozen_string_literal: true
module Bundler::Molinillo
# Hacks needed for old Ruby versions.
module Compatibility
module_function
if [].respond_to?(:flat_map)
# Flat map
# @param [Enumerable] enum an enumerable object
# @block the block to flat-map with
# @return The enum, flat-ma... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb | lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb | # frozen_string_literal: true
module Bundler::Molinillo
# The version of Bundler::Molinillo.
VERSION = '0.6.6'.freeze
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb | lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb | # frozen_string_literal: true
module Bundler::Molinillo
class Resolver
# A specific resolution from a given {Resolver}
class Resolution
# A conflict that the resolution process encountered
# @attr [Object] requirement the requirement that immediately led to the conflict
# @attr [{String,Nil... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | true |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb | # frozen_string_literal: true
require_relative 'action'
module Bundler::Molinillo
class DependencyGraph
# @!visibility private
# @see DependencyGraph#tag
class Tag < Action
# @!group Action
# (see Action.action_name)
def self.action_name
:tag
end
# (see Action#up)
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb | # frozen_string_literal: true
module Bundler::Molinillo
class DependencyGraph
# A vertex in a {DependencyGraph} that encapsulates a {#name} and a
# {#payload}
class Vertex
# @return [String] the name of the vertex
attr_accessor :name
# @return [Object] the payload the vertex holds
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb | # frozen_string_literal: true
require_relative 'add_edge_no_circular'
require_relative 'add_vertex'
require_relative 'delete_edge'
require_relative 'detach_vertex_named'
require_relative 'set_payload'
require_relative 'tag'
module Bundler::Molinillo
class DependencyGraph
# A log for dependency graph actions
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb | # frozen_string_literal: true
require_relative 'action'
module Bundler::Molinillo
class DependencyGraph
# @!visibility private
# (see DependencyGraph#add_edge_no_circular)
class AddEdgeNoCircular < Action
# @!group Action
# (see Action.action_name)
def self.action_name
:add_ver... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb | # frozen_string_literal: true
require_relative 'action'
module Bundler::Molinillo
class DependencyGraph
# @!visibility private
# (see DependencyGraph#delete_edge)
class DeleteEdge < Action
# @!group Action
# (see Action.action_name)
def self.action_name
:delete_edge
end
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb | # frozen_string_literal: true
require_relative 'action'
module Bundler::Molinillo
class DependencyGraph
# @!visibility private
# (see DependencyGraph#add_vertex)
class AddVertex < Action # :nodoc:
# @!group Action
# (see Action.action_name)
def self.action_name
:add_vertex
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb | # frozen_string_literal: true
require_relative 'action'
module Bundler::Molinillo
class DependencyGraph
# @!visibility private
# @see DependencyGraph#set_payload
class SetPayload < Action # :nodoc:
# @!group Action
# (see Action.action_name)
def self.action_name
:set_payload
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb | # frozen_string_literal: true
require_relative 'action'
module Bundler::Molinillo
class DependencyGraph
# @!visibility private
# @see DependencyGraph#detach_vertex_named
class DetachVertexNamed < Action
# @!group Action
# (see Action#name)
def self.action_name
:add_vertex
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb | lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb | # frozen_string_literal: true
module Bundler::Molinillo
class DependencyGraph
# An action that modifies a {DependencyGraph} that is reversible.
# @abstract
class Action
# rubocop:disable Lint/UnusedMethodArgument
# @return [Symbol] The name of the action.
def self.action_name
r... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb | lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb | # frozen_string_literal: true
module Bundler::Molinillo
module Delegates
# Delegates all {Bundler::Molinillo::SpecificationProvider} methods to a
# `#specification_provider` property.
module SpecificationProvider
# (see Bundler::Molinillo::SpecificationProvider#search_for)
def search_for(depe... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb | lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb | # frozen_string_literal: true
module Bundler::Molinillo
# @!visibility private
module Delegates
# Delegates all {Bundler::Molinillo::ResolutionState} methods to a `#state` property.
module ResolutionState
# (see Bundler::Molinillo::ResolutionState#name)
def name
current_state = state ||... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb | lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb | # frozen_string_literal: true
module Bundler::Molinillo
# Conveys information about the resolution process to a user.
module UI
# The {IO} object that should be used to print output. `STDOUT`, by default.
#
# @return [IO]
def output
STDOUT
end
# Called roughly every {#progress_rate},... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb | lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb | # frozen_string_literal: true
module Bundler::Molinillo
# Provides information about specifcations and dependencies to the resolver,
# allowing the {Resolver} class to remain generic while still providing power
# and flexibility.
#
# This module contains the methods that users of Bundler::Molinillo must to i... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/connection_pool/lib/connection_pool.rb | lib/bundler/vendor/connection_pool/lib/connection_pool.rb | require_relative 'connection_pool/version'
require_relative 'connection_pool/timed_stack'
# Generic connection pool class for e.g. sharing a limited number of network connections
# among many threads. Note: Connections are lazily created.
#
# Example usage with block (faster):
#
# @pool = Bundler::ConnectionPool.... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb | lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb | class Bundler::ConnectionPool
VERSION = "2.2.2"
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb | lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb | require 'thread'
require 'timeout'
require_relative 'monotonic_time'
##
# Raised when you attempt to retrieve a connection from a pool that has been
# shut down.
class Bundler::ConnectionPool::PoolShuttingDownError < RuntimeError; end
##
# The TimedStack manages a pool of homogeneous connections (or any resource
# y... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb | lib/bundler/vendor/connection_pool/lib/connection_pool/monotonic_time.rb | # Global monotonic clock from Concurrent Ruby 1.0.
# Copyright (c) Jerry D'Antonio -- released under the MIT license.
# Slightly modified; used with permission.
# https://github.com/ruby-concurrency/concurrent-ruby
require 'thread'
class Bundler::ConnectionPool
class_definition = Class.new do
if defined?(Proc... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/settings/validator.rb | lib/bundler/settings/validator.rb | # frozen_string_literal: true
module Bundler
class Settings
class Validator
class Rule
attr_reader :description
def initialize(keys, description, &validate)
@keys = keys
@description = description
@validate = validate
end
def validate!(key, va... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/fetcher/index.rb | lib/bundler/fetcher/index.rb | # frozen_string_literal: true
require_relative "base"
require "rubygems/remote_fetcher"
module Bundler
class Fetcher
class Index < Base
def specs(_gem_names)
Bundler.rubygems.fetch_all_remote_specs(remote)
rescue Gem::RemoteFetcher::FetchError, OpenSSL::SSL::SSLError, Net::HTTPFatalError => ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/fetcher/base.rb | lib/bundler/fetcher/base.rb | # frozen_string_literal: true
module Bundler
class Fetcher
class Base
attr_reader :downloader
attr_reader :display_uri
attr_reader :remote
def initialize(downloader, remote, display_uri)
raise "Abstract class" if self.class == Base
@downloader = downloader
@remote... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/fetcher/compact_index.rb | lib/bundler/fetcher/compact_index.rb | # frozen_string_literal: true
require_relative "base"
require_relative "../worker"
module Bundler
autoload :CompactIndexClient, File.expand_path("../compact_index_client", __dir__)
class Fetcher
class CompactIndex < Base
def self.compact_index_request(method_name)
method = instance_method(metho... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/fetcher/dependency.rb | lib/bundler/fetcher/dependency.rb | # frozen_string_literal: true
require_relative "base"
require "cgi"
module Bundler
class Fetcher
class Dependency < Base
def available?
@available ||= fetch_uri.scheme != "file" && downloader.fetch(dependency_api_uri)
rescue NetworkDownError => e
raise HTTPError, e.message
resc... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/fetcher/downloader.rb | lib/bundler/fetcher/downloader.rb | # frozen_string_literal: true
module Bundler
class Fetcher
class Downloader
attr_reader :connection
attr_reader :redirect_limit
def initialize(connection, redirect_limit)
@connection = connection
@redirect_limit = redirect_limit
end
def fetch(uri, headers = {}, cou... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/path.rb | lib/bundler/source/path.rb | # frozen_string_literal: true
module Bundler
class Source
class Path < Source
autoload :Installer, File.expand_path("path/installer", __dir__)
attr_reader :path, :options, :root_path, :original_path
attr_writer :name
attr_accessor :version
protected :original_path
DEFAULT_G... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/rubygems.rb | lib/bundler/source/rubygems.rb | # frozen_string_literal: true
require "rubygems/user_interaction"
module Bundler
class Source
class Rubygems < Source
autoload :Remote, File.expand_path("rubygems/remote", __dir__)
# Use the API when installing less than X gems
API_REQUEST_LIMIT = 500
# Ask for X gems per API request
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/gemspec.rb | lib/bundler/source/gemspec.rb | # frozen_string_literal: true
module Bundler
class Source
class Gemspec < Path
attr_reader :gemspec
def initialize(options)
super
@gemspec = options["gemspec"]
end
def as_path_source
Path.new(options)
end
end
end
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/git.rb | lib/bundler/source/git.rb | # frozen_string_literal: true
require_relative "../vendored_fileutils"
module Bundler
class Source
class Git < Path
autoload :GitProxy, File.expand_path("git/git_proxy", __dir__)
attr_reader :uri, :ref, :branch, :options, :glob, :submodules
def initialize(options)
@options = options
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/metadata.rb | lib/bundler/source/metadata.rb | # frozen_string_literal: true
module Bundler
class Source
class Metadata < Source
def specs
@specs ||= Index.build do |idx|
idx << Gem::Specification.new("Ruby\0", RubyVersion.system.to_gem_version_with_patchlevel)
idx << Gem::Specification.new("RubyGems\0", Gem::VERSION) do |s|... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/git/git_proxy.rb | lib/bundler/source/git/git_proxy.rb | # frozen_string_literal: true
require "shellwords"
module Bundler
class Source
class Git
class GitNotInstalledError < GitError
def initialize
msg = String.new
msg << "You need to install git to be able to use gems from git repositories. "
msg << "For help installing g... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/rubygems/remote.rb | lib/bundler/source/rubygems/remote.rb | # frozen_string_literal: true
module Bundler
class Source
class Rubygems
class Remote
attr_reader :uri, :anonymized_uri, :original_uri
def initialize(uri)
orig_uri = uri
uri = Bundler.settings.mirror_for(uri)
@original_uri = orig_uri if orig_uri != uri
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/source/path/installer.rb | lib/bundler/source/path/installer.rb | # frozen_string_literal: true
module Bundler
class Source
class Path
class Installer < Bundler::RubyGemsGemInstaller
attr_reader :spec
def initialize(spec, options = {})
@options = options
@spec = spec
@gem_dir = Bundler.rub... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/resolver/spec_group.rb | lib/bundler/resolver/spec_group.rb | # frozen_string_literal: true
module Bundler
class Resolver
class SpecGroup
include GemHelpers
attr_accessor :name, :version, :source
attr_accessor :ignores_bundler_dependencies
def initialize(all_specs)
@all_specs = all_specs
raise ArgumentError, "cannot initialize with... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/templates/gems.rb | lib/bundler/templates/gems.rb | # frozen_string_literal: true
# A sample gems.rb
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/add.rb | lib/bundler/cli/add.rb | # frozen_string_literal: true
module Bundler
class CLI::Add
attr_reader :gems, :options, :version
def initialize(options, gems)
@gems = gems
@options = options
@options[:group] = options[:group].split(",").map(&:strip) unless options[:group].nil?
@version = options[:version].split(",... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/platform.rb | lib/bundler/cli/platform.rb | # frozen_string_literal: true
module Bundler
class CLI::Platform
attr_reader :options
def initialize(options)
@options = options
end
def run
platforms, ruby_version = Bundler.ui.silence do
locked_ruby_version = Bundler.locked_gems && Bundler.locked_gems.ruby_version
gemfi... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/common.rb | lib/bundler/cli/common.rb | # frozen_string_literal: true
module Bundler
module CLI::Common
def self.output_post_install_messages(messages)
return if Bundler.settings["ignore_messages"]
messages.to_a.each do |name, msg|
print_post_install_message(name, msg) unless Bundler.settings["ignore_messages.#{name}"]
end
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/clean.rb | lib/bundler/cli/clean.rb | # frozen_string_literal: true
module Bundler
class CLI::Clean
attr_reader :options
def initialize(options)
@options = options
end
def run
require_path_or_force unless options[:"dry-run"]
Bundler.load.clean(options[:"dry-run"])
end
protected
def require_path_or_force
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/update.rb | lib/bundler/cli/update.rb | # frozen_string_literal: true
module Bundler
class CLI::Update
attr_reader :options, :gems
def initialize(options, gems)
@options = options
@gems = gems
end
def run
Bundler.ui.level = "error" if options[:quiet]
Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.featu... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/doctor.rb | lib/bundler/cli/doctor.rb | # frozen_string_literal: true
require "rbconfig"
module Bundler
class CLI::Doctor
DARWIN_REGEX = /\s+(.+) \(compatibility /.freeze
LDD_REGEX = /\t\S+ => (\S+) \(\S+\)/.freeze
attr_reader :options
def initialize(options)
@options = options
end
def otool_available?
Bundler.which... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/viz.rb | lib/bundler/cli/viz.rb | # frozen_string_literal: true
module Bundler
class CLI::Viz
attr_reader :options, :gem_name
def initialize(options)
@options = options
end
def run
# make sure we get the right `graphviz`. There is also a `graphviz`
# gem we're not built to support
gem "ruby-graphviz"
re... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/outdated.rb | lib/bundler/cli/outdated.rb | # frozen_string_literal: true
module Bundler
class CLI::Outdated
attr_reader :options, :gems, :options_include_groups, :filter_options_patch, :sources, :strict
attr_accessor :outdated_gems
def initialize(options, gems)
@options = options
@gems = gems
@sources = Array(options[:source])
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/issue.rb | lib/bundler/cli/issue.rb | # frozen_string_literal: true
require "rbconfig"
module Bundler
class CLI::Issue
def run
Bundler.ui.info <<-EOS.gsub(/^ {8}/, "")
Did you find an issue with Bundler? Before filing a new issue,
be sure to check out these resources:
1. Check out our troubleshooting guide for quick f... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/binstubs.rb | lib/bundler/cli/binstubs.rb | # frozen_string_literal: true
module Bundler
class CLI::Binstubs
attr_reader :options, :gems
def initialize(options, gems)
@options = options
@gems = gems
end
def run
Bundler.definition.validate_runtime!
path_option = options["path"]
path_option = nil if path_option && ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/pristine.rb | lib/bundler/cli/pristine.rb | # frozen_string_literal: true
module Bundler
class CLI::Pristine
def initialize(gems)
@gems = gems
end
def run
CLI::Common.ensure_all_gems_in_lockfile!(@gems)
definition = Bundler.definition
definition.validate_runtime!
installer = Bundler::Installer.new(Bundler.root, defin... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/plugin.rb | lib/bundler/cli/plugin.rb | # frozen_string_literal: true
require_relative "../vendored_thor"
module Bundler
class CLI::Plugin < Thor
desc "install PLUGINS", "Install the plugin from the source"
long_desc <<-D
Install plugins either from the rubygems source provided (with --source option) or from a git source provided with --git ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/console.rb | lib/bundler/cli/console.rb | # frozen_string_literal: true
module Bundler
class CLI::Console
attr_reader :options, :group
def initialize(options, group)
@options = options
@group = group
end
def run
Bundler::SharedHelpers.major_deprecation 2, "bundle console will be replaced " \
"by ... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/exec.rb | lib/bundler/cli/exec.rb | # frozen_string_literal: true
require_relative "../current_ruby"
module Bundler
class CLI::Exec
attr_reader :options, :args, :cmd
TRAPPED_SIGNALS = %w[INT].freeze
def initialize(options, args)
@options = options
@cmd = args.shift
@args = args
if !Bundler.current_ruby.jruby?
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/info.rb | lib/bundler/cli/info.rb | # frozen_string_literal: true
module Bundler
class CLI::Info
attr_reader :gem_name, :options
def initialize(options, gem_name)
@options = options
@gem_name = gem_name
end
def run
Bundler.ui.silence do
Bundler.definition.validate_runtime!
Bundler.load.lock
end
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/open.rb | lib/bundler/cli/open.rb | # frozen_string_literal: true
require "shellwords"
module Bundler
class CLI::Open
attr_reader :options, :name
def initialize(options, name)
@options = options
@name = name
end
def run
editor = [ENV["BUNDLER_EDITOR"], ENV["VISUAL"], ENV["EDITOR"]].find {|e| !e.nil? && !e.empty? }
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/list.rb | lib/bundler/cli/list.rb | # frozen_string_literal: true
module Bundler
class CLI::List
def initialize(options)
@options = options
@without_group = options["without-group"].map(&:to_sym)
@only_group = options["only-group"].map(&:to_sym)
end
def run
raise InvalidOption, "The `--only-group` and `--without-gr... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/config.rb | lib/bundler/cli/config.rb | # frozen_string_literal: true
module Bundler
class CLI::Config < Thor
class_option :parseable, :type => :boolean, :banner => "Use minimal formatting for more parseable output"
def self.scope_options
method_option :global, :type => :boolean, :banner => "Only change the global config"
method_optio... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/check.rb | lib/bundler/cli/check.rb | # frozen_string_literal: true
module Bundler
class CLI::Check
attr_reader :options
def initialize(options)
@options = options
end
def run
Bundler.settings.set_command_option_if_given :path, options[:path]
begin
definition = Bundler.definition
definition.validate_r... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/inject.rb | lib/bundler/cli/inject.rb | # frozen_string_literal: true
module Bundler
class CLI::Inject
attr_reader :options, :name, :version, :group, :source, :gems
def initialize(options, name, version)
@options = options
@name = name
@version = version || last_version_number
@group = options[:group].split(",") unless opti... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/install.rb | lib/bundler/cli/install.rb | # frozen_string_literal: true
module Bundler
class CLI::Install
attr_reader :options
def initialize(options)
@options = options
end
def run
Bundler.ui.level = "error" if options[:quiet]
warn_if_root
normalize_groups
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/init.rb | lib/bundler/cli/init.rb | # frozen_string_literal: true
module Bundler
class CLI::Init
attr_reader :options
def initialize(options)
@options = options
end
def run
if File.exist?(gemfile)
Bundler.ui.error "#{gemfile} already exists at #{File.expand_path(gemfile)}"
exit 1
end
unless Fil... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/gem.rb | lib/bundler/cli/gem.rb | # frozen_string_literal: true
require "pathname"
module Bundler
class CLI
Bundler.require_thor_actions
include Thor::Actions
end
class CLI::Gem
TEST_FRAMEWORK_VERSIONS = {
"rspec" => "3.0",
"minitest" => "5.0",
"test-unit" => "3.0",
}.freeze
attr_reader :options, :gem_nam... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/remove.rb | lib/bundler/cli/remove.rb | # frozen_string_literal: true
module Bundler
class CLI::Remove
def initialize(gems, options)
@gems = gems
@options = options
end
def run
raise InvalidOption, "Please specify gems to remove." if @gems.empty?
Injector.remove(@gems, {})
Installer.install(Bundler.root, Bundle... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/show.rb | lib/bundler/cli/show.rb | # frozen_string_literal: true
module Bundler
class CLI::Show
attr_reader :options, :gem_name, :latest_specs
def initialize(options, gem_name)
@options = options
@gem_name = gem_name
@verbose = options[:verbose] || options[:outdated]
@latest_specs = fetch_latest_specs if @verbose
e... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/cache.rb | lib/bundler/cli/cache.rb | # frozen_string_literal: true
module Bundler
class CLI::Cache
attr_reader :options
def initialize(options)
@options = options
end
def run
Bundler.ui.level = "error" if options[:quiet]
Bundler.settings.set_command_option_if_given :path, options[:path]
Bundler.settings.set_com... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/cli/lock.rb | lib/bundler/cli/lock.rb | # frozen_string_literal: true
module Bundler
class CLI::Lock
attr_reader :options
def initialize(options)
@options = options
end
def run
unless Bundler.default_gemfile
Bundler.ui.error "Unable to find a Gemfile to lock"
exit 1
end
print = options[:print]
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/ui/shell.rb | lib/bundler/ui/shell.rb | # frozen_string_literal: true
require_relative "../vendored_thor"
module Bundler
module UI
class Shell
LEVELS = %w[silent error warn confirm info debug].freeze
attr_writer :shell
def initialize(options = {})
Thor::Base.shell = options["no-color"] ? Thor::Shell::Basic : nil
@s... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/ui/rg_proxy.rb | lib/bundler/ui/rg_proxy.rb | # frozen_string_literal: true
require_relative "../ui"
require "rubygems/user_interaction"
module Bundler
module UI
class RGProxy < ::Gem::SilentUI
def initialize(ui)
@ui = ui
super()
end
def say(message)
@ui && @ui.debug(message)
end
end
end
end
| ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/ui/silent.rb | lib/bundler/ui/silent.rb | # frozen_string_literal: true
module Bundler
module UI
class Silent
attr_writer :shell
def initialize
@warnings = []
end
def add_color(string, color)
string
end
def info(message, newline = nil)
end
def confirm(message, newline = nil)
end
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/installer/gem_installer.rb | lib/bundler/installer/gem_installer.rb | # frozen_string_literal: true
require "shellwords"
module Bundler
class GemInstaller
attr_reader :spec, :standalone, :worker, :force, :installer
def initialize(spec, installer, standalone = false, worker = 0, force = false)
@spec = spec
@installer = installer
@standalone = standalone
... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/installer/parallel_installer.rb | lib/bundler/installer/parallel_installer.rb | # frozen_string_literal: true
require_relative "../worker"
require_relative "gem_installer"
module Bundler
class ParallelInstaller
class SpecInstallation
attr_accessor :spec, :name, :post_install_message, :state, :error
def initialize(spec)
@spec = spec
@name = spec.name
@sta... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
rubygems/bundler | https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/installer/standalone.rb | lib/bundler/installer/standalone.rb | # frozen_string_literal: true
module Bundler
class Standalone
def initialize(groups, definition)
@specs = groups.empty? ? definition.requested_specs : definition.specs_for(groups.map(&:to_sym))
end
def generate
SharedHelpers.filesystem_access(bundler_path) do |p|
FileUtils.mkdir_p(p)... | ruby | MIT | 35be6d9a603084f719fec4f4028c18860def07f6 | 2026-01-04T15:44:52.942591Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/spec/spec_helper.rb | spec/spec_helper.rb | $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
# Ruby stdlib dependencies
require 'tmpdir'
require 'fileutils'
# RSpec testing framework
require 'rspec'
# Teamocil
require 'teamocil'
RSpec.configure do |config|
# Disable `should` syntax
config.expect_with(:rspec) { |c| c.syntax = :expect }
end
| ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/spec/teamocil/cli_spec.rb | spec/teamocil/cli_spec.rb | require 'spec_helper'
RSpec.describe Teamocil::CLI do
describe :run! do
let(:cli) { Teamocil::CLI.new(arguments: arguments, environment: environment) }
let(:environment) { { 'HOME' => Dir.tmpdir } }
let(:root) { File.join(environment['HOME'], '.teamocil') }
describe 'with --list option' do
let... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/spec/teamocil/layout_spec.rb | spec/teamocil/layout_spec.rb | require 'spec_helper'
RSpec.describe Teamocil::Layout do
describe :execute! do
let(:layout) { Teamocil::Layout.new(path: path) }
let(:execute!) { layout.execute! }
let(:path) { double('Path') }
let(:options) { {} }
before { allow(Teamocil).to receive(:options).and_return(options) }
context ... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/spec/teamocil/tmux/pane_spec.rb | spec/teamocil/tmux/pane_spec.rb | require 'spec_helper'
RSpec.describe Teamocil::Tmux::Pane do
describe :as_tmux do
let(:pane) { Teamocil::Tmux::Pane.new(commands: commands, root: root, index: index, focus: focus, layout: layout, name: name) }
let(:as_tmux) { pane.as_tmux }
let(:pane_base_index) { Random.rand(0..100) }
before do
... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/spec/teamocil/tmux/session_spec.rb | spec/teamocil/tmux/session_spec.rb | require 'spec_helper'
RSpec.describe Teamocil::Tmux::Session do
pending
end
| ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/spec/teamocil/tmux/window_spec.rb | spec/teamocil/tmux/window_spec.rb | require 'spec_helper'
RSpec.describe Teamocil::Tmux::Window do
let(:window) { Teamocil::Tmux::Window.new(index: index, root: root, layout: layout, name: name, panes: panes, options: window_options) }
let(:as_tmux) { window.as_tmux }
before do
allow(Teamocil::Tmux::Pane).to receive(:pane_base_index).and_retu... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/lib/teamocil.rb | lib/teamocil.rb | require 'yaml'
require 'optparse'
# Version
require 'teamocil/version'
# Utils
require 'teamocil/utils/closed_struct'
require 'teamocil/utils/option_parser'
# Teamocil
require 'teamocil/layout'
require 'teamocil/cli'
# Errors
require 'teamocil/error/layout_not_found'
require 'teamocil/error/invalid_yaml_layout'
# ... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/lib/teamocil/version.rb | lib/teamocil/version.rb | module Teamocil
VERSION = '1.4.2'
end
| ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/lib/teamocil/tmux.rb | lib/teamocil/tmux.rb | module Teamocil
module Tmux
def self.option(option, default: nil)
command = Teamocil::Command::ShowOptions.new(name: option)
value = Teamocil.query_system(command).chomp
value.empty? ? default : value.to_i
end
def self.window_option(option, default: nil)
command = Teamocil::Comman... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
remi/teamocil | https://github.com/remi/teamocil/blob/9ceecf5a89f73b9c01b20237c6854b6b3aed9690/lib/teamocil/cli.rb | lib/teamocil/cli.rb | require 'shellwords'
module Teamocil
class CLI < ClosedStruct.new(:arguments, :environment)
DIRECTORY = '$HOME/.teamocil'
def run!
Teamocil.parse_options!(arguments: arguments)
# List available layouts
return Teamocil::Layout.print_available_layouts(directory: root) if Teamocil.options[:l... | ruby | MIT | 9ceecf5a89f73b9c01b20237c6854b6b3aed9690 | 2026-01-04T15:55:57.509578Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.