rubocop-rake 0.5.1 → 0.7.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: b71580a8ba42edbae65f9f46e4e5fd2af9e64b4bda2a8eff8a9e719e35ff4ca1
4
- data.tar.gz: 6083afa2054e8ccd3e4148335d663b6872f05cdeca02265601b3a7e4d5b1501a
3
+ metadata.gz: c253f7db93c311dcb08404abf4f310b37447bb191349022774f4b1d3b0801a47
4
+ data.tar.gz: 7cf21f3beb4f90cca3006c320c684c5dbe44d3279c4b65ea2ad24287a0e473b4
5
5
  SHA512:
6
- metadata.gz: f71f3e174dae2a4a310483393c506bd3508576d93bfe6e8bd6c7cbf66fbe3104b35ac287f0b69568fb3b169e3ee20ceebb4c77219fbb8c8a9d258cb676ad79a3
7
- data.tar.gz: ecd03e5d7cafc964fe1c501c85d554d07a3bdce600d1ba046cf372fcfbab5c0cde93b7fedf5c9781fdf9274e6c0adfbdd626dd59ac93f9c39e9c9c2f8b3de0cc
6
+ metadata.gz: b4370c9fb5c2f1aa26eff13f35d659decdacdcc33f4f5b71dc685ff6361987307a808f230de0359b1651934bdb1823d40134b707145b5ef4502784f43c82f3fe
7
+ data.tar.gz: 362266888433803919694e02787905a4d775f0ce5c76d79984572bbb673e24b4e7105f4fe8db6425e9622d828f8d4dba137293f434594f4e9210786532d428ee
@@ -0,0 +1,34 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - master
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ main:
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby:
20
+ - "2.7"
21
+ - "3.0"
22
+ - "3.1"
23
+ - "3.2"
24
+ - "3.3"
25
+ - "3.4"
26
+ - ruby-head
27
+ name: "Ruby ${{ matrix.ruby }}: spec"
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: "${{ matrix.ruby }}"
33
+ bundler-cache: true
34
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .ruby-version
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /_yardoc/
data/.rubocop.yml CHANGED
@@ -1,11 +1,21 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- require:
3
+ plugins:
4
+ - rubocop-internal_affairs
4
5
  - rubocop-rake
6
+
7
+ require:
5
8
  - rubocop-rspec
6
9
 
7
10
  AllCops:
8
- TargetRubyVersion: 2.4
11
+ NewCops: enable
12
+ TargetRubyVersion: 2.7
13
+
14
+ InternalAffairs/NodeMatcherDirective:
15
+ Enabled: false
16
+
17
+ InternalAffairs/OnSendWithoutOnCSend:
18
+ Enabled: false
9
19
 
10
20
  Layout/LineLength:
11
21
  Enabled: false
@@ -39,9 +49,16 @@ Style/PercentLiteralDelimiters:
39
49
  Style/TrailingCommaInArguments:
40
50
  EnforcedStyleForMultiline: comma
41
51
 
42
- RSpec/ExampleLength:
43
- Enabled: false
44
-
45
52
  Naming/FileName:
46
53
  Exclude:
47
54
  - 'lib/rubocop-rake.rb'
