rubocop-sequel 0.0.6 → 0.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
- SHA256:
3
- metadata.gz: c8a199639fb0c16e569564f9648764d8fb8aaf33bbee5def7a66d210cc85d649
4
- data.tar.gz: 593503731a786d54e7fafbde51fd1972ce2d20713549c9d440d62a899c2e7ee0
2
+ SHA1:
3
+ metadata.gz: a6bd53027cc6d6df7b1d67153a46c9ac5325509b
4
+ data.tar.gz: 32b4aa5476643d2c82d4c5495b77ba5cd3fcab02
5
5
  SHA512:
6
- metadata.gz: b55fa4dd717d9f52c7df265cff1e69971fc383dd2ee5851badeab905824910735e5f911061dbec719f66a44cf4f2b3a4774e5d068e3bd305e05261c051886b78
7
- data.tar.gz: eb87589c3d20befa8af7bdff1c9c46143b351d7a38e43c32b3b3ce195bdb538e8fefc7b9f97635aad7d9511dd3e276c382349792c8519aa3d6e9e462d6ee3791
6
+ metadata.gz: 75952359885f37ceafdc126f9df5b102f3f64d06ed761308085a6fe3498d68382a28bdfef00a6658c14af589f98900a70076fce221d425eb8167b3f2de1d8ed0
7
+ data.tar.gz: 2016916ef31f9459cc2ad51b4180534563d7c38f901a72e060db218716ddbad3ef9dfc2e35970333bb1877f7ea2d6f6e69018df4c5af37f5ce2de2bd188e5031
@@ -0,0 +1,29 @@
1
+ name: CI
2
+ on: push
3
+
4
+ jobs:
5
+ main:
6
+ name: Ruby ${{ matrix.ruby }}
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby:
11
+ - 2.4
12
+ - 2.5
13
+ - 2.6
14
+ - 2.7
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
@@ -2,7 +2,7 @@ require:
2
2
  - rubocop-rspec
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.3
5
+ TargetRubyVersion: 2.4
6
6
 
7
7
  # Offense count: 1
