rubocop-sequel 0.3.1 → 0.3.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: c2050311f0798d72d81f8af6463c505abbed45460abf2c6b764b90a57fc4926f
4
- data.tar.gz: 9b2dac1b9e05c5d47e8ce64386357c3fd1f73a46cd057e6e598923508e6d3bb4
3
+ metadata.gz: dc0c293a2da37b5ef89b4b0e7d6a6639c4edcc99b5f5a476adeaba27924baf84
4
+ data.tar.gz: 37d04d0e24b6aabc08a97ec6d713bfa00db61e755eb1d6a6254cf09d305149c8
5
5
  SHA512:
6
- metadata.gz: 25c86a24a2f3d7c72259ca824b7f3f49c09307f81aacca96b1ca265a6ac63038afa50355542b2896e058a0b04b3b4f3ba897dcbf824026f9d8be2e7c7255c042
7
- data.tar.gz: ba02ad3c73e81769d1bcf5642f15b02ba006319d507566a5ad2fabfa49681c006b0305d72ea76a7393b273a3b5434aec3baec20093deb8b43f4258591a7086e3
6
+ metadata.gz: 26fdd03e129d3636db9f348a7825c608eeefd7d5d1d715cdce4413120446ee93fda09afe5cb192e6074c02f33e03a5f8a7f87891e4ddb961e07ecc104fe44817
7
+ data.tar.gz: b55b4773c476338c93699771bf9066aedb261a2c8bb259177ec0b6b9b436475ac3243d476697d3edebd93474fe821f609e6a34548b1e5b4720cb4f84c3ac36c8
@@ -6,6 +6,7 @@ module RuboCop
6
6
  # ColumnDefault looks for column creation with a default value.
7
7
  class ColumnDefault < Base
8
8
  MSG = "Don't create new column with default values"
9
+ RESTRICT_ON_SEND = %i[add_column].freeze
9
10
 
10
11
  def_node_matcher :add_column_default?, <<-MATCHER
11
12
  (send _ :add_column ... (hash (pair (sym :default) _)))
@@ -6,6 +6,7 @@ module RuboCop
6
6
  # ConcurrentIndex looks for non-concurrent index creation.
7
7
  class ConcurrentIndex < Base
8
8
  MSG = 'Prefer creating or dropping new index concurrently'
9
+ RESTRICT_ON_SEND = %i[add_index drop_index].freeze
9
10
 
10
11
  def_node_matcher :indexes?, <<-MATCHER
11
12
  (send _ {:add_index :drop_index} $...)
@@ -6,6 +6,7 @@ module RuboCop
6
6
  # JSONColumn looks for non-JSONB columns.
7
7
  class JSONColumn < Base
8
8
  MSG = 'Use JSONB rather than JSON or hstore'
9
+ RESTRICT_ON_SEND = %i[add_column].freeze
9
10
 
10
11
  def_node_matcher :json_or_hstore?, <<-MATCHER
11
12
  (send _ :add_column ... (sym {:json :hstore}))
@@ -6,6 +6,7 @@ module RuboCop
6
6
  # PartialConstraint looks for missed usage of partial indexes.
7
7
  class PartialConstraint < Base
8
8
  MSG = "Constraint can't be partial, use where argument with index"
9
+ RESTRICT_ON_SEND = %i[add_unique_constraint].freeze
9
10
 
10
11
  def_node_matcher :add_partial_constraint?, <<-MATCHER
11
12
  (send _ :add_unique_constraint ... (hash (pair (sym :where) _)))
@@ -9,6 +9,7 @@ module RuboCop
9
9
 
10
10
  MSG = 'Use `Sequel::Model#save_changes` instead of '\
11
11
  '`Sequel::Model#save`.'
12
+ RESTRICT_ON_SEND = %i[save].freeze
12
13
 
13
14
  def_node_matcher :model_save?, <<-MATCHER
14
15
  (send _ :save)
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
14
  gem.name = 'rubocop-sequel'
15
15
  gem.require_paths = ['lib']
16
- gem.version = '0.3.1'
16
+ gem.version = '0.3.3'
17
17
 
18
18
  gem.required_ruby_version = '>= 2.5'
19
19
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothée Peignier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop