rubocop-itsmycargo 0.1.9 → 0.2.4

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: 25db869248a113e54a5b1d363077c4a74ca546132ee7d759ff79ba8e22b4930e
4
- data.tar.gz: 680eb697e2d5a2e5c0acd0d89fd52230b6aa8aa5e70d67c6821830c7a21f2120
3
+ metadata.gz: 6150773ccc539b1839574bccfd699356e99018663220604efc74af7fee5063db
4
+ data.tar.gz: 7d7ced6bd7da3f178ac705297b8c622c091bc354501b069aff812f78302fc19a
5
5
  SHA512:
6
- metadata.gz: 54594a0be50d8247e34265c1793da4dc4877783afae4232f0fbe5fc46fd032637b045d11d44848dce26d4f8446798c69791fa03a6f794fac0a51c380ff972b3b
7
- data.tar.gz: 222f09f5aad2f9ea8c1983bd283050ac03e6765d086854d954ac4b569a15eac3f095e157d5320fb310adb39ffc242c0864242ac9792745ea6af7e3f1db88a9ed
6
+ metadata.gz: 8b8e33de82de64541488855880de1059eb6060e6f5f1846ae101008a79df399c5f9ec41d62d1b2917416434f762bc17aa96e04b0f2ee14f91a10d633721ed23b
7
+ data.tar.gz: 24625c573f46f6a9916ba4d2f0e9b0767a3e4d6be7bcc564b1e0dde078575c6661050d8ad57c59659bf06b294fba33c2b2d0839b0ec9ab2d62f39ea7d9d16ea8
@@ -1,2 +1,2 @@
1
1
  inherit_from:
2
- - config/default.yml
2
+ - config/base.yml
@@ -1,5 +1,13 @@
1
1
  ### Next
2
+ ### v0.2.4-alpha-alpha-alpha-rc-rc - 2020-05-12
3
+ ### v0.2.3-alpha-alpha-alpha-rc-rc - 2020-05-12
4
+ ### v0.2.2-alpha-alpha-alpha-rc-rc - 2020-05-06
5
+ ### v0.2.1-alpha-alpha-alpha-rc-rc - 2020-05-06
6
+ <<<<<<< HEAD
2
7
  ### v0.1.9-alpha-alpha-alpha-rc-rc - 2020-02-13
8
+ =======
9
+ ### v0.2.0-alpha-alpha-alpha-rc-rc - 2020-05-06
10
+ >>>>>>> bc0d7cb... v0.2.0
3
11
  ### v0.1.8-alpha-alpha-alpha-rc-rc - 2020-02-13
4
12
  ### v0.1.10-alpha-alpha-alpha-rc-rc - 2020-02-13
5
13
  ### v0.1.9-alpha-alpha-rc-rc - 2020-02-13
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bump/tasks'
4
- require 'bundler/gem_tasks'
5
- require 'rspec/core/rake_task'
3
+ require "bump/tasks"
4
+ require "bundler/gem_tasks"
5
+ require "rspec/core/rake_task"
6
6
 
7
7
  Bump.tag_by_default = true
8
8
  Bump.changelog = true
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'bundler/setup'
5
- require 'rubocop/itsmycargo'
4
+ require "bundler/setup"
5
+ require "rubocop/itsmycargo"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -11,5 +11,5 @@ require 'rubocop/itsmycargo'
11
11
  # require "pry"
12
12
  # Pry.start
13
13
 
14
- require 'irb'
14
+ require "irb"
15
15
  IRB.start(__FILE__)