8
8
  # Configuration parameters: CountComments, ExcludedMethods.
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
+ ![CI status](https://github.com/rubocop-hq/rubocop-sequel/workflows/CI/badge.svg)
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-rspec` gem
9
+ Using the `rubocop-sequel` gem
8
10
 
9
11
  ```bash
10
12
  gem install rubocop-sequel
@@ -13,6 +13,7 @@ module RuboCop
13
13
 
14
14
  def on_send(node)
15
15
  return unless add_column_default?(node)
16
+
16
17
  add_offense(node, location: :selector, message: MSG)
17
18
  end
18
19
  end
@@ -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, location: :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
@@ -21,13 +21,16 @@ module RuboCop
21
21
 
22
22
  def on_send(node)
23
23
  return unless json_or_hstore?(node)
24
+
24
25
  add_offense(node, location: :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)
33
+
31
34
  add_offense(method, location: :selector, message: MSG)
32
35
  end
33
36
  end
@@ -14,6 +14,7 @@ module RuboCop
14
14
 
15
15
  def on_send(node)
16
16
  return unless model_save?(node)
17
+
17
18
  add_offense(node, location: :selector, message: MSG)
18
19
  end
19
20
 
@@ -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 the RuboCop code style & linting tool.'
8
- gem.homepage = 'http://rubygems.org/gems/rubocop-sequel'
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,16 @@ 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.6'
16
+ gem.version = '0.1.0'
17
17
 
18
- gem.add_runtime_dependency 'rubocop', '~> 0.55', '>= 0.55'
18
+ gem.required_ruby_version = '~> 2.4'
19
19
 
20
- gem.add_development_dependency 'rake', '~> 12.3.0', '>= 12.0.0'
21
- gem.add_development_dependency 'rspec', '~> 3.7', '>= 3.7.0'
22
- gem.add_development_dependency 'rubocop-rspec', '~> 1.25.0', '>= 1.25.0'
23
- gem.add_development_dependency 'sequel', '~> 4.49', '>= 4.49.0'
20
+ gem.add_runtime_dependency 'rubocop', '~> 1.0'
21
+
22
+ gem.add_development_dependency 'rake', '~> 12.3.0'
23
+ gem.add_development_dependency 'rspec', '~> 3.7'
24
+ gem.add_development_dependency 'rubocop-rspec', '~> 2.0'
25
+ gem.add_development_dependency 'sequel', '~> 4.49'
24
26
  gem.add_development_dependency 'simplecov', '~> 0.16'
25
27
  gem.add_development_dependency 'sqlite3', '~> 1.3', '>= 1.3.12'
26
28
  end
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.6
4
+ version: 0.1.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: 2018-04-29 00:00:00.000000000 Z
11
+ date: 2020-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.55'
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.55'
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
@@ -37,9 +31,6 @@ dependencies:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
33
  version: 12.3.0
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 12.0.0
43
34
  type: :development
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,9 +38,6 @@ dependencies:
47
38
  - - "~>"
48
39
  - !ruby/object:Gem::Version
49
40
  version: 12.3.0
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 12.0.0
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,29 +52,20 @@ dependencies:
67
52
  - - "~>"
68
53
  - !ruby/object:Gem::Version
69
54
  version: '3.7'
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: 3.7.0
73
55
  - !ruby/object:Gem::Dependency
74
56
  name: rubocop-rspec
75
57
  requirement: !ruby/object:Gem::Requirement
76
58
  requirements:
77
59
  - - "~>"
78
60
  - !ruby/object:Gem::Version
79
- version: 1.25.0
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: 1.25.0
61
+ version: '2.0'
83
62
  type: :development
84
63
  prerelease: false
85
64
  version_requirements: !ruby/object:Gem::Requirement
86
65
  requirements:
87
66
  - - "~>"
88
67
  - !ruby/object:Gem::Version
89
- version: 1.25.0
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- version: 1.25.0
68
+ version: '2.0'
93
69
  - !ruby/object:Gem::Dependency
94
70
  name: sequel
95
71
  requirement: !ruby/object:Gem::Requirement
@@ -97,9 +73,6 @@ dependencies:
97
73
  - - "~>"
98
74
  - !ruby/object:Gem::Version
99
75
  version: '4.49'
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: 4.49.0
103
76
  type: :development
104
77
  prerelease: false
105
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -107,9 +80,6 @@ dependencies:
107
80
  - - "~>"
108
81
  - !ruby/object:Gem::Version
109
82
  version: '4.49'
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: 4.49.0
113
83
  - !ruby/object:Gem::Dependency
114
84
  name: simplecov
115
85
  requirement: !ruby/object:Gem::Requirement
@@ -151,10 +121,10 @@ executables: []
151
121
  extensions: []
152
122
  extra_rdoc_files: []
153
123
  files:
124
+ - ".github/workflows/actions.yml"
154
125
  - ".gitignore"
155
126
  - ".rspec"
156
127
  - ".rubocop.yml"
157
- - ".travis.yml"
158
128
  - Gemfile
159
129
  - LICENSE
160
130
  - README.md
@@ -172,30 +142,30 @@ files:
172
142
  - spec/rubocop/cop/sequel/migration_name_spec.rb
173
143
  - spec/rubocop/cop/sequel/save_changes_spec.rb
174
144
  - spec/spec_helper.rb
175
- homepage: http://rubygems.org/gems/rubocop-sequel
145
+ homepage: https://github.com/rubocop-hq/rubocop-sequel
176
146
  licenses:
177
147
  - MIT
178
148
  metadata: {}
179
- post_install_message:
149
+ post_install_message:
180
150
  rdoc_options: []
181
151
  require_paths:
182
152
  - lib
183
153
  required_ruby_version: !ruby/object:Gem::Requirement
184
154
  requirements:
185
- - - ">="
155
+ - - "~>"
186
156
  - !ruby/object:Gem::Version
187
- version: '0'
157
+ version: '2.4'
188
158
  required_rubygems_version: !ruby/object:Gem::Requirement
189
159
  requirements:
190
160
  - - ">="
191
161
  - !ruby/object:Gem::Version
192
162
  version: '0'
193
163
  requirements: []
194
- rubyforge_project:
195
- rubygems_version: 2.7.6
196
- signing_key:
164
+ rubyforge_project:
165
+ rubygems_version: 2.6.11
166
+ signing_key:
197
167
  specification_version: 4
198
- summary: A plugin for the RuboCop code style & linting tool.
168
+ summary: A Sequel plugin for RuboCop
199
169
  test_files:
200
170
  - spec/rubocop/cop/sequel/column_default_spec.rb
201
171
  - spec/rubocop/cop/sequel/concurrent_index_spec.rb
@@ -1,10 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3
4
- - 2.4
5
- - 2.5
6
- script:
7
- - bundle exec rubocop --parallel
8
- - bundle exec rspec
9
- notifications:
10
- email: false