anyway_config 2.7.0 → 2.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eb0c3ba37fd0260a03e8e5076df051f992c4911dab345158e761c06eebc8c11
4
- data.tar.gz: 24b0f8193ade0506d71843ba3f7451cfab4bba806d856ea790a19c1ae3276c8d
3
+ metadata.gz: c6e808e00b7756aa1b22f20792dfcfbc5989c5f41a88ae5b16e87ee3e556b17d
4
+ data.tar.gz: ef819a44f7ac000f206929dbb412f778130bb40b240c45478e548c582a7b52f9
5
5
  SHA512:
6
- metadata.gz: faea4614c6e0bf13982bfe3e0808be0d784a095be66b09dd283afd0d8e38d668b6e518bd5c19f1b7bc32252a1e3045595d91b24fc5c8094a1a03da20adf6faf7
7
- data.tar.gz: 2b0cd4d3e551756bcb773782b105059a20224963bc91dc44557c35fd8c2edd745eb98d14a60668b557cbac9d3831c0195f56df9829a89f6c1cfadd949f1a07d7
6
+ metadata.gz: ca3f7f4ad799af0c53b613786a5407fa4d41a937528b12d17b69f466f3a7152a3b89e61cbcd4112f9bfd69b26089d3223eb85ba68859f9173997636ff04626a6
7
+ data.tar.gz: '00762802a9a92438cfd3ef29681eebaad657a81ddda44a06799c39c4f024d3975458b3380b8ef7b97611d9d561476a7fab386aa636aaa0a6712491790a583919'
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 2.7.1 (2025-02-24)
6
+
7
+ - Suppress required validations when running Rails credentials commands. ([@palkan][])
8
+
5
9
  ## 2.7.0 (2025-02-12)
6
10
 
7
11
  - Added `suppress_required_validations` configuration for skipping validation in CI. ([@OlegChuev][])
@@ -81,5 +81,14 @@ module Anyway
81
81
  self.default_environmental_key = nil
82
82
 
83
83
  self.suppress_required_validations = ENV.key?("SECRET_KEY_BASE_DUMMY") unless ENV.key?("ANYWAY_SUPPRESS_VALIDATIONS")
84
+
85
+ # Suppress validations when working with credentials
86
+ if defined?(::Rails::Command::CredentialsCommand) && ::Rails::Command.respond_to?(:const_source_location)
87
+ credentials_source_path = ::Rails::Command.const_source_location("CredentialsCommand").first
88
+
89
+ if caller_locations.any? { |l| l.absolute_path == credentials_source_path }
90
+ self.suppress_required_validations = true
91
+ end
92
+ end
84
93
  end
85
94
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anyway # :nodoc:
4
- VERSION = "2.7.0"
4
+ VERSION = "2.7.1"
5
5
  end
@@ -19,6 +19,13 @@ module Rails
19
19
 
20
20
  change_credentials_in_system_editor
21
21
  end
22
+
23
+ private
24
+
25
+ def load_environment_config!
26
+ ENV["ANYWAY_SUPPRESS_VALIDATIONS"] = "true"
27
+ super
28
+ end
22
29
  end
23
30
  end
24
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyway_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-next-core