rubocop-sequel 0.0.6 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/actions.yml +29 -0
- data/.rubocop.yml +2 -1
- data/README.md +4 -2
- data/lib/rubocop-sequel.rb +1 -0
- data/lib/rubocop/cop/sequel/column_default.rb +3 -2
- data/lib/rubocop/cop/sequel/concurrent_index.rb +3 -4
- data/lib/rubocop/cop/sequel/json_column.rb +6 -3
- data/lib/rubocop/cop/sequel/migration_name.rb +3 -3
- data/lib/rubocop/cop/sequel/partial_constraint.rb +22 -0
- data/lib/rubocop/cop/sequel/save_changes.rb +9 -6
- data/rubocop-sequel.gemspec +11 -8
- data/spec/rubocop/cop/sequel/column_default_spec.rb +4 -4
- data/spec/rubocop/cop/sequel/concurrent_index_spec.rb +8 -8
- data/spec/rubocop/cop/sequel/json_column_spec.rb +16 -16
- data/spec/rubocop/cop/sequel/migration_name_spec.rb +8 -8
- data/spec/rubocop/cop/sequel/partial_constraint_spec.rb +15 -0
- data/spec/rubocop/cop/sequel/save_changes_spec.rb +4 -4
- metadata +35 -48
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2050311f0798d72d81f8af6463c505abbed45460abf2c6b764b90a57fc4926f
|
4
|
+
data.tar.gz: 9b2dac1b9e05c5d47e8ce64386357c3fd1f73a46cd057e6e598923508e6d3bb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25c86a24a2f3d7c72259ca824b7f3f49c09307f81aacca96b1ca265a6ac63038afa50355542b2896e058a0b04b3b4f3ba897dcbf824026f9d8be2e7c7255c042
|
7
|
+
data.tar.gz: ba02ad3c73e81769d1bcf5642f15b02ba006319d507566a5ad2fabfa49681c006b0305d72ea76a7393b273a3b5434aec3baec20093deb8b43f4258591a7086e3
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
main:
|
6
|
+
name: Ruby ${{ matrix.ruby }}
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby:
|
11
|
+
- 2.5
|
12
|
+
- 2.6
|
13
|
+
- 2.7
|
14
|
+
- 3.0
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
|
18
|
+
- uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
|
22
|
+
- name: Install gems
|
23
|
+
run: bundle install
|
24
|
+
|
25
|
+
- name: RuboCop
|
26
|
+
run: bundle exec rubocop --parallel
|
27
|
+
|
28
|
+
- name: RSpec
|
29
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+

