rubocop-teamtailor 0.1.0 → 0.2.0

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: 8ca3d5b8117d60d31717bc5e6d3c268e7138ec2734d247a02afef416ec445811
4
- data.tar.gz: 5094eb595da4608f50aba8f70d9c4f32b0aa0e94f23549b8fd295ff2067a7d8b
3
+ metadata.gz: 4592a277b04f19d85f74eb00d578242102318946d930c428ed655390ba3ccc40
4
+ data.tar.gz: 10d484caaae9cbd10e72b919ad15aa17f90c488e459875d6a56a361480c7a2cd
5
5
  SHA512:
6
- metadata.gz: 342b844777a088abf662f4b4335c1d5e0f394ac97d73d9d2ea7746f4ad374146561f087f82feea447e414d4c4ee12fe10cda79f2fca0acc22cc91ba1867d29b3
7
- data.tar.gz: 790a00f4657f19e720564f3c14c7548999d27fa4cd3de9870735ed8667101e75a032a2086d9e19f3bee3f3e8d276264ee4628258a1a0fb7e0910471e96a700ee
6
+ metadata.gz: 25b7a07bdb38ef5baa26e0e333dca5608710b9f71c8085fdb71fa27cd5e2df1689e151fb21f73f8d30627d167397f28b44af023203b3c0888caa7d9210c3a11f
7
+ data.tar.gz: 48012ed398180b0d2120c00b3143cf98fd1428125d1d91b084a5c3c8c7698d6d0d366f13e054780eadb350b25ae96270ec73e70adc95b05d58b6ba43ed61f6c6
data/README.md CHANGED
@@ -6,15 +6,13 @@ Welcome to your new gem! In this directory, you'll find the files you need to be
6
6
 
7
7
  ## Installation
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
9
  Install the gem and add to the application's Gemfile by executing:
12
10
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG --require=false
11
+ $ bundle add rubocop-teamtailor --require=false
14
12
 
15
13
  If bundler is not being used to manage dependencies, install the gem by executing:
16
14
 
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ $ gem install rubocop-teamtailor
18
16
 
19
17
  ## Usage
20
18
 
@@ -28,7 +26,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
28
26
 
29
27
  ## Contributing
30
28
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rubocop-teamtailor. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rubocop-teamtailor/blob/main/CODE_OF_CONDUCT.md).
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/teamtailor/rubocop-teamtailor. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/teamtailor/rubocop-teamtailor/blob/main/CODE_OF_CONDUCT.md).
32
30
 
33
31
  ## License
34
32
 
@@ -36,4 +34,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
36
34
 
37
35
  ## Code of Conduct
38
36
 
39
- Everyone interacting in the RuboCop::Teamtailor project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rubocop-teamtailor/blob/main/CODE_OF_CONDUCT.md).
37
+ Everyone interacting in the RuboCop::Teamtailor project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/teamtailor/rubocop-teamtailor/blob/main/CODE_OF_CONDUCT.md).
data/config/default.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # Write it!
2
2
 
3
- Teamtailor/NoHasManyInActiveModelSerializer:
3
+ Teamtailor/NoEmbeddingsInActiveModelSerializer:
4
4
  Description: "TODO: Write a description of the cop."
5
5
  Enabled: true
6
6
  VersionAdded: "<<next>>"
@@ -3,11 +3,11 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Teamtailor
6
- class NoHasManyInActiveModelSerializer < Base
6
+ class NoEmbeddingsInActiveModelSerializer < Base
7
7
  MSG = "No embedding of records"
8
8
 
9
9
  def_node_matcher :no_has_many?, <<~PATTERN
10
- (send nil? :has_many ...)
10
+ (send nil? {:has_many | :has_one} ...)
11
11
  PATTERN
12
12
 
13
13
  def on_class(class_node)
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "teamtailor/no_has_many_in_active_model_serializer"
3
+ require_relative "teamtailor/no_embeddings_in_active_model_serializer"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Teamtailor
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-teamtailor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Brusman
@@ -42,7 +42,7 @@ files:
42
42
  - Rakefile
43
43
  - config/default.yml
44
44
  - lib/rubocop-teamtailor.rb
45
- - lib/rubocop/cop/teamtailor/no_has_many_in_active_model_serializer.rb
45
+ - lib/rubocop/cop/teamtailor/no_embeddings_in_active_model_serializer.rb
46
46
  - lib/rubocop/cop/teamtailor_cops.rb
47
47
  - lib/rubocop/teamtailor.rb
48
48
  - lib/rubocop/teamtailor/inject.rb