rubocop-sequel 0.0.5 → 0.3.0
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 +4 -2
- data/README.md +4 -2
- data/lib/rubocop-sequel.rb +2 -0
- data/lib/rubocop/cop/sequel/column_default.rb +5 -4
- data/lib/rubocop/cop/sequel/concurrent_index.rb +5 -6
- data/lib/rubocop/cop/sequel/json_column.rb +40 -0
- 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 +11 -8
- data/rubocop-sequel.gemspec +12 -9
- 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 +51 -0
- 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 +42 -53
- data/.travis.yml +0 -10
- data/rubocop.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 260beb7a94809075be127b7eac43b03b1acc661038009ea8c189bb91f543bdf0
|
4
|
+
data.tar.gz: '0815a252def8ee363d59bdc19f8c317b8f68bf9a89a50ed15bd79730bbc9fa60'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa012f6644b9360e4d3d8c3d9ceb1b00165bab142f6dab7521d7289a8caa09704b6d27224cae6490b9a86067a7058bd657ac59f975c51e242807d65243678b3a
|
7
|
+
data.tar.gz: 19aa510cdf0b8ec211d1bca4377652afa877a7c4e52d8804a45099008d0a763c008dac616b15e5074e71bbe98800d5c3d54f98fde5dc1fd29600ca197a6233ea
|
@@ -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
@@ -2,12 +2,14 @@ require:
|
|
2
2
|
- rubocop-rspec
|
3
3
|
|
4
4
|
AllCops:
|
5
|
-
TargetRubyVersion: 2.
|
5
|
+
TargetRubyVersion: 2.5
|
6
|
+
NewCops: enable
|
6
7
|
|
7
8
|
# Offense count: 1
|
8
9
|
# Configuration parameters: CountComments, ExcludedMethods.
|
9
10
|
Metrics/BlockLength:
|
10
|
-
|
11
|
+
Exclude:
|
12
|
+
- spec/**/*
|
11
13
|
|
12
14
|
# Offense count: 1
|
13
15
|
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
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,5 +4,7 @@ require 'rubocop'
|
|
4
4
|
|
5
5
|
require 'rubocop/cop/sequel/column_default'
|
6
6
|
require 'rubocop/cop/sequel/concurrent_index'
|
7
|
+
require 'rubocop/cop/sequel/json_column'
|
7
8
|
require 'rubocop/cop/sequel/migration_name'
|
8
9
|
require 'rubocop/cop/sequel/save_changes'
|
10
|
+
require 'rubocop/cop/sequel/partial_constraint'
|
@@ -4,16 +4,17 @@ 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
|
-
def_node_matcher :add_column_default
|
10
|
+
def_node_matcher :add_column_default?, <<-MATCHER
|
11
11
|
(send _ :add_column ... (hash (pair (sym :default) _)))
|
12
12
|
MATCHER
|
13
13
|
|
14
14
|
def on_send(node)
|
15
|
-
return unless add_column_default(node)
|
16
|
-
|
15
|
+
return unless add_column_default?(node)
|
16
|
+
|
17
|
+
add_offense(node.loc.selector, message: MSG)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -4,18 +4,16 @@ 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
|
-
def_node_matcher :indexes
|
10
|
+
def_node_matcher :indexes?, <<-MATCHER
|
11
11
|
(send _ {:add_index :drop_index} $...)
|
12
12
|
MATCHER
|
13
13
|
|
14
14
|
def on_send(node)
|
15
|
-
indexes(node) do |args|
|
16
|
-
if offensive?(args)
|
17
|
-
add_offense(node, location: :selector, message: MSG)
|
18
|
-
end
|
15
|
+
indexes?(node) do |args|
|
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
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Sequel
|
6
|
+
# JSONColumn looks for non-JSONB columns.
|
7
|
+
class JSONColumn < Base
|
8
|
+
MSG = 'Use JSONB rather than JSON or hstore'
|
9
|
+
|
10
|
+
def_node_matcher :json_or_hstore?, <<-MATCHER
|
11
|
+
(send _ :add_column ... (sym {:json :hstore}))
|
12
|
+
MATCHER
|
13
|
+
|
14
|
+
def_node_matcher :column_type?, <<-MATCHER
|
15
|
+
(send _ {:json :hstore} ...)
|
16
|
+
MATCHER
|
17
|
+
|
18
|
+
def_node_matcher :column_method?, <<-MATCHER
|
19
|
+
(send _ :column ... (sym {:json :hstore}))
|
20
|
+
MATCHER
|
21
|
+
|
22
|
+
def on_send(node)
|
23
|
+
return unless json_or_hstore?(node)
|
24
|
+
|
25
|
+
add_offense(node.loc.selector, message: MSG)
|
26
|
+
end
|
27
|
+
|
28
|
+
def on_block(node)
|
29
|
+
return unless node.send_node.method_name == :create_table
|
30
|
+
|
31
|
+
node.each_node(:send) do |method|
|
32
|
+
next unless column_method?(method) || column_type?(method)
|
33
|
+
|
34
|
+
add_offense(method.loc.selector, message: MSG)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
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 < Cop
|
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, location: :selector, message: MSG)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -4,21 +4,24 @@ 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
|
-
def_node_matcher :model_save
|
13
|
+
def_node_matcher :model_save?, <<-MATCHER
|
12
14
|
(send _ :save)
|
13
15
|
MATCHER
|
14
16
|
|
15
17
|
def on_send(node)
|
16
|
-
return unless model_save(node)
|
17
|
-
|
18
|
-
|
18
|
+
return unless model_save?(node)
|
19
|
+
|
20
|
+
range = node.loc.selector
|
19
21
|
|
20
|
-
|
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.0
|
16
|
+
gem.version = '0.3.0'
|
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 '
|
24
|
-
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'
|
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
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe RuboCop::Cop::Sequel::JSONColumn do
|
6
|
+
subject(:cop) { described_class.new }
|
7
|
+
|
8
|
+
context 'with add_column' do
|
9
|
+
it 'registers an offense when using json type' do
|
10
|
+
offenses = inspect_source('add_column(:products, :type, :json)')
|
11
|
+
expect(offenses.size).to eq(1)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'registers an offense when using hstore type' do
|
15
|
+
offenses = inspect_source('add_column(:products, :type, :hstore)')
|
16
|
+
expect(offenses.size).to eq(1)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'does not register an offense when using jsonb' do
|
20
|
+
offenses = inspect_source('add_column(:products, :type, :jsonb)')
|
21
|
+
expect(offenses).to be_empty
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'with create_table' do
|
26
|
+
it 'registers an offense when using json as a method' do
|
27
|
+
offenses = inspect_source('create_table(:products) { json :type, default: {} }')
|
28
|
+
expect(offenses.size).to eq(1)
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'registers an offense when using the column method with hstore' do
|
32
|
+
offenses = inspect_source('create_table(:products) { column :type, :hstore }')
|
33
|
+
expect(offenses.size).to eq(1)
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'does not register an offense when using jsonb as column type`' do
|
37
|
+
offenses = inspect_source('create_table(:products) { column :type, :jsonb }')
|
38
|
+
expect(offenses).to be_empty
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'does not register an offense when using jsonb' do
|
42
|
+
offenses = inspect_source('create_table(:products) { jsonb :type }')
|
43
|
+
expect(offenses).to be_empty
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'does not register an offense when using a simple type' do
|
47
|
+
offenses = inspect_source('create_table(:products) { integer :type, default: 0 }')
|
48
|
+
expect(offenses).to be_empty
|
49
|
+
end
|
50
|
+
end
|
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
|
+
inspect_source <<-RUBY
|
10
|
+
add_unique_constraint %i[col_1 col_2], where: "state != 'deleted'"
|
11
|
+
RUBY
|
12
|
+
|
13
|
+
expect(cop.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.0
|
4
|
+
version: 0.3.0
|
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,114 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0.52'
|
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.52'
|
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
|
56
44
|
requirements:
|
57
45
|
- - "~>"
|
58
46
|
- !ruby/object:Gem::Version
|
59
|
-
version: '3.
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 3.5.0
|
47
|
+
version: '3.7'
|
63
48
|
type: :development
|
64
49
|
prerelease: false
|
65
50
|
version_requirements: !ruby/object:Gem::Requirement
|
66
51
|
requirements:
|
67
52
|
- - "~>"
|
68
53
|
- !ruby/object:Gem::Version
|
69
|
-
version: '3.
|
70
|
-
|
54
|
+
version: '3.7'
|
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.22.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.22.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
|
116
100
|
requirements:
|
117
101
|
- - "~>"
|
118
102
|
- !ruby/object:Gem::Version
|
119
|
-
version: '0.
|
103
|
+
version: '0.16'
|
120
104
|
type: :development
|
121
105
|
prerelease: false
|
122
106
|
version_requirements: !ruby/object:Gem::Requirement
|
123
107
|
requirements:
|
124
108
|
- - "~>"
|
125
109
|
- !ruby/object:Gem::Version
|
126
|
-
version: '0.
|
110
|
+
version: '0.16'
|
127
111
|
- !ruby/object:Gem::Dependency
|
128
112
|
name: sqlite3
|
129
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,31 +135,35 @@ 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
|
161
146
|
- lib/rubocop-sequel.rb
|
162
147
|
- lib/rubocop/cop/sequel/column_default.rb
|
163
148
|
- lib/rubocop/cop/sequel/concurrent_index.rb
|
149
|
+
- lib/rubocop/cop/sequel/json_column.rb
|
164
150
|
- lib/rubocop/cop/sequel/migration_name.rb
|
151
|
+
- lib/rubocop/cop/sequel/partial_constraint.rb
|
165
152
|
- lib/rubocop/cop/sequel/save_changes.rb
|
166
153
|
- lib/rubocop/sequel.rb
|
167
154
|
- rubocop-sequel.gemspec
|
168
|
-
- rubocop.yml
|
169
155
|
- spec/rubocop/cop/sequel/column_default_spec.rb
|
170
156
|
- spec/rubocop/cop/sequel/concurrent_index_spec.rb
|
157
|
+
- spec/rubocop/cop/sequel/json_column_spec.rb
|
171
158
|
- spec/rubocop/cop/sequel/migration_name_spec.rb
|
159
|
+
- spec/rubocop/cop/sequel/partial_constraint_spec.rb
|
172
160
|
- spec/rubocop/cop/sequel/save_changes_spec.rb
|
173
161
|
- spec/spec_helper.rb
|
174
|
-
homepage:
|
162
|
+
homepage: https://github.com/rubocop-hq/rubocop-sequel
|
175
163
|
licenses:
|
176
164
|
- MIT
|
177
165
|
metadata: {}
|
178
|
-
post_install_message:
|
166
|
+
post_install_message:
|
179
167
|
rdoc_options: []
|
180
168
|
require_paths:
|
181
169
|
- lib
|
@@ -183,21 +171,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
171
|
requirements:
|
184
172
|
- - ">="
|
185
173
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
174
|
+
version: '2.5'
|
187
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
176
|
requirements:
|
189
177
|
- - ">="
|
190
178
|
- !ruby/object:Gem::Version
|
191
179
|
version: '0'
|
192
180
|
requirements: []
|
193
|
-
|
194
|
-
|
195
|
-
signing_key:
|
181
|
+
rubygems_version: 3.2.3
|
182
|
+
signing_key:
|
196
183
|
specification_version: 4
|
197
|
-
summary: A plugin for
|
184
|
+
summary: A Sequel plugin for RuboCop
|
198
185
|
test_files:
|
199
186
|
- spec/rubocop/cop/sequel/column_default_spec.rb
|
200
187
|
- spec/rubocop/cop/sequel/concurrent_index_spec.rb
|
188
|
+
- spec/rubocop/cop/sequel/json_column_spec.rb
|
201
189
|
- spec/rubocop/cop/sequel/migration_name_spec.rb
|
190
|
+
- spec/rubocop/cop/sequel/partial_constraint_spec.rb
|
202
191
|
- spec/rubocop/cop/sequel/save_changes_spec.rb
|
203
192
|
- spec/spec_helper.rb
|
data/.travis.yml
DELETED
data/rubocop.yml
DELETED