rubocop-neeto 0.1.15 → 0.1.16

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: adbaf8298c1804456d5050900f7e9c1d0688ad5f10e8b66c3db71bf90ad4fd81
4
- data.tar.gz: 7f8b07c600c15ae128f6f11586f349aa6376be85fdeda1105568873a518228e5
3
+ metadata.gz: fef927f6b5a152b14ff20ef805c7827e613f8daa8328545d523c9d9835d7aa54
4
+ data.tar.gz: 7042247a4a2f2c6a67ade4f63ef09269fae0ada7eea76ed0994fac82fb4d8e51
5
5
  SHA512:
6
- metadata.gz: ac72b53c76cb5e555c22a7a33af51a2de10bc3b552e0d6f0bbe57527c3023088f08342744ccb99636a0bca4f4f1a1a8b0c40bf08f6a47a3ea976d21d3a56da38
7
- data.tar.gz: 52b490198a4a344ce20397f18bd5518ec76261673f32bfe83ec2236e23f40045a8c4a9cff6fabbdead8d36e7661671e8b0e075a27facac892b9a9be28db93810
6
+ metadata.gz: 78bb3316b19e1711485815504076819bb08f336af7ae7b780dc4beb40f816ae71a54d5c11de2bf7144f3eeb970fd4e0297e530a61ac865e406329a9c57e50d1d
7
+ data.tar.gz: 6994e654164b41c70e859fe75517c6650be12ec56ff4d84508cd4de13bc888e8fe6b1278c58c163a8b17d67eab22a623bd413d5f55b2733b97a549686021c13b
data/config/default.yml CHANGED
@@ -26,12 +26,11 @@ Neeto/UnsafeColumnDeletion:
26
26
 
27
27
  Neeto/DirectEnvAccess:
28
28
  Description: >-
29
- Rails had `secrets.yml` which provided a single source of truth for all
30
- environment variables and their fallback values. Rails deprecated this in
31
- favor of encrypted credentials, so we created Secvault to maintain
32
- centralized configuration. Direct usage of `ENV` bypasses this system,
33
- making it harder to track what environment variables are being used and
34
- their defaults. Use `Secvault.secrets` instead.
29
+ `config/secrets.yml` provides a single source of truth for all environment
30
+ variables and their fallback values, loaded via Rails' built-in
31
+ `config_for`. Direct usage of `ENV` bypasses this system, making it harder
32
+ to track what environment variables are being used and their defaults.
33
+ Use `Rails.application.secrets` instead.
35
34
  Enabled: true
36
35
  Severity: refactor
37
36
  VersionAdded: '0.1'
@@ -3,16 +3,15 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Neeto
6
- # Rails had `secrets.yml` which provided a single source of truth for all
7
- # environment variables and their fallback values. Rails deprecated this in
8
- # favor of encrypted credentials, so we created Secvault
9
- # (https://github.com/neetozone/secvault) to maintain centralized configuration.
10
- # Direct usage of `ENV` bypasses this system, making it harder to track what
11
- # environment variables are being used and their defaults. This cop enforces
12
- # that all environment variable access goes through `Secvault.secrets`.
6
+ # `config/secrets.yml` provides a single source of truth for all
7
+ # environment variables and their fallback values, loaded via Rails'
8
+ # built-in `config_for`. Direct usage of `ENV` bypasses this system,
9
+ # making it harder to track what environment variables are being used
10
+ # and their defaults. This cop enforces that all environment variable
11
+ # access goes through `Rails.application.secrets`.
13
12
  #
14
13
  # @example DirectEnvAccess: true (default)
15
- # # Enforces the usage of `Secvault.secrets` over direct `ENV` access.
14
+ # # Enforces the usage of `Rails.application.secrets` over direct `ENV` access.
16
15
  #
17
16
  # # bad
18
17
  # api_key = ENV['STRIPE_API_KEY']
@@ -21,17 +20,17 @@ module RuboCop
21
20
  # default_timezone = ENV['DEFAULT_TIMEZONE'] || 'UTC'
22
21
  #
23
22
  # # good
24
- # api_key = Secvault.secrets.stripe_api_key
23
+ # api_key = Rails.application.secrets.stripe_api_key
25
24
  #
26
25
  # # good
27
- # default_timezone = Secvault.secrets.default_timezone
26
+ # default_timezone = Rails.application.secrets.default_timezone
28
27
  #
29
28
  # # good (ENV access is permitted in directories other than the app directory)
30
29
  # config.log_level = ENV.fetch('LOG_LEVEL', 'info')
31
30
  #
32
31
  class DirectEnvAccess < Base
33
32
  MSG = "Do not use ENV directly. " \
34
- "Use Secvault.secrets to maintain a single source of truth for configuration."
33
+ "Use Rails.application.secrets to maintain a single source of truth for configuration."
35
34
 
36
35
  def_node_matcher :env_access?, <<~PATTERN
37
36
  (const {nil? cbase} :ENV)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Neeto
5
- VERSION = "0.1.15"
5
+ VERSION = "0.1.16"
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.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhay V Ashokan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-02 00:00:00.000000000 Z
11
+ date: 2026-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop