From d429b810e31e3a4a801cd1bec005d6ce1efc8564 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 16 Feb 2025 18:58:11 +0900 Subject: [PATCH] Fix incorrect plugin version when displaing `rubocop -V` This commit fixes incorrect plugin version when displaing `rubocop -V`. ## Before The RuboCop core version is displayed incorrectly for `rubocop-rake`: ```console $ bundle exec rubocop -V 1.72.1 (using Parser 3.3.6.0, rubocop-ast 1.38.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-darwin23] - rubocop-rake 1.72.1 ``` ## After The correct `rubocop-rake` version is displayed: ```console $ bundle exec rubocop -V 1.72.1 (using Parser 3.3.6.0, rubocop-ast 1.38.0, analyzing as Ruby 3.4, running on ruby 3.4.1) [x86_64-darwin23] - rubocop-rake 0.7.0 ``` --- CHANGELOG.md | 4 ++++ lib/rubocop/rake/plugin.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 871d1b9..1f281ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master (unreleased) +### Bug fixes + +* [#59](https://github.com/rubocop/rubocop-rake/pull/59): Fix incorrect plugin version when displaing `rubocop -V`. ([@koic][]) + ## 0.7.0 (2025-02-16) ### New features diff --git a/lib/rubocop/rake/plugin.rb b/lib/rubocop/rake/plugin.rb index 975dce1..c8b1737 100644 --- a/lib/rubocop/rake/plugin.rb +++ b/lib/rubocop/rake/plugin.rb @@ -9,7 +9,7 @@ class Plugin < LintRoller::Plugin def about LintRoller::About.new( name: 'rubocop-rake', - version: Version::STRING, + version: VERSION, homepage: 'https://github.com/rubocop/rubocop-rake', description: 'A RuboCop plugin for Rake.', )