plate_id 0.0.0 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plate_id.rb +4 -0
- data/lib/uri/plate_id.rb +15 -7
- data/plate_id.gemspec +1 -1
- 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: 5049ac8ebc480808709a64331a1bfa81ca18439cd9be1ca90e1a3b7210df0585
|
4
|
+
data.tar.gz: f1b9fbee8fcb9d927a6c6ce20de3b4cfe2212c8bd87e9159cf041c7ec7d35a05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c51e9581ecc77a27ee583570d8e3da2077714d3101663c5345f66ed4b3fc28f999fde3a4cf6b1251a75f213697225462b1d681690b3ce42d2688ba45cbcacd
|
7
|
+
data.tar.gz: 03d03dd24752f22546c785f1f3845a51378e6c2fd8d9cac10f2054b4ae60e376a051c04f206ba90be60142c83941555c16dfea64b56d36994d57a2eebba82680
|
data/lib/plate_id.rb
CHANGED
data/lib/uri/plate_id.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
1
3
|
module URI
|
2
4
|
class PlateID < Generic
|
3
5
|
|
@@ -7,6 +9,8 @@ module URI
|
|
7
9
|
#
|
8
10
|
# The URI format looks like "plateid://group_name/base_class/id".
|
9
11
|
|
12
|
+
attr_writer :id
|
13
|
+
|
10
14
|
MAPPING = {
|
11
15
|
"Site" => { host: "Base", base_class: "Site" },
|
12
16
|
"Ngn::Attachment" => { host: "Base", base_class: "Attachment" },
|
@@ -20,6 +24,7 @@ module URI
|
|
20
24
|
"Ngn::Content::Element" => { host: "Content", base_class: "Element" },
|
21
25
|
"Ngn::Content::ContentObject" => { host: "Content", base_class: "ContentObject" },
|
22
26
|
"Ngn::Content::SiteTranslation" => { host: "Content", base_class: "SiteTranslation" },
|
27
|
+
"Ngn::Content::AuthenticationObject" => { host: "Content", base_class: "AuthenticationObject" },
|
23
28
|
|
24
29
|
"Ngn::ContentModel::ContentField" => { host: "ContentModel", base_class: "ContentField" },
|
25
30
|
"Ngn::ContentModel::ContentFieldTab" => { host: "ContentModel", base_class: "ContentFieldGroup" },
|
@@ -34,14 +39,17 @@ module URI
|
|
34
39
|
"Ngn::Theming::ThemeFile" => { host: "Theming", base_class: "ThemeFile" },
|
35
40
|
"Ngn::Theming::Prerender" => { host: "Theming", base_class: "Prerender" },
|
36
41
|
|
37
|
-
"
|
38
|
-
"
|
39
|
-
|
40
|
-
"Ngn::Auth::AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" },
|
42
|
+
"Org::Auth::User" => { host: "Auth", base_class: "User" },
|
43
|
+
"Api::Integration" => { host: "Auth", base_class: "ApiIntegration" },
|
41
44
|
|
42
45
|
"Org::Company" => { host: "Organization", base_class: "Company" },
|
43
46
|
"Org::Partner" => { host: "Organization", base_class: "Partner" },
|
44
|
-
"Org::FormMessage" => { host: "Organization", base_class: "FormMessage" }
|
47
|
+
"Org::FormMessage" => { host: "Organization", base_class: "FormMessage" },
|
48
|
+
|
49
|
+
# Access control
|
50
|
+
"AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" },
|
51
|
+
"AccessControl::Role" => { host: "AccessControl", base_class: "Role" },
|
52
|
+
"AccessControl::Group" => { host: "AccessControl", base_class: "Group" }
|
45
53
|
}
|
46
54
|
|
47
55
|
attr_reader :base_class, :id
|
@@ -67,13 +75,13 @@ module URI
|
|
67
75
|
|
68
76
|
# Create a new URI::PlateID from components with argument check.
|
69
77
|
#
|
70
|
-
# The allowed components are
|
78
|
+
# The allowed components are model_name and model_id, which
|
71
79
|
# can be either a hash or an array.
|
72
80
|
#
|
73
81
|
# Using a hash:
|
74
82
|
#
|
75
83
|
# URI::PlateID.build(
|
76
|
-
# model_name: 'Ngn::
|
84
|
+
# model_name: 'Ngn::ContentModel::ElementType',
|
77
85
|
# model_id: '1'
|
78
86
|
# )
|
79
87
|
def build(args)
|
data/plate_id.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plate_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kobus Post
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Identify any Plate record or class with URIs. Somewhat based on Rails's
|
14
14
|
GlobalID gem.
|