gl_rubocop 0.2.3 → 0.2.4

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: d20b890fc0655b53c0dcc83817c48487dd7a30f62566cd4d05c9aecf4ff8b4b8
4
- data.tar.gz: 7781b08914c2cdfba1265349799ef45f0b64ce585adb4ca0cfdb14212970e28c
3
+ metadata.gz: 20051ad7be570098d65231ae0699f2a8e0388ac1d46e635c2b967b04d4490278
4
+ data.tar.gz: 92d0f9a01f967880e8db09a2715adad74144071489e3a39e0b05fd260dd54f33
5
5
  SHA512:
6
- metadata.gz: 2d526e27669d0c354503003303f2c86f6f51ce80d5428c81ce1a5abfd2bd94aa3ad76d3270d1d23ef1066d191f6b6d6e7fb55f34f7d0f777e51c6dccec7782be
7
- data.tar.gz: 13b9fd998f8d22bb8f7ce7cbc3e71521ff2c17f13d7485ef44bcdc5f6c9f7617fce9d4d2998f03e35346558585649a00155d5ac0e96d40b4ee5149155d3ea779
6
+ metadata.gz: 0ad7a44349b6182c777f3277b84458624ed4010c6e8d5effc08461779262dc021081a83b2dbe1c0a325f86292b621ac2f73181c06ee24cda60b69a5ecd79f0eb
7
+ data.tar.gz: 17b072554bdbcb5df215abe5dd0c01c7d64324a0db62fdd555c8e931b16fbaa259d97a1a1028581fc3340b27e6e4bfb93963581c7414f5300d322a577d826ccd
@@ -5,6 +5,9 @@ module GLRubocop
5
5
  #
6
6
  # Good:
7
7
  # {data-test-id: "unique-id"}
8
+ # {data-test-id: @unique_id }
9
+ # {'data-test-id': "unique-id"}
10
+ # {"data-test-id": "unique-id"}
8
11
  #
9
12
  # Bad:
10
13
  # {data: {testId: "unique-id"}}
@@ -38,7 +41,8 @@ module GLRubocop
38
41
  end
39
42
 
40
43
  def regex_for_indentifier_and_value
41
- /#{Regexp.quote(UNIQUE_IDENTIFIER)}:\s*(["']([^"']*)["']|@\w+)/
44
+ key = Regexp.quote(UNIQUE_IDENTIFIER)
45
+ /(?:#{key}|["']#{key}["']):\s*(["']([^"']*)["']|@\w+)/
42
46
  end
43
47
 
44
48
  def test_id_value
@@ -1,3 +1,3 @@
1
1
  module GLRubocop
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gl_rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Give Lively