evt-schema 2.2.6.1 → 2.2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema/schema.rb +12 -2
- data/lib/schema/schema/compare/comparison.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 471161f68537974c8ae3871e2861dbd80d435db9d18d29f691febdd3a719667a
|
4
|
+
data.tar.gz: c9861600ec603ea520cd89deedd11f24ee5c2848d89fb9f9494ddbe98add8ae2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c4eaa8f30360a2642809a5608bfd8f6b915e48be494296a921884c1525ebd325320d12b3f4f9ad035465b30bcaf6da11a60390ce42db84ce56b363aeadb483a
|
7
|
+
data.tar.gz: a3697c536cd2251662ae8281de500896c1e0c6e515027affeeeeed8aba725ab0ffbf81911da99a8abfbef11159363e3537973bffd79ad432ca03c363a6169958
|
data/lib/schema/schema.rb
CHANGED
@@ -78,7 +78,9 @@ module Schema
|
|
78
78
|
@attributes ||= AttributeRegistry.new
|
79
79
|
end
|
80
80
|
|
81
|
-
def attribute_names
|
81
|
+
def attribute_names(include_transient: nil)
|
82
|
+
include_transient ||= false
|
83
|
+
|
82
84
|
transient_attributes = []
|
83
85
|
if respond_to?(:transient_attributes)
|
84
86
|
transient_attributes = self.transient_attributes
|
@@ -86,12 +88,20 @@ module Schema
|
|
86
88
|
|
87
89
|
attribute_names = []
|
88
90
|
attributes.each do |attribute|
|
89
|
-
|
91
|
+
if !include_transient &&
|
92
|
+
transient_attributes.include?(attribute.name)
|
93
|
+
next
|
94
|
+
end
|
95
|
+
|
90
96
|
attribute_names << attribute.name
|
91
97
|
end
|
92
98
|
|
93
99
|
attribute_names
|
94
100
|
end
|
101
|
+
|
102
|
+
def all_attribute_names
|
103
|
+
attribute_names(include_transient: true)
|
104
|
+
end
|
95
105
|
end
|
96
106
|
|
97
107
|
class AttributeRegistry
|
@@ -49,6 +49,14 @@ module Schema
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.build_entry(control_name, control, compare_name, compare)
|
52
|
+
|
53
|
+
|
54
|
+
pp control_name
|
55
|
+
pp control.class.attribute_names
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
52
60
|
control_class = control.class
|
53
61
|
if not control_class.attribute_names.include?(control_name)
|
54
62
|
raise Error, "Attribute is not defined (Attribute Name: #{control_name.inspect}, Schema Class: #{control_class})"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-attribute
|