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 +4 -4
- data/lib/rubocop/cop/sequel/column_default.rb +1 -0
- data/lib/rubocop/cop/sequel/concurrent_index.rb +1 -0
- data/lib/rubocop/cop/sequel/json_column.rb +1 -0
- data/lib/rubocop/cop/sequel/partial_constraint.rb +1 -0
- data/lib/rubocop/cop/sequel/save_changes.rb +1 -0
- data/rubocop-sequel.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0c293a2da37b5ef89b4b0e7d6a6639c4edcc99b5f5a476adeaba27924baf84
|
4
|
+
data.tar.gz: 37d04d0e24b6aabc08a97ec6d713bfa00db61e755eb1d6a6254cf09d305149c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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) _)))
|
data/rubocop-sequel.gemspec
CHANGED
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.
|
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-
|
11
|
+
date: 2021-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|