rubocop-nosolosoftware 0.4.0 → 0.5.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
2
  SHA256:
3
- metadata.gz: 6128021ffbbe9bad9b46793bad82a191cdd2bb8bc62ed02747f0cd9982b16f03
4
- data.tar.gz: 2b578eb02a6fce277514a47eea84ea40c9a92bddd70ca9ad2b6f87aeff122547
3
+ metadata.gz: be651a56847d606edfb463d7eb40df524b4bd442b2f82ddd91280dc65a043bab
4
+ data.tar.gz: 537fee6664ba0550276c2ffc7ae973c66d6630649c2dea68ea9d2a8d1b72f4f4
5
5
  SHA512:
6
- metadata.gz: f27f91a6732fbb9902c60018a47658cccb203f425df0921f8f47fba15ec43bc20642897a663851eb4431c5765f66d574c111da363e767cd89aa4d2d45cc8bf96
7
- data.tar.gz: a2858b1f301575cc7e58216522752edeba243b47b0a24e7a328f9e9913ea7d908eee0a09fdb3c560d9981ef5ee66c41f063574c6f333efa2771aa999a5e3f471
6
+ metadata.gz: 57a402c9eaf0a77d7047433d6ded777e2b6183b9c2aeb35bb873bca80111f102b076e1734ceaf404589f5ab497c375e35be8f396b7747719baba193c1669de35
7
+ data.tar.gz: f59972379f74a613d139bba332e27977e0297bbff19c6a1a4912f2b8f61f089b96020c57f0440e08387879569fde7415323d92808abfab1bcb98633aa00444f6
@@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.5.0 - 2020-07-07
8
9
 
10
+ ### Changed
11
+ - Actualizadas reglas
9
12
 
10
13
  ## 0.4.0 - 2020-02-26
11
14
 
data/README.md CHANGED
@@ -26,16 +26,16 @@ $ gem install rubocop-nosolosoftware
26
26
 
27
27
  ## Usage
28
28
 
29
- Include the following in your `.rubocop.yml`:
29
+ Include the following in your `.rubocop.yml`
30
30
 
31
- **For Ruby**
31
+ **For Ruby**:
32
32
 
33
33
  ```yaml
34
34
  inherit_gem:
35
35
  rubocop-nosolosoftware: rubocop-default.yml
36
36
  ```
37
37
 
38
- **For Rails**
38
+ **For Rails**:
39
39
 
40
40
  ```yaml
41
41
  inherit_gem:
@@ -44,7 +44,7 @@ inherit_gem:
44
44
  - rubocop-rails.yml
45
45
  ```
46
46
 
47
- **Optional Rake and Rspec rules**
47
+ **Optional Rake and Rspec rules**:
48
48
 
49
49
  ```yaml
50
50
  inherit_gem:
@@ -55,6 +55,30 @@ inherit_gem:
55
55
  - rubocop-rspec.yml
56
56
  ```
57
57
 
58
+ **For Mongoid projects**:
59
+
60
+ ```yaml
61
+ inherit_gem:
62
+ rubocop-nosolosoftware:
63
+ - rubocop-default.yml
64
+ - rubocop-rails.yml
65
+ - rubocop-rake.yml
66
+ - rubocop-rspec.yml
67
+ - rubocop-mongoid.yml
68
+ ```
69
+
70
+
71
+ ### Inheritance of array attributes
72
+
73
+ Don't forget to include the following in your configuration file:
74
+
75
+ ```yaml
76
+ inherit_mode:
77
+ merge:
78
+ - Exclude
79
+ - Prefixes
80
+ ```
81
+
58
82
 
59
83
  ## Contributing
60
84
 
@@ -72,4 +96,4 @@ be a safe, welcoming space for collaboration, and contributors are expected to a
72
96
 
73
97
  ## License
74
98
 
75
- Copyright (c) 2019-2020 NoSoloSoftware Network S.L. - Released under [MIT](LICENSE) license
99
+ Copyright (c) 2019-2020 NoSoloSoftware Network S.L. - Released under [MIT](LICENSE) license.
@@ -1,7 +1,3 @@
1
1
  #
2
2
  ## https://rubocop.readthedocs.io/en/latest/cops_bundler/
3
3
  #
4
-
5
- # https://rubocop.readthedocs.io/en/latest/cops_bundler/#bundlerorderedgems
6
- Bundler/OrderedGems:
7
- Enabled: false
@@ -2,6 +2,14 @@
2
2
  ## https://rubocop.readthedocs.io/en/latest/cops_layout/
3
3
  #
4
4
 
5
+ # https://docs.rubocop.org/en/stable/cops_layout/#layoutemptylinesaroundattributeaccessor
6
+ Layout/EmptyLinesAroundAttributeAccessor:
7
+ Enabled: true
8
+
9
+ # https://docs.rubocop.org/en/stable/cops_layout/#layoutspacearoundmethodcalloperator
10
+ Layout/SpaceAroundMethodCallOperator:
11
+ Enabled: true
12
+
5
13
  # https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutfirstarrayelementindentation
