foreman_enc_matcher_value_only 0.0.1 → 0.0.2
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
class Setting::Enc_Matcher_Value_Only < Setting
|
|
2
|
+
BLANK_ATTRS << 'enc_matcher_value_only_environments'
|
|
2
3
|
|
|
3
4
|
def self.load_defaults
|
|
4
5
|
# Check the table exists
|
|
@@ -8,7 +9,7 @@ class Setting::Enc_Matcher_Value_Only < Setting
|
|
|
8
9
|
|
|
9
10
|
Setting.transaction do
|
|
10
11
|
[
|
|
11
|
-
self.set('
|
|
12
|
+
self.set('enc_matcher_value_only_environments', 'The environments that Foreman ENC return matcher value parameters only', []),
|
|
12
13
|
].compact.each { |s| self.create s.update(:category => 'Setting::General')}
|
|
13
14
|
end
|
|
14
15
|
|
|
@@ -8,7 +8,8 @@ module ForemanEncMatcherValueOnlyPatch
|
|
|
8
8
|
|
|
9
9
|
# create or overwrite class methods...
|
|
10
10
|
def hashed_class_parameters_with_matcher_value_only
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
unless Setting[:enc_matcher_value_only_environments].include?(@host.environment.to_s)
|
|
12
13
|
Rails.logger.debug "ForemanEncMatcherValueOnlyPatch: return all"
|
|
13
14
|
return hashed_class_parameters_without_matcher_value_only
|
|
14
15
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_enc_matcher_value_only
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,9 +9,9 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-01-
|
|
12
|
+
date: 2015-01-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
|
-
description:
|
|
14
|
+
description: control enc behavior in settings for each environments
|
|
15
15
|
email:
|
|
16
16
|
- huajiang@ebay.com
|
|
17
17
|
executables: []
|