aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorRobert2017-09-29 17:01:18 +0200
committerRobert2017-10-02 10:52:07 +0200
commitea6537e2f520ca9abba0ca63c68ee42afe08d872 (patch)
tree51fa3272c33e1947e39de5d6a1e4d7cb76efd6e6 /app/models
parent8f11900221be0837e0ee9717746cd4d952a64794 (diff)
downloadchouette-core-ea6537e2f520ca9abba0ca63c68ee42afe08d872.tar.bz2
Refs: #4627@0.15h;
Put old behavior under tests, thusly also showing the motivation of this ticket.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/compliance_control.rb1
-rw-r--r--app/models/generic_attribute_control/min_max.rb1
-rw-r--r--app/models/generic_attribute_control/pattern.rb3
-rw-r--r--app/models/generic_attribute_control/uniqueness.rb3
4 files changed, 6 insertions, 2 deletions
diff --git a/app/models/compliance_control.rb b/app/models/compliance_control.rb
index 42f45b6ca..7317b81b8 100644
--- a/app/models/compliance_control.rb
+++ b/app/models/compliance_control.rb
@@ -3,6 +3,7 @@ class ComplianceControl < ActiveRecord::Base
belongs_to :compliance_control_set
belongs_to :compliance_control_block
+ cattr_reader :default_criticity, :default_code
@@default_criticity = :warning
@@default_code = ""
diff --git a/app/models/generic_attribute_control/min_max.rb b/app/models/generic_attribute_control/min_max.rb
index 6a2e1f284..d18ff6344 100644
--- a/app/models/generic_attribute_control/min_max.rb
+++ b/app/models/generic_attribute_control/min_max.rb
@@ -2,6 +2,7 @@ module GenericAttributeControl
class MinMax < ComplianceControl
hstore_accessor :control_attributes, minimum: :integer, maximum: :integer
+ cattr_reader :default_criticity, :default_code
@@default_criticity = :warning
@@default_code = "3-Generic-2"
diff --git a/app/models/generic_attribute_control/pattern.rb b/app/models/generic_attribute_control/pattern.rb
index 5b27da54e..9e5a311de 100644
--- a/app/models/generic_attribute_control/pattern.rb
+++ b/app/models/generic_attribute_control/pattern.rb
@@ -2,6 +2,7 @@ module GenericAttributeControl
class Pattern < ComplianceControl
hstore_accessor :control_attributes, value: :string, pattern: :string
+ cattr_reader :default_criticity, :default_code
@@default_criticity = :warning
@@default_code = "3-Generic-3"
@@ -10,4 +11,4 @@ module GenericAttributeControl
true
end
end
-end \ No newline at end of file
+end
diff --git a/app/models/generic_attribute_control/uniqueness.rb b/app/models/generic_attribute_control/uniqueness.rb
index 4f1a82083..3efe1deac 100644
--- a/app/models/generic_attribute_control/uniqueness.rb
+++ b/app/models/generic_attribute_control/uniqueness.rb
@@ -2,6 +2,7 @@ module GenericAttributeControl
class Uniqueness < ComplianceControl
hstore_accessor :control_attributes, name: :string
+ cattr_reader :default_criticity, :default_code
@@default_criticity = :warning
@@default_code = "3-Generic-3"
@@ -10,4 +11,4 @@ module GenericAttributeControl
true
end
end
-end \ No newline at end of file
+end