where_lower 0.3.2 → 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
- SHA1:
3
- metadata.gz: 7f498ad3b96880006f77dff37953f2f1ed461b0f
4
- data.tar.gz: 9f61774edda128ee06513d0bf20d820e58228ab2
2
+ SHA256:
3
+ metadata.gz: 877b97aa1777f8d5eb2e63a26fb086c0e975cb632589803ee217d91682f4ef43
4
+ data.tar.gz: ba3cde317a0a611252d1820ac5e094b7e12694e0ea4fa97750846711011272eb
5
5
  SHA512:
6
- metadata.gz: 3d9b5ab4fb39dd96904590542adbdbaae11a3bae07613f02312a9b59ee811a133073f40f6feb47a523a2c82d2a78fada1487ff1d95d770d7dee8360698daad9d
7
- data.tar.gz: d2573e173fbe7f0929df5420671184864a849d7778aee8a4cfc615bcab1e74b1cb915659044c2cfe6fbe8fc6e0a0ebb7f1ea7788a53d9442cff597cd6d52ea89
6
+ metadata.gz: 55a5bb02b8cc784f4343e489458e7efc52def14ee57f78e02a310082e397dbe78a1bc777bae8d87c9d7e774e0782cd0c209fe93ee0b290ffa76f8750ddba1917
7
+ data.tar.gz: 5bfad1dbde813763c2a8858e1a184e927b5e118b8691db67700c443aee79797be90ca6348d539dc117fe2e6b6df4716066bbd2a05cbeca2a65d05fbff36d907b
@@ -5,20 +5,21 @@ language: ruby
5
5
  cache:
6
6
  - bundler
7
7
  rvm:
8
- - 2.2.6
9
- - 2.3.3
10
- - 2.4.1
8
+ - 2.4
9
+ - 2.5
10
+ - 2.6
11
11
  - ruby-head
12
12
  gemfile:
13
13
  - gemfiles/rails_4_2.gemfile
14
14
  - gemfiles/rails_5_0.gemfile
15
15
  - gemfiles/rails_5_1.gemfile
16
+ - gemfiles/rails_5_2.gemfile
17
+ - gemfiles/rails_6_0.gemfile
16
18
  matrix:
17
19
  fast_finish: true
20
+ exclude:
21
+ - rvm: 2.4
22
+ gemfile: gemfiles/rails_6_0.gemfile
18
23
  allow_failures:
19
24
  - rvm: ruby-head
20
- include:
21
- - rvm: 2.2.6
22
- gemfile: gemfiles/rails_4_1.gemfile
23
- - rvm: 2.3.3
24
- gemfile: gemfiles/rails_4_1.gemfile
25
+
data/Appraisals CHANGED
@@ -1,20 +1,27 @@
1
1
 
2
- appraise "rails_4_1" do
3
- version = "~> 4.1.8"
4
- gem "activerecord", version
5
- end
6
-
7
2
  appraise "rails_4_2" do
8
3
  version = "~> 4.2.0"
9
4
  gem "activerecord", version
5
+ gem "sqlite3", "~> 1.3.6"
10
6
  end
11
7
 
12
8
  appraise "rails_5_0" do
13
9
  version = "~> 5.0.0"
14
10
  gem "activerecord", version
11
+ gem "sqlite3", "~> 1.3.6"
15
12
  end
16
13
 
17
14
  appraise "rails_5_1" do
18
15
  version = "~> 5.1.0"
19
16
  gem "activerecord", version
20
17
  end
18
+
19
+ appraise "rails_5_2" do
20
+ version = "~> 5.2.0"
21
+ gem "activerecord", version
22
+ end
23
+
24
+ appraise "rails_6_0" do
25
+ version = "~> 6.0.0.beta1"
26
+ gem "activerecord", version
27
+ end
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [0.3.3] - 2019-08-26
22
+
23
+ ### Changed
24
+
25
+ - Add support for AR 6.x
26
+ - Drop support for Ruby < 2.4
27
+
28
+
21
29
  ## [0.3.2] - 2017-05-11
22
30
 
23
31
  ### Changed
@@ -66,8 +74,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
66
74
  - Initial Release
67
75
 
68
76
 
