rubocop-neeto 0.1.18 → 0.1.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0673b79da6f5f0a65905146dc7626d731613ccdf19575ddaa26e4d3d6c32c424
4
- data.tar.gz: e846f0f4339ea9c6496ff54503287480c19464212151f69e846cf6f659e75a57
3
+ metadata.gz: a114d1fda0a6640c867ce32d0882d0c804d1e0b4f273d9bfcf13f35d77e8cda7
4
+ data.tar.gz: 0f27ddfd9cfce7a6e6499716441730003bf5f4657b650020866ba811bc7966ac
5
5
  SHA512:
6
- metadata.gz: ba3a84a47cb213fdf8ece57d183ce1b061f14de1fd253ee11d76dd96a5430e659bdb475add57892653c7e7ba5948f91c040211526627ada628fa091de0949194
7
- data.tar.gz: 44f961f81778b30199382f17c53f98847999bf924c814c0bd3f57a51a28250b4ef7ecca8d4b1eeb35cda0d78542369739b02882376fdbb3e9e461ed1480362b9
6
+ metadata.gz: 8c02805a3712d669826caa86ec47a886347bc3657e8d1d72901f3f5465babcdd9c666e76e63374b3e6ac17c52f0511fe65b2bfb4be4bc1f0eb97ea800fef6f19
7
+ data.tar.gz: 726009349f00e1615c5b6e4752bc4cd5be629e3b142af7fb6b3f3bd2d801203a172b70c48a05b4f252063802db1ca001526d0c54a727b676d77177ddca2b29ae
data/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  2. [Neeto/UnsafeColumnDeletion](https://rubocop-neeto.neetodeployapp.com/docs/RuboCop/Cop/Neeto/UnsafeColumnDeletion)
7
7
  3. [Neeto/DirectEnvAccess](https://rubocop-neeto.neetodeployapp.com/docs/RuboCop/Cop/Neeto/DirectEnvAccess)
8
8
  4. [Neeto/DeprecatedJobBaseClass](https://rubocop-neeto.neetodeployapp.com/docs/RuboCop/Cop/Neeto/DeprecatedJobBaseClass)
9
+ 5. [Neeto/FaradayOverHttparty](https://rubocop-neeto.neetodeployapp.com/docs/RuboCop/Cop/Neeto/FaradayOverHttparty)
9
10
 
10
11
  ## Installation
11
12
 
data/config/default.yml CHANGED
@@ -52,3 +52,15 @@ Neeto/DeprecatedJobBaseClass:
52
52
  - app/workers/**/*.rb
53
53
  - test/dummy/app/jobs/**/*.rb
54
54
  - test/dummy/app/workers/**/*.rb
55
+
56
+ Neeto/FaradayOverHttparty:
57
+ Description: >-
58
+ HTTParty has been removed from all Neeto applications in favor of Faraday,
59
+ which is already available. Do not re-add the `httparty` gem. See
60
+ https://github.com/neetozone/neeto-engineering/issues/1862 for more details.
61
+ Enabled: true
62
+ Severity: refactor
63
+ VersionAdded: '0.1'
64
+ Include:
65
+ - '**/Gemfile'
66
+ - '**/Gemfile.common.rb'
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Neeto
6
+ # HTTParty has been removed from all Neeto applications in favor of
7
+ # Faraday, which is already available. This cop flags any attempt to add
8
+ # the `httparty` gem to a Gemfile.
9
+ #
10
+ # @example FaradayOverHttparty: true (default)
11
+ # # Disallows adding the `httparty` gem.
12
+ #
13
+ # # bad
14
+ # gem "httparty"
15
+ #
16
+ # # good
17
+ # gem "faraday"
18
+ #
19
+ class FaradayOverHttparty < Base
20
+ MSG = "Do not add the `httparty` gem. Use `faraday` instead, which is " \
21
+ "already available in the application. See " \
22
+ "https://github.com/neetozone/neeto-engineering/issues/1862 for more details."
23
+
24
+ RESTRICT_ON_SEND = %i[gem].freeze
25
+
26
+ def_node_matcher :httparty_gem?, <<~PATTERN
27
+ (send nil? :gem (str $_) ...)
28
+ PATTERN
29
+
30
+ def on_send(node)
31
+ httparty_gem?(node) do |gem_name|
32
+ add_offense(node) if gem_name.casecmp?("httparty")
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -4,3 +4,4 @@ require_relative "neeto/unsafe_table_deletion"
4
4
  require_relative "neeto/unsafe_column_deletion"
5
5
  require_relative "neeto/direct_env_access"
6
6
  require_relative "neeto/deprecated_job_base_class"
7
+ require_relative "neeto/faraday_over_httparty"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Neeto
5
- VERSION = "0.1.18"
5
+ VERSION = "0.1.19"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-neeto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yedhin Kizhakkethara
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-22 00:00:00.000000000 Z
11
+ date: 2026-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -37,6 +37,7 @@ files:
37
37
  - lib/rubocop-neeto.rb
38
38
  - lib/rubocop/cop/neeto/deprecated_job_base_class.rb
39
39
  - lib/rubocop/cop/neeto/direct_env_access.rb
40
+ - lib/rubocop/cop/neeto/faraday_over_httparty.rb
40
41
  - lib/rubocop/cop/neeto/unsafe_column_deletion.rb
41
42
  - lib/rubocop/cop/neeto/unsafe_table_deletion.rb
42
43
  - lib/rubocop/cop/neeto_cops.rb