minitest-focus-1.4.1/0000755000004100000410000000000015131012655014515 5ustar www-datawww-dataminitest-focus-1.4.1/Manifest.txt0000444000004100000410000000021015131012655017013 0ustar www-datawww-data.autotest History.rdoc Manifest.txt README.rdoc Rakefile lib/minitest/focus.rb lib/minitest/focus_plugin.rb test/minitest/test_focus.rb minitest-focus-1.4.1/.autotest0000444000004100000410000000104015131012655016357 0ustar www-datawww-data# -*- ruby -*- require "autotest/restart" Autotest.add_hook :initialize do |at| at.testlib = "minitest/autorun" at.add_exception "tmp" # at.extra_files << "../some/external/dependency.rb" # # at.libs << ":../some/external" # # at.add_exception "vendor" # # at.add_mapping(/dependency.rb/) do |f, _| # at.files_matching(/test_.*rb$/) # end # # %w(TestA TestB).each do |klass| # at.extra_class_map[klass] = "test/test_misc.rb" # end end # Autotest.add_hook :run_command do |at| # system "rake build" # end minitest-focus-1.4.1/README.rdoc0000444000004100000410000000452615131012655016330 0ustar www-datawww-data= minitest-focus home :: https://github.com/seattlerb/minitest-focus rdoc :: http://docs.seattlerb.org/minitest-focus == DESCRIPTION: Allows you to focus on a few tests with ease without having to use command-line arguments. Good for tools like guard that don't have enough brains to understand test output. Cf. minitest-autotest (an example of a test runner with strong testing logic). Inspired by https://github.com/seattlerb/minitest/issues/213 == FEATURES/PROBLEMS: * `focus` class method allows you to specify that the next test defined should be run. * Use --no-focus to temporarily disable or override with --name arguments. == SYNOPSIS: require "minitest/autorun" require "minitest/focus" class MyTest < Minitest::Test def test_unrelated; ...; end # will NOT run focus def test_method2; ...; end # will run (direct--preferred) focus def test_method; ...; end # will run (indirect) def test_method_edgecase; ...; end # will NOT run end # or, with spec-style: describe "MyTest2" do focus; it "does something" do pass end focus it("does something else") { pass } # block precedence needs {} end == REQUIREMENTS: * minitest 5+ == INSTALL: * sudo gem install minitest-focus == LICENSE: (The MIT License) Copyright (c) Ryan Davis, seattle.rb Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. minitest-focus-1.4.1/lib/0000755000004100000410000000000015131012655015263 5ustar www-datawww-dataminitest-focus-1.4.1/lib/minitest/0000755000004100000410000000000015131012655017117 5ustar www-datawww-dataminitest-focus-1.4.1/lib/minitest/focus.rb0000444000004100000410000000232215131012655020560 0ustar www-datawww-datarequire "minitest/test" Minitest.load :focus if Minitest.respond_to? :load # MT6 class Minitest::Test # :nodoc: class Focus # :nodoc: VERSION = "1.4.1" # :nodoc: end @@filtered_names = [] # :nodoc: def self.add_to_filter name @@filtered_names << "#{self}##{name}" end def self.filtered_names @@filtered_names end ## # Focus on the next test defined. Cumulative. Equivalent to # running with command line arg: -n /test_name|.../ # # class MyTest < Minitest::Test # # # direct approach # focus def test_method1 # will run # ... # end # # # indirect approach # focus # def test_method2 # will run # ... # end # # def test_method3 # will NOT run # ... # end # end def self.focus name = nil if name then add_to_filter name else set_focus_trap end end ## # Sets a one-off method_added callback to set focus on the method # defined next. def self.set_focus_trap meta = class << self; self; end meta.send :define_method, :method_added do |name| add_to_filter name meta.send :remove_method, :method_added end end end minitest-focus-1.4.1/lib/minitest/focus_plugin.rb0000444000004100000410000000143015131012655022135 0ustar www-datawww-data# frozen_string_literal: true module Minitest def self.plugin_focus_options opts, options opts.on "--no-focus", "Disable `focus` calls in tests." do |n| @nofocus = true end end def self.plugin_focus_init options # :nodoc: return unless Minitest::Test.respond_to? :filtered_names return if Minitest::Test.filtered_names.empty? if options[:include] || options[:filter] then order = %w[ `focus` --name ] a, b = @nofocus ? order : order.reverse extra = " Use --no-focus to override." unless @nofocus warn "Ignoring #{a} filters in favor of #{b} filters.#{extra}" warn "" end return if @nofocus re = "/^(#{Regexp.union(Minitest::Test.filtered_names).source})$/" options[:include] = options[:filter] = re end end minitest-focus-1.4.1/test/0000755000004100000410000000000015131012655015474 5ustar www-datawww-dataminitest-focus-1.4.1/test/minitest/0000755000004100000410000000000015131012655017330 5ustar www-datawww-dataminitest-focus-1.4.1/test/minitest/test_focus.rb0000444000004100000410000000126315131012655022033 0ustar www-datawww-datarequire "minitest/autorun" require "minitest/focus" class MyTest1 < Minitest::Test def test_fail; flunk; end focus; def test_method; pass; end focus def test_method2; pass; end focus \ def test_method3; pass; end def test_method_edgecase; flunk; end end describe "MyTest2" do it "is ignored" do flunk end focus; it "does something" do pass end focus it("does something else") { pass } # stupid block precedence needs {} it "bombs" do flunk end focus; it "has non-word ['chars'" do pass end # Will raise invalid RegExp unless correctly escaped end minitest-focus-1.4.1/checksums.yaml.gz.sig0000444000004100000410000000040015131012655020556 0ustar www-datawww-data :[^wiLh3o❇nP(jǯ>ڸ\"L|G,] i}9] :[by؉sI)r?ӻaur@;Εs+[9w3LTW( m TQr؅L%ʽƅlea@/N] vQR$!+q`CF2\:!st唠BB>fm|B3 +1a!Xn*u)ٺ.minitest-focus-1.4.1/Rakefile0000444000004100000410000000037115131012655016161 0ustar www-datawww-data# -*- ruby -*- require "rubygems" require "hoe" Hoe.plugin :isolate Hoe.plugin :seattlerb Hoe.spec "minitest-focus" do developer "Ryan Davis", "ryand-ruby@zenspider.com" license "MIT" dependency "minitest", "> 5.0" end # vim: syntax=ruby minitest-focus-1.4.1/data.tar.gz.sig0000444000004100000410000000040015131012655017326 0ustar www-datawww-dataL"="(+V%1a!-Nlu*r;֠QF.U;e9zB SԜRbҢ(̞&|c)!`FϜDw#~ F~5 #qe${IzuQqJ ^2Nf X`Az$7'7J0jQ>9ju}ZkuFk#t b̓tdfd Elod2( C_V}Zminitest-focus-1.4.1/minitest-focus.gemspec0000644000004100000410000000612715131012655021041 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: minitest-focus 1.4.1 ruby lib Gem::Specification.new do |s| s.name = "minitest-focus".freeze s.version = "1.4.1".freeze s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "homepage_uri" => "https://github.com/seattlerb/minitest-focus" } if s.respond_to? :metadata= s.require_paths = ["lib".freeze] s.authors = ["Ryan Davis".freeze] s.cert_chain = ["-----BEGIN CERTIFICATE-----\nMIIDPjCCAiagAwIBAgIBCTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu\nZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB\nGRYDY29tMB4XDTI1MDEwNjIzMjcwMVoXDTI2MDEwNjIzMjcwMVowRTETMBEGA1UE\nAwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS\nJomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda\nb9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx\ntaCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT\noOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh\nGiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt\nqhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV\ngBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw\nHQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB\nAQAC0WQJcPOWPFwkojhzweilRVjTJ19UiLhiBTw3C1wJO3LVdBkWDmnnhAmKuX4D\nr7vjQvESlABGIPdutI1Yl7mrHQzTkfLfXvNN6MT0nLChPyIYauT6SZZxubwJrUfA\n7R0c2CJTIboZ0XaGpLsXqHEF1c29H7TV1QvVuqKAN2mCjh4N82QVn+ZKtys28AwT\n6GfQX2fqLoi4KSc7xIzHKaNzqxeOICmJofk9w5VZ2rRN6yes8jvFYwz9HR41wdj8\nbwfinv7Yp5fA6AysuZLhCykyfDuZVRrUp0Vb68YCKsLjJly/Theak+euNTxvHsB+\nal9oSgPPHICMEX65qvLywitx\n-----END CERTIFICATE-----\n".freeze] s.date = "1980-01-02" s.description = "Allows you to focus on a few tests with ease without having to use\ncommand-line arguments. Good for tools like guard that don't have\nenough brains to understand test output. Cf. minitest-autotest (an\nexample of a test runner with strong testing logic).\n\nInspired by https://github.com/seattlerb/minitest/issues/213".freeze s.email = ["ryand-ruby@zenspider.com".freeze] s.extra_rdoc_files = ["History.rdoc".freeze, "Manifest.txt".freeze, "README.rdoc".freeze] s.files = [".autotest".freeze, "History.rdoc".freeze, "Manifest.txt".freeze, "README.rdoc".freeze, "Rakefile".freeze, "lib/minitest/focus.rb".freeze, "lib/minitest/focus_plugin.rb".freeze, "test/minitest/test_focus.rb".freeze] s.homepage = "https://github.com/seattlerb/minitest-focus".freeze s.licenses = ["MIT".freeze] s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] s.rubygems_version = "3.7.2".freeze s.summary = "Allows you to focus on a few tests with ease without having to use command-line arguments".freeze s.specification_version = 4 s.add_development_dependency(%q.freeze, ["~> 4.5".freeze]) s.add_runtime_dependency(%q.freeze, ["> 5.0".freeze]) s.add_development_dependency(%q.freeze, [">= 6.0".freeze, "< 8".freeze]) end minitest-focus-1.4.1/History.rdoc0000444000004100000410000000231715131012655017030 0ustar www-datawww-data=== 1.4.1 / 2025-12-31 * 4 bug fixes: * MT6: Load focus plugin if minitest/focus is required. (mattbrictson) * Loosened the minitest dependency to include MT6. * Dropped MT4. * MT6: Minor option processing fixes. === 1.4.0 / 2023-07-11 * 1 minor enhancement: * Added --no-focus flag to disable focus and allow --name args to override. === 1.3.1 / 2021-05-26 * 1 bug fix: * Fixed missing require. (ryanseys) === 1.3.0 / 2021-05-22 * 1 major enhancement: * Removed minitest4 support. * 2 minor enhancements: * Added support for `focus def test_method`. * Improved documentation for both test- and spec-style. === 1.2.1 / 2020-06-14 * 1 bug fix: * Prevent a crash if the gem is installed but never required. (dazuma) === 1.2.0 / 2020-05-15 * 1 major enhancement: * Converted to a minitest plugin. (jbourassa) === 1.1.2 / 2015-07-25 * 1 bug fix: * Fixed focus handling when run under Rake's rake_test_loader.rb. === 1.1.1 / 2015-03-12 * 1 minor enhancement: * Escape method names in filter regexp. (ddiachkov) === 1.1.0 / 2013-11-07 * 1 major enhancement: * Minitest 5 compatibility. * Still works on minitest 4. === 1.0.0 / 2013-01-07 * 1 major enhancement * Birthday! minitest-focus-1.4.1/metadata.gz.sig0000444000004100000410000000040015131012655017410 0ustar www-datawww-dataUO"\wZfQrH)) Ѭl2ouc!?s* H/xuTl_8ASWYL {k{d*T^Ĥ2^9SZ.>WSˠw0(VgXjng(#3/KgBm)vA+ȤќxX*dDc4Ya ]wߓ<0yvxAv XZGeXZ.i~_