the_bath_of_zahn 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +75 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/rubocop +18 -0
- data/bin/setup +8 -0
- data/rubocop-rails.yml +5 -0
- data/rubocop.yml +73 -0
- data/the_bath_of_zahn.gemspec +25 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: '069ad0b69a8585f8c5bb875dfab2ef4883c0225c'
|
4
|
+
data.tar.gz: d66363a119021ef3e58cab94f1ef93b60b5d3a66
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4ded93bfc51d7c0d90c19c929bc3b51b8277108a1e13f2874ef3cc4ae04d476f52977d8680c30bb855b26796fa26f17c5faf20acf0ba04e0e45aa60856fd0a8d
|
7
|
+
data.tar.gz: 306bcf821e2aa1e728236444af86eecb421488b4417c9bc979805da8daded005fde6d5d087e2980d745f73ad71ee37c7446de77c8a9eafde665dd969a2b107a5
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Zach Ahn
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# The Bath of Zahn
|
2
|
+
|
3
|
+
These are some Rubocop configurations that I use in my personal projects.
|
4
|
+
I created this gem when it became difficult to synchronize these rules between
|
5
|
+
the several projects I work on.
|
6
|
+
|
7
|
+
Many of the rules were defined for Rails applications; files such as
|
8
|
+
`db/schema.rb` are ignored since they are automatically generated, and
|
9
|
+
tests/specs can have as many lines as desired.
|
10
|
+
|
11
|
+
The rules here were generally guided by a few principles:
|
12
|
+
|
13
|
+
1. Prefer what the Ruby community seems to follow as a whole
|
14
|
+
1. Prefer rules which make it easier to collaborate
|
15
|
+
1. Avoid unnecessarily changing default behavior
|
16
|
+
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Add this line to your application's Gemfile:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
gem "the_bath_of_zahn"
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
$ bundle
|
29
|
+
|
30
|
+
Or install it yourself as:
|
31
|
+
|
32
|
+
$ gem install the_bath_of_zahn
|
33
|
+
|
34
|
+
|
35
|
+
## Usage
|
36
|
+
|
37
|
+
Create a `.rubocop.yml` file in your repository with the following contents
|
38
|
+
|
39
|
+
```yaml
|
40
|
+
inherit_gem:
|
41
|
+
the_bath_of_zahn: 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
|
+
```yaml
|
48
|
+
inherit_gem:
|
49
|
+
the_bath_of_zahn: rubocop.yml
|
50
|
+
```
|
51
|
+
|
52
|
+
|
53
|
+
## Development
|
54
|
+
|
55
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
56
|
+
`rake test` to run the tests. You can also run `bin/console` for an interactive
|
57
|
+
prompt that will allow you to experiment.
|
58
|
+
|
59
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
60
|
+
release a new version, update the version number in `version.rb`, and then run
|
61
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
62
|
+
git commits and tags, and push the `.gem` file to
|
63
|
+
[rubygems.org](https://rubygems.org).
|
64
|
+
|
65
|
+
|
66
|
+
## Contributing
|
67
|
+
|
68
|
+
Bug reports, pull requests, and suggestions are all welcome on GitHub at
|
69
|
+
https://github.com/zachahn/the_bath_of_zahn.
|
70
|
+
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the
|
75
|
+
[MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "the_bath_of_zahn"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/rubocop
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
require "rubygems"
|
16
|
+
require "bundler/setup"
|
17
|
+
|
18
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bin/setup
ADDED
data/rubocop-rails.yml
ADDED
data/rubocop.yml
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
Exclude:
|
4
|
+
- db/schema.rb
|
5
|
+
|
6
|
+
Bundler/OrderedGems:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Layout/AlignHash:
|
10
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
11
|
+
|
12
|
+
Layout/AlignParameters:
|
13
|
+
EnforcedStyle: with_fixed_indentation
|
14
|
+
|
15
|
+
Layout/ExtraSpacing:
|
16
|
+
AllowForAlignment: false
|
17
|
+
|
18
|
+
Layout/MultilineMethodCallIndentation:
|
19
|
+
EnforcedStyle: indented_relative_to_receiver
|
20
|
+
|
21
|
+
Layout/SpaceInLambdaLiteral:
|
22
|
+
EnforcedStyle: require_space
|
23
|
+
|
24
|
+
Metrics/AbcSize:
|
25
|
+
Exclude:
|
26
|
+
- test/**/*_test.rb
|
27
|
+
|
28
|
+
Metrics/LineLength:
|
29
|
+
Exclude:
|
30
|
+
- db/migrate/**/*
|
31
|
+
IgnoredPatterns:
|
32
|
+
- !ruby/regexp /^\s*#/
|
33
|
+
|
34
|
+
Metrics/BlockLength:
|
35
|
+
Exclude:
|
36
|
+
- config/initializers/**/*
|
37
|
+
- config/environments/**/*
|
38
|
+
- lib/tasks/**/*.rake
|
39
|
+
|
40
|
+
Metrics/MethodLength:
|
41
|
+
Exclude:
|
42
|
+
- test/**/*_test.rb
|
43
|
+
- db/migrate/**/*
|
44
|
+
|
45
|
+
Style/AsciiComments:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Style/Documentation:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/EmptyMethod:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/FrozenStringLiteralComment:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Style/GuardClause:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
Style/IfUnlessModifier:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/NegatedIf:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
Style/StringLiterals:
|
67
|
+
EnforcedStyle: double_quotes
|
68
|
+
|
69
|
+
Style/StringLiteralsInInterpolation:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Style/TrailingCommaInLiteral:
|
73
|
+
EnforcedStyleForMultiline: comma
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "the_bath_of_zahn"
|
5
|
+
spec.version = "0.0.1"
|
6
|
+
spec.authors = ["Zach Ahn"]
|
7
|
+
spec.email = ["engineering@zachahn.com"]
|
8
|
+
|
9
|
+
spec.summary = "Some rubocop configs I like"
|
10
|
+
spec.description = \
|
11
|
+
"These are some Rubocop configs that I use in my new personal projects"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
15
|
+
f.match(%r{^(test|spec|features)/})
|
16
|
+
end
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
24
|
+
spec.add_development_dependency "rubocop"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: the_bath_of_zahn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Zach Ahn
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: These are some Rubocop configs that I use in my new personal projects
|
70
|
+
email:
|
71
|
+
- engineering@zachahn.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/console
|
83
|
+
- bin/rubocop
|
84
|
+
- bin/setup
|
85
|
+
- rubocop-rails.yml
|
86
|
+
- rubocop.yml
|
87
|
+
- the_bath_of_zahn.gemspec
|
88
|
+
homepage:
|
89
|
+
licenses:
|
90
|
+
- MIT
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 2.6.8
|
109
|
+
signing_key:
|
110
|
+
specification_version: 4
|
111
|
+
summary: Some rubocop configs I like
|
112
|
+
test_files: []
|