rentacop 0.1.1 → 0.1.2

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: 7603c018f4213b0937dd8e9d9f46fbc9f9a73d3909767117d49789f1b2053353
4
- data.tar.gz: '028bca585e46bc7ff579a4bed08316f83b39dc3cd4fd220fbba1778de483b46d'
3
+ metadata.gz: fa8b8e38bc7ed952b8d9a77e6fc4b4f21fd84fd9024ea32a8f54d19b2af6fffb
4
+ data.tar.gz: 2b95fb2d85548358947a15d7f40513b489f763e7a77b963daa9215f6bd90bdbe
5
5
  SHA512:
6
- metadata.gz: cb82fe2b71a4cfb346e098435c499fbab6c5f878e1015297975e9c5c4a313565e07f186611840451d70716515389101e29abc4e1132504a6f98c3652ed1dfb70
7
- data.tar.gz: a36c5bff6a6bdc9045f5cd2178fa3b29e36c6372fa07a0064f3cd7115499ae0bba389860c62256921cc2e560a4b488bbf09a3c929830a85d24fa1d51f1e37cb2
6
+ metadata.gz: 0b9e62c0f52c79f3190f4ff63a13cce6fc55e855912433d302ce8126f20c1cf43a0fa81163a7439ffff64d194cad5cecec48e186e78d0e2739ce22481f01b53f
7
+ data.tar.gz: b6c1e1e3d95f118f03cd4d4007ea335662d2d7bd2473f008c6f0db4caac112bab6de22285cc1fbdeec3d9d772610bc7d8e678810e06f1c0f6cc1d044653b3e17
data/README.md CHANGED
@@ -7,7 +7,7 @@ A more relaxed default set of RuboCop rules.
7
7
  Run:
8
8
 
9
9
  ```bash
10
- $ bundle add rentacop --group development,test
10
+ $ gem install rentacop
11
11
  ```
12
12
 
13
13
  Or, add this line to your Gemfile:
@@ -34,17 +34,70 @@ $ bundle add rubocop --group development,test
34
34
 
35
35
  ## Usage
36
36
 
37
- Add the following to the top of your `.rubocop.yml`:
37
+ This gem contains two rule sets:
38
+
39
+ 1. Global rubocop rules in [rentacop.yml](rentacop.yml)
40
+ 2. RSpec rubocop rules in [rspec.yml](rspec.yml)
41
+
42
+ ### Configuring `.rubocop.yml`
43
+
44
+ If you are not using RSpec, add the following to the top of your `.rubocop.yml`:
45
+
38
46
 
39
47
  ```yaml
40
48
  inherit_gem:
41
49
  rentacop: rentacop.yml
42
50
  ```
43
51
 
44
- And run:
52
+ If you are using [rubocop-rspec](https://github.com/rubocop/rubocop-rspec), and wish to include the RSpec rules from this repository, add this instead:
53
+
54
+ ```yaml
55
+ require: rubocop-rspec
56
+
57
+ inherit_gem:
58
+ rentatop:
59
+ - rentacop.yml
60
+ - rspec.yml
61
+ ```
62
+
63
+ ### Recommended Template
64
+
65
+ This `.rubocop.yml` contains our full recommended configuration:
66
+
67
+
68
+ ```yaml
69
+ # .rubocop.yml
70
+ require:
71
+ - rubocop-performance
72
+ - rubocop-rspec
73
+
74
+ inherit_gem:
75
+ rentacop:
76
+ - rentacop.yml
77
+ - rspec.yml
78
+
79
+ inherit_mode:
80
+ merge:
81
+ - Exclude
82
+ - Include
83
+
84
+ AllCops:
85
+ TargetRubyVersion: 2.7
86
+ ```
87
+
88
+ ### Running `rubocop`
89
+
90
+ After creating your `.rubocop.yml` file, run:
45
91
 
46
92
  ```bash
47
93
  $ rubocop
48
- # or, if your rubocop is not installed globally
94
+ # or, if you do not have rubocop installed globally
49
95
  $ bundle exec rubocop
50
96
  ```
97
+
98
+ To create a todo list, run:
99
+
100
+ ```bash
101
+ $ rubocop --regenerate-todo
102
+ ```
103
+
@@ -1,3 +1,3 @@
1
1
  module Rentacop
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/rentacop.yml CHANGED
@@ -41,6 +41,10 @@ Layout/MultilineMethodCallIndentation:
41
41
  Lint/MissingSuper:
42
42
  Enabled: false
43
43
 
44
+ # `FileUtils` methods do not behave properly on Vagrant
45
+ Lint/NonAtomicFileOperation:
46
+ Enabled: false
47
+
44
48
 
45
49
  # === Metrics ===
46
50
 
@@ -104,6 +108,10 @@ Style/ClassAndModuleChildren:
104
108
  Style/Documentation:
105
109
  Enabled: false
106
110
 
111
+ # Do not require comments for `eval`
112
+ Style/DocumentDynamicEvalDefinition:
113
+ Enabled: false
114
+
107
115
  # Allow the use of `ENV['name']`
108
116
  Style/FetchEnvVar:
109
117
  Enabled: false
data/rspec.yml ADDED
@@ -0,0 +1,44 @@
1
+ # Allow `before :all` and `after :all`
2
+ RSpec/BeforeAfterAll:
3
+ Enabled: false
4
+
5
+ # Allow the first `describe` to be arbitrary
6
+ RSpec/DescribeClass:
7
+ Enabled: false
8
+
9
+ # Allow longer tests
10
+ RSpec/ExampleLength:
11
+ Max: 8
12
+
13
+ # Allow `expect` in `before` hook, it is used as a utility to trap output and
14
+ # ensure state
15
+ RSpec/ExpectInHook:
16
+ Enabled: false
17
+
18
+ # Prefer `receive` over `have_received` spies
19
+ RSpec/MessageSpies:
20
+ EnforcedStyle: receive
21
+
22
+ # Allow multiple expectations
23
+ RSpec/MultipleExpectations:
24
+ Max: 5
25
+
26
+ # Allow more `let` statements per test
27
+ RSpec/MultipleMemoizedHelpers:
28
+ Max: 8
29
+
30
+ # Allow unnamed subjects
31
+ RSpec/NamedSubject:
32
+ Enabled: false
33
+
34
+ # Allow deeper nested groups
35
+ RSpec/NestedGroups:
36
+ Max: 5
37
+
38
+ # Allow stubbing inner methods of `subject`
39
+ RSpec/SubjectStub:
40
+ Enabled: false
41
+
42
+ # Allow nameless `double`
43
+ RSpec/VerifiedDoubles:
44
+ Enabled: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rentacop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-17 00:00:00.000000000 Z
11
+ date: 2022-11-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Collection of more relaxed rubocop rules
14
14
  email: db@dannyben.com
@@ -20,6 +20,7 @@ files:
20
20
  - README.md
21
21
  - lib/rentacop/version.rb
22
22
  - rentacop.yml
23
+ - rspec.yml
23
24
  homepage: https://github.com/dannyben/rentacop
24
25
  licenses:
25
26
  - MIT