danger-packwerk 0.1.2 → 0.1.3

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: 6300323ecd2a3738dff019fa9d13477c01c4ef9f0c750780d25c22dea7087e56
4
- data.tar.gz: b4d97e21514bc854ccea2117ca0b63a751a632a2ad4558fe2f5e7e64c382c11e
3
+ metadata.gz: e8ad610d58f87b5c05d4f55688a43be6fe566a24a987d29dbd43bc1397e42e2b
4
+ data.tar.gz: d3db9e2c065272e5d1a249b81edd5ab5b4ac253fd0281df5e8cc5f5fc4ce92a9
5
5
  SHA512:
6
- metadata.gz: dbfa1eaea903b7ae2fed28832bb8797c9a594886baf4bad4e951ebf95d6859d19776a8affccb20623189987230a33046eac23ff2eb3a659f454f37c1fc30cdff
7
- data.tar.gz: 0f0e32051b0f970eeac82fa5ba0e677441ffdbc8b9a2e9c1f94d6dcdbea5937df4ccfce69eea946a52ea7af54b7ff646d3d8b1c7356d55c488c1eb35f8224404
6
+ metadata.gz: d707148404ee53fa7ca6b7fceb595ed8e97a746e57b2f6b3ba93d6e7f8f7a435524c641c89884d3b5e243fb2f19f71119b17689429d77dd5a280efd4c212c854
7
+ data.tar.gz: 8927da7749c65108bc30cfa1790e2dd2eb620c38a3895c201fad152f72c420c76950a5b5ee3f6ba5329990cb2c339af2717ebd5fc19c604e412636526b9e3c00
@@ -81,10 +81,11 @@ module DangerPackwerk
81
81
  _line, class_name_line_number = deprecated_references_yml_pathname.readlines.each_with_index.find do |line, _index|
82
82
  # If you have a class `::MyClass`, then you can get a false match if another constant in the file
83
83
  # is named `MyOtherClass::MyClassThing`. Therefore we include quotes in our match to ensure that we match
84
- # the constant and only the constant. Right now `packwerk` `deprecated_references.yml` files always use
85
- # double quotes, so we check for that only. If the public API ever changes, this may need to change.
86
- class_name_with_quote_boundaries = "\"#{violation.class_name}\":"
87
- line.include?(class_name_with_quote_boundaries)
84
+ # the constant and only the constant.
85
+ # Right now `packwerk` `deprecated_references.yml` files typically use double quotes, but sometimes folks linters change this to single quotes.
86
+ # To be defensive, we match against either.
87
+ class_name_with_quote_boundaries = /["|']#{violation.class_name}["|']:/
88
+ line.match?(class_name_with_quote_boundaries)
88
89
  end
89
90
 
90
91
  if class_name_line_number.nil?
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module DangerPackwerk
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-packwerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-20 00:00:00.000000000 Z
11
+ date: 2022-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api