|
2
|
+
|
1
3
|
# RuboCop Sequel
|
2
4
|
|
3
|
-
Code style checking for Sequel.
|
5
|
+
Code style checking for [Sequel](https://sequel.jeremyevans.net/).
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
7
|
-
Using the `rubocop-
|
9
|
+
Using the `rubocop-sequel` gem
|
8
10
|
|
9
11
|
```bash
|
10
12
|
gem install rubocop-sequel
|
data/lib/rubocop-sequel.rb
CHANGED
@@ -4,7 +4,7 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module Sequel
|
6
6
|
# ColumnDefault looks for column creation with a default value.
|
7
|
-
class ColumnDefault <
|
7
|
+
class ColumnDefault < Base
|
8
8
|
MSG = "Don't create new column with default values"
|
9
9
|
|
10
10
|
def_node_matcher :add_column_default?, <<-MATCHER
|
@@ -13,7 +13,8 @@ module RuboCop
|
|
13
13
|
|
14
14
|
def on_send(node)
|
15
15
|
return unless add_column_default?(node)
|
16
|
-
|
16
|
+
|
17
|
+
add_offense(node.loc.selector, message: MSG)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -4,7 +4,7 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module Sequel
|
6
6
|
# ConcurrentIndex looks for non-concurrent index creation.
|
7
|
-
class ConcurrentIndex <
|
7
|
+
class ConcurrentIndex < Base
|
8
8
|
MSG = 'Prefer creating or dropping new index concurrently'
|
9
9
|
|
10
10
|
def_node_matcher :indexes?, <<-MATCHER
|
@@ -13,9 +13,7 @@ module RuboCop
|
|
13
13
|
|
14
14
|
def on_send(node)
|
15
15
|
indexes?(node) do |args|
|
16
|
-
if offensive?(args)
|
17
|
-
add_offense(node, location: :selector, message: MSG)
|
18
|
-
end
|
16
|
+
add_offense(node.loc.selector, message: MSG) if offensive?(args)
|
19
17
|
end
|
20
18
|
end
|
21
19
|
|
@@ -24,6 +22,7 @@ module RuboCop
|
|
24
22
|
def offensive?(args)
|
25
23
|
!args.last.hash_type? || args.last.each_descendant.none? do |n|
|
26
24
|
next unless n.sym_type?
|
25
|
+
|
27
26
|
n.children.any? { |s| s == :concurrently }
|
28
27
|
end
|
29
28
|
end
|
@@ -4,7 +4,7 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module Sequel
|
6
6
|
# JSONColumn looks for non-JSONB columns.
|
7
|
-
class JSONColumn <
|
7
|
+
class JSONColumn < Base
|
8
8
|
MSG = 'Use JSONB rather than JSON or hstore'
|
9
9
|
|
10
10
|
def_node_matcher :json_or_hstore?, <<-MATCHER
|
@@ -21,14 +21,17 @@ module RuboCop
|
|
21
21
|
|
22
22
|
def on_send(node)
|
23
23
|
return unless json_or_hstore?(node)
|
24
|
-
|
24
|
+
|
25
|
+
add_offense(node.loc.selector, message: MSG)
|
25
26
|
end
|
26
27
|
|
27
28
|
def on_block(node)
|
28
29
|
return unless node.send_node.method_name == :create_table
|
30
|
+
|
29
31
|
node.each_node(:send) do |method|
|
30
32
|
next unless column_method?(method) || column_type?(method)
|
31
|
-
|
33
|
+
|
34
|
+
add_offense(method.loc.selector, message: MSG)
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
@@ -4,19 +4,19 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module Sequel
|
6
6
|
# MigrationName looks for migration files named with a default name.
|
7
|
-
class MigrationName <
|
7
|
+
class MigrationName < Base
|
8
8
|
include RangeHelp
|
9
9
|
|
10
10
|
MSG = 'Migration files should not use default name.'
|
11
11
|
|
12
|
-
def
|
12
|
+
def on_new_investigation
|
13
13
|
file_path = processed_source.buffer.name
|
14
14
|
return if config.file_to_include?(file_path)
|
15
15
|
|
16
16
|
return unless filename_bad?(file_path)
|
17
17
|
|
18
18
|
location = source_range(processed_source.buffer, 1, 0)
|
19
|
-
add_offense(
|
19
|
+
add_offense(location)
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Sequel
|
6
|
+
# PartialConstraint looks for missed usage of partial indexes.
|
7
|
+
class PartialConstraint < Base
|
8
|
+
MSG = "Constraint can't be partial, use where argument with index"
|
9
|
+
|
10
|
+
def_node_matcher :add_partial_constraint?, <<-MATCHER
|
11
|
+
(send _ :add_unique_constraint ... (hash (pair (sym :where) _)))
|
12
|
+
MATCHER
|
13
|
+
|
14
|
+
def on_send(node)
|
15
|
+
return unless add_partial_constraint?(node)
|
16
|
+
|
17
|
+
add_offense(node.loc.selector, message: MSG)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -4,9 +4,11 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module Sequel
|
6
6
|
# SaveChanges promotes the use of save_changes.
|
7
|
-
class SaveChanges <
|
7
|
+
class SaveChanges < Base
|
8
|
+
extend AutoCorrector
|
9
|
+
|
8
10
|
MSG = 'Use `Sequel::Model#save_changes` instead of '\
|
9
|
-
|
11
|
+
'`Sequel::Model#save`.'
|
10
12
|
|
11
13
|
def_node_matcher :model_save?, <<-MATCHER
|
12
14
|
(send _ :save)
|
@@ -14,11 +16,12 @@ module RuboCop
|
|
14
16
|
|
15
17
|
def on_send(node)
|
16
18
|
return unless model_save?(node)
|
17
|
-
add_offense(node, location: :selector, message: MSG)
|
18
|
-
end
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
range = node.loc.selector
|
21
|
+
|
22
|
+
add_offense(range, message: MSG) do |corrector|
|
23
|
+
corrector.replace(range, 'save_changes')
|
24
|
+
end
|
22
25
|
end
|
23
26
|
end
|
24
27
|
end
|
data/rubocop-sequel.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |gem|
|
|
4
4
|
gem.authors = ['Timothée Peignier']
|
5
5
|
gem.email = ['timothee.peignier@tryphon.org']
|
6
6
|
gem.description = 'Code style checking for Sequel'
|
7
|
-
gem.summary = 'A plugin for
|
8
|
-
gem.homepage = '
|
7
|
+
gem.summary = 'A Sequel plugin for RuboCop'
|
8
|
+
gem.homepage = 'https://github.com/rubocop-hq/rubocop-sequel'
|
9
9
|
gem.license = 'MIT'
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
|
@@ -13,14 +13,17 @@ 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.
|
16
|
+
gem.version = '0.3.1'
|
17
17
|
|
18
|
-
gem.
|
18
|
+
gem.required_ruby_version = '>= 2.5'
|
19
19
|
|
20
|
-
gem.
|
21
|
-
|
22
|
-
gem.add_development_dependency '
|
23
|
-
gem.add_development_dependency '
|
20
|
+
gem.add_runtime_dependency 'rubocop', '~> 1.0'
|
21
|
+
|
22
|
+
gem.add_development_dependency 'rake', '~> 13.0.6'
|
23
|
+
gem.add_development_dependency 'rspec', '~> 3.7'
|
24
|
+
gem.add_development_dependency 'rubocop-rake', '~> 0.6.0'
|
25
|
+
gem.add_development_dependency 'rubocop-rspec', '~> 2.0'
|
26
|
+
gem.add_development_dependency 'sequel', '~> 5.47'
|
24
27
|
gem.add_development_dependency 'simplecov', '~> 0.16'
|
25
28
|
gem.add_development_dependency 'sqlite3', '~> 1.3', '>= 1.3.12'
|
26
29
|
end
|
@@ -6,12 +6,12 @@ describe RuboCop::Cop::Sequel::ColumnDefault do
|
|
6
6
|
subject(:cop) { described_class.new }
|
7
7
|
|
8
8
|
it 'registers an offense when setting a default' do
|
9
|
-
inspect_source('add_column(:products, :type, :text, default: "cop")')
|
10
|
-
expect(
|
9
|
+
offenses = inspect_source('add_column(:products, :type, :text, default: "cop")')
|
10
|
+
expect(offenses.size).to eq(1)
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'does not register an offense when not setting a default' do
|
14
|
-
inspect_source('add_column(:products, :type, :text)')
|
15
|
-
expect(
|
14
|
+
offenses = inspect_source('add_column(:products, :type, :text)')
|
15
|
+
expect(offenses).to be_empty
|
16
16
|
end
|
17
17
|
end
|
@@ -7,35 +7,35 @@ describe RuboCop::Cop::Sequel::ConcurrentIndex do
|
|
7
7
|
|
8
8
|
context 'without the concurrent option' do
|
9
9
|
it 'registers an offense without options' do
|
10
|
-
inspect_source(<<~SOURCE)
|
10
|
+
offenses = inspect_source(<<~SOURCE)
|
11
11
|
add_index(:products, :name)
|
12
12
|
drop_index(:products, :name)
|
13
13
|
SOURCE
|
14
|
-
expect(
|
14
|
+
expect(offenses.size).to eq(2)
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'registers an offense with other options' do
|
18
|
-
inspect_source(<<~SOURCE)
|
18
|
+
offenses = inspect_source(<<~SOURCE)
|
19
19
|
add_index(:products, :name, unique: true)
|
20
20
|
drop_index(:products, :name, unique: true)
|
21
21
|
SOURCE
|
22
|
-
expect(
|
22
|
+
expect(offenses.size).to eq(2)
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'registers an offense with composite index' do
|
26
|
-
inspect_source(<<~SOURCE)
|
26
|
+
offenses = inspect_source(<<~SOURCE)
|
27
27
|
add_index(:products, [:name, :price], unique: true)
|
28
28
|
drop_index(:products, [:name, :price])
|
29
29
|
SOURCE
|
30
|
-
expect(
|
30
|
+
expect(offenses.size).to eq(2)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'does not register an offense when using concurrent option' do
|
35
|
-
inspect_source(<<~SOURCE)
|
35
|
+
offenses = inspect_source(<<~SOURCE)
|
36
36
|
add_index(:products, :name, unique: true, concurrently: true)
|
37
37
|
drop_index(:products, :name, concurrently: true)
|
38
38
|
SOURCE
|
39
|
-
expect(
|
39
|
+
expect(offenses).to be_empty
|
40
40
|
end
|
41
41
|
end
|
@@ -7,45 +7,45 @@ describe RuboCop::Cop::Sequel::JSONColumn do
|
|
7
7
|
|
8
8
|
context 'with add_column' do
|
9
9
|
it 'registers an offense when using json type' do
|
10
|
-
inspect_source('add_column(:products, :type, :json)')
|
11
|
-
expect(
|
10
|
+
offenses = inspect_source('add_column(:products, :type, :json)')
|
11
|
+
expect(offenses.size).to eq(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'registers an offense when using hstore type' do
|
15
|
-
inspect_source('add_column(:products, :type, :hstore)')
|
16
|
-
expect(
|
15
|
+
offenses = inspect_source('add_column(:products, :type, :hstore)')
|
16
|
+
expect(offenses.size).to eq(1)
|
17
17
|
end
|
18
18
|
|
19
19
|
it 'does not register an offense when using jsonb' do
|
20
|
-
inspect_source('add_column(:products, :type, :jsonb)')
|
21
|
-
expect(
|
20
|
+
offenses = inspect_source('add_column(:products, :type, :jsonb)')
|
21
|
+
expect(offenses).to be_empty
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
context 'with create_table' do
|
26
26
|
it 'registers an offense when using json as a method' do
|
27
|
-
inspect_source('create_table(:products) { json :type, default: {} }')
|
28
|
-
expect(
|
27
|
+
offenses = inspect_source('create_table(:products) { json :type, default: {} }')
|
28
|
+
expect(offenses.size).to eq(1)
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'registers an offense when using the column method with hstore' do
|
32
|
-
inspect_source('create_table(:products) { column :type, :hstore }')
|
33
|
-
expect(
|
32
|
+
offenses = inspect_source('create_table(:products) { column :type, :hstore }')
|
33
|
+
expect(offenses.size).to eq(1)
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'does not register an offense when using jsonb as column type`' do
|
37
|
-
inspect_source('create_table(:products) { column :type, :jsonb }')
|
38
|
-
expect(
|
37
|
+
offenses = inspect_source('create_table(:products) { column :type, :jsonb }')
|
38
|
+
expect(offenses).to be_empty
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'does not register an offense when using jsonb' do
|
42
|
-
inspect_source('create_table(:products) { jsonb :type }')
|
43
|
-
expect(
|
42
|
+
offenses = inspect_source('create_table(:products) { jsonb :type }')
|
43
|
+
expect(offenses).to be_empty
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'does not register an offense when using a simple type' do
|
47
|
-
inspect_source('create_table(:products) { integer :type, default: 0 }')
|
48
|
-
expect(
|
47
|
+
offenses = inspect_source('create_table(:products) { integer :type, default: 0 }')
|
48
|
+
expect(offenses).to be_empty
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
@@ -17,13 +17,13 @@ describe RuboCop::Cop::Sequel::MigrationName, :config do
|
|
17
17
|
let(:cop_config) { {} }
|
18
18
|
|
19
19
|
it 'registers an offense when using the default name' do
|
20
|
-
inspect_source('', 'new_migration.rb')
|
21
|
-
expect(
|
20
|
+
offenses = inspect_source('', 'new_migration.rb')
|
21
|
+
expect(offenses.size).to eq(1)
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'does not register an offense when using a specific name' do
|
25
|
-
inspect_source('', 'add_index.rb')
|
26
|
-
expect(
|
25
|
+
offenses = inspect_source('', 'add_index.rb')
|
26
|
+
expect(offenses).to be_empty
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -31,13 +31,13 @@ describe RuboCop::Cop::Sequel::MigrationName, :config do
|
|
31
31
|
let(:cop_config) { { 'DefaultName' => 'add_migration' } }
|
32
32
|
|
33
33
|
it 'registers an offense when using the default name' do
|
34
|
-
inspect_source('', 'add_migration.rb')
|
35
|
-
expect(
|
34
|
+
offenses = inspect_source('', 'add_migration.rb')
|
35
|
+
expect(offenses.size).to eq(1)
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'does not register an offense when using a specific name' do
|
39
|
-
inspect_source('', 'add_index.rb')
|
40
|
-
expect(
|
39
|
+
offenses = inspect_source('', 'add_index.rb')
|
40
|
+
expect(offenses).to be_empty
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe RuboCop::Cop::Sequel::PartialConstraint do
|
6
|
+
subject(:cop) { described_class.new }
|
7
|
+
|
8
|
+
it 'registers an offense when using where for constraint' do
|
9
|
+
offenses = inspect_source(<<~RUBY)
|
10
|
+
add_unique_constraint %i[col_1 col_2], where: "state != 'deleted'"
|
11
|
+
RUBY
|
12
|
+
|
13
|
+
expect(offenses.size).to eq(1)
|
14
|
+
end
|
15
|
+
end
|
@@ -6,13 +6,13 @@ describe RuboCop::Cop::Sequel::SaveChanges do
|
|
6
6
|
subject(:cop) { described_class.new }
|
7
7
|
|
8
8
|
it 'registers an offense when using save' do
|
9
|
-
inspect_source('favorite.save')
|
10
|
-
expect(
|
9
|
+
offenses = inspect_source('favorite.save')
|
10
|
+
expect(offenses.size).to eq(1)
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'does not register an offense when using save_changes' do
|
14
|
-
inspect_source('favorite.save_changes')
|
15
|
-
expect(
|
14
|
+
offenses = inspect_source('favorite.save_changes')
|
15
|
+
expect(offenses).to be_empty
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'auto-corrects by using save_changes' do
|
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.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timothée Peignier
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,40 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0.55'
|
19
|
+
version: '1.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0.55'
|
26
|
+
version: '1.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rake
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 12.0.0
|
33
|
+
version: 13.0.6
|
43
34
|
type: :development
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
38
|
- - "~>"
|
48
39
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 12.0.0
|
40
|
+
version: 13.0.6
|
53
41
|
- !ruby/object:Gem::Dependency
|
54
42
|
name: rspec
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -57,9 +45,6 @@ dependencies:
|
|
57
45
|
- - "~>"
|
58
46
|
- !ruby/object:Gem::Version
|
59
47
|
version: '3.7'
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 3.7.0
|
63
48
|
type: :development
|
64
49
|
prerelease: false
|
65
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -67,49 +52,48 @@ dependencies:
|
|
67
52
|
- - "~>"
|
68
53
|
- !ruby/object:Gem::Version
|
69
54
|
version: '3.7'
|
70
|
-
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
71
60
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
61
|
+
version: 0.6.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.6.0
|
73
69
|
- !ruby/object:Gem::Dependency
|
74
70
|
name: rubocop-rspec
|
75
71
|
requirement: !ruby/object:Gem::Requirement
|
76
72
|
requirements:
|
77
73
|
- - "~>"
|
78
74
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 1.25.0
|
75
|
+
version: '2.0'
|
83
76
|
type: :development
|
84
77
|
prerelease: false
|
85
78
|
version_requirements: !ruby/object:Gem::Requirement
|
86
79
|
requirements:
|
87
80
|
- - "~>"
|
88
81
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 1.25.0
|
82
|
+
version: '2.0'
|
93
83
|
- !ruby/object:Gem::Dependency
|
94
84
|
name: sequel
|
95
85
|
requirement: !ruby/object:Gem::Requirement
|
96
86
|
requirements:
|
97
87
|
- - "~>"
|
98
88
|
- !ruby/object:Gem::Version
|
99
|
-
version: '
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 4.49.0
|
89
|
+
version: '5.47'
|
103
90
|
type: :development
|
104
91
|
prerelease: false
|
105
92
|
version_requirements: !ruby/object:Gem::Requirement
|
106
93
|
requirements:
|
107
94
|
- - "~>"
|
108
95
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 4.49.0
|
96
|
+
version: '5.47'
|
113
97
|
- !ruby/object:Gem::Dependency
|
114
98
|
name: simplecov
|
115
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,10 +135,11 @@ executables: []
|
|
151
135
|
extensions: []
|
152
136
|
extra_rdoc_files: []
|
153
137
|
files:
|
138
|
+
- ".github/dependabot.yml"
|
139
|
+
- ".github/workflows/actions.yml"
|
154
140
|
- ".gitignore"
|
155
141
|
- ".rspec"
|
156
142
|
- ".rubocop.yml"
|
157
|
-
- ".travis.yml"
|
158
143
|
- Gemfile
|
159
144
|
- LICENSE
|
160
145
|
- README.md
|
@@ -163,6 +148,7 @@ files:
|
|
163
148
|
- lib/rubocop/cop/sequel/concurrent_index.rb
|
164
149
|
- lib/rubocop/cop/sequel/json_column.rb
|
165
150
|
- lib/rubocop/cop/sequel/migration_name.rb
|
151
|
+
- lib/rubocop/cop/sequel/partial_constraint.rb
|
166
152
|
- lib/rubocop/cop/sequel/save_changes.rb
|
167
153
|
- lib/rubocop/sequel.rb
|
168
154
|
- rubocop-sequel.gemspec
|
@@ -170,13 +156,14 @@ files:
|
|
170
156
|
- spec/rubocop/cop/sequel/concurrent_index_spec.rb
|
171
157
|
- spec/rubocop/cop/sequel/json_column_spec.rb
|
172
158
|
- spec/rubocop/cop/sequel/migration_name_spec.rb
|
159
|
+
- spec/rubocop/cop/sequel/partial_constraint_spec.rb
|
173
160
|
- spec/rubocop/cop/sequel/save_changes_spec.rb
|
174
161
|
- spec/spec_helper.rb
|
175
|
-
homepage:
|
162
|
+
homepage: https://github.com/rubocop-hq/rubocop-sequel
|
176
163
|
licenses:
|
177
164
|
- MIT
|
178
165
|
metadata: {}
|
179
|
-
post_install_message:
|
166
|
+
post_install_message:
|
180
167
|
rdoc_options: []
|
181
168
|
require_paths:
|
182
169
|
- lib
|
@@ -184,22 +171,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
171
|
requirements:
|
185
172
|
- - ">="
|
186
173
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
174
|
+
version: '2.5'
|
188
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
176
|
requirements:
|
190
177
|
- - ">="
|
191
178
|
- !ruby/object:Gem::Version
|
192
179
|
version: '0'
|
193
180
|
requirements: []
|
194
|
-
|
195
|
-
|
196
|
-
signing_key:
|
181
|
+
rubygems_version: 3.2.3
|
182
|
+
signing_key:
|
197
183
|
specification_version: 4
|
198
|
-
summary: A plugin for
|
184
|
+
summary: A Sequel plugin for RuboCop
|
199
185
|
test_files:
|
200
186
|
- spec/rubocop/cop/sequel/column_default_spec.rb
|
201
187
|
- spec/rubocop/cop/sequel/concurrent_index_spec.rb
|
202
188
|
- spec/rubocop/cop/sequel/json_column_spec.rb
|
203
189
|
- spec/rubocop/cop/sequel/migration_name_spec.rb
|
190
|
+
- spec/rubocop/cop/sequel/partial_constraint_spec.rb
|
204
191
|
- spec/rubocop/cop/sequel/save_changes_spec.rb
|
205
192
|
- spec/spec_helper.rb
|