plate_id 0.0.1 → 0.0.6
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/lib/plate_id.rb +4 -0
- data/lib/uri/plate_id.rb +14 -5
- 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: 70bf5412c0dfcfdfe2993c7d3012b8073c5512500c843345fd4f856288595fce
|
4
|
+
data.tar.gz: 27ab91fbc63de055ad1e5726c311c354869a763549166bc514d81e27b18ad69b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d70fc2247e4ac453643ef1cb299b551c6a5d4426e1d197c7340e75d8ca1485e7d965bc27ddd1597dde2ba75ca1e4fa0fbd5185c4731057a8ab6e9dbb179de9f1
|
7
|
+
data.tar.gz: b1db3f55237419a7313d548de16847e2586bc7595c72e07fa56b4c29360a11c11f0de0effef8cab56ce1fbc400fabe064206e5d088681554002e3bbec57f703c
|
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,11 +9,14 @@ 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" },
|
13
17
|
"Ngn::Domain" => { host: "Base", base_class: "Domain" },
|
14
18
|
"Ngn::ClipboardItem" => { host: "Base", base_class: "ClipboardItem" },
|
19
|
+
"Ngn::VersionControl::Actions::Action" => { host: "Base", base_class: "VersionControl" },
|
15
20
|
|
16
21
|
"Ngn::Content::Post" => { host: "Content", base_class: "Post" },
|
17
22
|
"Ngn::Content::Section" => { host: "Content", base_class: "Section" },
|
@@ -20,6 +25,7 @@ module URI
|
|
20
25
|
"Ngn::Content::Element" => { host: "Content", base_class: "Element" },
|
21
26
|
"Ngn::Content::ContentObject" => { host: "Content", base_class: "ContentObject" },
|
22
27
|
"Ngn::Content::SiteTranslation" => { host: "Content", base_class: "SiteTranslation" },
|
28
|
+
"Ngn::Content::AuthenticationObject" => { host: "Content", base_class: "AuthenticationObject" },
|
23
29
|
|
24
30
|
"Ngn::ContentModel::ContentField" => { host: "ContentModel", base_class: "ContentField" },
|
25
31
|
"Ngn::ContentModel::ContentFieldTab" => { host: "ContentModel", base_class: "ContentFieldGroup" },
|
@@ -37,11 +43,14 @@ module URI
|
|
37
43
|
"Org::Auth::User" => { host: "Auth", base_class: "User" },
|
38
44
|
"Api::Integration" => { host: "Auth", base_class: "ApiIntegration" },
|
39
45
|
|
40
|
-
# "Ngn::Auth::AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" },
|
41
|
-
|
42
46
|
"Org::Company" => { host: "Organization", base_class: "Company" },
|
43
47
|
"Org::Partner" => { host: "Organization", base_class: "Partner" },
|
44
|
-
"Org::FormMessage" => { host: "Organization", base_class: "FormMessage" }
|
48
|
+
"Org::FormMessage" => { host: "Organization", base_class: "FormMessage" },
|
49
|
+
|
50
|
+
# Access control
|
51
|
+
"AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" },
|
52
|
+
"AccessControl::Role" => { host: "AccessControl", base_class: "Role" },
|
53
|
+
"AccessControl::Group" => { host: "AccessControl", base_class: "Group" }
|
45
54
|
}
|
46
55
|
|
47
56
|
attr_reader :base_class, :id
|
@@ -67,13 +76,13 @@ module URI
|
|
67
76
|
|
68
77
|
# Create a new URI::PlateID from components with argument check.
|
69
78
|
#
|
70
|
-
# The allowed components are
|
79
|
+
# The allowed components are model_name and model_id, which
|
71
80
|
# can be either a hash or an array.
|
72
81
|
#
|
73
82
|
# Using a hash:
|
74
83
|
#
|
75
84
|
# URI::PlateID.build(
|
76
|
-
# model_name: 'Ngn::
|
85
|
+
# model_name: 'Ngn::ContentModel::ElementType',
|
77
86
|
# model_id: '1'
|
78
87
|
# )
|
79
88
|
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.6
|
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-22 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.
|