6
14
  Layout/FirstArrayElementIndentation:
7
15
  EnforcedStyle: consistent
@@ -10,6 +18,10 @@ Layout/FirstArrayElementIndentation:
10
18
  Layout/LineLength:
11
19
  Max: 100
12
20
 
21
+ # https://rubocop.readthedocs.io/en/stable/cops_layout/#layoutmultilinemethodcallindentation
22
+ Layout/MultilineMethodCallIndentation:
23
+ EnforcedStyle: indented_relative_to_receiver
24
+
13
25
  # https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutspacearoundequalsinparameterdefault
14
26
  Layout/SpaceAroundEqualsInParameterDefault:
15
27
  EnforcedStyle: no_space
@@ -1,3 +1,11 @@
1
1
  #
2
2
  ## https://rubocop.readthedocs.io/en/latest/cops_lint/
3
3
  #
4
+
5
+ # https://docs.rubocop.org/en/stable/cops_lint/#lintraiseexception
6
+ Lint/RaiseException:
7
+ Enabled: true
8
+
9
+ # https://docs.rubocop.org/en/stable/cops_lint/#lintstructnewoverride
10
+ Lint/StructNewOverride:
11
+ Enabled: true
@@ -0,0 +1,7 @@
1
+ #
2
+ ## Rubocop cops for Mongoid projects
3
+ #
4
+
5
+ # https://docs.rubocop.org/projects/rails/en/latest/cops_rails/#railsfindeach
6
+ Rails/FindEach:
7
+ Enabled: false
@@ -9,33 +9,36 @@ Rails:
9
9
 
10
10
  # https://docs.rubocop.org/projects/rails/en/latest/cops_rails/#railshttpstatus
11
11
  Rails/HttpStatus:
12
- Enabled: false
12
+ EnforcedStyle: numeric
13
13
 
14
- # https://docs.rubocop.org/projects/rails/en/latest/cops_rails/#railshasandbelongstomany
15
- Rails/HasAndBelongsToMany:
16
- Enabled: false
17
-
18
- # https://docs.rubocop.org/projects/rails/en/latest/cops_rails/#railsfindby
19
- Rails/FindBy:
20
- Enabled: false
14
+ # https://rubocop-rails.readthedocs.io/en/stable/cops_rails/#railsrakeenvironment
15
+ Rails/RakeEnvironment:
16
+ Exclude:
17
+ - "**/lib/tasks/auto_annotate_models.rake"
21
18
 
22
19
  AllCops:
23
20
  Exclude:
24
- - "**/db/schema.rb"
25
21
  - "**/bin/**/*"
22
+ - "**/db/schema.rb"
23
+
24
+ # https://rubocop.readthedocs.io/en/stable/cops_layout/#layouthashalignment
25
+ Layout/HashAlignment:
26
+ Exclude:
27
+ - "**/lib/tasks/auto_annotate_models.rake"
26
28
 
27
29
  # https://rubocop.readthedocs.io/en/latest/cops_metrics/#metricsblocklength
28
30
  Metrics/BlockLength:
29
31
  Exclude:
30
- - "**/spec/**/*.rb"
31
- - "**/config/routes.rb"
32
32
  - "**/config/environments/*.rb"
33
+ - "**/config/routes.rb"
34
+ - "**/lib/tasks/auto_annotate_models.rake"
35
+ - "**/spec/**/*.rb"
33
36
 
34
37
  # https://rubocop.readthedocs.io/en/latest/cops_metrics/#metricsmodulelength
35
38
  Metrics/ModuleLength:
36
39
  Exclude:
37
- - "**/spec/**/*.rb"
38
40
  - "**/config/routes.rb"
41
+ - "**/spec/**/*.rb"
39
42
 
40
43
  # https://www.rubocop.org/en/stable/cops_naming/#namingfilename
41
44
  Naming/FileName:
@@ -1 +1,6 @@
1
1
  require: rubocop-rake
2
+
3
+ # https://github.com/rubocop-hq/rubocop-rake/blob/master/lib/rubocop/cop/rake/desc.rb
4
+ Rake/Desc:
5
+ Exclude:
6
+ - "**/lib/tasks/auto_annotate_models.rake"
@@ -4,6 +4,40 @@
4
4
 
5
5
  require: rubocop-rspec
6
6
 
