gitlab-styles 3.0.0 → 3.1.0

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: 3f5552d3274e9fcc7cd1f9802827988b343ff53be6965e972129ca30f907cd97
4
- data.tar.gz: ed8f06bd8b13546ca2d8d560e940d033b68a909f10383e17780e4a89f93ccde6
3
+ metadata.gz: d86bd7450d5e1e84449f55bbfeefdb27a067c267113fb7250bd05f61c85a70d1
4
+ data.tar.gz: 1c0fe977d604069904204d4e0cdbe56fab1e09c854f4454564898e16500b3433
5
5
  SHA512:
6
- metadata.gz: a603accfcfe2d585cdf4a05409c9f2be04ef2c84c120f6dcb1f054478088842cbb942ea1df939069d4b5e6ace2e89072b3f2a7f58e4b1e9f77834a8cd1cb2d7e
7
- data.tar.gz: b08d79637bdb07a000dffa358552deeff81ff8c3f5807a73b8b6c16800d9ec34ae549e77e7717d599320050358d8543df32ac627c803554ea46f5236034b99fa
6
+ metadata.gz: c229e6cf6799290cb3d9b9d70b6cbfeecf40bb38a9f9be7546c9a7a7473bdfd471339e11e00ce6a4b14f51877e687089f0929e12e9d6477ae560b96e9612604a
7
+ data.tar.gz: a527876da702cfa20a703360290db2460fe0fa41c1e80ffaaa7cec6c203aa8748a0580175606d70039bd558c18df280425f38177ecf769e3343064bb306c78f9
@@ -6,6 +6,7 @@ require 'gitlab/styles/rubocop/cop/polymorphic_associations'
6
6
  require 'gitlab/styles/rubocop/cop/active_record_dependent'
7
7
  require 'gitlab/styles/rubocop/cop/in_batches'
8
8
  require 'gitlab/styles/rubocop/cop/line_break_after_guard_clauses'
9
+ require 'gitlab/styles/rubocop/cop/without_reactive_cache'
9
10
  require 'gitlab/styles/rubocop/cop/rspec/single_line_hook'
10
11
  require 'gitlab/styles/rubocop/cop/rspec/have_link_parameters'
11
12
  require 'gitlab/styles/rubocop/cop/rspec/verbose_include_metadata'
@@ -0,0 +1,18 @@
1
+ module Gitlab
2
+ module Styles
3
+ module Rubocop
4
+ module Cop
5
+ # Cop that prevents the use of `without_reactive_cache`
6
+ class WithoutReactiveCache < RuboCop::Cop::Cop
7
+ MSG = 'without_reactive_cache is for debugging purposes only. Please use with_reactive_cache.'.freeze
8
+
9
+ def on_send(node)
10
+ return unless node.children[1] == :without_reactive_cache
11
+
12
+ add_offense(node, location: :selector)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Styles
3
- VERSION = '3.0.0'.freeze
3
+ VERSION = '3.1.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-styles
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-25 00:00:00.000000000 Z
11
+ date: 2019-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -156,6 +156,7 @@ files:
156
156
  - lib/gitlab/styles/rubocop/cop/rspec/have_link_parameters.rb
157
157
  - lib/gitlab/styles/rubocop/cop/rspec/single_line_hook.rb
158
158
  - lib/gitlab/styles/rubocop/cop/rspec/verbose_include_metadata.rb
159
+ - lib/gitlab/styles/rubocop/cop/without_reactive_cache.rb
159
160
  - lib/gitlab/styles/rubocop/migration_helpers.rb
160
161
  - lib/gitlab/styles/rubocop/model_helpers.rb
161
162
  - lib/gitlab/styles/version.rb