plate_id 0.0.4 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/plate_id.rb +2 -1
- data/lib/uri/plate_id.rb +11 -1
- 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: 8b8d3dabbaefa7c9ee8a0deae52e407cd1ab16da2155412ef675357cd9d9f70c
|
4
|
+
data.tar.gz: 7551903ea1563796779fd1d009a5ebbe545a270e77224505a20c94b758d5b3dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afcd7d4e1dc7a155bca5c2d38ab156862788faca0a4b261aee352984f969c518ab63a62b4374b0b001cf9a58fd2f871e9502b716510c8208901bb0dc72c59472
|
7
|
+
data.tar.gz: 4cd51908239399a521f6585c9aae06b49ea2491dd14f059f0e1d765b68848abdfa00a677fe001f5e14df298fa8be121d290b0a47a21dad0912f89d045f8d9b2d
|
data/.gitignore
CHANGED
data/lib/plate_id.rb
CHANGED
data/lib/uri/plate_id.rb
CHANGED
@@ -13,9 +13,12 @@ module URI
|
|
13
13
|
|
14
14
|
MAPPING = {
|
15
15
|
"Site" => { host: "Base", base_class: "Site" },
|
16
|
+
"Ngn::Site" => { host: "Base", base_class: "Site" },
|
17
|
+
"Org::Site" => { host: "Base", base_class: "Site" },
|
16
18
|
"Ngn::Attachment" => { host: "Base", base_class: "Attachment" },
|
17
19
|
"Ngn::Domain" => { host: "Base", base_class: "Domain" },
|
18
20
|
"Ngn::ClipboardItem" => { host: "Base", base_class: "ClipboardItem" },
|
21
|
+
"Ngn::VersionControl::Actions::Action" => { host: "Base", base_class: "VersionControl" },
|
19
22
|
|
20
23
|
"Ngn::Content::Post" => { host: "Content", base_class: "Post" },
|
21
24
|
"Ngn::Content::Section" => { host: "Content", base_class: "Section" },
|
@@ -32,6 +35,7 @@ module URI
|
|
32
35
|
"Ngn::ContentModel::SectionType" => { host: "ContentModel", base_class: "SectionType" },
|
33
36
|
"Ngn::ContentModel::ElementType" => { host: "ContentModel", base_class: "ElementType" },
|
34
37
|
"Ngn::ContentModel::ObjectTypeKind" => { host: "ContentModel", base_class: "ContentType" },
|
38
|
+
"Ngn::ContentModel::ObjectType" => { host: "ContentModel", base_class: "ObjectType" }, # TODO: legacy, to be replaced with typed kinds
|
35
39
|
"Ngn::ContentModel::TrayType" => { host: "ContentModel", base_class: "TrayType" },
|
36
40
|
"Ngn::ContentModel::AuthenticationType" => { host: "ContentModel", base_class: "AuthenticationType" },
|
37
41
|
|
@@ -47,7 +51,9 @@ module URI
|
|
47
51
|
"Org::FormMessage" => { host: "Organization", base_class: "FormMessage" },
|
48
52
|
|
49
53
|
# Access control
|
50
|
-
"AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" }
|
54
|
+
"AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" },
|
55
|
+
"AccessControl::Role" => { host: "AccessControl", base_class: "Role" },
|
56
|
+
"AccessControl::Group" => { host: "AccessControl", base_class: "Group" }
|
51
57
|
}
|
52
58
|
|
53
59
|
attr_reader :base_class, :id
|
@@ -84,7 +90,11 @@ module URI
|
|
84
90
|
# )
|
85
91
|
def build(args)
|
86
92
|
comps = Util.make_components_hash(self, args)
|
93
|
+
return unless comps
|
94
|
+
|
87
95
|
parts = MAPPING[comps[:model_name]].dup
|
96
|
+
return unless parts
|
97
|
+
|
88
98
|
parts[:scheme] = comps[:scheme]
|
89
99
|
parts[:id] = comps[:model_id]
|
90
100
|
parts[:path] = "/#{parts[:base_class]}/#{CGI.escape(parts[:id].to_s)}"
|
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.9
|
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-04-08 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.
|