69
- [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v0.3.2...HEAD
70
- [0.3.2]: https://github.com/AssetSync/asset_sync/compare/v0.3.1...v0.3.2
71
- [0.3.1]: https://github.com/AssetSync/asset_sync/compare/v0.3.0...v0.3.1
72
- [0.3.0]: https://github.com/AssetSync/asset_sync/compare/v0.2.0...v0.3.0
73
- [0.2.0]: https://github.com/AssetSync/asset_sync/compare/v0.1.0...v0.2.0
77
+ [Unreleased]: https://github.com/PikachuEXE/where_lower/compare/v0.3.3...HEAD
78
+ [0.3.2]: https://github.com/PikachuEXE/where_lower/compare/v0.3.2...v0.3.3
79
+ [0.3.2]: https://github.com/PikachuEXE/where_lower/compare/v0.3.1...v0.3.2
80
+ [0.3.1]: https://github.com/PikachuEXE/where_lower/compare/v0.3.0...v0.3.1
81
+ [0.3.0]: https://github.com/PikachuEXE/where_lower/compare/v0.2.0...v0.3.0
82
+ [0.2.0]: https://github.com/PikachuEXE/where_lower/compare/v0.1.0...v0.2.0
data/README.md CHANGED
@@ -6,10 +6,13 @@ Provide an easy way to use case insensitive `where` in ActiveRecord.
6
6
  ## Status
7
7
 
8
8
  [![Build Status](http://img.shields.io/travis/PikachuEXE/where_lower.svg?style=flat-square)](https://travis-ci.org/PikachuEXE/where_lower)
9
+
9
10
  [![Gem Version](http://img.shields.io/gem/v/where_lower.svg?style=flat-square)](http://badge.fury.io/rb/where_lower)
10
- [![Dependency Status](http://img.shields.io/gemnasium/PikachuEXE/where_lower.svg?style=flat-square)](https://gemnasium.com/PikachuEXE/where_lower)
11
+
11
12
  [![Coverage Status](http://img.shields.io/coveralls/PikachuEXE/where_lower.svg?style=flat-square)](https://coveralls.io/r/PikachuEXE/where_lower)
12
- [![Code Climate](http://img.shields.io/codeclimate/github/PikachuEXE/where_lower.svg?style=flat-square)](https://codeclimate.com/github/PikachuEXE/where_lower)
13
+
14
+ [![Maintainability](https://api.codeclimate.com/v1/badges/7ec16febfe7879226a4b/maintainability)](https://codeclimate.com/github/PikachuEXE/where_lower/maintainability)
15
+
13
16
  [![Inch CI](https://inch-ci.org/github/PikachuEXE/where_lower.svg?branch=master)](https://inch-ci.org/github/PikachuEXE/where_lower)
14
17
 
15
18
 
data/Rakefile CHANGED
@@ -1,14 +1,11 @@
1
1
  require "appraisal"
2
2
  require "bundler"
3
3
  require "rspec/core/rake_task"
4
- require "rubocop/rake_task"
5
4
 
6
5
  Bundler::GemHelper.install_tasks
7
6
 
8
7
  RSpec::Core::RakeTask.new(:spec)
9
8
 
10
- RuboCop::RakeTask.new(:rubocop)
11
-
12
9
  if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
13
10
  task :default do
14
11
  sh "appraisal install && rake appraisal spec"
@@ -3,5 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 4.2.0"
6
+ gem "sqlite3", "~> 1.3.6"
6
7
 
7
8
  gemspec path: "../"
@@ -3,5 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 5.0.0"
6
+ gem "sqlite3", "~> 1.3.6"
6
7
 
7
8
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 4.1.8"
5
+ gem "activerecord", "~> 5.2.0"
6
6
 
7
7
  gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.0.0.beta1"
6
+
7
+ gemspec path: "../"
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WhereLower
2
4
  # String form of version, to be parsed by Gem::Version
3
- VERSION = "0.3.2"
5
+ VERSION = "0.3.3"
4
6
 
5
7
  # Return a version object instead of just a string for easier comparison
6
8
  #
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
 
35
35
  s.require_paths = ["lib"]
36
36
 
37
- s.add_dependency "activerecord", ">= 4.1.0", "< 6.0.0"
37
+ s.add_dependency "activerecord", ">= 4.1.0", "< 7.0.0"
38
38
 
39
39
  s.add_development_dependency "bundler", ">= 1.0.0"
40
40
  s.add_development_dependency "rake", ">= 10.0", "<= 13.0"
@@ -45,10 +45,9 @@ Gem::Specification.new do |s|
45
45
  s.add_development_dependency "database_cleaner", ">= 1.0"
46
46
  s.add_development_dependency "coveralls", ">= 0.7"
47
47
  s.add_development_dependency "gem-release", ">= 0.7"
48
- s.add_development_dependency "rubocop", "~> 0.33"
49
48
  s.add_development_dependency "inch", "~> 0.5", ">= 0.5.10"
50
49
 
51
- s.required_ruby_version = ">= 2.2.0"
50
+ s.required_ruby_version = ">= 2.4.0"
52
51
 
53
52
  s.required_rubygems_version = ">= 1.4.0"
54
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_lower
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - PikachuEXE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2019-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 4.1.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 6.0.0
22
+ version: 7.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 4.1.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 6.0.0
32
+ version: 7.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -162,20 +162,6 @@ dependencies:
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0.7'
165
- - !ruby/object:Gem::Dependency
166
- name: rubocop
167
- requirement: !ruby/object:Gem::Requirement
168
- requirements:
169
- - - "~>"
170
- - !ruby/object:Gem::Version
171
- version: '0.33'
172
- type: :development
173
- prerelease: false
174
- version_requirements: !ruby/object:Gem::Requirement
175
- requirements:
176
- - - "~>"
177
- - !ruby/object:Gem::Version
178
- version: '0.33'
179
165
  - !ruby/object:Gem::Dependency
180
166
  name: inch
181
167
  requirement: !ruby/object:Gem::Requirement
@@ -209,7 +195,6 @@ extra_rdoc_files: []
209
195
  files:
210
196
  - ".gitignore"
211
197
  - ".rspec"
212
- - ".rubocop.yml"
213
198
  - ".travis.yml"
214
199
  - Appraisals
215
200
  - CHANGELOG.md
@@ -217,10 +202,11 @@ files:
217
202
  - README.md
218
203
  - Rakefile
219
204
  - gemfiles/.bundle/config
220
- - gemfiles/rails_4_1.gemfile
221
205
  - gemfiles/rails_4_2.gemfile
222
206
  - gemfiles/rails_5_0.gemfile
223
207
  - gemfiles/rails_5_1.gemfile
208
+ - gemfiles/rails_5_2.gemfile
209
+ - gemfiles/rails_6_0.gemfile
224
210
  - lib/where_lower.rb
225
211
  - lib/where_lower/active_record_extension.rb
226
212
  - lib/where_lower/base.rb
@@ -241,15 +227,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
227
  requirements:
242
228
  - - ">="
243
229
  - !ruby/object:Gem::Version
244
- version: 2.2.0
230
+ version: 2.4.0
245
231
  required_rubygems_version: !ruby/object:Gem::Requirement
246
232
  requirements:
247
233
  - - ">="
248
234
  - !ruby/object:Gem::Version
249
235
  version: 1.4.0
250
236
  requirements: []
251
- rubyforge_project:
252
- rubygems_version: 2.6.12
237
+ rubygems_version: 3.0.6
253
238
  signing_key:
254
239
  specification_version: 4
255
240
  summary: Provide an easy way to use case insensitive `where` in ActiveRecord.
@@ -1,856 +0,0 @@
1
- # This is the default configuration file. Enabling and disabling is configured
2
- # in separate files. This file adds all other parameters apart from Enabled.
3
-
4
- # Common configuration.
5
- AllCops:
6
- # Include gemspec and Rakefile
7
- Include:
8
- - "**/*.gemspec"
9
- - "**/*.podspec"
10
- - "**/*.jbuilder"
11
- - "**/*.rake"
12
- - "**/*.opal"
13
- - "**/Gemfile"
14
- - "**/Rakefile"
15
- - "**/Capfile"
16
- - "**/Guardfile"
17
- - "**/Podfile"
18
- - "**/Thorfile"
19
- - "**/Vagrantfile"
20
- - "**/Berksfile"
21
- - "**/Cheffile"
22
- - "**/Vagabondfile"
23
- Exclude:
24
- - "vendor/**/*"
25
- - "gemfiles/vendor/**/*"
26
- # By default, the rails cops are not run. Override in project or home
27
- # directory .rubocop.yml files, or by giving the -R/--rails option.
28
- RunRailsCops: false
29
- # Cop names are not displayed in offense messages by default. Change behavior
30
- # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
31
- # option.
32
- DisplayCopNames: true
33
- # Style guide URLs are not displayed in offense messages by default. Change
34
- # behavior by overriding DisplayStyleGuide, or by giving the
35
- # -S/--display-style-guide option.
36
- DisplayStyleGuide: false
37
- # Additional cops that do not reference a style guide rule may be enabled by
38
- # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
39
- # the --only-guide-cops option.
40
- StyleGuideCopsOnly: false
41
-
42
- # Indent private/protected/public as deep as method definitions
43
- Style/AccessModifierIndentation:
44
- EnforcedStyle: indent
45
- SupportedStyles:
46
- - outdent
47
- - indent
48
-
49
- # Align the elements of a hash literal if they span more than one line.
50
- Style/AlignHash:
51
- # Alignment of entries using hash rocket as separator. Valid values are:
52
- #
53
- # key - left alignment of keys
54
- # "a" => 2
55
- # "bb" => 3
56
- # separator - alignment of hash rockets, keys are right aligned
57
- # "a" => 2
58
- # "bb" => 3
59
- # table - left alignment of keys, hash rockets, and values
60
- # "a" => 2
61
- # "bb" => 3
62
- EnforcedHashRocketStyle: table
63
- # Alignment of entries using colon as separator. Valid values are:
64
- #
65
- # key - left alignment of keys
66
- # a: 0
67
- # bb: 1
68
- # separator - alignment of colons, keys are right aligned
69
- # a: 0
70
- # bb: 1
71
- # table - left alignment of keys and values
72
- # a: 0
73
- # bb: 1
74
- EnforcedColonStyle: table
75
- # Select whether hashes that are the last argument in a method call should be
76
- # inspected? Valid values are:
77
- #
78
- # always_inspect - Inspect both implicit and explicit hashes.
79
- # Registers an offense for:
80
- # function(a: 1,
81
- # b: 2)
82
- # Registers an offense for:
83
- # function({a: 1,
84
- # b: 2})
85
- # always_ignore - Ignore both implicit and explicit hashes.
86
- # Accepts:
87
- # function(a: 1,
88
- # b: 2)
89
- # Accepts:
90
- # function({a: 1,
91
- # b: 2})
92
- # ignore_implicit - Ignore only implicit hashes.
93
- # Accepts:
94
- # function(a: 1,
95
- # b: 2)
96
- # Registers an offense for:
97
- # function({a: 1,
98
- # b: 2})
99
- # ignore_explicit - Ignore only explicit hashes.
100
- # Accepts:
101
- # function({a: 1,
102
- # b: 2})
103
- # Registers an offense for:
104
- # function(a: 1,
105
- # b: 2)
106
- EnforcedLastArgumentHashStyle: always_inspect
107
- SupportedLastArgumentHashStyles:
108
- - always_inspect
109
- - always_ignore
110
- - ignore_implicit
111
- - ignore_explicit
112
-
113
- Style/AlignParameters:
114
- # Alignment of parameters in multi-line method calls.
115
- #
116
- # The `with_first_parameter` style aligns the following lines along the same
117
- # column as the first parameter.
118
- #
119
- # method_call(a,
120
- # b)
121
- #
122
- # The `with_fixed_indentation` style aligns the following lines with one
123
- # level of indentation relative to the start of the line with the method call.
124
- #
125
- # method_call(a,
126
- # b)
127
- EnforcedStyle: with_fixed_indentation
128
- SupportedStyles:
129
- - with_first_parameter
130
- - with_fixed_indentation
131
-
132
- Style/AndOr:
133
- # Whether `and` and `or` are banned only in conditionals (conditionals)
134
- # or completely (always).
135
- EnforcedStyle: always
136
- SupportedStyles:
137
- - always
138
- - conditionals
139
-
140
-
141
- # Checks if usage of %() or %Q() matches configuration.
142
- Style/BarePercentLiterals:
143
- EnforcedStyle: percent_q
144
- SupportedStyles:
145
- - percent_q
146
- - bare_percent
147
-
148
- Style/BlockDelimiters:
149
- EnforcedStyle: line_count_based
150
- SupportedStyles:
151
- # The `line_count_based` style enforces braces around single line blocks and
152
- # do..end around multi-line blocks.
153
- - line_count_based
154
- # The `semantic` style enforces braces around functional blocks, where the
155
- # primary purpose of the block is to return a value and do..end for
156
- # procedural blocks, where the primary purpose of the block is its
157
- # side-effects.
158
- #
159
- # This looks at the usage of a block"s method to determine its type (e.g. is
160
- # the result of a `map` assigned to a variable or passed to another
161
- # method) but exceptions are permitted in the `ProceduralMethods`,
162
- # `FunctionalMethods` and `IgnoredMethods` sections below.
163
- - semantic
164
- ProceduralMethods:
165
- # Methods that are known to be procedural in nature but look functional from
166
- # their usage, e.g.
167
- #
168
- # time = Benchmark.realtime do
169
- # foo.bar
170
- # end
171
- #
172
- # Here, the return value of the block is discarded but the return value of
173
- # `Benchmark.realtime` is used.
174
- - benchmark
175
- - bm
176
- - bmbm
177
- - create
178
- - each_with_object
179
- - measure
180
- - new
181
- - realtime
182
- - tap
183
- - with_object
184
- FunctionalMethods:
185
- # Methods that are known to be functional in nature but look procedural from
186
- # their usage, e.g.
187
- #
188
- # let(:foo) { Foo.new }
189
- #
190
- # Here, the return value of `Foo.new` is used to define a `foo` helper but
191
- # doesn"t appear to be used from the return value of `let`.
192
- - let
193
- - let!
194
- - subject
195
- - watch
196
- IgnoredMethods:
197
- # Methods that can be either procedural or functional and cannot be
198
- # categorised from their usage alone, e.g.
199
- #
200
- # foo = lambda do |x|
201
- # puts "Hello, #{x}"
202
- # end
203
- #
204
- # foo = lambda do |x|
205
- # x * 100
206
- # end
207
- #
208
- # Here, it is impossible to tell from the return value of `lambda` whether
209
- # the inner block"s return value is significant.
210
- - lambda
211
- - proc
212
- - it
213
-
214
- Style/BracesAroundHashParameters:
215
- EnforcedStyle: context_dependent
216
- SupportedStyles:
217
- # The `braces` style enforces braces around all method parameters that are
218
- # hashes.
219
- - braces
220
- # The `no_braces` style checks that the last parameter doesn"t have braces
221
- # around it.
222
- - no_braces
223
- # The `context_dependent` style checks that the last parameter doesn"t have
224
- # braces around it, but requires braces if the second to last parameter is
225
- # also a hash literal.
226
- - context_dependent
227
-
228
- # Indentation of `when`.
229
- Style/CaseIndentation:
230
- IndentWhenRelativeTo: case
231
- SupportedStyles:
232
- - case
233
- - end
234
- IndentOneStep: false
235
-
236
- Style/ClassAndModuleChildren:
237
- # Checks the style of children definitions at classes and modules.
238
- #
239
- # Basically there are two different styles:
240
- #
241
- # `nested` - have each child on a separate line
242
- # class Foo
243
- # class Bar
244
- # end
245
- # end
246
- #
247
- # `compact` - combine definitions as much as possible
248
- # class Foo::Bar
249
- # end
250
- #
251
- # The compact style is only forced, for classes / modules with one child.
252
- EnforcedStyle: nested
253
- SupportedStyles:
254
- - nested
255
- - compact
256
-
257
- Style/ClassCheck:
258
- EnforcedStyle: is_a?
259
- SupportedStyles:
260
- - is_a?
261
- - kind_of?
262
-
263
- # Align with the style guide.
264
- Style/CollectionMethods:
265
- # Mapping from undesired method to desired_method
266
- # e.g. to use `detect` over `find`:
267
- #
268
- # CollectionMethods:
269
- # PreferredMethods:
270
- # find: detect
271
- PreferredMethods:
272
- collect: "map"
273
- collect!: "map!"
274
- inject: "reduce"
275
- detect: "find"
276
- find_all: "select"
277
-
278
- # Use ` or %x around command literals.
279
- Style/CommandLiteral:
280
- EnforcedStyle: mixed
281
- # backticks: Always use backticks.
282
- # percent_x: Always use %x.
283
- # mixed: Use backticks on single-line commands, and %x on multi-line commands.
284
- SupportedStyles:
285
- - backticks
286
- - percent_x
287
- - mixed
288
- # If false, the cop will always recommend using %x if one or more backticks
289
- # are found in the command string.
290
- AllowInnerBackticks: false
291
-
292
- # Checks formatting of special comments
293
- Style/CommentAnnotation:
294
- Keywords:
295
- - TODO
296
- - FIXME
297
- - OPTIMIZE
298
- - HACK
299
- - REVIEW
300
-
301
- # Checks that you have put a copyright in a comment before any code.
302
- #
303
- # You can override the default Notice in your .rubocop.yml file.
304
- #
305
- # In order to use autocorrect, you must supply a value for the
306
- # AutocorrectNotice key that matches the regexp Notice. A blank
307
- # AutocorrectNotice will cause an error during autocorrect.
308
- #
309
- # Autocorrect will add a copyright notice in a comment at the top
310
- # of the file immediately after any shebang or encoding comments.
311
- #
312
- # Example rubocop.yml:
313
- #
314
- # Style/Copyright:
315
- # Enabled: true
316
- # Notice: "Copyright (\(c\) )?2015 Yahoo! Inc"
317
- # AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc."
318
- #
319
- Style/Copyright:
320
- Enabled: false
321
- Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
322
- AutocorrectNotice: ""
323
-
324
- Style/Documentation:
325
- Enabled: false
326
-
327
- # Multi-line method chaining should be done with leading dots.
328
- Style/DotPosition:
329
- EnforcedStyle: trailing
330
- SupportedStyles:
331
- - leading
332
- - trailing
333
-
334
- # Warn on empty else statements
335
- # empty - warn only on empty else
336
- # nil - warn on else with nil in it
337
- # both - warn on empty else and else with nil in it
338
- Style/EmptyElse:
339
- EnforcedStyle: both
340
- SupportedStyles:
341
- - empty
342
- - nil
343
- - both
344
-
345
- # Use empty lines between defs.
346
- Style/EmptyLineBetweenDefs:
347
- # If true, this parameter means that single line method definitions don"t
348
- # need an empty line between them.
349
- AllowAdjacentOneLineDefs: false
350
-
351
- Style/EmptyLinesAroundBlockBody:
352
- EnforcedStyle: no_empty_lines
353
- SupportedStyles:
354
- - empty_lines
355
- - no_empty_lines
356
-
357
- Style/EmptyLinesAroundClassBody:
358
- EnforcedStyle: no_empty_lines
359
- SupportedStyles:
360
- - empty_lines
361
- - no_empty_lines
362
-
363
- Style/EmptyLinesAroundModuleBody:
364
- EnforcedStyle: no_empty_lines
365
- SupportedStyles:
366
- - empty_lines
367
- - no_empty_lines
368
-
369
- # Checks whether the source file has a utf-8 encoding comment or not
370
- # AutoCorrectEncodingComment must match the regex
371
- # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
372
- Style/Encoding:
373
- EnforcedStyle: always
374
- SupportedStyles:
375
- - when_needed
376
- - always
377
- AutoCorrectEncodingComment: "# encoding: utf-8"
378
-
379
- Style/FileName:
380
- # File names listed in AllCops:Include are excluded by default. Add extra
381
- # excludes here.
382
- Exclude: []
383
-
384
- Style/FirstParameterIndentation:
385
- EnforcedStyle: special_for_inner_method_call_in_parentheses
386
- SupportedStyles:
387
- # The first parameter should always be indented one step more than the
388
- # preceding line.
389
- - consistent
390
- # The first parameter should normally be indented one step more than the
391
- # preceding line, but if it"s a parameter for a method call that is itself
392
- # a parameter in a method call, then the inner parameter should be indented
393
- # relative to the inner method.
394
- - special_for_inner_method_call
395
- # Same as special_for_inner_method_call except that the special rule only
396
- # applies if the outer method call encloses its arguments in parentheses.
397
- - special_for_inner_method_call_in_parentheses
398
-
399
- # Checks use of for or each in multiline loops.
400
- Style/For:
401
- EnforcedStyle: each
402
- SupportedStyles:
403
- - for
404
- - each
405
-
406
- # Enforce the method used for string formatting.
407
- Style/FormatString:
408
- EnforcedStyle: format
409
- SupportedStyles:
410
- - format
411
- - sprintf
412
- - percent
413
-
414
- # Built-in global variables are allowed by default.
415
- Style/GlobalVars:
416
- AllowedVariables: []
417
-
418
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
419
- # needs to have to trigger this cop
420
- Style/GuardClause:
421
- MinBodyLength: 1
422
-
423
- Style/HashSyntax:
424
- EnforcedStyle: ruby19_no_mixed_keys
425
- SupportedStyles:
426
- - ruby19
427
- - ruby19_no_mixed_keys
428
- - hash_rockets
429
- # Force hashes that have a symbol value to use hash rockets
430
- UseHashRocketsWithSymbolValues: false
431
-
432
- Style/IfUnlessModifier:
433
- MaxLineLength: 80
434
-
435
- Style/IndentationConsistency:
436
- # The difference between `rails` and `normal` is that the `rails` style
437
- # prescribes that in classes and modules the `protected` and `private`
438
- # modifier keywords shall be indented the same as public methods and that
439
- # protected and private members shall be indented one step more than the
440
- # modifiers. Other than that, both styles mean that entities on the same
441
- # logical depth shall have the same indentation.
442
- EnforcedStyle: normal
443
- SupportedStyles:
444
- - normal
445
- - rails
446
-
447
- Style/IndentationWidth:
448
- # Number of spaces for each indentation level.
449
- Width: 2
450
-
451
- # Checks the indentation of the first key in a hash literal.
452
- Style/IndentHash:
453
- # The value `special_inside_parentheses` means that hash literals with braces
454
- # that have their opening brace on the same line as a surrounding opening
455
- # round parenthesis, shall have their first key indented relative to the
456
- # first position inside the parenthesis.
457
- # The value `consistent` means that the indentation of the first key shall
458
- # always be relative to the first position of the line where the opening
459
- # brace is.
460
- EnforcedStyle: special_inside_parentheses
461
- SupportedStyles:
462
- - special_inside_parentheses
463
- - consistent
464
-
465
- Style/LambdaCall:
466
- EnforcedStyle: call
467
- SupportedStyles:
468
- - call
469
- - braces
470
-
471
- Style/Next:
472
- # With `always` all conditions at the end of an iteration needs to be
473
- # replaced by next - with `skip_modifier_ifs` the modifier if like this one
474
- # are ignored: [1, 2].each { |a| return "yes" if a == 1 }
475
- EnforcedStyle: skip_modifier_ifs
476
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
477
- # needs to have to trigger this cop
478
- MinBodyLength: 3
479
- SupportedStyles:
480
- - skip_modifier_ifs
481
- - always
482
-
483
- Style/NonNilCheck:
484
- # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
485
- # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
486
- # **usually** OK, but might change behavior.
487
- #
488
- # With `IncludeSemanticChanges` set to `false`, this cop does not report
489
- # offenses for `!x.nil?` and does no changes that might change behavior.
490
- IncludeSemanticChanges: false
491
-
492
- Style/MethodDefParentheses:
493
- EnforcedStyle: require_parentheses
494
- SupportedStyles:
495
- - require_parentheses
496
- - require_no_parentheses
497
-
498
- Style/MethodName:
499
- EnforcedStyle: snake_case
500
- SupportedStyles:
501
- - snake_case
502
- - camelCase
503
-
504
- Style/MultilineOperationIndentation:
505
- EnforcedStyle: aligned
506
- SupportedStyles:
507
- - aligned
508
- - indented
509
-
510
- Style/NumericLiterals:
511
- MinDigits: 5
512
-
513
- # Allow safe assignment in conditions.
514
- Style/ParenthesesAroundCondition:
515
- AllowSafeAssignment: true
516
-
517
- Style/PercentLiteralDelimiters:
518
- PreferredDelimiters:
519
- "%": ()
520
- "%i": ()
521
- "%q": ()
522
- "%Q": ()
523
- "%r": "{}"
524
- "%s": ()
525
- "%w": ()
526
- "%W": ()
527
- "%x": ()
528
-
529
- Style/PercentQLiterals:
530
- EnforcedStyle: upper_case_q
531
- SupportedStyles:
532
- - lower_case_q # Use %q when possible, %Q when necessary
533
- - upper_case_q # Always use %Q
534
-
535
- Style/PredicateName:
536
- # Predicate name prefices.
537
- NamePrefix:
538
- - is_
539
- - has_
540
- - have_
541
- # Predicate name prefices that should be removed.
542
- NamePrefixBlacklist:
543
- - is_
544
- - has_
545
- - have_
546
-
547
- Style/RaiseArgs:
548
- EnforcedStyle: exploded
549
- SupportedStyles:
550
- - compact # raise Exception.new(msg)
551
- - exploded # raise Exception, msg
552
-
553
- Style/RedundantReturn:
554
- # When true allows code like `return x, y`.
555
- AllowMultipleReturnValues: false
556
-
557
- # Use / or %r around regular expressions.
558
- Style/RegexpLiteral:
559
- EnforcedStyle: mixed
560
- # slashes: Always use slashes.
561
- # percent_r: Always use %r.
562
- # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
563
- SupportedStyles:
564
- - slashes
565
- - percent_r
566
- - mixed
567
- # If false, the cop will always recommend using %r if one or more slashes
568
- # are found in the regexp string.
569
- AllowInnerSlashes: false
570
-
571
- Style/Semicolon:
572
- # Allow ; to separate several expressions on the same line.
573
- AllowAsExpressionSeparator: false
574
-
575
- Style/SignalException:
576
- EnforcedStyle: only_fail
577
- SupportedStyles:
578
- - only_raise
579
- - only_fail
580
- - semantic
581
-
582
- Style/SingleLineBlockParams:
583
- Methods:
584
- - reduce:
585
- - a
586
- - e
587
- - inject:
588
- - a
589
- - e
590
-
591
- Style/SingleLineMethods:
592
- AllowIfMethodIsEmpty: true
593
-
594
- Style/StringLiterals:
595
- EnforcedStyle: double_quotes
596
- SupportedStyles:
597
- - single_quotes
598
- - double_quotes
599
-
600
- Style/StringLiteralsInInterpolation:
601
- EnforcedStyle: double_quotes
602
- SupportedStyles:
603
- - single_quotes
604
- - double_quotes
605
-
606
- Style/SpaceAroundBlockParameters:
607
- EnforcedStyleInsidePipes: no_space
608
- SupportedStyles:
609
- - space
610
- - no_space
611
-
612
- Style/SpaceAroundEqualsInParameterDefault:
613
- EnforcedStyle: space
614
- SupportedStyles:
615
- - space
616
- - no_space
617
-
618
- Style/SpaceAroundOperators:
619
- MultiSpaceAllowedForOperators:
620
- - "="
621
- - "=>"
622
-
623
- Style/SpaceBeforeBlockBraces:
624
- EnforcedStyle: space
625
- SupportedStyles:
626
- - space
627
- - no_space
628
-
629
- Style/SpaceInsideBlockBraces:
630
- EnforcedStyle: space
631
- SupportedStyles:
632
- - space
633
- - no_space
634
- # Valid values are: space, no_space
635
- EnforcedStyleForEmptyBraces: no_space
636
- # Space between { and |. Overrides EnforcedStyle if there is a conflict.
637
- SpaceBeforeBlockParameters: true
638
-
639
- Style/SpaceInsideHashLiteralBraces:
640
- EnforcedStyle: no_space
641
- EnforcedStyleForEmptyBraces: no_space
642
- SupportedStyles:
643
- - space
644
- - no_space
645
-
646
- Style/SymbolProc:
647
- # A list of method names to be ignored by the check.
648
- # The names should be fairly unique, otherwise you"ll end up ignoring lots of code.
649
- IgnoredMethods:
650
- - respond_to
651
-
652
- Style/TrailingBlankLines:
653
- EnforcedStyle: final_newline
654
- SupportedStyles:
655
- - final_newline
656
- - final_blank_line
657
-
658
- Style/TrailingComma:
659
- # If EnforcedStyleForMultiline is comma, the cop requires a comma after the
660
- # last item of a list, but only for lists where each item is on its own line.
661
- # If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
662
- # after the last item of a list, for all lists.
663
- EnforcedStyleForMultiline: comma
664
- SupportedStyles:
665
- - comma
666
- - consistent_comma
667
- - no_comma
668
-
669
- # TrivialAccessors requires exact name matches and doesn"t allow
670
- # predicated methods by default.
671
- Style/TrivialAccessors:
672
- # When set to false the cop will suggest the use of accessor methods
673
- # in situations like:
674
- #
675
- # def name
676
- # @other_name
677
- # end
678
- #
679
- # This way you can uncover "hidden" attributes in your code.
680
- ExactNameMatch: false
681
- AllowPredicates: false
682
- # Allows trivial writers that don"t end in an equal sign. e.g.
683
- #
684
- # def on_exception(action)
685
- # @on_exception=action
686
- # end
687
- # on_exception :restart
688
- #
689
- # Commonly used in DSLs
690
- AllowDSLWriters: false
691
- IgnoreClassMethods: false
692
- Whitelist:
693
- - to_ary
694
- - to_a
695
- - to_c
696
- - to_enum
697
- - to_h
698
- - to_hash
699
- - to_i
700
- - to_int
701
- - to_io
702
- - to_open
703
- - to_path
704
- - to_proc
705
- - to_r
706
- - to_regexp
707
- - to_str
708
- - to_s
709
- - to_sym
710
-
711
- Style/UnneededPercentQ:
712
- Enabled: false
713
-
714
- Style/VariableName:
715
- EnforcedStyle: snake_case
716
- SupportedStyles:
717
- - snake_case
718
- - camelCase
719
-
720
- Style/WhileUntilModifier:
721
- MaxLineLength: 80
722
-
723
- Style/WordArray:
724
- MinSize: 0
725
- # The regular expression WordRegex decides what is considered a word.
726
- WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
727
-
728
- ##################### Metrics ##################################
729
-
730
- Metrics/AbcSize:
731
- # The ABC size is a calculated magnitude, so this number can be a Fixnum or
732
- # a Float.
733
- Max: 15
734
-
735
- Metrics/BlockNesting:
736
- Max: 3
737
-
738
- Metrics/ClassLength:
739
- CountComments: false # count full line comments?
740
- Max: 100
741
-
742
- # Avoid complex methods.
743
- Metrics/CyclomaticComplexity:
744
- Max: 6
745
-
746
- Metrics/LineLength:
747
- Max: 100
748
- # To make it possible to copy or click on URIs in the code, we allow lines
749
- # contaning a URI to be longer than Max.
750
- AllowURI: true
751
- URISchemes:
752
- - http
753
- - https
754
-
755
- Metrics/MethodLength:
756
- CountComments: false # count full line comments?
757
- Max: 10
758
-
759
- Metrics/ParameterLists:
760
- Max: 5
761
- CountKeywordArgs: true
762
-
763
- Metrics/PerceivedComplexity:
764
- Max: 7
765
-
766
- ##################### Lint ##################################
767
-
768
- # Allow safe assignment in conditions.
769
- Lint/AssignmentInCondition:
770
- AllowSafeAssignment: true
771
-
772
- # Align ends correctly.
773
- Lint/EndAlignment:
774
- # The value `keyword` means that `end` should be aligned with the matching
775
- # keyword (if, while, etc.).
776
- # The value `variable` means that in assignments, `end` should be aligned
777
- # with the start of the variable on the left hand side of `=`. In all other
778
- # situations, `end` should still be aligned with the keyword.
779
- AlignWith: variable
780
- SupportedStyles:
781
- - keyword
782
- - variable
783
-
784
- Lint/DefEndAlignment:
785
- # The value `def` means that `end` should be aligned with the def keyword.
786
- # The value `start_of_line` means that `end` should be aligned with method
787
- # calls like `private`, `public`, etc, if present in front of the `def`
788
- # keyword on the same line.
789
- AlignWith: start_of_line
790
- SupportedStyles:
791
- - start_of_line
792
- - def
793
-
794
- ##################### Rails ##################################
795
-
796
- Rails/ActionFilter:
797
- EnforcedStyle: action
798
- SupportedStyles:
799
- - action
800
- - filter
801
- Include:
802
- - app/controllers/**/*.rb
803
-
804
- Rails/Date:
805
- # The value `always` disallows usage of `Date.today`, `Date.current`,
806
- # `Date#to_time` etc.
807
- # The value `acceptable` allows usage of `Date.current`, `Date.yesterday`, etc
808
- # (but not `Date.today`) which are overriden by ActiveSupport to handle current
809
- # time zone.
810
- EnforcedStyle: always
811
- SupportedStyles:
812
- - always
813
- - acceptable
814
-
815
- Rails/DefaultScope:
816
- Include:
817
- - app/models/**/*.rb
818
-
819
- Rails/FindBy:
820
- Include:
821
- - app/models/**/*.rb
822
-
823
- Rails/FindEach:
824
- Include:
825
- - app/models/**/*.rb
826
-
827
- Rails/HasAndBelongsToMany:
828
- Include:
829
- - app/models/**/*.rb
830
-
831
- Rails/Output:
832
- Include:
833
- - app/**/*.rb
834
- - config/**/*.rb
835
- - db/**/*.rb
836
- - lib/**/*.rb
837
-
838
- Rails/ReadWriteAttribute:
839
- Include:
840
- - app/models/**/*.rb
841
-
842
- Rails/ScopeArgs:
843
- Include:
844
- - app/models/**/*.rb
845
-
846
- Rails/TimeZone:
847
- # The value `always` means that `Time` should be used with `zone`.
848
- # The value `acceptable` allows usage of `in_time_zone` instead of `zone`.
849
- EnforcedStyle: always
850
- SupportedStyles:
851
- - always
852
- - acceptable
853
-
854
- Rails/Validation:
855
- Include:
856
- - app/models/**/*.rb