odca 0.1.2 → 0.1.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/config/overlays_info.yml +0 -9
- data/lib/odca/hashlink_generator.rb +1 -1
- data/lib/odca/headful_overlay.rb +1 -5
- data/lib/odca/overlays/header.rb +2 -4
- data/lib/odca/schema_parser.rb +13 -1
- data/lib/odca/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cccb246024fcc5e44f92849d08b4b4c86182bb7a
|
|
4
|
+
data.tar.gz: a350bd63f3c28006b3e388cd75effec8a9519c6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55daa2ef722c03e70aeb861267c3c279c31a5033a75a21f3d17ded9e0781b7029756fb8e5ee84c90b3c77b0b33f4b66ee0361fd88641bcae38a879157b3a7e57
|
|
7
|
+
data.tar.gz: e95d9fc2af7fd58f13df4e9cfcc4ada24d923dbe5ac7f0dc4dcb2102429a05dd623f17e7009ad2bb8b0e23f8011616ff8ed2187cacf85122f2c859432f83f98c
|
data/Gemfile.lock
CHANGED
data/config/overlays_info.yml
CHANGED
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
label:
|
|
2
2
|
type_v1: spec/overlay/label/1.0
|
|
3
|
-
description: Category and attribute labels for %{schema_name}
|
|
4
3
|
|
|
5
4
|
format:
|
|
6
5
|
type_v1: spec/overlay/format/1.0
|
|
7
|
-
description: Attribute formats for %{schema_name}
|
|
8
6
|
|
|
9
7
|
encode:
|
|
10
8
|
type_v1: spec/overlay/encode/1.0
|
|
11
|
-
description: Character set encoding for %{schema_name}
|
|
12
9
|
|
|
13
10
|
entry:
|
|
14
11
|
type_v1: spec/overlay/entry/1.0
|
|
15
|
-
description: Field entries for %{schema_name}
|
|
16
12
|
|
|
17
13
|
information:
|
|
18
14
|
type_v1: spec/overlay/information/1.0
|
|
19
|
-
description: Informational items for %{schema_name}
|
|
20
15
|
|
|
21
16
|
conditional:
|
|
22
17
|
type_v1: spec/overlay/conditional/1.0
|
|
23
|
-
description:
|
|
24
18
|
|
|
25
19
|
source:
|
|
26
20
|
type_v1: spec/overlay/source/1.0
|
|
27
|
-
description: Source endpoints for %{schema_name}
|
|
28
21
|
|
|
29
22
|
review:
|
|
30
23
|
type_v1: spec/overlay/review/1.0
|
|
31
|
-
description: Field entry review comments for %{schema_name}
|
|
32
24
|
|
|
33
25
|
masking:
|
|
34
26
|
type_v1: spec/overlay/masking/1.0
|
|
35
|
-
description: Masking attributes for %{schema_name}
|
data/lib/odca/headful_overlay.rb
CHANGED
|
@@ -32,11 +32,7 @@ module Odca
|
|
|
32
32
|
Odca::Overlays::Header.new(
|
|
33
33
|
role: role,
|
|
34
34
|
purpose: purpose,
|
|
35
|
-
type: overlay_info['type_v1']
|
|
36
|
-
description: format(
|
|
37
|
-
overlay_info['description'],
|
|
38
|
-
schema_name: parentful_overlay.parent.name
|
|
39
|
-
)
|
|
35
|
+
type: overlay_info['type_v1']
|
|
40
36
|
)
|
|
41
37
|
end
|
|
42
38
|
|
data/lib/odca/overlays/header.rb
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
module Odca
|
|
2
2
|
module Overlays
|
|
3
3
|
class Header
|
|
4
|
-
attr_reader :issued_by, :role, :purpose, :
|
|
4
|
+
attr_reader :issued_by, :role, :purpose, :type
|
|
5
5
|
|
|
6
|
-
def initialize(role:, purpose:,
|
|
6
|
+
def initialize(role:, purpose:, type:, issued_by: '')
|
|
7
7
|
@issued_by = issued_by
|
|
8
8
|
@role = role
|
|
9
9
|
@purpose = purpose
|
|
10
|
-
@description = description
|
|
11
10
|
@type = type
|
|
12
11
|
end
|
|
13
12
|
|
|
@@ -15,7 +14,6 @@ module Odca
|
|
|
15
14
|
{
|
|
16
15
|
'@context' => 'https://odca.tech/overlays/v1',
|
|
17
16
|
type: type,
|
|
18
|
-
description: description,
|
|
19
17
|
issued_by: issued_by,
|
|
20
18
|
role: role || '',
|
|
21
19
|
purpose: purpose || ''
|
data/lib/odca/schema_parser.rb
CHANGED
|
@@ -19,12 +19,24 @@ module Odca
|
|
|
19
19
|
overlay_attrs = {}
|
|
20
20
|
overlay_indexes = overlay_dtos.map(&:index)
|
|
21
21
|
|
|
22
|
+
entry_overlay_indexes = overlay_dtos.select do |ov|
|
|
23
|
+
ov.name == 'Entry Overlay'
|
|
24
|
+
end.map(&:index)
|
|
25
|
+
|
|
22
26
|
records.each do |row|
|
|
23
27
|
attr_name = row[3]
|
|
28
|
+
attr_type = row[4]
|
|
29
|
+
entry_overlay_indexes.each do |ov_index|
|
|
30
|
+
if row[ov_index]
|
|
31
|
+
attr_type = 'Array[Text]'
|
|
32
|
+
break
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
24
36
|
schema_base.add_attribute(
|
|
25
37
|
SchemaBase::Attribute.new(
|
|
26
38
|
name: attr_name,
|
|
27
|
-
type:
|
|
39
|
+
type: attr_type,
|
|
28
40
|
pii: row[5]
|
|
29
41
|
)
|
|
30
42
|
)
|
data/lib/odca/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: odca
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- THCLab
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-11-
|
|
11
|
+
date: 2019-11-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base58
|