rubocop-graphql 0.6.1 → 0.6.2

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: 47871bc7644dbf0fb1f5c9b25af8d5f60183a8513d90f5a62d980b0fc865f9ad
4
- data.tar.gz: 18177a7497deef3c5342405b5b393eb5e1bae75cbf8e8eee5da636c814b51ea0
3
+ metadata.gz: 2393f8c4972a479e9618f3ed9f846a819b0efa8bf13e53f319bbc176c50a470b
4
+ data.tar.gz: 4326de68922f560a042ecbee99f70f421a09c05e0502291e4b4624c90a369233
5
5
  SHA512:
6
- metadata.gz: 7d2f3153652722d359d0ee0d5c6da8f9d03e1cae62c78e1e5f1b9fc577cfc361fd39cdfa0cd0addee6fb6c0e36b8c51bca485cc18f9c15fa3b1495d941668b0d
7
- data.tar.gz: bcb8a5d5938abd6b9be712f51a6363c31098d604dafcf725a8da6edff5d737c42532b329ba831d1d09277f78d340da9d105b58c37b0b494d5e526a882eda70b1
6
+ metadata.gz: 1d65dbf3f6d5a623afbd74524e485ff4c570157ab23eae396e7ca5e343ff3ea2546d8433fc67dff38e2d63985ebc2881de3ba37e58ed5943ef2521fb2be93d36
7
+ data.tar.gz: 718957be35d17116319a4d18ba707b96236e813e9acd8fa724888623550f6dffafc2c07e774a181f5f576c2e949d92e3c264badc2c30ef4897d440781a3b1c32
@@ -12,7 +12,7 @@ module RuboCop
12
12
  # class will invoke the inherited hook instead
13
13
  class << self
14
14
  undef inherited
15
- def inherited(*); end
15
+ def inherited(*); end # rubocop:disable Lint/MissingSuper
16
16
  end
17
17
 
18
18
  # Special case `Module#<` so that the rspec support rubocop exports
@@ -47,7 +47,7 @@ module RuboCop
47
47
  )
48
48
 
49
49
  # Invoke the original inherited hook so our cops are recognized
50
- def self.inherited(subclass)
50
+ def self.inherited(subclass) # rubocop:disable Lint/MissingSuper
51
51
  RuboCop::Cop::Cop.inherited(subclass)
52
52
  end
53
53
 
@@ -109,7 +109,7 @@ module RuboCop
109
109
  field_definition?(node) || field_definition_with_body?(node)
110
110
  end
111
111
 
112
- source_to_insert = "\n" + indent(node) + node.source
112
+ source_to_insert = "\n#{indent(node)}#{node.source}"
113
113
  corrector.insert_after(first_field.loc.expression, source_to_insert)
114
114
 
115
115
  range = range_with_surrounding_space(range: node.loc.expression, side: :left)
@@ -143,7 +143,7 @@ module RuboCop
143
143
 
144
144
  field_definition = field_definition_with_body?(node.parent) ? node.parent : node
145
145
 
146
- source_to_insert = indent(method_definition) + field_definition.source + "\n\n"
146
+ source_to_insert = "#{indent(method_definition)}#{field_definition.source}\n\n"
147
147
  method_range = range_by_whole_lines(method_definition.loc.expression)
148
148
  corrector.insert_before(method_range, source_to_insert)
149
149
 
@@ -33,6 +33,10 @@ module RuboCop
33
33
  (send nil? :description (:str $_))
34
34
  PATTERN
35
35
 
36
+ def_node_matcher :has_multiline_string_description?, <<~PATTERN
37
+ (send nil? :description (:dstr ...))
38
+ PATTERN
39
+
36
40
  def_node_matcher :interface?, <<~PATTERN
37
41
  (send nil? :include (const ...))
38
42
  PATTERN
@@ -54,7 +58,9 @@ module RuboCop
54
58
  private
55
59
 
56
60
  def has_description?(node)
57
- has_i18n_description?(node) || has_string_description?(node)
61
+ has_i18n_description?(node) ||
62
+ has_string_description?(node) ||
63
+ has_multiline_string_description?(node)
58
64
  end
59
65
 
60
66
  def child_nodes(node)
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module GraphQL
3
- VERSION = "0.6.1".freeze
3
+ VERSION = "0.6.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Tsepelev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2021-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,7 +116,7 @@ metadata:
116
116
  homepage_uri: https://github.com/DmitryTsepelev/rubocop-graphql
117
117
  source_code_uri: https://github.com/DmitryTsepelev/rubocop-graphql
118
118
  changelog_uri: https://github.com/DmitryTsepelev/rubocop-graphql/CHANGELOG.md
119
- post_install_message:
119
+ post_install_message:
120
120
  rdoc_options: []
121
121
  require_paths:
122
122
  - lib
@@ -131,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.0.3
135
- signing_key:
134
+ rubygems_version: 3.1.2
135
+ signing_key:
136
136
  specification_version: 4
137
137
  summary: Automatic performance checking tool for Ruby code.
138
138
  test_files: []