standard-rspec 0.1.6 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0167c561b676fc8e9fb04eefbc84caad20df4c07d1d933ef2b1bf670fb61b557
4
- data.tar.gz: f096a118e1cb6828de8ef2e769b8ac8a941c6dfaf50aa4a3b2bd7bbe5bbedf7a
3
+ metadata.gz: ec0d895ae8406f45ab179d5e65bdc1b48991fbf5bb4289482e7e522eabb6076a
4
+ data.tar.gz: 13acd1dec3ed2caa7bc09bf9326ec17ca39f851ee613be2c97e1226354cc3b1d
5
5
  SHA512:
6
- metadata.gz: b5735f3b982241989e5d67e9641a89d7b4f8636f137367353305482f9f19225d50e6374820567d4fe29ad094c99630914fac45f0c8349ff6d4aa4c38140a95d7
7
- data.tar.gz: 6a47e57eb27ddddf332f36079e0e37392d1e10732ec0e65217fe54463c4488b849e3d9606f6c673bbbb24ba2f87a348e25743ccb014d2f0adcb13c6a654a873d
6
+ metadata.gz: 4387f0c1fb54c3cb8967944c56f1d4f8bb9e75dc5e7a456cf423ed6c7892cfdc673aa385b2e93b84a3125ad8056665a8fbb87b0a29459a7a1192126b6188edcd
7
+ data.tar.gz: 15d71effe85f755dbfecd875acef1ce65454538a7ffbd91b5b2a078a74d7a84c16d2f105fba9f697e90f41ce0877a77cedc3ef6b095156dcb13923ff2c44ed67
data/CHANGELOG.md CHANGED
@@ -3,3 +3,7 @@
3
3
  ## [0.1.0] - 2023-07-07
4
4
 
5
5
  - Initial release
6
+
7
+ ## [0.1.6] - 2023-07-10
8
+
9
+ - Fix cops paths, remove deprecated cops
data/Rakefile CHANGED
@@ -43,7 +43,7 @@ task :copy_rubocop_rspec_entry_point_and_comment_out_monkey_patch do
43
43
  #
44
44
  # Because there are both necessary require statements and additional patching
45
45
  # of RuboCop built-in cops in this file, we need to monitor it for changes
46
- # in rubocop-rails and keep it up to date.
46
+ # in rubocop-rspec and keep it up to date.
47
47
  #
48
48
  # Last updated from #{gem_spec.name} v#{gem_spec.version}
49
49
 
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # Because there are both necessary require statements and additional patching
7
7
  # of RuboCop built-in cops in this file, we need to monitor it for changes
8
- # in rubocop-rails and keep it up to date.
8
+ # in rubocop-rspec and keep it up to date.
9
9
  #
10
10
  # Last updated from rubocop-rspec v2.22.0
11
11
 
@@ -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: YAML.load_file(Pathname.new(__dir__).join("../../../config/base.yml"), aliases: true)
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,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Standard
4
4
  module Rspec
5
- VERSION = "0.1.6"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
@@ -1,4 +1,5 @@
1
1
  require "lint_roller"
2
+ require "action_policy"
2
3
 
3
4
  require_relative "rspec/version"
4
5
  require_relative "rspec/plugin"
@@ -34,4 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "lint_roller", "~> 1.0"
35
35
  spec.add_dependency "rubocop-rspec", "~> 2.22.0"
36
36
  spec.add_dependency "rubocop-factory_bot", "~> 2.22"
37
+ spec.add_dependency "action_policy", "~> 0.6.5"
37
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - shilin-anton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lint_roller
@@ -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
@@ -70,7 +84,6 @@ files:
70
84
  - lib/standard/rspec/load_rubocop_rspec_without_the_monkey_patch.rb
71
85
  - lib/standard/rspec/plugin.rb
72
86
  - lib/standard/rspec/version.rb
73
- - sig/standard/rspec.rbs
74
87
  - standard-rspec.gemspec
75
88
  homepage: https://github.com/shilin-anton/standard-rspec
76
89
  licenses:
@@ -1 +0,0 @@
1
- TODO