polleverywhere-cops 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -1
- data/lib/rubocop/cop/polleverywhere/nullable_boolean.rb +1 -1
- data/lib/rubocop/polleverywhere/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31e5f064aa48aac5b577a0abc3fabc2f0699e857
|
4
|
+
data.tar.gz: a218915bcdd9a9e6e67f0de848d27227a88f6f1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e556c63f94eaa30ba786d0cf865b19cdf5416dc98f52064ace3efea8a2357c2bb50c6371579a2256277c705e368543172575e7284854af6e6772a6daadc5690
|
7
|
+
data.tar.gz: 8596be63c6c8b529416b1701c73927c0d7ddd1ea978fa4cda2624f686a0e9afa55d577f0dada334d97220b0ec4c596037ab81f3112c54cfa24bcfe1b72b76df6
|
data/README.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
1
|
# Poll Everywhere Cops
|
2
2
|
|
3
|
-
|
3
|
+
Custom RuboCop cops for Poll Everywhere
|
4
|
+
|
5
|
+
## Cops
|
6
|
+
|
7
|
+
- *NullableBoolean*: Boolean database columns cannot be nullable.
|
8
|
+
|
9
|
+
## Instructions
|
10
|
+
|
11
|
+
Add to `Gemfile`:
|
12
|
+
|
13
|
+
```
|
14
|
+
gem "polleverywhere-cops"
|
15
|
+
```
|
16
|
+
|
17
|
+
Add to `.rubocop.yml`:
|
18
|
+
|
19
|
+
```
|
20
|
+
require:
|
21
|
+
- polleverywhere-cops
|
22
|
+
```
|
@@ -4,7 +4,7 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module PollEverywhere
|
6
6
|
class NullableBoolean < Cop
|
7
|
-
MSG = "Boolean columns cannot be nullable. (https://playbook.polleverywhere.com/conventions/ruby/#migrations)".freeze
|
7
|
+
MSG = "Boolean database columns cannot be nullable. (https://playbook.polleverywhere.com/conventions/ruby/#migrations)".freeze
|
8
8
|
|
9
9
|
def on_send(node)
|
10
10
|
if adding_boolean?(node) && nullable?(node)
|