rubocop-obsession 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39eccc2042bacc3bca61a4dc992aa38dcca8d7c734e0aa7661b4091e7e1cac2c
4
- data.tar.gz: a8f61cd4628e3340e00a144958db6e0eacf60f1505043f6c21a7868a7e4ed664
3
+ metadata.gz: ca08e6e52147f47ce8142c88d2e527551ebe9daba1469c0ca72e4e1903ac2b93
4
+ data.tar.gz: 7a2237521f066a0c04f7409b4f71cc2bc60c3a5df0648edeedb5ba655cf80abd
5
5
  SHA512:
6
- metadata.gz: 6fc06812358cdcd5b26c776dd964f5b341c02a70c4e8200f7542c75fe19026d913b6626c84da8af5a8b5c7cef6b3f36a8e6c4d80b367b664d769baa6ba8d92ca
7
- data.tar.gz: d4367dd495d6e5848ad83122214be0a7b6af21dc4ea92278a0c5e97ccc4442a12f777a98838a231cc5336715e86c18de70ae8a86a99e5a04bc0f125f591ef472
6
+ metadata.gz: c29e19de87c89fffd4d02c17082d82a1cc4fa6d66f710f2bbfe1637badc2a30bb67ebc7d6e459537a0980ee1c361fa3543c259f1c48d22ce771d205aa5f6a097
7
+ data.tar.gz: 58bdbd117cb731304db523fc53deb7dfed033bd96260fd58a123ba1afb6d668df0b53e73e13a32f2d8928b055322872966192822512c23ebe2fb2bd2a0c73597
data/config/default.yml CHANGED
@@ -127,11 +127,11 @@ Layout/ClassStructure:
127
127
  - after_destroy_commit
128
128
  - around_create
129
129
  other_macros:
130
- - devise
131
130
  - acts_as_paranoid
132
- - serialize
133
- - has_paper_trail
134
131
  - audited
132
+ - devise
133
+ - has_paper_trail
134
+ - serialize
135
135
  scopes:
136
136
  - default_scope
137
137
  - scope
@@ -41,11 +41,9 @@ module RuboCop
41
41
 
42
42
  def on_block(node)
43
43
  return if !safety_assured_block?(node)
44
- previous_comment = processed_source.comments_before_line(node.first_line)&.first
44
+ comment = processed_source.ast_with_comments[node].map(&:text).join("\n")
45
45
 
46
- if previous_comment.nil? || !previous_comment.text.match?(/^# Safe because( [^ ]+){4}/)
47
- add_offense(node)
48
- end
46
+ add_offense(node) if !comment.match?(/^# Safe because( [^ ]+){4}/)
49
47
  end
50
48
  end
51
49
  end
@@ -1,5 +1,5 @@
1
1
  module Rubocop
2
2
  module Obsession
3
- VERSION = '0.1.9'
3
+ VERSION = '0.1.10'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-obsession
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Dalbert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-05 00:00:00.000000000 Z
11
+ date: 2024-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.5.16
96
+ rubygems_version: 3.5.23
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: High-level code style checking for Ruby files.