@@ -0,0 +1,47 @@
1
+ inherit_mode:
2
+ merge:
3
+ - Exclude
4
+
5
+ require:
6
+ - rubocop-performance
7
+ - standard/cop/semantic_blocks
8
+
9
+ inherit_gem:
10
+ standard: config/base.yml
11
+
12
+ Layout/EmptyLinesAroundAttributeAccessor:
13
+ Enabled: true
14
+
15
+ Layout/SpaceAroundMethodCallOperator:
16
+ Enabled: true
17
+
18
+ # Allow longer line length for bigger screens
19
+ Layout/LineLength:
20
+ Max: 120
21
+ StyleGuide: 'https://github.com/itsmycargo/rubocop-itsmycargo/blob/master/docs/Guide.adoc#maximum-line-length'
22
+
23
+ Lint/RaiseException:
24
+ Enabled: true
25
+
26
+ Lint/StructNewOverride:
27
+ Enabled: true
28
+
29
+ Style/ExponentialNotation:
30
+ Enabled: true
31
+
32
+ Style/HashEachMethods:
33
+ Enabled: true
34
+
35
+ Style/HashTransformKeys:
36
+ Enabled: true
37
+
38
+ Style/HashTransformValues:
39
+ Enabled: true
40
+
41
+ # TODO: Enable with Ruby2.6
42
+ Style/SlicingWithRange:
43
+ Enabled: false
44
+
45
+ Style/Documentation:
46
+ Enabled: false
47
+ StyleGuide: 'https://github.com/itsmycargo/rubocop-itsmycargo/blob/master/docs/Guide.adoc#classmodule-documentation'
@@ -1,38 +1,2 @@
1
- require:
2
- - rubocop-performance
3
- - rubocop-rails
4
- - rubocop-rspec
5
-
6
- AllCops:
7
- TargetRubyVersion: 2.6
8
-
9
- # Allow longer line length for bigger screens
10
- Layout/LineLength:
11
- Max: 120
12
- StyleGuide: 'https://github.com/mikian/itsmycargo/blob/master/docs/Guide.adoc#maximum-line-length'
13
-
14
- Lint/UnusedMethodArgument:
15
- AllowUnusedKeywordArguments: true
16
-
17
- # Allow Ignoring filename requirements for initializers
18
- Naming/FileName:
19
- Exclude:
20
- - config/initializers/*.rb
21
- StyleGuide: 'https://github.com/mikian/itsmycargo/blob/master/docs/Guide.adoc#snake-case-files'
22
-
23
- Style/Documentation:
24
- Enabled: false
25
- StyleGuide: 'https://github.com/mikian/itsmycargo/blob/master/docs/Guide.adoc#classmodule-documentation'
26
-
27
- Style/MethodCalledOnDoEndBlock:
28
- Enabled: true
29
-
30
- # RSpec
31
- RSpec/MultipleExpectations:
32
- AggregateFailuresByDefault: true
33
-
34
- RSpec/ExampleLength:
35
- Max: 8
36
-
37
- RSpec/NestedGroups:
38
- Max: 4
1
+ inherit_from:
2
+ - ./legacy.yml
@@ -0,0 +1,5 @@
1
+ inherit_from:
2
+ - ./base.yml
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: 'single_quotes'
@@ -0,0 +1,202 @@
1
+ # Based on removed standard configuration:
2
+ # https://github.com/testdouble/standard/commit/94d133f477a5694084ac974d5ee01e8a66ce777e#diff-65478e10d5b2ef41c7293a110c0e6b7c
3
+
4
+ require:
5
+ - rubocop-rails
6
+
7
+ Naming/FileName:
8
+ Exclude:
9
+ - config/initializers/*.rb
10
+
11
+ Rails/ActionFilter:
12
+ Enabled: true
13
+ EnforcedStyle: action
14
+ Include:
15
+ - app/controllers/**/*.rb
16
+
17
+ Rails/ActiveRecordAliases:
18
+ Enabled: true
19
+
20
+ Rails/ActiveSupportAliases:
21
+ Enabled: true
22
+
23
+ Rails/ApplicationJob:
24
+ Enabled: true
25
+
26
+ Rails/ApplicationRecord:
27
+ Enabled: true
28
+
29
+ Rails/AssertNot:
30
+ Enabled: true
31
+ Include:
32
+ - '**/test/**/*'
33
+
34
+ Rails/Blank:
35
+ Enabled: true
36
+ # Convert usages of `nil? || empty?` to `blank?`
37
+ NilOrEmpty: true
38
+ # Convert usages of `!present?` to `blank?`
39
+ NotPresent: true
40
+ # Convert usages of `unless present?` to `if blank?`
41
+ UnlessPresent: true
42
+
43
+ Rails/BulkChangeTable:
44
+ Enabled: true
45
+ Database: null
46
+ Include:
47
+ - db/migrate/*.rb
48
+
49
+ Rails/CreateTableWithTimestamps:
50
+ Enabled: true
51
+ Include:
52
+ - db/migrate/*.rb
53
+
54
+ Rails/Date:
55
+ Enabled: true
56
+ EnforcedStyle: flexible
57
+
58
+ Rails/Delegate:
59
+ Enabled: true
60
+ EnforceForPrefixed: true
61
+
62
+ Rails/DelegateAllowBlank:
63
+ Enabled: true
64
+
65
+ Rails/DynamicFindBy:
66
+ Enabled: true
67
+ Whitelist:
68
+ - find_by_sql
69
+
70
+ Rails/EnumUniqueness:
71
+ Enabled: true
72
+ Include:
73
+ - app/models/**/*.rb
74
+
75
+ Rails/EnvironmentComparison:
76
+ Enabled: true
77
+
78
+ Rails/Exit:
79
+ Enabled: true
80
+ Include:
81
+ - app/**/*.rb
82
+ - config/**/*.rb
83
+ - lib/**/*.rb
84
+ Exclude:
85
+ - lib/**/*.rake
86
+
87
+ Rails/FilePath:
88
+ Enabled: true
89
+ EnforcedStyle: arguments
90
+
91
+ Rails/FindBy:
92
+ Enabled: true
93
+ Include:
94
+ - app/models/**/*.rb
95
+
96
+ Rails/FindEach:
97
+ Enabled: true
98
+ Include:
99
+ - app/models/**/*.rb
100
+
101
+ Rails/HasAndBelongsToMany:
102
+ Enabled: true
103
+ Include:
104
+ - app/models/**/*.rb
105
+
106
+ Rails/HttpPositionalArguments:
107
+ Enabled: true
108
+ Include:
109
+ - 'spec/**/*'
110
+ - 'test/**/*'
111
+
112
+ Rails/HttpStatus:
113
+ Enabled: true
114
+ EnforcedStyle: symbolic
115
+
116
+ Rails/InverseOf:
117
+ Enabled: true
118
+ Include:
119
+ - app/models/**/*.rb
120
+
121
+ Rails/LexicallyScopedActionFilter:
122
+ Enabled: true
123
+ Safe: false
124
+ Include:
125
+ - app/controllers/**/*.rb
126
+
127
+ Rails/NotNullColumn:
128
+ Enabled: true
129
+ Include:
130
+ - db/migrate/*.rb
131
+
132
+ Rails/Output:
133
+ Enabled: true
134
+ Include:
135
+ - app/**/*.rb
136
+ - config/**/*.rb
137
+ - db/**/*.rb
138
+ - lib/**/*.rb
139
+
140
+ Rails/OutputSafety:
141
+ Enabled: true
142
+
143
+ Rails/PluralizationGrammar:
144
+ Enabled: true
145
+
146
+ Rails/Presence:
147
+ Enabled: true
148
+
149
+ Rails/Present:
150
+ Enabled: true
151
+ NotNilAndNotEmpty: true
152
+ NotBlank: true
153
+ UnlessBlank: true
154
+
155
+ Rails/ReadWriteAttribute:
156
+ Enabled: true
157
+ Include:
158
+ - app/models/**/*.rb
159
+
160
+ Rails/RedundantReceiverInWithOptions:
161
+ Enabled: true
162
+
163
+ Rails/RefuteMethods:
164
+ Enabled: true
165
+ Include:
166
+ - '**/test/**/*'
167
+
168
+ Rails/RelativeDateConstant:
169
+ Enabled: true
170
+ AutoCorrect: false
171
+
172
+ Rails/RequestReferer:
173
+ Enabled: true
174
+ EnforcedStyle: referer
175
+
176
+ Rails/ReversibleMigration:
177
+ Enabled: true
178
+ Include:
179
+ - db/migrate/*.rb
180
+
181
+ Rails/SafeNavigation:
182
+ Enabled: true
183
+ ConvertTry: false
184
+
185
+ Rails/ScopeArgs:
186
+ Enabled: true
187
+ Include:
188
+ - app/models/**/*.rb
189
+
190
+ Rails/TimeZone:
191
+ Enabled: true
192
+ EnforcedStyle: flexible
193
+
194
+ Rails/UniqBeforePluck:
195
+ Enabled: true
196
+ EnforcedStyle: conservative
197
+ AutoCorrect: false
198
+
199
+ Rails/Validation:
200
+ Enabled: true
201
+ Include:
202
+ - app/models/**/*.rb
@@ -0,0 +1,50 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ RSpec/Focus:
5
+ Enabled: true
6
+
7
+ RSpec/EmptyExampleGroup:
8
+ Enabled: true
9
+
10
+ RSpec/EmptyLineAfterExampleGroup:
11
+ Enabled: true
12
+
13
+ RSpec/EmptyLineAfterFinalLet:
14
+ Enabled: true
15
+
16
+ RSpec/EmptyLineAfterHook:
17
+ Enabled: true
18
+
19
+ RSpec/EmptyLineAfterSubject:
20
+ Enabled: true
21
+
22
+ RSpec/HookArgument:
23
+ Enabled: true
24
+
25
+ RSpec/HooksBeforeExamples:
26
+ Enabled: true
27
+
28
+ RSpec/ImplicitExpect:
29
+ Enabled: true
30
+
31
+ RSpec/IteratedExpectation:
32
+ Enabled: true
33
+
34
+ RSpec/LetBeforeExamples:
35
+ Enabled: true
36
+
37
+ RSpec/MissingExampleGroupArgument:
38
+ Enabled: true
39
+
40
+ RSpec/ReceiveCounts:
41
+ Enabled: true
42
+
43
+ Capybara/CurrentPathExpectation:
44
+ Enabled: true
45
+
46
+ FactoryBot/AttributeDefinedStatically:
47
+ Enabled: true
48
+
49
+ FactoryBot/CreateList:
50
+ Enabled: true
@@ -2,11 +2,6 @@
2
2
 
