standard-rspec 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/standard/rspec/plugin.rb +13 -1
- data/lib/standard/rspec/version.rb +1 -1
- data/lib/standard/rspec.rb +1 -0
- data/standard-rspec.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec0d895ae8406f45ab179d5e65bdc1b48991fbf5bb4289482e7e522eabb6076a
|
4
|
+
data.tar.gz: 13acd1dec3ed2caa7bc09bf9326ec17ca39f851ee613be2c97e1226354cc3b1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4387f0c1fb54c3cb8967944c56f1d4f8bb9e75dc5e7a456cf423ed6c7892cfdc673aa385b2e93b84a3125ad8056665a8fbb87b0a29459a7a1192126b6188edcd
|
7
|
+
data.tar.gz: 15d71effe85f755dbfecd875acef1ce65454538a7ffbd91b5b2a078a74d7a84c16d2f105fba9f697e90f41ce0877a77cedc3ef6b095156dcb13923ff2c44ed67
|
@@ -3,6 +3,10 @@ require "yaml"
|
|
3
3
|
module Standard
|
4
4
|
module Rspec
|
5
5
|
class Plugin < LintRoller::Plugin
|
6
|
+
def initialize(config)
|
7
|
+
@config = config
|
8
|
+
end
|
9
|
+
|
6
10
|
def about
|
7
11
|
LintRoller::About.new(
|
8
12
|
name: "standard-rspec",
|
@@ -22,12 +26,20 @@ module Standard
|
|
22
26
|
LintRoller::Rules.new(
|
23
27
|
type: :object,
|
24
28
|
config_format: :rubocop,
|
25
|
-
value:
|
29
|
+
value: rules_with_config_applied
|
26
30
|
)
|
27
31
|
end
|
28
32
|
|
29
33
|
private
|
30
34
|
|
35
|
+
def rules_with_config_applied
|
36
|
+
YAML.load_file(Pathname.new(__dir__).join("../../../config/base.yml"), aliases: true).tap do |rules|
|
37
|
+
if @config["action_policy_enabled"]
|
38
|
+
rules["inherit_gem"] = { "action_policy" => "config/rubocop-rspec.yml" }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
31
43
|
# This is not fantastic.
|
32
44
|
#
|
33
45
|
# When you `require "rubocop-rspec"`, it will not only load the cops,
|
data/lib/standard/rspec.rb
CHANGED
data/standard-rspec.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standard-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shilin-anton
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.22'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: action_policy
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.6.5
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.6.5
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- anton.d.shilin@gmail.com
|