test-prof 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples/matchers_with_side_effects.rb +1 -1
- data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples/node_matchers.rb +1 -1
- data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples.rb +5 -5
- data/lib/{test_prof/cops → rubocop/test_prof}/plugin.rb +2 -2
- data/lib/rubocop/test_prof.rb +11 -0
- data/lib/test-prof.rb +7 -0
- data/lib/test_prof/recipes/rspec/let_it_be.rb +1 -1
- data/lib/test_prof/rspec_dissect/collectors/let.rb +1 -1
- data/lib/test_prof/rubocop.rb +10 -9
- data/lib/test_prof/version.rb +1 -1
- metadata +11 -10
- /data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples/its.rb +0 -0
- /data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples/line_range_helpers.rb +0 -0
- /data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples/metadata_helpers.rb +0 -0
- /data/lib/{test_prof → rubocop/test_prof}/cops/rspec/language.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2dff1d8ae5206095a30da3b95a68c39df0571bcd7525f8601c2ff0b7ce0b5d06
|
|
4
|
+
data.tar.gz: a67fe77ee1826c220e7afde7e5df026d88c61a2d376134bc858b4a2143a6b883
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a939c453031278d52fc942f81e712aaafc6959286757a9fdc2680e514f6932488e38da8e2591b4e04aac790088cb109da49a014403f3e67156f31bf4e53b46d2
|
|
7
|
+
data.tar.gz: 43130ba15fbb3f17cb087733c587724185ad849011477424cb2805df9e86cde41c8101d14126b7d0483999f5f08363727b09caabf471b73d85b8652eb2412fb4
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## master (unreleased)
|
|
4
4
|
|
|
5
|
+
## 1.5.1 (2026-01-27)
|
|
6
|
+
|
|
7
|
+
- Fix RuboCop plugin. ([@palkan][])
|
|
8
|
+
|
|
9
|
+
Now you should use `--plugin test-prof` or `plugins: [test-prof]` (in YAML) (so LintRoller can correctly obtain the plugin class name from the gemspec).
|
|
10
|
+
|
|
5
11
|
## 1.5.0 (2025-12-04)
|
|
6
12
|
|
|
7
13
|
- Logging: support Rails 8.2 structured events based logging. ([@palkan][])
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
require_relative "aggregate_examples/line_range_helpers"
|
|
4
|
+
require_relative "aggregate_examples/metadata_helpers"
|
|
5
|
+
require_relative "aggregate_examples/node_matchers"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
require_relative "aggregate_examples/its"
|
|
8
|
+
require_relative "aggregate_examples/matchers_with_side_effects"
|
|
9
9
|
|
|
10
10
|
module RuboCop
|
|
11
11
|
module Cop
|
|
@@ -8,8 +8,8 @@ module RuboCop
|
|
|
8
8
|
class Plugin < LintRoller::Plugin
|
|
9
9
|
def about
|
|
10
10
|
LintRoller::About.new(
|
|
11
|
-
name: "
|
|
12
|
-
version: VERSION,
|
|
11
|
+
name: "test-prof",
|
|
12
|
+
version: ::TestProf::VERSION,
|
|
13
13
|
homepage: "https://test-prof.evilmartians.io/misc/rubocop",
|
|
14
14
|
description: "RuboCop plugin to help you write more performant tests."
|
|
15
15
|
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "test_prof/utils"
|
|
4
|
+
supported = TestProf::Utils.verify_gem_version("rubocop", at_least: "0.51.0")
|
|
5
|
+
unless supported
|
|
6
|
+
warn "TestProf cops require RuboCop >= 0.51.0 to run."
|
|
7
|
+
return
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require "rubocop/test_prof/plugin"
|
|
11
|
+
require "rubocop/test_prof/cops/rspec/aggregate_examples"
|
data/lib/test-prof.rb
CHANGED
|
@@ -142,7 +142,7 @@ module TestProf
|
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
private def report_duplicates(identifier)
|
|
145
|
-
if
|
|
145
|
+
if method_defined?(identifier) && File.basename(__FILE__) == File.basename(instance_method(identifier).source_location[0])
|
|
146
146
|
error_msg = "let_it_be(:#{identifier}) was redefined in nested group"
|
|
147
147
|
report_level = LetItBe.config.report_duplicates.to_sym
|
|
148
148
|
|
data/lib/test_prof/rubocop.rb
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
unless supported
|
|
6
|
-
warn "TestProf cops require RuboCop >= 0.51.0 to run."
|
|
7
|
-
return
|
|
8
|
-
end
|
|
3
|
+
warn <<~MSG
|
|
4
|
+
!!!
|
|
9
5
|
|
|
10
|
-
|
|
6
|
+
Please, update your .rubocop.yml configuration to load TestProf plugin as follows (and fix the error below):
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
plugins:
|
|
9
|
+
- test-prof
|
|
10
|
+
|
|
11
|
+
!!!
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
MSG
|
data/lib/test_prof/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: test-prof
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -123,6 +123,15 @@ files:
|
|
|
123
123
|
- lib/minitest/base_reporter.rb
|
|
124
124
|
- lib/minitest/event_prof_formatter.rb
|
|
125
125
|
- lib/minitest/test_prof_plugin.rb
|
|
126
|
+
- lib/rubocop/test_prof.rb
|
|
127
|
+
- lib/rubocop/test_prof/cops/rspec/aggregate_examples.rb
|
|
128
|
+
- lib/rubocop/test_prof/cops/rspec/aggregate_examples/its.rb
|
|
129
|
+
- lib/rubocop/test_prof/cops/rspec/aggregate_examples/line_range_helpers.rb
|
|
130
|
+
- lib/rubocop/test_prof/cops/rspec/aggregate_examples/matchers_with_side_effects.rb
|
|
131
|
+
- lib/rubocop/test_prof/cops/rspec/aggregate_examples/metadata_helpers.rb
|
|
132
|
+
- lib/rubocop/test_prof/cops/rspec/aggregate_examples/node_matchers.rb
|
|
133
|
+
- lib/rubocop/test_prof/cops/rspec/language.rb
|
|
134
|
+
- lib/rubocop/test_prof/plugin.rb
|
|
126
135
|
- lib/test-prof.rb
|
|
127
136
|
- lib/test_prof.rb
|
|
128
137
|
- lib/test_prof/any_fixture.rb
|
|
@@ -135,14 +144,6 @@ files:
|
|
|
135
144
|
- lib/test_prof/before_all.rb
|
|
136
145
|
- lib/test_prof/before_all/adapters/active_record.rb
|
|
137
146
|
- lib/test_prof/before_all/isolator.rb
|
|
138
|
-
- lib/test_prof/cops/plugin.rb
|
|
139
|
-
- lib/test_prof/cops/rspec/aggregate_examples.rb
|
|
140
|
-
- lib/test_prof/cops/rspec/aggregate_examples/its.rb
|
|
141
|
-
- lib/test_prof/cops/rspec/aggregate_examples/line_range_helpers.rb
|
|
142
|
-
- lib/test_prof/cops/rspec/aggregate_examples/matchers_with_side_effects.rb
|
|
143
|
-
- lib/test_prof/cops/rspec/aggregate_examples/metadata_helpers.rb
|
|
144
|
-
- lib/test_prof/cops/rspec/aggregate_examples/node_matchers.rb
|
|
145
|
-
- lib/test_prof/cops/rspec/language.rb
|
|
146
147
|
- lib/test_prof/core.rb
|
|
147
148
|
- lib/test_prof/event_prof.rb
|
|
148
149
|
- lib/test_prof/event_prof/custom_events.rb
|
|
File without changes
|
/data/lib/{test_prof → rubocop/test_prof}/cops/rspec/aggregate_examples/line_range_helpers.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|