55
+
56
+ RSpec:
57
+ Language:
58
+ Expectations:
59
+ - expect_correction
60
+ - expect_no_offenses
61
+ - expect_offense
62
+
63
+ RSpec/ExampleLength:
64
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -2,45 +2,59 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.7.0 (2025-02-16)
6
+
7
+ * [#58](https://github.com/rubocop/rubocop-rake/pull/58): Pluginfy RuboCop Rake. ([@koic][])
8
+ * [#57](https://github.com/rubocop/rubocop-rake/pull/57): Drop support Ruby 2.5 and 2.6 for runtime environment. ([@koic][])
9
+
10
+ ## 0.6.0 (2021-06-29)
11
+
12
+ ### Changes
13
+
14
+ * [#33](https://github.com/rubocop/rubocop-rake/pull/33): Drop support for Ruby 2.3. ([@koic][])
15
+ * [#34](https://github.com/rubocop/rubocop-rake/pull/34): Require RuboCop 1.0 or higher. ([@koic][])
16
+ * [#38](https://github.com/rubocop/rubocop-rake/pull/37): Drop support for Ruby 2.4. ([@tejasbubane])
17
+ * [#36](https://github.com/rubocop/rubocop-rake/issues/36): Fix `Rake/Desc` to not generate offense for prerequisite declarations. ([@tejasbubane][])
18
+
5
19
  ## 0.5.1 (2020-02-14)
6
20
 
7
21
  ### Bug fixes
8
22
 
9
- * [#28](https://github.com/rubocop-hq/rubocop-rake/issues/28): Fix `Rake/Desc` to avoid an error when `task` is not a task definition. ([@pocke][])
23
+ * [#28](https://github.com/rubocop/rubocop-rake/issues/28): Fix `Rake/Desc` to avoid an error when `task` is not a task definition. ([@pocke][])
10
24
 
11
25
  ## 0.5.0 (2019-10-31)
12
26
 
13
27
  ### New features
14
28
 
15
- * [#14](https://github.com/rubocop-hq/rubocop-rake/issues/14): Add Rake/DuplicateNamespace cop. ([@jaruuuu][])
29
+ * [#14](https://github.com/rubocop/rubocop-rake/issues/14): Add Rake/DuplicateNamespace cop. ([@jaruuuu][])
16
30
 
17
31
  ## 0.4.0 (2019-10-13)
18
32
 
19
33
  ### New features
20
34
 
21
- * [#13](https://github.com/rubocop-hq/rubocop-rake/issues/13): Add Rake/DuplicateTask cop. ([@pocke][])
35
+ * [#13](https://github.com/rubocop/rubocop-rake/issues/13): Add Rake/DuplicateTask cop. ([@pocke][])
22
36
 
23
37
  ## 0.3.1 (2019-10-06)
24
38
 
25
39
  ### Bug fixes
26
40
 
27
- * [#17](https://github.com/rubocop-hq/rubocop-rake/pull/17): Filter target files for Rake/ClassDefinitionInTask cop. ([@pocke][])
41
+ * [#17](https://github.com/rubocop/rubocop-rake/pull/17): Filter target files for Rake/ClassDefinitionInTask cop. ([@pocke][])
28
42
 
29
43
  ## 0.3.0 (2019-09-25)
30
44
 
31
45
  ### New features
32
46
 
33
- * [#6](https://github.com/rubocop-hq/rubocop-rake/issues/6): Add `Rake/ClassDefinitionInTask` cop. ([@pocke][])
47
+ * [#6](https://github.com/rubocop/rubocop-rake/issues/6): Add `Rake/ClassDefinitionInTask` cop. ([@pocke][])
34
48
 
35
49
  ### Bug fixes
36
50
 
37
- * [#8](https://github.com/rubocop-hq/rubocop-rake/issues/8): Make Rake/Desc to not require description for the default task. ([@pocke][])
51
+ * [#8](https://github.com/rubocop/rubocop-rake/issues/8): Make Rake/Desc to not require description for the default task. ([@pocke][])
38
52
 
39
53
  ## 0.2.0 (2019-09-17)
40
54
 
41
55
  ### New features
42
56
 
43
- * [#5](https://github.com/rubocop-hq/rubocop-rake/pull/5): Add `Rake/MethodDefinitionInTask`. ([@pocke][])
57
+ * [#5](https://github.com/rubocop/rubocop-rake/pull/5): Add `Rake/MethodDefinitionInTask`. ([@pocke][])
44
58
 
45
59
  ## 0.1.0 (2019-09-04)
46
60
 
@@ -51,3 +65,5 @@
51
65
 
52
66
  [@pocke]: https://github.com/pocke
53
67
  [@jaruuuu]: https://github.com/jaruuuu
68
+ [@koic]: https://github.com/koic
69
+ [@tejasbubane]: https://github.com/tejasbubane
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in rubocop-rake.gemspec
6
6
  gemspec
7
7
 
8
- gem "rake", "~> 12.0"
8
+ gem "rake", "~> 13.0"
9
9
  gem 'rspec'
10
- gem 'rubocop', '>= 0.76'
10
+ gem 'rubocop', '>= 1.72.1'
11
11
  gem 'rubocop-rspec'
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/rubocop-rake.svg)](https://rubygems.org/gems/rubocop-rake)
2
- [![CircleCI](https://circleci.com/gh/rubocop-hq/rubocop-rake.svg?style=svg)](https://circleci.com/gh/rubocop-hq/rubocop-rake)
2
+ ![CI](https://github.com/rubocop/rubocop-rake/workflows/main.yml/badge.svg)
3
3
 
4
4
  # RuboCop Rake
5
5
 
6
- A [RuboCop](https://github.com/rubocop-hq/rubocop) plugin for Rake.
6
+ A [RuboCop](https://github.com/rubocop/rubocop) plugin for Rake.
7
7
 
8
8
  ## Installation
9
9
 
@@ -23,12 +23,48 @@ Or install it yourself as:
23
23
 
24
24
  ## Usage
25
25
 
26
+ You need to tell RuboCop to load the Rake extension. There are three
27
+ ways to do this:
28
+
29
+ ### RuboCop configuration file
30
+
26
31
  Put this into your `.rubocop.yml`.
27
32
 
28
33
  ```yaml
29
- require: rubocop-rake
34
+ plugins: rubocop-rake
35
+ ```
36
+
37
+ Alternatively, use the following array notation when specifying multiple extensions.
38
+
39
+ ```yaml
40
+ plugins:
41
+ - rubocop-other-extension
42
+ - rubocop-rake
43
+ ```
44
+
45
+ Now you can run `rubocop` and it will automatically load the RuboCop Rake
46
+ cops together with the standard cops.
47
+
48
+ > [!NOTE]
49
+ > The plugin system is supported in RuboCop 1.72+. In earlier versions, use `require` instead of `plugins`.
50
+
51
+ ### Command line
52
+
53
+ ```bash
54
+ rubocop --plugin rubocop-rake
30
55
  ```
31
56
 
57
+ ### Rake task
58
+
59
+ ```ruby
60
+ require 'rubocop/rake_task'
61
+
62
+ RuboCop::RakeTask.new do |task|
63
+ task.plugins << 'rubocop-rake'
64
+ end
65
+ ```
66
+
67
+
32
68
  ## Development
33
69
 
34
70
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -37,5 +73,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
37
73
 
38
74
  ## Contributing
39
75
 
40
- Bug reports and pull requests are welcome on GitHub at https://github.com/rubocop-hq/rubocop-rake.
41
-
76
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rubocop/rubocop-rake.
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Rake
6
- # This cop detects class or module definition in a task or namespace,
6
+ # Detects class or module definition in a task or namespace,
7
7
  # because it is defined to the top level.
8
8
  # It is confusing because the scope looks in the task or namespace,
9
9
  # but actually it is defined to the top level.
@@ -28,18 +28,14 @@ module RuboCop
28
28
  # task :foo do
29
29
  # end
30
30
  #
31
- class ClassDefinitionInTask < Cop
31
+ class ClassDefinitionInTask < Base
32
32
  MSG = 'Do not define a %<type>s in rake task, because it will be defined to the top level.'
33
33
 
34
34
  def on_class(node)
35
35
  return if Helper::ClassDefinition.in_class_definition?(node)
36
36
  return unless Helper::TaskDefinition.in_task_or_namespace?(node)
37
37
 
38
- add_offense(node)
39
- end
40
-
41
- def message(node)
42
- format(MSG, type: node.type)
38
+ add_offense(node, message: format(MSG, type: node.type))
43
39
  end
44
40
 
45
41
  alias on_module on_class
@@ -27,15 +27,23 @@ module RuboCop
27
27
  # task :do_something do
28
28
  # end
29
29
  #
30
- class Desc < Cop
30
+ class Desc < Base
31
31
  include Helper::OnTask
32
+ extend AutoCorrector
32
33
 
33
34
  MSG = 'Describe the task with `desc` method.'
34
35
 
36
+ def_node_matcher :prerequisites, <<~PATTERN
37
+ (send nil? :task (hash (pair _ $_)))
38
+ PATTERN
39
+
35
40
  def on_task(node)
36
41
  return if task_with_desc?(node)
37
42
  return if Helper::TaskName.task_name(node) == :default
38
43
 
44
+ requirements = prerequisites(node)
45
+ return if requirements&.array_type?
46
+
39
47
  add_offense(node)
40
48
  end
41
49
 
@@ -48,7 +56,7 @@ module RuboCop
48
56
  desc_candidate = parent.children[idx]
49
57
  return false unless desc_candidate
50
58
 
51
- desc_candidate.send_type? && desc_candidate.method_name == :desc
59
+ desc_candidate.send_type? && desc_candidate.method?(:desc)
52
60
  end
53
61
 
54
62
  private def parent_and_task(task_node)
@@ -66,7 +74,7 @@ module RuboCop
66
74
  end
67
75
 
68
76
  private def can_insert_desc_to?(parent)
69
- parent.begin_type? || parent.block_type? || parent.kwbegin_type?
77
+ parent.type?(:begin, :block, :kwbegin)
70
78
  end
71
79
  end
72
80
  end
@@ -27,7 +27,7 @@ module RuboCop
27
27
  # end
28
28
  # end
29
29
  #
30
- class DuplicateNamespace < Cop
30
+ class DuplicateNamespace < Base
31
31
  include Helper::OnNamespace
32
32
 
33
33
  MSG = 'Namespace `%<namespace>s` is defined at both %<previous>s and %<current>s.'
@@ -55,7 +55,7 @@ module RuboCop
55
55
 
56
56
  node.each_ancestor(:block) do |block_node|
57
57
  send_node = block_node.send_node
58
- next unless send_node.method_name == :namespace
58
+ next unless send_node.method?(:namespace)
59
59
 
60
60
  name = Helper::TaskName.task_name(send_node)
61
61
  ns << name
@@ -74,7 +74,7 @@ module RuboCop
74
74
  end
75
75
 
76
76
  def source_location(node)
77
- range = node.location.expression
77
+ range = node.source_range
78
78
  path = smart_path(range.source_buffer.name)
79
79
  "#{path}:#{range.line}"
80
80
  end
@@ -23,7 +23,7 @@ module RuboCop
23
23
  # p 'foo 2'
24
24
  # end
25
25
  #
26
- class DuplicateTask < Cop
26
+ class DuplicateTask < Base
27
27
  include Helper::OnTask
28
28
 
29
29
  MSG = 'Task `%<task>s` is defined at both %<previous>s and %<current>s.'
@@ -54,7 +54,7 @@ module RuboCop
54
54
 
55
55
  node.each_ancestor(:block) do |block_node|
56
56
  send_node = block_node.send_node
57
- next unless send_node.method_name == :namespace
57
+ next unless send_node.method?(:namespace)
58
58
 
59
59
  name = Helper::TaskName.task_name(send_node)
60
60
  ns << name
@@ -73,7 +73,7 @@ module RuboCop
73
73
  end
74
74
 
75
75
  def source_location(node)
76
- range = node.location.expression
76
+ range = node.source_range
77
77
  path = smart_path(range.source_buffer.name)
78
78
  "#{path}:#{range.line}"
79
79
  end
@@ -7,6 +7,8 @@ module RuboCop
7
7
  module OnTask
8
8
  extend NodePattern::Macros
9
9
 
10
+ RESTRICT_ON_SEND = %i[task].freeze
11
+
10
12
  def_node_matcher :task?, <<~PATTERN
11
13
  (send nil? :task ...)
12
14
  PATTERN
@@ -8,7 +8,7 @@ module RuboCop
8
8
  extend self
9
9
 
10
10
  def task_name(node)
11
- first_arg = node.arguments[0]
11
+ first_arg = node.first_argument
12
12
  case first_arg&.type
13
13
  when :sym, :str
14
14
  first_arg.value.to_sym
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Rake
6
- # This cop detects method definition in a task or namespace,
6
+ # Detects method definition in a task or namespace,
7
7
  # because it is defined to the top level.
8
8
  # It is confusing because the scope looks in the task or namespace,
9
9
  # but actually it is defined to the top level.
@@ -30,7 +30,7 @@ module RuboCop
30
30
  # task :foo do
31
31
  # end
32
32
  #
33
- class MethodDefinitionInTask < Cop
33
+ class MethodDefinitionInTask < Base
34
34
  MSG = 'Do not define a method in rake task, because it will be defined to the top level.'
35
35
 
36
36
  def on_def(node)
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'lint_roller'
4
+
5
+ module RuboCop
6
+ module Rake
7
+ # A plugin that integrates RuboCop Rake with RuboCop's plugin system.
8
+ class Plugin < LintRoller::Plugin
9
+ def about
10
+ LintRoller::About.new(
11
+ name: 'rubocop-rake',
12
+ version: Version::STRING,
13
+ homepage: 'https://github.com/rubocop/rubocop-rake',
14
+ description: 'A RuboCop plugin for Rake.',
15
+ )
16
+ end
17
+
18
+ def supported?(context)
19
+ context.engine == :rubocop
20
+ end
21
+
22
+ def rules(_context)
23
+ LintRoller::Rules.new(
24
+ type: :path,
25
+ config_format: :rubocop,
26
+ value: Pathname.new(__dir__).join('../../../config/default.yml'),
27
+ )
28
+ end
29
+ end
30
+ end
31
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Rake
5
- VERSION = "0.5.1"
5
+ VERSION = "0.7.0"
6
6
  end
7
7
  end
data/lib/rubocop/rake.rb CHANGED
@@ -6,11 +6,5 @@ module RuboCop
6
6
  # :nodoc:
7
7
  module Rake
8
8
  class Error < StandardError; end
9
-
10
- PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
11
- CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
12
- CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
13
-
14
- private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
15
9
  end
16
10
  end
data/lib/rubocop-rake.rb CHANGED
@@ -4,9 +4,7 @@ require 'rubocop'
4
4
 
5
5
  require_relative 'rubocop/rake'
6
6
  require_relative 'rubocop/rake/version'
7
- require_relative 'rubocop/rake/inject'
8
-
9
- RuboCop::Rake::Inject.defaults!
7
+ require_relative 'rubocop/rake/plugin'
10
8
 
11
9
  require_relative 'rubocop/cop/rake/helper/class_definition'
12
10
  require_relative 'rubocop/cop/rake/helper/on_task'
data/rubocop-rake.gemspec CHANGED
@@ -10,15 +10,18 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = %q{A RuboCop plugin for Rake}
12
12
  spec.description = %q{A RuboCop plugin for Rake}
13
- spec.homepage = "https://github.com/rubocop-hq/rubocop-rake"
14
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+ spec.homepage = "https://github.com/rubocop/rubocop-rake"
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
15
15
  spec.licenses = ['MIT']
16
16
 
17
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
-
19
- spec.metadata["homepage_uri"] = spec.homepage
20
- spec.metadata["source_code_uri"] = spec.homepage
21
- spec.metadata["changelog_uri"] = "https://github.com/rubocop-hq/rubocop-rake/blob/master/CHANGELOG.md"
17
+ spec.metadata = {
18
+ 'allowed_push_host' => 'https://rubygems.org',
19
+ 'homepage_uri' => spec.homepage,
20
+ 'source_code_uri' => spec.homepage,
21
+ 'changelog_uri' => "https://github.com/rubocop/rubocop-rake/blob/master/CHANGELOG.md",
22
+ 'rubygems_mfa_required' => 'true',
23
+ 'default_lint_roller_plugin' => 'RuboCop::Rake::Plugin'
24
+ }
22
25
 
23
26
  # Specify which files should be added to the gem when it is released.
24
27
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -29,5 +32,6 @@ Gem::Specification.new do |spec|
29
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
33
  spec.require_paths = ["lib"]
31
34
 
32
- spec.add_runtime_dependency 'rubocop'
35
+ spec.add_dependency 'lint_roller', '~> 1.1'
36
+ spec.add_dependency 'rubocop', '>= 1.72.1'
33
37
  end
metadata CHANGED
@@ -1,29 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Pocke Kuwabara
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2020-02-14 00:00:00.000000000 Z
10
+ date: 2025-02-15 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: lint_roller
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '1.1'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '1.1'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: rubocop
15
28
  requirement: !ruby/object:Gem::Requirement
16
29
  requirements:
17
30
  - - ">="
18
31
  - !ruby/object:Gem::Version
19
- version: '0'
32
+ version: 1.72.1
20
33
  type: :runtime
21
34
  prerelease: false
22
35
  version_requirements: !ruby/object:Gem::Requirement
23
36
  requirements:
24
37
  - - ">="
25
38
  - !ruby/object:Gem::Version
26
- version: '0'
39
+ version: 1.72.1
27
40
  description: A RuboCop plugin for Rake
28
41
  email:
29
42
  - kuwabara@pocke.me
@@ -31,7 +44,7 @@ executables: []
31
44
  extensions: []
32
45
  extra_rdoc_files: []
33
46
  files:
34
- - ".circleci/config.yml"
47
+ - ".github/workflows/main.yml"
35
48
  - ".gitignore"
36
49
  - ".rspec"
37
50
  - ".rubocop.yml"
@@ -57,18 +70,19 @@ files:
57
70
  - lib/rubocop/cop/rake/method_definition_in_task.rb
58
71
  - lib/rubocop/cop/rake_cops.rb
59
72
  - lib/rubocop/rake.rb
60
- - lib/rubocop/rake/inject.rb
73
+ - lib/rubocop/rake/plugin.rb
61
74
  - lib/rubocop/rake/version.rb
62
75
  - rubocop-rake.gemspec
63
- homepage: https://github.com/rubocop-hq/rubocop-rake
76
+ homepage: https://github.com/rubocop/rubocop-rake
64
77
  licenses:
65
78
  - MIT
66
79
  metadata:
67
80
  allowed_push_host: https://rubygems.org
68
- homepage_uri: https://github.com/rubocop-hq/rubocop-rake
69
- source_code_uri: https://github.com/rubocop-hq/rubocop-rake
70
- changelog_uri: https://github.com/rubocop-hq/rubocop-rake/blob/master/CHANGELOG.md
71
- post_install_message:
81
+ homepage_uri: https://github.com/rubocop/rubocop-rake
82
+ source_code_uri: https://github.com/rubocop/rubocop-rake
83
+ changelog_uri: https://github.com/rubocop/rubocop-rake/blob/master/CHANGELOG.md
84
+ rubygems_mfa_required: 'true'
85
+ default_lint_roller_plugin: RuboCop::Rake::Plugin
72
86
  rdoc_options: []
73
87
  require_paths:
74
88
  - lib
@@ -76,15 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
90
  requirements:
77
91
  - - ">="
78
92
  - !ruby/object:Gem::Version
79
- version: 2.3.0
93
+ version: 2.7.0
80
94
  required_rubygems_version: !ruby/object:Gem::Requirement
81
95
  requirements:
82
96
  - - ">="
83
97
  - !ruby/object:Gem::Version
84
98
  version: '0'
85
99
  requirements: []
86
- rubygems_version: 3.2.0.pre1
87
- signing_key:
100
+ rubygems_version: 3.7.0.dev
88
101
  specification_version: 4
89
102
  summary: A RuboCop plugin for Rake
90
103
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,50 +0,0 @@
1
- version: 2
2
-
3
- steps: &steps
4
- steps:
5
- - checkout
6
- - run: bundle install
7
- - run: bundle exec rake
8
-
9
- jobs:
10
-
11
- ruby-2.3:
12
- docker:
13
- - image: circleci/ruby:2.3
14
- <<: *steps
15
-
16
- ruby-2.4:
17
- docker:
18
- - image: circleci/ruby:2.4
19
- <<: *steps
20
-
21
- ruby-2.5:
22
- docker:
23
- - image: circleci/ruby:2.5
24
- <<: *steps
25
-
26
- ruby-2.6:
27
- docker:
28
- - image: circleci/ruby:2.6
29
- <<: *steps
30
-
31
- ruby-2.7:
32
- docker:
33
- - image: circleci/ruby:2.7
34
- <<: *steps
35
-
36
- ruby-head:
37
- docker:
38
- - image: rubocophq/circleci-ruby-snapshot:latest
39
- <<: *steps
40
-
41
- workflows:
42
- version: 2
43
- build:
44
- jobs:
45
- - ruby-2.3
46
- - ruby-2.4
47
- - ruby-2.5
48
- - ruby-2.6
49
- - ruby-2.7
50
- - ruby-head
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
4
- # See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
5
- module RuboCop
6
- module Rake
7
- # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
8
- # bit of our configuration.
9
- module Inject
10
- def self.defaults!
11
- path = CONFIG_DEFAULT.to_s
12
- hash = ConfigLoader.send(:load_yaml_configuration, path)
13
- config = Config.new(hash, path)
14
- puts "configuration from #{path}" if ConfigLoader.debug?
15
- config = ConfigLoader.merge_with_default(config, path)
16
- ConfigLoader.instance_variable_set(:@default_configuration, config)
17
- end
18
- end
19
- end
20
- end