the_bath_of_zahn 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +0 -8
- data/Rakefile +0 -2
- data/config/internal/overrides.yml +3 -0
- data/lib/the_bath_of_zahn/utility/extractor.rb +0 -5
- data/the_bath_of_zahn.gemspec +3 -2
- metadata +4 -6
- data/config/internal/rails_style_guide.yml +0 -60
- data/config/rubocop-rails.yml +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7d1ab31f2b119ca8cd4acfdb1474f71cecb979370b430a7f608ea42e46a78883
|
4
|
+
data.tar.gz: d7dd78cd2447a40d6f7478f072c736bbacd881206695750628da36a1122e3461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ffb4eaba798a4a647c2b2eebcbf6cddcca72e8b6e2a0627f25c130b1140bc5237d2b0ceea829f4f737d0b50e5ce6f4fd16297f2b52c962b0a4f73c688a4a4ca
|
7
|
+
data.tar.gz: 56a5e724140091b4e097c9b5152b75cc1edc0f3838d207eaec503d79781073f682209db1952722575deac7f9f2518d4853d9c42d42a1de7206f889027ea0483a
|
data/README.md
CHANGED
@@ -36,14 +36,6 @@ Or install it yourself as:
|
|
36
36
|
|
37
37
|
Create a `.rubocop.yml` file in your repository with the following contents
|
38
38
|
|
39
|
-
```yaml
|
40
|
-
inherit_gem:
|
41
|
-
the_bath_of_zahn: config/rubocop-rails.yml
|
42
|
-
```
|
43
|
-
|
44
|
-
Or, if you are not working on a Rails project, there's a non-Rails configuration
|
45
|
-
as well.
|
46
|
-
|
47
39
|
```yaml
|
48
40
|
inherit_gem:
|
49
41
|
the_bath_of_zahn: config/rubocop.yml
|
data/Rakefile
CHANGED
@@ -2,7 +2,6 @@ require "bundler/gem_tasks"
|
|
2
2
|
|
3
3
|
task :test do
|
4
4
|
system %(rubocop -c config/rubocop.yml)
|
5
|
-
system %(rubocop -c config/rubocop-rails.yml)
|
6
5
|
end
|
7
6
|
|
8
7
|
task :fix do
|
@@ -17,7 +16,6 @@ task :extract do
|
|
17
16
|
|
18
17
|
Dir.chdir("config/internal") do
|
19
18
|
File.write("style_guide.yml", extract.rules_plain.to_yaml)
|
20
|
-
File.write("rails_style_guide.yml", extract.rules_rails.to_yaml)
|
21
19
|
end
|
22
20
|
end
|
23
21
|
|
@@ -1,11 +1,6 @@
|
|
1
1
|
module TheBathOfZahn
|
2
2
|
module Utility
|
3
3
|
class Extractor
|
4
|
-
def rules_rails
|
5
|
-
@rules_rails ||=
|
6
|
-
rules_styleguide.select { |key, _value| key =~ %r{^Rails/} }
|
7
|
-
end
|
8
|
-
|
9
4
|
def rules_plain
|
10
5
|
@rules_plain ||=
|
11
6
|
rules_styleguide.reject { |key, _value| key =~ %r{^Rails/} }
|
data/the_bath_of_zahn.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "the_bath_of_zahn"
|
3
|
-
spec.version = "0.0.
|
3
|
+
spec.version = "0.0.6"
|
4
4
|
spec.authors = ["Zach Ahn"]
|
5
5
|
spec.email = ["engineering@zachahn.com"]
|
6
6
|
|
@@ -19,5 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_development_dependency "bundler", "~> 1.15"
|
20
20
|
spec.add_development_dependency "rake", "~> 10.0"
|
21
21
|
spec.add_development_dependency "minitest", "~> 5.0"
|
22
|
-
|
22
|
+
|
23
|
+
spec.add_runtime_dependency "rubocop", "~> 0.52.0"
|
23
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_bath_of_zahn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Ahn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.52.0
|
62
|
-
type: :
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
@@ -84,9 +84,7 @@ files:
|
|
84
84
|
- bin/rubocop
|
85
85
|
- bin/setup
|
86
86
|
- config/internal/overrides.yml
|
87
|
-
- config/internal/rails_style_guide.yml
|
88
87
|
- config/internal/style_guide.yml
|
89
|
-
- config/rubocop-rails.yml
|
90
88
|
- config/rubocop.yml
|
91
89
|
- lib/the_bath_of_zahn/utility/extractor.rb
|
92
90
|
- the_bath_of_zahn.gemspec
|
@@ -110,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
108
|
version: '0'
|
111
109
|
requirements: []
|
112
110
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.6
|
111
|
+
rubygems_version: 2.7.6
|
114
112
|
signing_key:
|
115
113
|
specification_version: 4
|
116
114
|
summary: Some rubocop configs I like
|
@@ -1,60 +0,0 @@
|
|
1
|
-
---
|
2
|
-
Rails/DynamicFindBy:
|
3
|
-
Description: Use `find_by` instead of dynamic `find_by_*`.
|
4
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
|
5
|
-
Enabled: true
|
6
|
-
Whitelist:
|
7
|
-
- find_by_sql
|
8
|
-
Rails/FindBy:
|
9
|
-
Description: Prefer find_by over where.first.
|
10
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
|
11
|
-
Enabled: true
|
12
|
-
Include:
|
13
|
-
- app/models/**/*.rb
|
14
|
-
Rails/FindEach:
|
15
|
-
Description: Prefer all.find_each over all.find.
|
16
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#find-each
|
17
|
-
Enabled: true
|
18
|
-
Include:
|
19
|
-
- app/models/**/*.rb
|
20
|
-
Rails/HasAndBelongsToMany:
|
21
|
-
Description: Prefer has_many :through to has_and_belongs_to_many.
|
22
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#has-many-through
|
23
|
-
Enabled: true
|
24
|
-
Include:
|
25
|
-
- app/models/**/*.rb
|
26
|
-
Rails/HasManyOrHasOneDependent:
|
27
|
-
Description: Define the dependent option to the has_many and has_one associations.
|
28
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#has_many-has_one-dependent-option
|
29
|
-
Enabled: true
|
30
|
-
Include:
|
31
|
-
- app/models/**/*.rb
|
32
|
-
Rails/LexicallyScopedActionFilter:
|
33
|
-
Description: Checks that methods specified in the filter's `only` or `except` options
|
34
|
-
are explicitly defined in the controller.
|
35
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#lexically-scoped-action-filter
|
36
|
-
Enabled: true
|
37
|
-
Include:
|
38
|
-
- app/controllers/**/*.rb
|
39
|
-
Rails/ReadWriteAttribute:
|
40
|
-
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
41
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#read-attribute
|
42
|
-
Enabled: true
|
43
|
-
Include:
|
44
|
-
- app/models/**/*.rb
|
45
|
-
Rails/ReversibleMigration:
|
46
|
-
Description: Checks whether the change method of the migration file is reversible.
|
47
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#reversible-migration
|
48
|
-
Reference: http://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html
|
49
|
-
Enabled: true
|
50
|
-
Include:
|
51
|
-
- db/migrate/*.rb
|
52
|
-
Rails/TimeZone:
|
53
|
-
Description: Checks the correct usage of time zone aware methods.
|
54
|
-
StyleGuide: https://github.com/bbatsov/rails-style-guide#time
|
55
|
-
Reference: http://danilenko.org/2012/7/6/rails_timezones
|
56
|
-
Enabled: true
|
57
|
-
EnforcedStyle: flexible
|
58
|
-
SupportedStyles:
|
59
|
-
- strict
|
60
|
-
- flexible
|
data/config/rubocop-rails.yml
DELETED