rubocop-obsession 0.1.2 → 0.1.4

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: bd3523798bbc346eb15f1b58b80bcf78e37dd8943f17eaa45064f69a0d5cdc65
4
- data.tar.gz: 861a5ca15e7ad4b1f737367faad91a56922b3ae9bdfe7ca562455c2320ef9b63
3
+ metadata.gz: 47b14b8bd67398fccc5f92ba6e3e5b30bd76a47ec28a38694183cac973de17e4
4
+ data.tar.gz: bc60b8d77b8a2353abf4d0d3025161b5c581405507ecbe946f6401e9e3665951
5
5
  SHA512:
6
- metadata.gz: ee149bc3433c82b163c49d336e8dd85dbd8b042ea6c2338c2f73b4921afad79fa6c020341c0ecffdb58e753ca8edc5db2e79ccea5505bbe584097b685f74ab12
7
- data.tar.gz: b5e1be57e0fa807b0252534b2be4c29a0883d3145555432580049409173981b48ef54cafac86b0bd8b6a3d9abeeff10d16706621b02c77801498cf530270e79a
6
+ metadata.gz: db8e7698d91d0ab2ef5cb95236164ac2bb0dc754944082c3705d88d87cf99ed1d8bb620cefba7e7817dcfc622d951aca9ee38be76fec566d7a6644a9a1bed111
7
+ data.tar.gz: 744cc5411803bdf92075645b9aa53d50133078f8491c0edc6bbade699805141b72297b1acabc85ed5321a1cc70a86282d5458bd5eb7df0483174211f153f7250
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Rubocop Obsession
2
2
 
3
- A [RuboCop](https://github.com/rubocop/rubocop) extension that enforces
4
- higher-level code concepts, like checking that code reads from
3
+ A [RuboCop](https://github.com/rubocop/rubocop) extension that focuses on
4
+ higher-level concepts, like checking that code reads from
5
5
  [top to bottom](lib/rubocop/cop/obsession/method_order.rb), or only unit
6
6
  testing [public methods](lib/rubocop/cop/obsession/rspec/describe_public_method.rb).
7
+ There are some lower-level cops as well.
7
8
 
8
9
  Use the provided cops as is, or as inspiration to build custom cops aligned
9
10
  with your project's best practices.
@@ -66,11 +67,11 @@ end
66
67
 
67
68
  All cops are located under
68
69
  [`lib/rubocop/cop/obsession`](lib/rubocop/cop/obsession), and contain examples
69
- and documentation.
70
+ and documentation. Their default configuration is defined in
71
+ [`config/default.yml`](config/default.yml).
70
72
 
71
- These cops are opinionated and can often feel like too much, that is why some
72
- of them are disabled by default. They should not be treated as gospel, so do
73
- not hesitate to enable or disable them as needed.
73
+ These cops are opinionated and can feel like too much, that is why some of them
74
+ are disabled by default. Do not hesitate to enable or disable them as needed.
74
75
 
75
76
  I wrote them to scratch an itch I had at one point or another. Tastes change
76
77
  with time, and I personally do not use some of them any more, but others might
@@ -3,7 +3,8 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Obsession
6
- # This cop checks for private/protected methods that are not ordered correctly.
6
+ # This cop checks for private/protected methods that are not ordered
7
+ # correctly. It supports autocorrect.
7
8
  #
8
9
  # Code should read from top to bottom: methods should be defined in the
9
10
  # same order as the order when they are first mentioned.
@@ -8,12 +8,12 @@ module RuboCop
8
8
  # defaults or comments.
9
9
  #
10
10
  # - json(b) fields should have a default value like {} or [] so code can
11
- # do my_field['field'] or my_field.first without fear that my_field is
12
- # nil.
11
+ # do my_field['field'] or my_field.first without fear that my_field is
12
+ # nil.
13
13
  # - It is impossible to know the structure of a json(b) field just by
14
- # reading the schema, because json(b) is an unstructured type. That's why
15
- # an "Example: ..." Postgres comment should always be present when
16
- # defining the field.
14
+ # reading the schema, because json(b) is an unstructured type. That's why
15
+ # an "Example: ..." Postgres comment should always be present when
16
+ # defining the field.
17
17
  #
18
18
  # @example
19
19
  #
@@ -1,5 +1,5 @@
1
1
  module Rubocop
2
2
  module Obsession
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-obsession
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Dalbert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-26 00:00:00.000000000 Z
11
+ date: 2024-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport