minitest-utils 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47f2a64d51c694699857beeeb0c224ac318a93370004e38fafd45c8c150f51d4
4
- data.tar.gz: c7cedcd2bb07bf7f081695a006406ff552fa2a9546b1303923ac8b91ec181f0c
3
+ metadata.gz: 84ff17b12d3ecf5983fca906bad050c72704c79b28e80f0a4af12da0045be9f8
4
+ data.tar.gz: 47eb2b47469a7f12247fdb502f482258d137f910f13863aec78ead8511963a03
5
5
  SHA512:
6
- metadata.gz: 237296d8b11d7c1ca2f3f180cc766dbd5829a9af85cacdc9e906a115d44fc593086afd4c52678a4b44af0f694c894ab3de56a1ef42653e2b07fe11ada7ccde25
7
- data.tar.gz: e22d3c24c0843787f347f892205f8579f3ed0c3661a114e8b207649571115a20ca46c84de11e2474c8a330917d64a348f79779a8aeb827f9c56e97398d0e21f5
6
+ metadata.gz: 664cf1128e552426b8c9d6089358886d10b7d1ea47896e7c5476fb131de836583bb4ee7c184e8439a6e8c8b67648b54fb0975733ae582d6583ddff864aa34abf
7
+ data.tar.gz: 62db581b15916c22304fee4801aec9bba0cd89cc466e3422dc654b30b7c28a2663b22b517fe06ed8087fba8ee09fd06382200fcd54f3fb3c63b8febd61f09514
@@ -0,0 +1,3 @@
1
+ ---
2
+ github: [fnando]
3
+ custom: ["https://www.paypal.me/nandovieira/🍕"]
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_gem:
3
3
  rubocop-fnando: .rubocop.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 2.7
7
7
 
8
8
  Metrics/LineLength:
9
9
  Exclude:
@@ -15,3 +15,6 @@ Metrics/AbcSize:
15
15
  Style/GlobalVars:
16
16
  Exclude:
17
17
  - test/minitest/utils/let_test.rb
18
+
19
+ Metrics:
20
+ Enabled: false
data/Rakefile CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rake/testtask"
5
+ require "rubocop/rake_task"
5
6
 
6
7
  Rake::TestTask.new(:test) do |t|
7
8
  t.libs << "test"
@@ -10,4 +11,6 @@ Rake::TestTask.new(:test) do |t|
10
11
  t.warning = false
11
12
  end
12
13
 
13
- task default: :test
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
@@ -57,12 +57,12 @@ module Minitest
57
57
  include mod
58
58
  end
59
59
 
60
- def self.let(name, &block) # rubocop:disable Metrics/MethodLength
60
+ def self.let(name, &block)
61
61
  target = begin
62
- instance_method(name)
63
- rescue StandardError
64
- nil
65
- end
62
+ instance_method(name)
63
+ rescue StandardError
64
+ nil
65
+ end
66
66
 
67
67
  message = "Cannot define let(:#{name});"
68
68
 
@@ -11,7 +11,7 @@ module ActionDispatch
11
11
  Capybara.use_default_driver
12
12
  end
13
13
 
14
- def self.use_javascript!(raise_on_javascript_errors: true) # rubocop:disable Metrics/MethodLength
14
+ def self.use_javascript!(raise_on_javascript_errors: true)
15
15
  setup do
16
16
  Capybara.current_driver = Capybara.javascript_driver
17
17
  end
@@ -4,8 +4,7 @@ module Minitest
4
4
  module Utils
5
5
  module Locale
6
6
  class << self
7
- attr_accessor :setup
8
- attr_accessor :teardown
7
+ attr_accessor :setup, :teardown
9
8
  end
10
9
 
11
10
  self.setup = proc do
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Minitest
4
4
  module Utils
5
- class Reporter < Minitest::StatisticsReporter # rubocop:disable Metrics/ClassLength
5
+ class Reporter < Minitest::StatisticsReporter
6
6
  COLOR_FOR_RESULT_CODE = {
7
7
  "." => :green,
8
8
  "E" => :red,
@@ -35,7 +35,7 @@ module Minitest
35
35
  io.puts
36
36
  end
37
37
 
38
- def report # rubocop:disable Metrics/MethodLength
38
+ def report
39
39
  super
40
40
  io.sync = true
41
41
 
@@ -148,7 +148,11 @@ module Minitest
148
148
  indent(backtrace.join("\n")).gsub(/^(\s+)/, "\\1# ")
149
149
  end
150
150
 
151
- private def location(location, include_line_number = false)
151
+ private def location(location, include_line_number = false) # rubocop:disable Style/OptionalBooleanParameter
152
+ matches = location.match(/^(<.*?>)/)
153
+
154
+ return matches[1] if matches
155
+
152
156
  regex = include_line_number ? /^([^:]+:\d+)/ : /^([^:]+)/
153
157
  location = File.expand_path(location[regex, 1])
154
158
 
@@ -164,7 +168,7 @@ module Minitest
164
168
  private def result_name(name)
165
169
  name
166
170
  .gsub(/^test(_\d+)?_/, "")
167
- .gsub(/_/, " ")
171
+ .tr("_", " ")
168
172
  end
169
173
 
170
174
  private def print_result_code(result_code)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Minitest
4
4
  module Utils
5
- VERSION = "0.4.6"
5
+ VERSION = "0.4.7"
6
6
  end
7
7
  end
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.summary = "Some utilities for your Minitest day-to-day usage."
11
11
  spec.description = spec.summary
12
12
  spec.homepage = "http://github.com/fnando/minitest-utils"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
13
14
 
14
15
  spec.files = `git ls-files -z`
15
16
  .split("\x0")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-15 00:00:00.000000000 Z
11
+ date: 2022-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -101,6 +101,7 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".github/FUNDING.yml"
104
105
  - ".gitignore"
105
106
  - ".rubocop.yml"
106
107
  - Gemfile
@@ -134,7 +135,7 @@ files:
134
135
  homepage: http://github.com/fnando/minitest-utils
135
136
  licenses: []
136
137
  metadata: {}
137
- post_install_message:
138
+ post_install_message:
138
139
  rdoc_options: []
139
140
  require_paths:
140
141
  - lib
@@ -142,15 +143,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
143
  requirements:
143
144
  - - ">="
144
145
  - !ruby/object:Gem::Version
145
- version: '0'
146
+ version: 2.7.0
146
147
  required_rubygems_version: !ruby/object:Gem::Requirement
147
148
  requirements:
148
149
  - - ">="
149
150
  - !ruby/object:Gem::Version
150
151
  version: '0'
151
152
  requirements: []
152
- rubygems_version: 3.0.3
153
- signing_key:
153
+ rubygems_version: 3.3.3
154
+ signing_key:
154
155
  specification_version: 4
155
156
  summary: Some utilities for your Minitest day-to-day usage.
156
157
  test_files: []