3
3
  Limit lines to 120 characters.
4
4
 
5
- === Snake Case Files [[snake-case-files]]
6
-
7
- Use `snake_case` for naming files, e.g. `hello_world.rb`.
8
- For Rails initialisers this naming rule is not enforced.
9
-
10
5
  === Class/Module Documentation [[class-documentation]]
11
6
 
12
7
  Top-level classes and modules are not required to have documentation.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rubocop/itsmycargo/version'
3
+ require "rubocop/itsmycargo/version"
4
4
 
5
5
  module Rubocop
6
6
  module Itsmycargo
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubocop
4
4
  module Itsmycargo
5
- VERSION = '0.1.9'
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
@@ -1,38 +1,37 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'rubocop/itsmycargo/version'
5
+ require "rubocop/itsmycargo/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'rubocop-itsmycargo'
9
- spec.version = Rubocop::Itsmycargo::VERSION
10
- spec.authors = ['Mikko Kokkonen']
11
- spec.email = ['oss@itsmycargo.com']
8
+ spec.name = "rubocop-itsmycargo"
9
+ spec.version = Rubocop::Itsmycargo::VERSION
10
+ spec.authors = ["Mikko Kokkonen"]
11
+ spec.email = ["oss@itsmycargo.com"]
12
12
 
13
- spec.summary = 'RuboCop Styles and Configuration for ItsMyCargo.'
14
- spec.homepage = 'https://github.com/itsmycargo/rubocop-itsmycargo'
15
- spec.license = 'MIT'
13
+ spec.summary = "RuboCop Styles and Configuration for ItsMyCargo."
14
+ spec.homepage = "https://github.com/itsmycargo/rubocop-itsmycargo"
15
+ spec.license = "MIT"
16
16
 
17
- spec.metadata['homepage_uri'] = spec.homepage
18
- spec.metadata['source_code_uri'] = spec.homepage
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
19
 
20
20
  # Specify which files should be added to the gem when it is released.
21
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
22
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
23
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
24
  end
25
- spec.bindir = 'exe'
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ['lib']
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
28
 
29
- spec.add_dependency 'rubocop'
30
- spec.add_dependency 'rubocop-performance'
31
- spec.add_dependency 'rubocop-rails'
32
- spec.add_dependency 'rubocop-rspec'
29
+ spec.add_dependency "rubocop-rails"
30
+ spec.add_dependency "rubocop-rspec"
31
+ spec.add_dependency "standard", "~> 0.4.1"
33
32
 
34
- spec.add_development_dependency 'bump', '~> 0.9'
35
- spec.add_development_dependency 'bundler', '~> 2.1'
36
- spec.add_development_dependency 'rake', '~> 13.0'
37
- spec.add_development_dependency 'rspec', '~> 3.0'
33
+ spec.add_development_dependency "bump", "~> 0.9"
34
+ spec.add_development_dependency "bundler", "~> 2.1"
35
+ spec.add_development_dependency "rake", "~> 13.0"
36
+ spec.add_development_dependency "rspec", "~> 3.0"
38
37
  end
