rt_rubocop_defaults 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CODE_OF_CONDUCT.md +69 -0
- data/{LICENSE.txt → LICENSE} +1 -1
- data/README.md +24 -22
- data/config/default.yml +27 -16
- data/lib/rt_rubocop_defaults/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9dc6c3dfa51888bfe56ef946e32d74e90aea467476376a9f21d1aa79b366a88a
|
4
|
+
data.tar.gz: 949711b52db28db163faeaabb10d48db7153882711d6d5a50c862f9f57ca32c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e80972c51d620615dfcac572d5912db0f7eef3465975cd664c6794c3035ab608686f4dd71f180426785166a0a954e83e90b4b6eb83ac375e0e4532d73d6b20a
|
7
|
+
data.tar.gz: 62a871828a52ab38b70d0a8e1386c13d194a0b6bee7134a4e33a1751d2b06db406c20169552b47fb5bb19e47785a87e7048115eb590d21ca58beda900f36560c
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
58
|
+
faith may face temporary or permanent repercussions as determined by other
|
59
|
+
members of the project's leadership.
|
60
|
+
|
61
|
+
## Attribution
|
62
|
+
|
63
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
64
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
65
|
+
|
66
|
+
[homepage]: https://www.contributor-covenant.org
|
67
|
+
|
68
|
+
For answers to common questions about this code of conduct, see
|
69
|
+
https://www.contributor-covenant.org/faq
|
data/{LICENSE.txt → LICENSE}
RENAMED
data/README.md
CHANGED
@@ -1,16 +1,14 @@
|
|
1
|
-
#
|
1
|
+
# RtRubocopDefaults
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Inspired by how [rubocop-rspec](https://github.com/backus/rubocop-rspec) delivers and injects it's configuration.
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/rt_rubocop_defaults.svg)][rubygems]
|
6
4
|
|
5
|
+
Opinionated and sharable default rubocop config used at [runtastic](https://runtastic.com).
|
7
6
|
|
8
7
|
## Installation
|
9
|
-
|
10
8
|
Add this line to your application's Gemfile:
|
11
9
|
|
12
10
|
```ruby
|
13
|
-
gem 'rt_rubocop_defaults',
|
11
|
+
gem 'rt_rubocop_defaults', require: false
|
14
12
|
```
|
15
13
|
|
16
14
|
And then execute:
|
@@ -21,19 +19,21 @@ Or install it yourself as:
|
|
21
19
|
|
22
20
|
$ gem install rt_rubocop_defaults
|
23
21
|
|
24
|
-
##
|
22
|
+
## Configuration
|
25
23
|
|
26
|
-
You need to tell RuboCop to load the
|
24
|
+
You need to tell RuboCop to load the defaults from this gem. There are two ways
|
25
|
+
to do this:
|
27
26
|
|
28
27
|
### RuboCop configuration file
|
29
28
|
|
30
|
-
Put this into your .rubocop.yml
|
29
|
+
Put this into your .rubocop.yml:
|
31
30
|
|
32
31
|
```yml
|
33
32
|
require: rt_rubocop_defaults
|
34
33
|
```
|
35
34
|
|
36
|
-
Now you can run rubocop and it will automatically load the RuboCop
|
35
|
+
Now you can run rubocop and it will automatically load the RuboCop defaults
|
36
|
+
together with the standard cops.
|
37
37
|
|
38
38
|
### Command line
|
39
39
|
|
@@ -41,22 +41,24 @@ Now you can run rubocop and it will automatically load the RuboCop RSpec cops to
|
|
41
41
|
rubocop --require rt_rubocop_defaults
|
42
42
|
```
|
43
43
|
|
44
|
+
## Usage
|
45
|
+
|
46
|
+
You can use RuboCop as always, but it will use the defaults defined in this gem.
|
47
|
+
|
44
48
|
## Development
|
45
49
|
|
46
|
-
|
47
|
-
release a new version, update the version number in `version.rb`, and then run
|
48
|
-
`bundle exec rake release`, which will create a git tag for the version, push
|
49
|
-
git commits and tags, and push the `.gem` file
|
50
|
-
to [rubygems.org](https://rubygems.org).
|
50
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
51
51
|
|
52
|
-
|
52
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
53
53
|
|
54
|
-
|
55
|
-
https://github.com/runtastic/rt_rubocop_defaults.
|
56
|
-
welcoming space for collaboration, and
|
57
|
-
the [
|
54
|
+
## Contributing
|
55
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/runtastic/rt_rubocop_defaults.
|
56
|
+
This project is intended to be a safe, welcoming space for collaboration, and
|
57
|
+
contributors are expected to adhere to the [code of conduct][cc].
|
58
58
|
|
59
59
|
## License
|
60
|
+
The gem is available as open source under [the terms of the MIT License][mit].
|
60
61
|
|
61
|
-
|
62
|
-
|
62
|
+
[rubygems]: https://rubygems.org/gems/rt_rubocop_defaults
|
63
|
+
[mit]: https://choosealicense.com/licenses/mit/
|
64
|
+
[cc]: ../CODE_OF_CONDUCT.md
|
data/config/default.yml
CHANGED
@@ -19,6 +19,7 @@ Metrics/LineLength:
|
|
19
19
|
Exclude:
|
20
20
|
- Guardfile
|
21
21
|
- Gemfile
|
22
|
+
IgnoreCopDirectives: true
|
22
23
|
|
23
24
|
Metrics/MethodLength:
|
24
25
|
Enabled: true
|
@@ -29,30 +30,50 @@ Metrics/MethodLength:
|
|
29
30
|
- api/sinatra/**/*
|
30
31
|
|
31
32
|
Metrics/AbcSize:
|
33
|
+
Max: 18
|
34
|
+
Severity: refactor
|
32
35
|
Exclude:
|
33
36
|
- api/sinatra/**/*
|
34
|
-
|
37
|
+
|
38
|
+
Metrics/CyclomaticComplexity:
|
39
|
+
Severity: refactor
|
40
|
+
|
35
41
|
Metrics/BlockLength:
|
36
42
|
Exclude:
|
37
43
|
- '*.gemspec'
|
38
44
|
- '**/*.rake'
|
39
|
-
- '
|
45
|
+
- 'config/initialize/*'
|
46
|
+
- 'spec/**/*'
|
47
|
+
- 'api/**/*'
|
48
|
+
|
49
|
+
Metrics/ClassLength:
|
50
|
+
Exclude:
|
51
|
+
- spec/**/*
|
40
52
|
|
41
|
-
|
42
|
-
|
43
|
-
|
53
|
+
Metrics/ModuleLength:
|
54
|
+
Exclude:
|
55
|
+
- spec/requests/**/*
|
44
56
|
|
57
|
+
### Style / Layout
|
45
58
|
Style/AlignHash:
|
46
59
|
EnforcedColonStyle: table
|
47
60
|
EnforcedHashRocketStyle: table
|
48
61
|
|
62
|
+
Layout/AlignHash:
|
63
|
+
EnforcedColonStyle: table
|
64
|
+
EnforcedHashRocketStyle: table
|
65
|
+
|
49
66
|
Style/HashSyntax:
|
50
|
-
EnforcedStyle:
|
67
|
+
EnforcedStyle: ruby19_no_mixed_keys
|
51
68
|
|
52
69
|
Style/MultilineOperationIndentation:
|
53
70
|
Description: Checks indentation of binary operations that span more than one line.
|
54
71
|
EnforcedStyle: indented
|
55
72
|
|
73
|
+
Layout/MultilineOperationIndentation:
|
74
|
+
Description: Checks indentation of binary operations that span more than one line.
|
75
|
+
EnforcedStyle: indented
|
76
|
+
|
56
77
|
Style/RaiseArgs:
|
57
78
|
EnforcedStyle: compact
|
58
79
|
|
@@ -79,16 +100,6 @@ Style/NumericLiterals:
|
|
79
100
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
80
101
|
Enabled: false
|
81
102
|
|
82
|
-
### Specs
|
83
|
-
|
84
|
-
Metrics/ClassLength:
|
85
|
-
Exclude:
|
86
|
-
- spec/**/*
|
87
|
-
|
88
|
-
Metrics/ModuleLength:
|
89
|
-
Exclude:
|
90
|
-
- spec/requests/**/*
|
91
|
-
|
92
103
|
### RSpec
|
93
104
|
|
94
105
|
RSpec/ExampleWording:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rt_rubocop_defaults
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Eger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -61,8 +61,9 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- ".rubocop.yml"
|
64
|
+
- CODE_OF_CONDUCT.md
|
64
65
|
- Gemfile
|
65
|
-
- LICENSE
|
66
|
+
- LICENSE
|
66
67
|
- README.md
|
67
68
|
- Rakefile
|
68
69
|
- config/default.yml
|
@@ -90,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
version: '0'
|
91
92
|
requirements: []
|
92
93
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.7.8
|
94
95
|
signing_key:
|
95
96
|
specification_version: 4
|
96
97
|
summary: rubocop defaults used at runtastic
|