test-prof 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/test_prof/cops/inject.rb +16 -14
- data/lib/test_prof/cops/rspec/aggregate_failures.rb +2 -4
- data/lib/test_prof/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 967e917103495761884236a184497ae47d9a94950b91e2ab2f972b7f51d378e1
|
4
|
+
data.tar.gz: 733623aa5a072a701014d9c5b24b4c2bb3f1aee8c8f689b1c9bd7f0c7088c09d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3205058c5cb3baa8c7552fd225c0932dc2c7b871adfd8efb81e59b669940a128c738ed2278b6262c7507a3fa9555f5a0be3c730b656bae8b7f2097f056c0697
|
7
|
+
data.tar.gz: 449e2c8c17397eec18b68c9e3f53ba3315b38bd4042a0191bedade3fa2a5b7fb1e9d1155b3673f08d6016b322a0733de1fc95a64cb5aa4b604dc7e209817b0c3
|
data/CHANGELOG.md
CHANGED
@@ -2,22 +2,24 @@
|
|
2
2
|
|
3
3
|
# This is shamelessly borrowed from RuboCop RSpec
|
4
4
|
# https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
5
|
-
module
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
module TestProf
|
6
|
+
module Cops
|
7
|
+
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
8
|
+
# bit of our configuration.
|
9
|
+
module Inject
|
10
|
+
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.parent.expand_path.freeze
|
11
|
+
CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default.yml").freeze
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
def self.defaults!
|
14
|
+
path = CONFIG_DEFAULT.to_s
|
15
|
+
hash = RuboCop::ConfigLoader.send(:load_yaml_configuration, path)
|
16
|
+
config = RuboCop::Config.new(hash, path)
|
17
|
+
puts "configuration from #{path}" if RuboCop::ConfigLoader.debug?
|
18
|
+
config = RuboCop::ConfigLoader.merge_with_default(config, path)
|
19
|
+
RuboCop::ConfigLoader.instance_variable_set(:@default_configuration, config)
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
23
|
-
|
25
|
+
TestProf::Cops::Inject.defaults!
|
@@ -4,14 +4,12 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module RSpec
|
6
6
|
class AggregateExamples
|
7
|
-
def self.
|
8
|
-
|
7
|
+
def self.registry
|
8
|
+
RuboCop::Cop::Cop.registry
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
12
|
class AggregateFailures < AggregateExamples
|
13
|
-
raise "Remove me" if TestProf::VERSION >= "1.0"
|
14
|
-
|
15
13
|
def initialize(*)
|
16
14
|
super
|
17
15
|
self.class.just_once { warn "`AggregateFailures` cop has been renamed to `AggregateExamples`." }
|
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: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|