metadata CHANGED
@@ -1,31 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-itsmycargo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikko Kokkonen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-13 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rubocop
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rubocop-performance
14
+ name: rubocop-rails
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - ">="
@@ -39,7 +25,7 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
- name: rubocop-rails
28
+ name: rubocop-rspec
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - ">="
@@ -53,19 +39,19 @@ dependencies:
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
- name: rubocop-rspec
42
+ name: standard
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ">="
45
+ - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '0'
47
+ version: 0.4.1
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ">="
52
+ - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: 0.4.1
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: bump
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -129,7 +115,6 @@ executables: []
129
115
  extensions: []
130
116
  extra_rdoc_files: []
131
117
  files:
132
- - ".github/workflows/bump.yml"
133
118
  - ".gitignore"
134
119
  - ".rspec"
135
120
  - ".rubocop.yml"
@@ -141,7 +126,11 @@ files:
141
126
  - Rakefile
142
127
  - bin/console
143
128
  - bin/setup
129
+ - config/base.yml
144
130
  - config/default.yml
131
+ - config/legacy.yml
132
+ - config/rails.yml
133
+ - config/rspec.yml
145
134
  - docs/Guide.adoc
146
135
  - lib/rubocop/itsmycargo.rb
147
136
  - lib/rubocop/itsmycargo/version.rb
@@ -1,50 +0,0 @@
1
- name: Ruby Gems
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
-
8
- jobs:
9
- build:
10
- name: Build & Publish
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v2
15
- - uses: actions/setup-ruby@v1
16
- with:
17
- ruby-version: '2.7'
18
- - run: |
19
- git config --local user.email "dev-services@itsmycargo.com"
20
- git config --local user.name "ItsMyCargo"
21
- - run: bundle
22
- - run: rake bump:patch
23
- - run: git push --follow-tags
24
-
25
- - name: Publish to RubyGems
26
- run: |
27
- mkdir -p $HOME/.gem
28
- touch $HOME/.gem/credentials
29
- chmod 0600 $HOME/.gem/credentials
30
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
31
- gem build *.gemspec
32
- gem push *.gem
33
- env:
34
- GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
35
-
36
- - name: Publish to GitHub Package Registry
37
- run: |
38
- mkdir -p $HOME/.gem
39
- touch $HOME/.gem/credentials
40
- chmod 0600 $HOME/.gem/credentials
41
- printf -- "---\n:github: Bearer ${GH_TOKEN}\n" > $HOME/.gem/credentials
42
- gem build *.gemspec
43
- gem push --key github --host https://rubygems.pkg.github.com/itsmycargo *.gem
44
- env:
45
- GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
46
-
47
- - name: Trigger Wolfhound Build
48
- run: curl -s -XPOST "${WEBHOOK_URL}"
49
- env:
50
- WEBHOOK_URL: ${{secrets.DOCKER_WEBHOOK}}