7
+ # https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspeccontextwording
8
+ RSpec/ContextWording:
9
+ Prefixes:
10
+ - and
11
+
12
+ # https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspecdescribeclass
13
+ RSpec/DescribeClass:
14
+ Exclude:
15
+ - "**/spec/requests/**/*.rb"
16
+ - "**/spec/system/**/*.rb"
17
+ - "**/spec/features/**/*.rb"
18
+
19
+ # https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspecexamplelength
20
+ RSpec/ExampleLength:
21
+ Exclude:
22
+ - "**/spec/requests/**/*.rb"
23
+ - "**/spec/system/**/*.rb"
24
+ - "**/spec/features/**/*.rb"
25
+
26
+ # https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspecimplicitsubject
27
+ RSpec/ImplicitSubject:
28
+ EnforcedStyle: single_statement_only
29
+
30
+ # https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspecmultipleexpectations
31
+ RSpec/MultipleExpectations:
32
+ Exclude:
33
+ - "**/spec/requests/**/*.rb"
34
+ - "**/spec/system/**/*.rb"
35
+ - "**/spec/features/**/*.rb"
36
+
37
+ # https://rubocop-rspec.readthedocs.io/en/latest/cops_rspec/#rspecnestedgroups
38
+ RSpec/NestedGroups:
39
+ Max: 5
40
+
7
41
  # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockcomments
8
42
  Style/BlockComments:
9
43
  Exclude:
@@ -6,34 +6,38 @@
6
6
  Style/AsciiComments:
7
7
  Enabled: false
8
8
 
9
- # https://rubocop.readthedocs.io/en/latest/cops_style/#styledatetime
10
- Style/DateTime:
11
- Enabled: false
9
+ # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockdelimiters
10
+ Style/BlockDelimiters:
11
+ EnforcedStyle: braces_for_chaining
12
12
 
13
13
  # https://rubocop.readthedocs.io/en/latest/cops_style/#styledocumentation
14
14
  Style/Documentation:
15
15
  Enabled: false
16
16
 
17
- # https://rubocop.readthedocs.io/en/latest/cops_style/#styleemptymethod
18
- Style/EmptyMethod:
19
- Enabled: false
20
-
21
- # https://rubocop.readthedocs.io/en/latest/cops_style/#styleformatstringtoken
22
- Style/FormatStringToken:
23
- Enabled: false
17
+ # https://docs.rubocop.org/en/stable/cops_style/#styleexponentialnotation
18
+ Style/ExponentialNotation:
19
+ Enabled: true
24
20
 
25
21
  # https://rubocop.readthedocs.io/en/latest/cops_style/#stylefrozenstringliteralcomment
26
22
  Style/FrozenStringLiteralComment:
27
23
  Enabled: false
28
24
 
29
- # https://rubocop.readthedocs.io/en/latest/cops_style/#stylemutableconstant
30
- Style/MutableConstant:
31
- Enabled: false
25
+ # https://docs.rubocop.org/en/stable/cops_style/#stylehasheachmethods
26
+ Style/HashEachMethods:
27
+ Enabled: true
28
+
29
+ # https://docs.rubocop.org/en/stable/cops_style/#stylehashtransformkeys
30
+ Style/HashTransformKeys:
31
+ Enabled: true
32
+
33
+ # https://docs.rubocop.org/en/stable/cops_style/#stylehashtransformvalues
34
+ Style/HashTransformValues:
35
+ Enabled: true
32
36
 
33
37
  # https://rubocop.readthedocs.io/en/latest/cops_style/#styleregexpliteral
34
38
  Style/RegexpLiteral:
35
- Enabled: false
39
+ AllowInnerSlashes: true
36
40
 
37
- # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockdelimiters
38
- Style/BlockDelimiters:
39
- EnforcedStyle: braces_for_chaining
41
+ # https://docs.rubocop.org/en/stable/cops_style/#styleslicingwithrange
42
+ Style/SlicingWithRange:
43
+ Enabled: true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-nosolosoftware
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Aranda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-26 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.78'
19
+ version: '0.83'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.78'
26
+ version: '0.83'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.4'
47
+ version: '2.5'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.4'
54
+ version: '2.5'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop-rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.37'
75
+ version: '1.39'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.37'
82
+ version: '1.39'
83
83
  description: ''
84
84
  email: jaranda@nosolosoftware.es
85
85
  executables: []
@@ -98,6 +98,7 @@ files:
98
98
  - rubocop-layout.yml
99
99
  - rubocop-lint.yml
100
100
  - rubocop-metrics.yml
101
+ - rubocop-mongoid.yml
101
102
  - rubocop-naming.yml
102
103
  - rubocop-performance.yml
103
104
  - rubocop-rails.yml
@@ -109,8 +110,8 @@ homepage: https://github.com/nosolosoftware/rubocop-nosolosoftware
109
110
  licenses:
110
111
  - MIT
111
112
  metadata:
112
- source_code_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/tree/v0.4.0
113
- changelog_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/blob/v0.4.0/CHANGELOG.md
113
+ source_code_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/tree/v0.5.0
114
+ changelog_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/blob/v0.5.0/CHANGELOG.md
114
115
  homepage_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware
115
116
  post_install_message:
116
117
  rdoc_options: