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
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands.rb
lib/packwerk/commands.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands extend T::Sig extend ActiveSupport::Autoload autoload :BaseCommand autoload :CheckCommand autoload :HelpCommand autoload :InitCommand autoload :LazyLoadedEntry autoload :UpdateTodoCommand autoload :Uses...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/files_for_processing.rb
lib/packwerk/files_for_processing.rb
# typed: strict # frozen_string_literal: true module Packwerk class FilesForProcessing extend T::Sig RelativeFileSet = T.type_alias { T::Set[String] } class << self extend T::Sig sig do params( relative_file_paths: T::Array[String], configuration: Configuration,...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/association_inspector.rb
lib/packwerk/association_inspector.rb
# typed: strict # frozen_string_literal: true module Packwerk # Extracts the implicit constant reference from an active record association class AssociationInspector extend T::Sig include ConstantNameInspector CustomAssociations = T.type_alias { T.any(T::Array[Symbol], T::Set[Symbol]) } RAILS_ASS...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/unresolved_reference.rb
lib/packwerk/unresolved_reference.rb
# typed: true # frozen_string_literal: true module Packwerk # An unresolved reference from a file in one package to a constant that may be defined in a different package. # Unresolved means that we know how it's referred to in the file, # and we have enough context on that reference to figure out the fully quali...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/disable_sorbet.rb
lib/packwerk/disable_sorbet.rb
# typed: true # frozen_string_literal: true require "sorbet-runtime" begin T::Configuration.default_checked_level = :never T.singleton_class.prepend( Module.new do def cast(value, type, checked: true) value end def let(value, type, checked: true) value end def ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/reference_extractor.rb
lib/packwerk/reference_extractor.rb
# typed: strict # frozen_string_literal: true module Packwerk # Extracts a possible constant reference from a given AST node. class ReferenceExtractor extend T::Sig class << self extend T::Sig sig do params( unresolved_references: T::Array[UnresolvedReference], con...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/package_set.rb
lib/packwerk/package_set.rb
# typed: strict # frozen_string_literal: true require "pathname" require "bundler" module Packwerk PathSpec = T.type_alias { T.any(String, T::Array[String]) } # A set of {Packwerk::Package}s as well as methods to parse packages from the filesystem. class PackageSet extend T::Sig extend T::Generic i...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/parsers.rb
lib/packwerk/parsers.rb
# typed: strict # frozen_string_literal: true module Packwerk module Parsers autoload :Erb, "packwerk/parsers/erb" autoload :Factory, "packwerk/parsers/factory" autoload :ParserInterface, "packwerk/parsers/parser_interface" autoload :Ruby, "packwerk/parsers/ruby" class ParseResult < Offense; end...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/package_todo.rb
lib/packwerk/package_todo.rb
# typed: strict # frozen_string_literal: true require "yaml" module Packwerk class PackageTodo extend T::Sig PackageName = T.type_alias { String } ConstantName = T.type_alias { String } FilePath = T.type_alias { String } Entry = T.type_alias { T::Hash[ConstantName, T::Hash[ConstantName, T::Arra...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/const_node_inspector.rb
lib/packwerk/const_node_inspector.rb
# typed: strict # frozen_string_literal: true module Packwerk # Extracts a constant name from an AST node of type :const class ConstNodeInspector extend T::Sig include ConstantNameInspector sig do override .params(node: AST::Node, ancestors: T::Array[AST::Node], relative_file: String) ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/constant_discovery.rb
lib/packwerk/constant_discovery.rb
# typed: strict # frozen_string_literal: true require "constant_resolver" module Packwerk # Get information about unresolved constants without loading the application code. # Information gathered: Fully qualified name, path to file containing the definition, package, # and visibility (public/private to the pack...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/checker.rb
lib/packwerk/checker.rb
# typed: strict # frozen_string_literal: true module Packwerk module Checker extend T::Sig extend T::Helpers abstract! class << self extend T::Sig sig { params(base: T::Class[T.anything]).void } def included(base) checkers << base end sig { returns(T::Array[C...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/node_processor_factory.rb
lib/packwerk/node_processor_factory.rb
# typed: strict # frozen_string_literal: true module Packwerk class NodeProcessorFactory < T::Struct extend T::Sig const :root_path, String const :constant_name_inspectors, T::Array[ConstantNameInspector] sig { params(relative_file: String, node: AST::Node).returns(NodeProcessor) } def for(rela...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/cache.rb
lib/packwerk/cache.rb
# typed: strict # frozen_string_literal: true require "digest" module Packwerk class Cache extend T::Sig class CacheContents < T::Struct extend T::Sig const :file_contents_digest, String const :unresolved_references, T::Array[UnresolvedReference] class << self extend T::Si...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/run_context.rb
lib/packwerk/run_context.rb
# typed: strict # frozen_string_literal: true require "constant_resolver" module Packwerk # Holds the context of a Packwerk run across multiple files. class RunContext extend T::Sig class << self extend T::Sig sig do params(configuration: Configuration).returns(RunContext) end ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/file_processor.rb
lib/packwerk/file_processor.rb
# typed: strict # frozen_string_literal: true require "parser/ast/node" module Packwerk class FileProcessor extend T::Sig class UnknownFileTypeResult < Offense extend T::Sig sig { params(file: String).void } def initialize(file:) super(file: file, message: "unknown file type") ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/output_styles/plain.rb
lib/packwerk/output_styles/plain.rb
# typed: strict # frozen_string_literal: true module Packwerk module OutputStyles class Plain extend T::Sig include OutputStyle sig { override.returns(String) } def reset "" end sig { override.returns(String) } def filename "" end sig { ove...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/output_styles/coloured.rb
lib/packwerk/output_styles/coloured.rb
# typed: strict # frozen_string_literal: true module Packwerk module OutputStyles # See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit for ANSI escape colour codes class Coloured extend T::Sig include OutputStyle sig { override.returns(String) } def reset "\033[m" ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/validators/dependency_validator.rb
lib/packwerk/validators/dependency_validator.rb
# typed: strict # frozen_string_literal: true module Packwerk module Validators class DependencyValidator extend T::Sig include Validator sig do override.params(package_set: PackageSet, configuration: Configuration).returns(Validator::Result) end def call(package_set, confi...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/base_command.rb
lib/packwerk/commands/base_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class BaseCommand extend T::Sig extend T::Helpers abstract! @description = T.let("", String) class << self extend T::Sig sig { params(description: T.nilable(String)).returns(String) } ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/validate_command.rb
lib/packwerk/commands/validate_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class ValidateCommand < BaseCommand extend T::Sig description "verify integrity of packwerk and package configuration" sig { override.returns(T::Boolean) } def run validator_result = T.let(nil, T.nilab...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/lazy_loaded_entry.rb
lib/packwerk/commands/lazy_loaded_entry.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class LazyLoadedEntry extend T::Sig sig { returns(String) } attr_reader :name sig { params(name: String, aliases: T::Array[String]).void } def initialize(name, aliases: []) @name = name @...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/check_command.rb
lib/packwerk/commands/check_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class CheckCommand < BaseCommand extend T::Sig include UsesParseRun description "run all checks" sig { override.returns(T::Boolean) } def run if @files_for_processing.files.empty? out.p...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/help_command.rb
lib/packwerk/commands/help_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class HelpCommand < BaseCommand extend T::Sig description "display help information about packwerk" sig { override.returns(T::Boolean) } def run err_out.puts(<<~USAGE) Usage: #{$PROGRAM_NAME}...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/init_command.rb
lib/packwerk/commands/init_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class InitCommand < BaseCommand extend T::Sig description "set up packwerk" sig { override.returns(T::Boolean) } def run out.puts("📦 Initializing Packwerk...") configuration_file = Generators...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/version_command.rb
lib/packwerk/commands/version_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class VersionCommand < BaseCommand extend T::Sig description "output packwerk version" sig { override.returns(T::Boolean) } def run out.puts(Packwerk::VERSION) true end end end end
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/update_todo_command.rb
lib/packwerk/commands/update_todo_command.rb
# typed: strict # frozen_string_literal: true module Packwerk module Commands class UpdateTodoCommand < BaseCommand extend T::Sig include UsesParseRun description "update package_todo.yml files" sig { override.returns(T::Boolean) } def run if @files_for_processing.files_sp...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/commands/uses_parse_run.rb
lib/packwerk/commands/uses_parse_run.rb
# typed: strict # frozen_string_literal: true require "optparse" module Packwerk module Commands module UsesParseRun extend T::Sig extend T::Helpers requires_ancestor { BaseCommand } sig do params( args: T::Array[String], configuration: Configuration, ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/generators/root_package.rb
lib/packwerk/generators/root_package.rb
# typed: strict # frozen_string_literal: true module Packwerk module Generators class RootPackage extend T::Sig class << self extend T::Sig sig { params(root: String, out: T.any(IO, StringIO)).returns(T::Boolean) } def generate(root:, out:) new(root: root, out: out...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/generators/configuration_file.rb
lib/packwerk/generators/configuration_file.rb
# typed: strict # frozen_string_literal: true require "erb" module Packwerk module Generators class ConfigurationFile extend T::Sig CONFIGURATION_TEMPLATE_FILE_PATH = "templates/packwerk.yml.erb" class << self extend T::Sig sig { params(root: String, out: T.any(IO, StringIO)...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/formatters/default_offenses_formatter.rb
lib/packwerk/formatters/default_offenses_formatter.rb
# typed: strict # frozen_string_literal: true module Packwerk module Formatters class DefaultOffensesFormatter include OffensesFormatter IDENTIFIER = T.let("default", String) extend T::Sig sig { override.params(offenses: T::Array[T.nilable(Offense)]).returns(String) } def show_of...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/formatters/progress_formatter.rb
lib/packwerk/formatters/progress_formatter.rb
# typed: strict # frozen_string_literal: true require "benchmark" module Packwerk module Formatters class ProgressFormatter extend T::Sig sig { params(out: T.any(StringIO, IO), style: OutputStyle).void } def initialize(out, style: OutputStyles::Plain.new) @out = out @style = s...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/validator/result.rb
lib/packwerk/validator/result.rb
# typed: strict # frozen_string_literal: true module Packwerk module Validator class Result < T::Struct extend T::Sig const :ok, T::Boolean const :error_value, T.nilable(String) sig { returns(T::Boolean) } def ok? ok end end end end
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/parsers/parser_interface.rb
lib/packwerk/parsers/parser_interface.rb
# typed: strict # frozen_string_literal: true module Packwerk module Parsers module ParserInterface extend T::Helpers extend T::Sig requires_ancestor { Kernel } interface! sig { abstract.params(io: T.any(IO, StringIO), file_path: String).returns(T.untyped) } def call(io:, f...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/parsers/erb.rb
lib/packwerk/parsers/erb.rb
# typed: strict # frozen_string_literal: true require "ast/node" require "better_html" require "better_html/parser" require "parser/source/buffer" module Packwerk module Parsers class Erb extend T::Sig include ParserInterface sig { params(parser_class: T.untyped, ruby_parser: Ruby).void } ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/parsers/factory.rb
lib/packwerk/parsers/factory.rb
# typed: strict # frozen_string_literal: true require "singleton" module Packwerk module Parsers class Factory extend T::Sig include Singleton RUBY_REGEX = %r{ # Although not important for regex, these are ordered from most likely to match to least likely. \.(rb|rake|builder|g...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/parsers/ruby.rb
lib/packwerk/parsers/ruby.rb
# typed: strict # frozen_string_literal: true require "parser" require "prism" module Packwerk module Parsers class Ruby extend T::Sig include ParserInterface class RaiseExceptionsParser < Prism::Translation::Parser extend T::Sig sig { params(builder: T.untyped).void } ...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/reference_checking/reference_checker.rb
lib/packwerk/reference_checking/reference_checker.rb
# typed: strict # frozen_string_literal: true module Packwerk module ReferenceChecking class ReferenceChecker extend T::Sig sig { params(checkers: T::Array[Checker]).void } def initialize(checkers) @checkers = checkers end sig do params( reference: Refere...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
Shopify/packwerk
https://github.com/Shopify/packwerk/blob/5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf/lib/packwerk/reference_checking/checkers/dependency_checker.rb
lib/packwerk/reference_checking/checkers/dependency_checker.rb
# typed: strict # frozen_string_literal: true module Packwerk module ReferenceChecking module Checkers # Checks whether a given reference conforms to the configured graph of dependencies. class DependencyChecker extend T::Sig include Checker VIOLATION_TYPE = T.let("dependency...
ruby
MIT
5b06827b1d4be60a54dbf68a2cab5661b3fd3dcf
2026-01-04T16:00:42.070180Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/form_spec.rb
spec/form_spec.rb
require 'spec_helper' describe 'NestedForm' do include Capybara::DSL def check_form page.should have_no_css('form .fields input[id$=name]') click_link 'Add new task' page.should have_css('form .fields input[id$=name]', :count => 1) find('form .fields input[id$=name]').should be_visible find('f...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/events_spec.rb
spec/events_spec.rb
require 'spec_helper' describe 'Nested form', :js => true do include Capybara::DSL [:jquery, :prototype].each do |js_framework| url = case js_framework when :jquery then '/projects/new' when :prototype then '/projects/new?type=prototype' end context "with #{js_framework}" do contex...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/spec_helper.rb
spec/spec_helper.rb
# Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require 'rspec/rails' require 'capybara/rspec' Capybara.javascript_driver = :selenium RSpec.configure do |config| config.mock_with :mocha end Rails.backtrace_cleaner.remove_silencers! # Lo...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/helpers/projects_helper.rb
spec/dummy/app/helpers/projects_helper.rb
module ProjectsHelper end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/helpers/application_helper.rb
spec/dummy/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/controllers/projects_controller.rb
spec/dummy/app/controllers/projects_controller.rb
class ProjectsController < ApplicationController def new @project = Project.new end end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/controllers/companies_controller.rb
spec/dummy/app/controllers/companies_controller.rb
class CompaniesController < ApplicationController def new @company = Company.new end end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/controllers/application_controller.rb
spec/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base protect_from_forgery end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/models/task.rb
spec/dummy/app/models/task.rb
class Task < ActiveRecord::Base belongs_to :project has_many :milestones accepts_nested_attributes_for :milestones end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/models/project.rb
spec/dummy/app/models/project.rb
class Project < ActiveRecord::Base has_many :tasks has_many :assignments, :class_name => 'ProjectTask' accepts_nested_attributes_for :tasks accepts_nested_attributes_for :assignments has_many :not_nested_tasks, :class_name => 'Task' end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/models/project_task.rb
spec/dummy/app/models/project_task.rb
class ProjectTask < ActiveRecord::Base belongs_to :project end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/models/milestone.rb
spec/dummy/app/models/milestone.rb
class Milestone < ActiveRecord::Base belongs_to :task end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/app/models/company.rb
spec/dummy/app/models/company.rb
class Company < ActiveRecord::Base has_one :project accepts_nested_attributes_for :project after_initialize 'self.build_project' end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/db/schema.rb
spec/dummy/db/schema.rb
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/db/migrate/20120819164528_add_association_with_class_name.rb
spec/dummy/db/migrate/20120819164528_add_association_with_class_name.rb
class AddAssociationWithClassName < ActiveRecord::Migration def self.up create_table :project_tasks do |t| t.integer :project_id t.string :name end end def self.down drop_table :project_tasks end end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/db/migrate/20130203095901_create_company.rb
spec/dummy/db/migrate/20130203095901_create_company.rb
class CreateCompany < ActiveRecord::Migration def self.up create_table :companies do |t| t.string :name end add_column :projects, :company_id, :integer end def self.down remove_column :projects, :company_id drop_table :companies end end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/db/migrate/20110710143903_initial_tables.rb
spec/dummy/db/migrate/20110710143903_initial_tables.rb
class InitialTables < ActiveRecord::Migration def self.up create_table :projects do |t| t.string :name end create_table :tasks do |t| t.integer :project_id t.string :name end create_table :milestones do |t| t.integer :task_id t.string :name end end def self...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/test/unit/helpers/projects_helper_test.rb
spec/dummy/test/unit/helpers/projects_helper_test.rb
require 'test_helper' class ProjectsHelperTest < ActionView::TestCase end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/test/functional/projects_controller_test.rb
spec/dummy/test/functional/projects_controller_test.rb
require 'test_helper' class ProjectsControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/application.rb
spec/dummy/config/application.rb
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require require "nested_form" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers ...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/environment.rb
spec/dummy/config/environment.rb
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Dummy::Application.initialize!
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/routes.rb
spec/dummy/config/routes.rb
Dummy::Application.routes.draw do resources :companies, :only => %w(new create) resources :projects, :only => %w(new create) get '/:controller/:action' # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#vie...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/boot.rb
spec/dummy/config/boot.rb
require 'rubygems' gemfile = ENV['BUNDLE_GEMFILE'] || File.expand_path('../../../../Gemfile', __FILE__) if File.exist?(gemfile) ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup end $:.unshift File.expand_path('../../../../lib', __FILE__)
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/initializers/session_store.rb
spec/dummy/config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails ge...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/initializers/wrap_parameters.rb
spec/dummy/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. ActionController::Base.wrap_parameters :format => [:json] if Ac...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/initializers/inflections.rb
spec/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', ...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/initializers/backtrace_silencers.rb
spec/dummy/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| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a probl...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/initializers/mime_types.rb
spec/dummy/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 # Mime::Type.register_alias "text/html", :iphone
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/initializers/secret_token.rb
spec/dummy/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
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/environments/test.rb
spec/dummy/config/environments/test.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb # 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 su...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/environments/development.rb
spec/dummy/config/environments/development.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web ser...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/dummy/config/environments/production.rb
spec/dummy/config/environments/production.rb
Dummy::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 # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_c...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/nested_form/view_helper_spec.rb
spec/nested_form/view_helper_spec.rb
require "spec_helper" describe NestedForm::ViewHelper do include RSpec::Rails::HelperExampleGroup before(:each) do _routes.draw do resources :projects end end it "should pass nested form builder to form_for along with other options" do pending mock.proxy(_view).form_for(:first, :as =>...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/spec/nested_form/builder_spec.rb
spec/nested_form/builder_spec.rb
require "spec_helper" [NestedForm::Builder, NestedForm::SimpleBuilder, defined?(NestedForm::FormtasticBuilder) ? NestedForm::FormtasticBuilder : nil].compact.each do |builder| describe builder do let(:project) do Project.new end let(:template) do template = ActionView::Base.new templat...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/lib/nested_form.rb
lib/nested_form.rb
require "nested_form/engine"
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/lib/generators/nested_form/install_generator.rb
lib/generators/nested_form/install_generator.rb
module NestedForm module Generators class InstallGenerator < Rails::Generators::Base def self.source_root File.expand_path('../../../../vendor/assets/javascripts', __FILE__) end def copy_jquery_file if File.exists?('public/javascripts/prototype.js') copy_file 'prototyp...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/lib/nested_form/view_helper.rb
lib/nested_form/view_helper.rb
require 'nested_form/builders' module NestedForm module ViewHelper def nested_form_for(*args, &block) options = args.extract_options!.reverse_merge(:builder => NestedForm::Builder) form_for(*(args << options)) do |f| capture(f, &block).to_s << after_nested_form_callbacks end end ...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/lib/nested_form/builders.rb
lib/nested_form/builders.rb
require 'nested_form/builder_mixin' module NestedForm class Builder < ::ActionView::Helpers::FormBuilder include ::NestedForm::BuilderMixin end begin require 'simple_form' class SimpleBuilder < ::SimpleForm::FormBuilder include ::NestedForm::BuilderMixin end rescue LoadError end beg...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/lib/nested_form/builder_mixin.rb
lib/nested_form/builder_mixin.rb
module NestedForm module BuilderMixin # Adds a link to insert a new associated records. The first argument is the name of the link, the second is the name of the association. # # f.link_to_add("Add Task", :tasks) # # You can pass HTML options in a hash at the end and a block for the content. ...
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
ryanb/nested_form
https://github.com/ryanb/nested_form/blob/78ad0469e681f159072e04c9c57d8722c9826295/lib/nested_form/engine.rb
lib/nested_form/engine.rb
require 'rails' module NestedForm class Engine < ::Rails::Engine initializer 'nested_form' do |app| ActiveSupport.on_load(:action_view) do require "nested_form/view_helper" class ActionView::Base include NestedForm::ViewHelper end end end end end
ruby
MIT
78ad0469e681f159072e04c9c57d8722c9826295
2026-01-04T16:01:04.503443Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/diagnostics_spec.rb
spec/diagnostics_spec.rb
describe Solargraph::Diagnostics do it "registers reporters" do Solargraph::Diagnostics.register 'base', Solargraph::Diagnostics::Base expect(Solargraph::Diagnostics.reporters).to include('base') expect(Solargraph::Diagnostics.reporter('base')).to be(Solargraph::Diagnostics::Base) end end
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/source_map_spec.rb
spec/source_map_spec.rb
describe Solargraph::SourceMap do it "locates named path pins" do map = Solargraph::SourceMap.load_string(%( class Foo def bar; end end )) pin = map.locate_named_path_pin(2, 16) expect(pin.path).to eq('Foo#bar') end it "queries symbols using fuzzy matching" do map = Solarg...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/yardoc_spec.rb
spec/yardoc_spec.rb
# frozen_string_literal: true require 'tmpdir' require 'open3' describe Solargraph::Yardoc do let(:gem_yardoc_path) do Solargraph::PinCache.yardoc_path gemspec end before do FileUtils.mkdir_p(gem_yardoc_path) end describe '#cache' do let(:api_map) { Solargraph::ApiMap.new } let(:doc_map) {...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/library_spec.rb
spec/library_spec.rb
require 'tmpdir' require 'yard' describe Solargraph::Library do it "does not open created files in the workspace" do Dir.mktmpdir do |temp_dir_path| # Ensure we resolve any symlinks to their real path workspace_path = File.realpath(temp_dir_path) file_path = File.join(workspace_path, 'file.rb')...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/api_map_spec.rb
spec/api_map_spec.rb
require 'tmpdir' describe Solargraph::ApiMap do before :all do @api_map = Solargraph::ApiMap.new end it 'returns core methods' do pins = @api_map.get_methods('String') expect(pins.map(&:path)).to include('String#upcase') end it 'returns core classes' do pins = @api_map.get_constants('') ...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/source_spec.rb
spec/source_spec.rb
describe Solargraph::Source do it "parses code" do code = 'class Foo;def bar;end;end' source = described_class.new(code) expect(source.code).to eq(code) expect(Solargraph::Parser.is_ast_node?(source.node)).to be_truthy expect(source).to be_parsed end it "fixes invalid code" do code = 'cla...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/api_map_method_spec.rb
spec/api_map_method_spec.rb
# frozen_string_literal: true describe 'Solargraph::ApiMap methods' do let(:api_map) { Solargraph::ApiMap.new } let(:bench) do Solargraph::Bench.new(external_requires: external_requires, workspace: Solargraph::Workspace.new('.')) end let(:external_requires) { [] } before do api_map.catalog bench e...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/gem_pins_spec.rb
spec/gem_pins_spec.rb
# frozen_string_literal: true describe Solargraph::GemPins do it 'can merge YARD and RBS' do gemspec = Gem::Specification.find_by_name('rbs') yard_pins = Solargraph::GemPins.build_yard_pins([], gemspec) rbs_map = Solargraph::RbsMap.from_gemspec(gemspec, nil, nil) pins = Solargraph::GemPins.combine ya...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/complex_type_spec.rb
spec/complex_type_spec.rb
describe 'YARD type specifier list parsing' do context 'in compliance with https://www.rubydoc.info/gems/yard/file/docs/Tags.md#type-list-conventions' do # Types Specifier List # # In some cases, a tag will allow for a "types specifier list"; this # will be evident from the use of the [Types] syntax i...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/convention_spec.rb
spec/convention_spec.rb
describe Solargraph::Convention do it 'newly defined pins are resolved by ApiMap after file changes' do filename = 'test.rb' # Initial code with one DSL call initial_code = <<~RUBY class MyModel dummy_dsl :existing_field end RUBY # Create a dummy convention that statically pr...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/logging_spec.rb
spec/logging_spec.rb
require 'tempfile' describe Solargraph::Logging do it "logs messages with levels" do file = Tempfile.new('log') Solargraph::Logging.logger.reopen file Solargraph::Logging.logger.warn "Test" file.rewind msg = file.read file.close file.unlink Solargraph::Logging.logger.reopen STDERR ...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/position_spec.rb
spec/position_spec.rb
describe Solargraph::Position do it "normalizes arrays into positions" do pos = Solargraph::Position.normalize([0, 1]) expect(pos).to be_a(Solargraph::Position) expect(pos.line).to eq(0) expect(pos.column).to eq(1) end it "returns original positions when normalizing" do orig = Solargraph::Pos...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/workspace_spec.rb
spec/workspace_spec.rb
require 'fileutils' require 'tmpdir' describe Solargraph::Workspace do let(:workspace) { described_class.new(dir_path) } let(:dir_path) { File.realpath(Dir.mktmpdir) } let(:file_path) { File.join(dir_path, 'file.rb') } before(:each) { File.write(file_path, 'exit') } after(:each) { FileUtils.remove_ent...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/shell_spec.rb
spec/shell_spec.rb
# frozen_string_literal: true require 'tmpdir' require 'open3' describe Solargraph::Shell do let(:shell) { described_class.new } let(:temp_dir) { Dir.mktmpdir } before do File.open(File.join(temp_dir, 'Gemfile'), 'w') do |file| file.puts "source 'https://rubygems.org'" file.puts "gem 'sola...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/parser_spec.rb
spec/parser_spec.rb
describe Solargraph::Parser do it "parses nodes" do node = Solargraph::Parser.parse('class Foo; end', 'test.rb') expect(Solargraph::Parser.is_ast_node?(node)).to be(true) end it 'raises repairable SyntaxError for unknown encoding errors' do code = "# encoding: utf-\nx = 'y'" expect { Solargraph::...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/doc_map_spec.rb
spec/doc_map_spec.rb
# frozen_string_literal: true describe Solargraph::DocMap do before :all do # We use ast here because it's a known dependency. gemspec = Gem::Specification.find_by_name('ast') yard_pins = Solargraph::GemPins.build_yard_pins([], gemspec) Solargraph::PinCache.serialize_yard_gem(gemspec, yard_pins) en...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/rbs_map_spec.rb
spec/rbs_map_spec.rb
describe Solargraph::RbsMap do it 'loads from a gemspec' do spec = Gem::Specification.find_by_name('rbs') rbs_map = Solargraph::RbsMap.from_gemspec(spec, nil, nil) pin = rbs_map.path_pin('RBS::EnvironmentLoader#add_collection') expect(pin).to be end it 'converts constants and aliases to correct t...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/spec_helper.rb
spec/spec_helper.rb
require 'bundler/setup' require 'webmock/rspec' WebMock.disable_net_connect!(allow_localhost: true) unless ENV['SIMPLECOV_DISABLED'] # set up lcov reporting for undercover require 'simplecov' require 'undercover/simplecov_formatter' SimpleCov.start do cname = ENV.fetch('TEST_COVERAGE_COMMAND_NAME', 'ad-hoc...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/type_checker_spec.rb
spec/type_checker_spec.rb
require 'timeout' describe Solargraph::TypeChecker do it 'does not raise errors checking unparsed sources' do expect { checker = Solargraph::TypeChecker.load_string(%( foo{ )) checker.problems }.not_to raise_error end it 'ignores tagged problems' do checker = Solargraph::Ty...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/language_server/uri_helpers_spec.rb
spec/language_server/uri_helpers_spec.rb
describe Solargraph::LanguageServer::UriHelpers do it "doesn't escapes colons in file paths" do file = 'c:/one/two' uri = Solargraph::LanguageServer::UriHelpers.file_to_uri(file) expect(uri).to start_with('file:///c:') end it 'uses %20 for spaces' do file = '/path/to/a file' uri = Solargraph:...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false
castwide/solargraph
https://github.com/castwide/solargraph/blob/533872019e08fa0ebd8ce1c6b0cc1e8c27abc431/spec/language_server/message_spec.rb
spec/language_server/message_spec.rb
describe Solargraph::LanguageServer::Message do it "returns MethodNotFound for unregistered methods" do msg = Solargraph::LanguageServer::Message.select 'notARealMethod' expect(msg).to be(Solargraph::LanguageServer::Message::MethodNotFound) end it "returns MethodNotImplemented for unregistered $ methods"...
ruby
MIT
533872019e08fa0ebd8ce1c6b0cc1e8c27abc431
2026-01-04T15:59:00.592130Z
false