Skip to content

Commit

Permalink
Fix relative & Rubocop dependency for cop
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Campbell authored and nickcampbell18 committed Nov 11, 2019
1 parent da40a13 commit 83f3ed8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.2.1

* Fix relative require in DefineDeletionStrategy cop [#8](https://github.com/gocardless/anony/pull/8)

# v0.2

* Improve the README [#5](https://github.com/gocardless/anony/pulls/5)
Expand Down
6 changes: 5 additions & 1 deletion lib/anony/cops/define_deletion_strategy.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# frozen_string_literal: true

require "rubocop"

require_relative "../version.rb"

module RuboCop
module Cop
module Lint
Expand All @@ -20,7 +24,7 @@ module Lint
# class MyNewThing < ApplicationRecord; end
class DefineDeletionStrategy < Cop
MSG = "Define .anonymise for %<model>s, see https://github.com/gocardless/" \
"anony/blob/#{::Anony::VERSION}/README.md for details"
"anony/blob/#{Anony::VERSION}/README.md for details"

def_node_matcher :only_models, <<~PATTERN
(class
Expand Down
2 changes: 1 addition & 1 deletion lib/anony/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Anony
VERSION = "0.2"
VERSION = "0.2.1"
end

0 comments on commit 83f3ed8

Please sign in to comment.