source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_struct_test.rb
Ruby
mit
200
main
7,861
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTStructTest < ::Minitest::Test MSG = "Sorbet/ForbidTStruct: Using `T::Struct` or its variants is deprecated in this codebase." PROPS_MSG = "Sorbet/ForbidTStruct: Using `T::Props` or its ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_superclass_const_literal_test.rb
Ruby
mit
200
main
2,506
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidSuperclassConstLiteralTest < ::Minitest::Test MSG = "Sorbet/ForbidSuperclassConstLiteral: Superclasses must only contain constant literals" def setup @cop = ForbidSuperclassCo...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/obsolete_strict_memoization_test.rb
Ruby
mit
200
main
7,604
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ObsoleteStrictMemoizationTest < ::Minitest::Test MSG = "Sorbet/ObsoleteStrictMemoization: This two-stage workaround for memoization in `#typed: strict` files is no longer necessary. See https://sorbet...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_include_const_literal_test.rb
Ruby
mit
200
main
6,702
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidIncludeConstLiteralTest < ::Minitest::Test MSG = "Sorbet/ForbidIncludeConstLiteral: `include` must only be used with constant literals as arguments" PREPEND_MSG = "Sorbet/ForbidIncludeCo...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/constants_from_strings_test.rb
Ruby
mit
200
main
2,513
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ConstantsFromStringsTest < ::Minitest::Test def setup @cop = ConstantsFromStrings.new end def test_registers_offense_for_constantize assert_offense(<<~RUBY) ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_untyped_struct_props_test.rb
Ruby
mit
200
main
3,517
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidUntypedStructPropsTest < ::Minitest::Test MSG = "Sorbet/ForbidUntypedStructProps: Struct props cannot be T.untyped" def setup @cop = ForbidUntypedStructProps.new end ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_type_aliased_shapes_test.rb
Ruby
mit
200
main
1,525
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTypeAliasedShapesTest < ::Minitest::Test MSG = "Sorbet/ForbidTypeAliasedShapes: Type aliases shouldn't contain shapes because of significant performance overhead" def setup @c...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_unsafe_test.rb
Ruby
mit
200
main
543
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTUnsafeTest < ::Minitest::Test MSG = "Sorbet/ForbidTUnsafe: Do not use `T.unsafe`." def setup @cop = ForbidTUnsafe.new end def test_adds_offense_when_using_t_...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/buggy_obsolete_strict_memoization_test.rb
Ruby
mit
200
main
4,505
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class BuggyObsoleteStrictMemoizationTest < ::Minitest::Test MSG = "Sorbet/BuggyObsoleteStrictMemoization: This might be a mistaken variant of the two-stage workaround that used to be needed for memoization ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_let_test.rb
Ruby
mit
200
main
548
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTLetTest < ::Minitest::Test MSG = "Sorbet/ForbidTLet: Do not use `T.let`." def setup @cop = ForbidTLet.new end def test_adds_offense_when_using_t_let ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_bind_test.rb
Ruby
mit
200
main
561
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTBindTest < ::Minitest::Test MSG = "Sorbet/ForbidTBind: Do not use `T.bind`." def setup @cop = ForbidTBind.new end def test_adds_offense_when_using_t_bind ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_any_with_nil_test.rb
Ruby
mit
200
main
1,137
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTAnyWithNilTest < ::Minitest::Test MSG = "Sorbet/ForbidTAnyWithNil: Use `T.nilable` instead of `T.any(..., NilClass, ...)`." def setup @cop = ForbidTAnyWithNil.new end...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/refinement_test.rb
Ruby
mit
200
main
2,037
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class RefinementTest < ::Minitest::Test MSG = "Sorbet/Refinement: Do not use Ruby Refinements library as it is not supported by Sorbet." def setup @cop = Refinement.new end ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_untyped_test.rb
Ruby
mit
200
main
1,271
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTUntypedTest < ::Minitest::Test MSG = "Sorbet/ForbidTUntyped: Do not use `T.untyped`." def setup @cop = ForbidTUntyped.new end def test_adds_offense_for_simpl...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/implicit_conversion_method_test.rb
Ruby
mit
200
main
1,494
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ImplicitConversionMethodTest < ::Minitest::Test MSG = "Sorbet/ImplicitConversionMethod: Avoid implicit conversion methods, as Sorbet does not support them. " \ "Explicity convert to the desi...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_absurd_test.rb
Ruby
mit
200
main
543
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTAbsurdTest < ::Minitest::Test MSG = "Sorbet/ForbidTAbsurd: Do not use `T.absurd`." def setup @cop = ForbidTAbsurd.new end def test_adds_offense_when_using_t_...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_t_cast_test.rb
Ruby
mit
200
main
557
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidTCastTest < ::Minitest::Test MSG = "Sorbet/ForbidTCast: Do not use `T.cast`." def setup @cop = ForbidTCast.new end def test_adds_offense_when_using_t_cast ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/redundant_t_let_test.rb
Ruby
mit
200
main
7,980
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class RedundantTLetTest < ::Minitest::Test MSG = "Sorbet/RedundantTLet: Unnecessary T.let. The instance variable type is inferred from the signature." def setup @cop = RedundantTLet.new ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/forbid_mixes_in_class_methods_test.rb
Ruby
mit
200
main
1,338
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet class ForbidMixesInClassMethodsTest < ::Minitest::Test MSG = "Sorbet/ForbidMixesInClassMethods: #{ForbidMixesInClassMethods::MSG}" def setup @cop = ForbidMixesInClassMethods.new e...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/t_enum/multiple_t_enum_values_test.rb
Ruby
mit
200
main
2,735
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module TEnum class MultipleTEnumValuesTest < ::Minitest::Test MSG = "Sorbet/MultipleTEnumValues: `T::Enum` should have at least two values." def setup @cop = MultipleTEnumVa...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum_test.rb
Ruby
mit
200
main
2,029
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module TEnum class ForbidComparableTEnumTest < ::Minitest::Test MSG = "Sorbet/ForbidComparableTEnum: Do not use `T::Enum` as a comparable object because of significant performance overhead." ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/forbid_sig_without_runtime_test.rb
Ruby
mit
200
main
2,904
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class ForbidSigWithoutRuntimeTest < ::Minitest::Test MSG = "Sorbet/ForbidSigWithoutRuntime: Do not use `T::Sig::WithoutRuntime.sig`." def setup @cop = Forb...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/forbid_sig_with_runtime_test.rb
Ruby
mit
200
main
1,237
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class ForbidSigWithRuntimeTest < ::Minitest::Test MSG = "Sorbet/ForbidSigWithRuntime: Do not use `T::Sig.sig`." def setup @cop = ForbidSigWithRuntime.new ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/forbid_sig_test.rb
Ruby
mit
200
main
1,173
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class ForbidSigTest < ::Minitest::Test MSG = "Sorbet/ForbidSig: Do not use `T::Sig`." def setup @cop = ForbidSig.new end def test_allo...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/void_checked_tests_test.rb
Ruby
mit
200
main
3,144
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class VoidCheckedTestsTest < ::Minitest::Test MSG = "Sorbet/VoidCheckedTests: Returning `.void` from a sig marked `.checked(:tests)` means that the " \ "method will r...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/keyword_argument_ordering_test.rb
Ruby
mit
200
main
2,527
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class KeywordArgumentOrderingTest < ::Minitest::Test MSG = "Sorbet/KeywordArgumentOrdering: Optional keyword arguments must be at the end of the parameter list." def s...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/capitalized_type_parameters_test.rb
Ruby
mit
200
main
3,633
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class CapitalizedTypeParametersTest < ::Minitest::Test MSG = "Sorbet/CapitalizedTypeParameters: Type parameters must be capitalized." def setup @cop = Capi...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/enforce_signatures_test.rb
Ruby
mit
200
main
21,742
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class EnforceSignaturesTest < ::Minitest::Test MSG = "Each method is required to have a signature." MSG_SIG = "Each method is required to have a sig block signature." ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/runtime_on_failure_depends_on_checked_test.rb
Ruby
mit
200
main
2,285
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class RuntimeOnFailureDependsOnCheckedTest < ::Minitest::Test MSG = "Sorbet/RuntimeOnFailureDependsOnChecked: To use .on_failure you must additionally call .checked(:tests) or .c...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/allow_incompatible_override_test.rb
Ruby
mit
200
main
3,360
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class AllowIncompatibleOverrideTest < ::Minitest::Test MSG = "Sorbet/AllowIncompatibleOverride: Usage of `allow_incompatible` suggests a violation of the Liskov Substitution Prin...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/signature_build_order_test.rb
Ruby
mit
200
main
5,609
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class SignatureBuildOrderTest < ::Minitest::Test MSG = "Sorbet/SignatureBuildOrder: Sig builders must be invoked in the following order: type_parameters, params, void." ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/checked_true_in_signature_test.rb
Ruby
mit
200
main
1,226
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class CheckedTrueInSignatureTest < ::Minitest::Test MSG = "Sorbet/CheckedTrueInSignature: Using `checked(true)` in a method signature definition is not allowed. " \ "...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/signatures/empty_line_after_sig_test.rb
Ruby
mit
200
main
8,221
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Signatures class EmptyLineAfterSigTest < ::Minitest::Test MSG = "Sorbet/EmptyLineAfterSig: Extra empty line or comment detected" def setup @cop = EmptyLineAfterSig.ne...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/false_sigil_test.rb
Ruby
mit
200
main
1,207
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class FalseSigilTest < ::Minitest::Test MSG = "Sorbet/FalseSigil: Sorbet sigil should be at least `false` got `ignore`." def setup @cop = FalseSigil.new ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/valid_sigil_test.rb
Ruby
mit
200
main
8,715
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class ValidSigilTest < ::Minitest::Test EMPTY_SIGIL_MSG = "Sorbet sigil should not be empty." INVALID_SIGIL_MSG = "Invalid Sorbet sigil `%{sigil}`." NO_SIGIL_MSG ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/enforce_sigil_order_test.rb
Ruby
mit
200
main
7,038
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class EnforceSigilOrderTest < ::Minitest::Test MSG = "Sorbet/EnforceSigilOrder: Magic comments should be in the following order: encoding, typed, warn_indent, frozen_string_literal."...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/ignore_sigil_test.rb
Ruby
mit
200
main
1,132
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class IgnoreSigilTest < ::Minitest::Test MSG = "Sorbet/IgnoreSigil: No Sorbet sigil found in file. Try a `typed: ignore` to start (you can also use `rubocop -a` to automatically add ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/enforce_single_sigil_test.rb
Ruby
mit
200
main
4,563
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class EnforceSingleSigilTest < ::Minitest::Test MSG = "Sorbet/EnforceSingleSigil: Files must only contain one sigil" def setup @cop = EnforceSingleSigil.new ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/strict_sigil_test.rb
Ruby
mit
200
main
1,210
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class StrictSigilTest < ::Minitest::Test MSG = "Sorbet/StrictSigil: Sorbet sigil should be at least `strict` got `true`." def setup @cop = StrictSigil.new ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/true_sigil_test.rb
Ruby
mit
200
main
1,195
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class TrueSigilTest < ::Minitest::Test MSG = "Sorbet/TrueSigil: Sorbet sigil should be at least `true` got `false`." def setup @cop = TrueSigil.new e...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/has_sigil_test.rb
Ruby
mit
200
main
3,196
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class HasSigilTest < ::Minitest::Test EMPTY_SIGIL_MSG = "Sorbet/HasSigil: Sorbet sigil should not be empty." INVALID_SIGIL_MSG = "Sorbet/HasSigil: Invalid Sorbet sigil `%{s...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/sigils/strong_sigil_test.rb
Ruby
mit
200
main
1,216
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Sigils class StrongSigilTest < ::Minitest::Test MSG = "Sorbet/StrongSigil: Sorbet sigil should be at least `strong` got `strict`." def setup @cop = StrongSigil.new ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/rbi_versioning/valid_gem_version_annotations_test.rb
Ruby
mit
200
main
3,021
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module RbiVersioning class ValidGemVersionAnnotationsTest < ::Minitest::Test MSG = "Sorbet/ValidGemVersionAnnotations: Invalid gem version(s) detected: %{message}" def setup ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions_test.rb
Ruby
mit
200
main
2,478
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Rbi class SingleLineRbiClassModuleDefinitionsTest < ::Minitest::Test MSG = "Sorbet/SingleLineRbiClassModuleDefinitions: Empty class/module definitions in RBI files should be on a single lin...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths_test.rb
Ruby
mit
200
main
4,123
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Rbi class ForbidRBIOutsideOfAllowedPathsTest < ::Minitest::Test MSG = "RBI file path should match one of: rbi/**, sorbet/rbi/**" def setup @cop = target_cop.new(cop_c...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims_test.rb
Ruby
mit
200
main
2,398
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Sorbet module Rbi class ForbidExtendTSigHelpersInShimsTest < ::Minitest::Test MSG = "Sorbet/ForbidExtendTSigHelpersInShims: Extending T::Sig or T::Helpers in a shim is unnecessary" def setup ...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
test/rubocop/cop/style/mutable_constant_test.rb
Ruby
mit
200
main
5,332
# frozen_string_literal: true require "test_helper" module RuboCop module Cop module Style class MutableConstantTest < ::Minitest::Test MSG = "Style/MutableConstant: Freeze mutable objects assigned to constants." def setup @cop = target_cop.new end def test_regi...
github
Shopify/rubocop-sorbet
https://github.com/Shopify/rubocop-sorbet
tasks/cops_documentation.rake
Ruby
mit
200
main
8,523
# frozen_string_literal: true require "yard" require "rubocop" require "rubocop-sorbet" YARD::Rake::YardocTask.new(:yard_for_generate_documentation) do |task| task.files = ["lib/rubocop/cop/**/*.rb"] task.options = ["--no-output"] end desc("Generate docs of all cops departments") task generate_cops_documentation...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
kitchen-salt.gemspec
Ruby
mit
200
master
1,146
require File.expand_path('../lib/kitchen-salt/version', __FILE__) Gem::Specification.new do |spec| spec.name = 'kitchen-salt' spec.version = Kitchen::Salt::VERSION spec.authors = ['SaltStack Inc'] spec.email = ['daniel@gtmanfred.com'] spec.homepage = 'https://github.com/salt...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
Rakefile
Ruby
mit
200
master
1,553
require 'bundler/setup' require 'bundler/gem_tasks' require 'rake' require 'rake/testtask' require 'yard' Rake::Task.define_task(:environment) desc 'Run Test Kitchen integration tests' namespace :integration do desc 'Run integration tests with kitchen-docker' task :verify, [:taskname] => [:environment] do |task, ...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
Gemfile
Ruby
mit
200
master
304
source 'https://rubygems.org' group :cicd do gem 'thor', '~> 0.20.3' end group :vagrant do gem 'vagrant-wrapper' gem 'kitchen-vagrant' end group :docker do gem 'kitchen-docker' end group :git do gem 'git' end group :windows do gem 'winrm', '~>2.0' gem 'winrm-fs', '~>1.0' end gemspec
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen/provisioner/salt_solo.rb
Ruby
mit
200
master
19,073
# # Author:: Simon McCartney <simon.mccartney@hp.com> # # Copyright (C) 2013, Chris Lundquist, Simon McCartney # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen/transport/runtests.rb
Ruby
mit
200
master
680
require 'kitchen/transport/rsync' require 'shellwords' module Kitchen module Transport class Runtests < Kitchen::Transport::Rsync class Connection < Kitchen::Transport::Rsync::Connection def execute_with_exit_code(command) if command.start_with?("sh -c") super else ...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen/verifier/runtests.rb
Ruby
mit
200
master
3,469
# -*- encoding: utf-8 -*- require "kitchen/verifier/base" module Kitchen module Verifier class Runtests < Kitchen::Verifier::Base kitchen_verifier_api_version 1 plugin_version Kitchen::VERSION default_config :testingdir, '/testing' default_config :python_bin, 'python2' default_co...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen/verifier/nox.rb
Ruby
mit
200
master
12,559
# -*- encoding: utf-8 -*- require "date" require "kitchen/errors" require "kitchen/verifier/base" module Kitchen module Verifier class Nox < Kitchen::Verifier::Base kitchen_verifier_api_version 1 plugin_version Kitchen::VERSION default_config :testingdir, '/testing' default_config :tes...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen/verifier/salttox.rb
Ruby
mit
200
master
2,745
# -*- encoding: utf-8 -*- require "kitchen/verifier/base" module Kitchen module Verifier class Salttox < Kitchen::Verifier::Base kitchen_verifier_api_version 1 plugin_version Kitchen::VERSION default_config :testingdir, '/testing' default_config :verbose, false default_config :ru...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen/verifier/tox.rb
Ruby
mit
200
master
5,032
# -*- encoding: utf-8 -*- require "kitchen/verifier/base" module Kitchen module Verifier class Tox < Kitchen::Verifier::Base kitchen_verifier_api_version 1 plugin_version Kitchen::VERSION default_config :testingdir, '/testing' default_config :tests, [] default_config :transport, ...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen-salt/states.rb
Ruby
mit
200
master
4,703
module Kitchen module Salt module States private def prepare_state_top info('Preparing state_top') sandbox_state_top_path = File.join(sandbox_path, config[:salt_state_top]) if config[:state_top_from_file] == false # use the top.sls embedded in .kitchen.yml ...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen-salt/util.rb
Ruby
mit
200
master
2,227
require 'find' module Kitchen module Salt module Util private def unsymbolize(obj) if obj.is_a? Hash obj.each_with_object({}) do |(k, v), a| a[k.to_s] = unsymbolize(v) a end elsif obj.is_a? Array obj.each_with_object([]) do |e, a|...
github
saltstack/kitchen-salt
https://github.com/saltstack/kitchen-salt
lib/kitchen-salt/pillars.rb
Ruby
mit
200
master
3,583
module Kitchen module Salt module Pillars private def prepare_pillars info("Preparing pillars into #{config[:salt_pillar_root]}") pillars = config[:pillars] if config.key?(:'pillars-from-files') info("pillars-from-files is deprecated in favor of pillars_from_files")...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
chainsaw.gemspec
Ruby
mit
200
master
962
# -*- encoding: utf-8 -*- require File.expand_path('../lib/chainsaw/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['blahed', 'ljfauscett'] gem.email = ['tdunn13@gmail.com'] gem.description = 'Filter logfiles based on a time range' gem.summary = 'Filter logfiles based o...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
test/detector_test.rb
Ruby
mit
200
master
4,168
require 'test_helper' describe Chainsaw::Detector do Detector = Chainsaw::Detector it 'detects CLF log format' do line = get_log_line('clf.log') format = Detector.detect(line) time = get_time(line, format) format.type.must_equal :clf time.must_equal Time.local(2012, 8, 26, 7, 42, 20) en...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
test/test_helper.rb
Ruby
mit
200
master
202
$LOAD_PATH.unshift(File.expand_path('../../test', __FILE__)) require 'rubygems' require 'bundler' Bundler.setup require 'minitest/autorun' require 'minitest/pride' require 'mocha' require 'chainsaw'
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
test/cli_test.rb
Ruby
mit
200
master
397
require 'test_helper' describe Chainsaw::CLI do CLI = Chainsaw::CLI before do end it 'parses time as a single time if given without hyphen' do time = CLI.parse_time_args(['4:00']) time.must_be_kind_of Range end it 'parses time as a range if time args delimited by a hyphen' do time = CLI.pars...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
test/filter_test.rb
Ruby
mit
200
master
3,861
require 'test_helper' describe Chainsaw::Filter do Filter = Chainsaw::Filter before :each do FileUtils.mkdir_p(ENV['HOME']) end it 'finds the correct number of lines given an interval' do logfile = File.expand_path('../logs/clf.log', __FILE__) # stub out an interval of 11 hours from the last log e...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
lib/chainsaw.rb
Ruby
mit
200
master
376
require 'date' require 'ostruct' require 'optparse' require 'chronic' require 'chainsaw/cli' require 'chainsaw/core_extensions' require 'chainsaw/format' require 'chainsaw/detector' require 'chainsaw/filter' require 'chainsaw/version' if defined? Encoding Encoding.default_external = Encoding::UTF_8 Encoding.defa...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
lib/chainsaw/filter.rb
Ruby
mit
200
master
3,395
module Chainsaw class Filter attr_reader :line_count # Initialize a Filter instance. We read the logfile here and # attempt to detect what type of logfile it is. # # logfile - the String path of the logfile to be filtered # range - the "time" range to filter through (Time or Range) # opt...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
lib/chainsaw/format.rb
Ruby
mit
200
master
274
module Chainsaw class Format attr_accessor :type attr_accessor :time_format attr_accessor :pattern def initialize(type, attributes = {}) @type = type attributes.each do |key, value| send(:"#{key}=", value) end end end end
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
lib/chainsaw/cli.rb
Ruby
mit
200
master
3,639
module Chainsaw class CLI CHRONIC_OPTIONS = { :context => :past, :guess => false } BANNER = <<-BANNER Usage: chainsaw LOGFILE INTERVAL [OPTIONS] Description: Parses a log file and returns lines matching the time period provided. Chronic is used to parse the time strings, so any format ch...
github
trvsdnn/chainsaw
https://github.com/trvsdnn/chainsaw
lib/chainsaw/detector.rb
Ruby
mit
200
master
3,023
module Chainsaw class Detector PATTERNS = { :clf => { :pattern => /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} (?:-|[^ ]+) (?:-|[^ ]+) \[(\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (-|\+)\d{4})\]/i, :time_format => '%d/%b/%Y:%H:%M:%S %z' }, :apache_error => { :pattern => /...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
rakefile.rb
Ruby
mit
200
master
1,553
require 'rubygems' require 'bundler' # Hack this dir onto path for Ruby 1.9.2 # support: test_package = File.expand_path(File.join(File.dirname(__FILE__), 'test')) $: << test_package unless $:.include? test_package Bundler.require require 'rake/clean' require 'rake/testtask' ## # NOTE, to generate documentation, si...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
sprout.gemspec
Ruby
mit
200
master
1,153
# -*- encoding: utf-8 -*- lib = File.expand_path File.join(File.dirname(__FILE__), 'lib') $:.unshift lib unless $:.include?(lib) require 'bundler' require 'rake' Gem::Specification.new do |s| s.name = 'sprout' s.version = File.read('VERSION').strip s.platform ...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
Gemfile
Ruby
mit
200
master
438
source "http://rubygems.org" gem "bundler", ">= 0.9.19" gem "rake", ">= 0.9.2" gem "rubyzip", "~> 1.2.1" gem "archive-tar-minitar", "0.5.2" if RUBY_PLATFORM =~ /mswin/i gem "win32-open3", "0.2.5" # Win32 only else gem "open4", ">= 0.9.6" # All others end group :development do gem "yard" #gem "RedCloth" # Thi...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
script/add_param_handler.rb
Ruby
mit
200
master
1,159
class AddParamHandler < YARD::Handlers::Ruby::MethodHandler handles method_call(:add_param) def process name = statement[1][0].source.gsub(/^:/, '') class_name = statement[1][1].source case class_name when "Strings" class_name = "Array<String>" when "Files" class_name = "A...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/unix_system_test.rb
Ruby
mit
200
master
2,664
require 'test_helper' class UnixSystemTest < Test::Unit::TestCase include Sprout::TestHelper context "new unix system" do setup do @user = Sprout::System::UnixSystem.new @user.stubs(:home).returns '/home/someone' end should "escape spaces in paths" do assert_equal 'a\ b', @user.cle...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/fake_process_runner.rb
Ruby
mit
200
master
298
class FakeProcessRunner attr_accessor :command def initialize @r = FakeIO.new @w = FakeIO.new @e = FakeIO.new end def execute_open4 *command @command = command end def read @r end def read_err @e end def write value @w.write value end end
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/string_test.rb
Ruby
mit
200
master
469
require 'test_helper' class StringTest < Test::Unit::TestCase include Sprout::TestHelper context "a new string" do should "switch to snake case" do assert_equal "a_b_c", "ABC".snake_case assert_equal "my_big_camel_case_word", "MyBigCamelCaseWord".snake_case end should "switch to camel ca...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/strings_param_test.rb
Ruby
mit
200
master
598
require 'test_helper' class StringsParamTest < Test::Unit::TestCase include Sprout::TestHelper context "a new StringsParam" do setup do @param = Sprout::Executable::Strings.new @param.name = "strings" end ['abcd', 1234, true].each do |value| should "throw with non-enumerable assign...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/process_runner_test.rb
Ruby
mit
200
master
4,032
require 'test_helper' class ProcessRunnerTest < Test::Unit::TestCase include Sprout::TestHelper context "process runner" do setup do @fixture = File.expand_path File.join(fixtures, 'process_runner') @script = File.join @fixture, 'chmod_script.sh' @script_with_spaces =...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/fake_executable_task.rb
Ruby
mit
200
master
378
class FakeExecutableTask attr_accessor :output attr_accessor :default_prefix attr_accessor :default_short_prefix def initialize super @output = 'fake_tool' @default_prefix = '-' @default_short_prefix = '--' end def default_file_expression @default_file_expression ||= '/**/**/*' end ...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/paths_param_test.rb
Ruby
mit
200
master
1,568
require 'test_helper' class PathsParamTest < Test::Unit::TestCase include Sprout::TestHelper context "a new PathsParam" do setup do @path1 = File.join(fixtures, 'executable', 'paths', 'folder1') @path2 = File.join(fixtures, 'executable', 'paths', 'folder2') @path3 = File.join(fixtures, 'exe...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/win_system_test.rb
Ruby
mit
200
master
1,777
require 'test_helper' class WinSystemTest < Test::Unit::TestCase include Sprout::TestHelper context "new windows system" do setup do @user = Sprout::System::WinSystem.new end should "not accept home path with My Documents" do @user.stubs(:find_home).returns File.join('C:', 'foo', 'My Doc...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/win_nix_system_test.rb
Ruby
mit
200
master
877
require 'test_helper' class WinNixSystemTest < Test::Unit::TestCase include Sprout::TestHelper context "new windows nix (cygwin/mingw) system" do setup do @sys = Sprout::System::WinNixSystem.new @sys.stubs(:win_home).returns 'C:\Documents and Settings\Some System' end should "find home o...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/executable_param_test.rb
Ruby
mit
200
master
1,756
require 'test_helper' class ExecutableParamTest < Test::Unit::TestCase include Sprout::TestHelper context "a new, simple Executable::Param" do setup do @param = Sprout::Executable::Param.new end should "be invisible until value set" do assert !@param.visible? end should "return...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/boolean_param_test.rb
Ruby
mit
200
master
1,026
require 'test_helper' class BooleanParamTest < Test::Unit::TestCase include Sprout::TestHelper context "a new, simple BooleanParam" do setup do @param = Sprout::Executable::Boolean.new @param.name = 'foo' end should "be hidden when false" do @param.value = false assert_equal...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/remote_file_loader_test.rb
Ruby
mit
200
master
676
require 'test_helper' class RemoteFileLoaderTest < Test::Unit::TestCase include Sprout::TestHelper context "The remote file loader" do setup do @uri = 'http://github.com/downloads/lukebayes/project-sprouts/echochamber-test.zip' @file = File.join fixtures, 'remote_file_loader', 'md5', 'echochamb...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/vista_system_test.rb
Ruby
mit
200
master
1,118
require 'test_helper' class VistaSystemTest < Test::Unit::TestCase include Sprout::TestHelper context "new windows vista system" do setup do @user_system = Sprout::System::VistaSystem.new end should "work when env_userprofile isn't found" do @user_system.stubs(:find_home).returns 'C:\Doc...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/ruby_feature_test.rb
Ruby
mit
200
master
4,264
require 'test_helper' class RubyFeatureTest < Test::Unit::TestCase include Sprout::TestHelper context "a new ruby feature" do teardown do FakePlugin.clear_entities! end should "allow register" do # Shouldn't require the package since it's already # registered and available... ...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/command_line_test.rb
Ruby
mit
200
master
609
require 'test_helper' class CommandLineTest < Test::Unit::TestCase include Sprout::TestHelper context "a new command line ui" do setup do @logger = Sprout::OutputBuffer.new @instance = Sprout::CommandLine.new @instance.logger = @logger end should "display the ve...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/sprout_test.rb
Ruby
mit
200
master
5,408
require 'test_helper' class SproutTest < Test::Unit::TestCase include Sprout::TestHelper context "The Sprout::TestHelper" do context "find_fixtures" do setup do @from = File.join(fixtures, 'sprout_test_case', 'test', 'other') @expected_fixtures = File.join(fixtures, 'sprout_test_case',...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/osx_system_test.rb
Ruby
mit
200
master
434
require 'test_helper' class OSXSystemTest < Test::Unit::TestCase include Sprout::TestHelper context "new osx system" do setup do @user = Sprout::System::OSXSystem.new @user.stubs(:home).returns '/Users/someone' end should "capitalize application name" do File.stubs(:exists?).return...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/platform_test.rb
Ruby
mit
200
master
2,363
require 'test_helper' class PlatformTest < Test::Unit::TestCase include Sprout::TestHelper context "platform" do setup do @platform = Sprout::Platform.new end ['cygwin', 'mingw', 'bccwin'].each do |variant| context variant do should "know if they're windows nix" do @pla...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/rdoc_parser_test.rb
Ruby
mit
200
master
255
require 'test_helper' require 'fixtures/examples/echo_inputs' class ExecutableOptionParserTest < Test::Unit::TestCase include Sprout::TestHelper context "a new RDoc parser" do setup do @parser = Sprout::RDocParser.new end end end
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/user_test.rb
Ruby
mit
200
master
4,150
require 'test_helper' class UserTest < Test::Unit::TestCase #include Sprout::TestHelper ['vista', 'mswin', 'wince', 'emx'].each do |variant| context variant do should "create a Win System" do Sprout::Platform.any_instance.stubs(:ruby_platform).returns variant assert Sprout::System.create...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/executable_test.rb
Ruby
mit
200
master
9,550
require 'test_helper' require 'fixtures/executable/mxmlc' require 'unit/fake_other_executable' require 'fixtures/executable/subclass/executable_superclass' require 'fixtures/executable/subclass/executable_subclass' class ExecutableTest < Test::Unit::TestCase include Sprout::TestHelper context "a new executable de...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/test_helper.rb
Ruby
mit
200
master
839
require "rubygems" require "bundler" Bundler.setup :default, :development # These require statments *must* be in this order: # http://bit.ly/bCC0Ew # Somewhat surprised they're not being required by Bundler... require 'shoulda' require 'mocha' lib = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/path_param_test.rb
Ruby
mit
200
master
1,175
require 'test_helper' class PathParamTest < Test::Unit::TestCase include Sprout::TestHelper context "a new PathParam" do setup do @path1 = File.join(fixtures, 'executable', 'paths', 'folder1') @param = Sprout::Executable::Path.new @param.belongs_to = FakeExecutableTask.new @param.nam...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/ruby_generator_test.rb
Ruby
mit
200
master
2,275
require 'test_helper' require 'sprout/generators/ruby/ruby_generator' class RubyGeneratorTest < Test::Unit::TestCase include Sprout::TestHelper context "A generated ruby application" do setup do @temp = File.join(fixtures, 'generators', 'ruby') FileUtils.mkdir_p @temp @generator = Sprout::...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/executable_session_test.rb
Ruby
mit
200
master
1,224
require 'test_helper' require 'fixtures/executable/fdb' class ExecutableSessionTest < Test::Unit::TestCase include Sprout::TestHelper context "a new executable session" do setup do # Uncomment the following to see interactive sessions: #Sprout.stdout = $stdout #Sprout.stderr = $stderr ...
github
lukebayes/project-sprouts
https://github.com/lukebayes/project-sprouts
test/unit/file_param_test.rb
Ruby
mit
200
master
1,792
require 'test_helper' class FileParamTest < Test::Unit::TestCase include Sprout::TestHelper context "a new FileParam" do setup do @input_with_spaces = File.join(fixtures, "executable", "path with spaces", "input.as") @input_with_spaces.gsub!(Dir.pwd + File::SEPARATOR, '') @input_with_escape...