plate_id 0.0.3 → 0.0.8
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 +2 -1
- data/lib/uri/plate_id.rb +10 -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: 723d95e019a4e8f50cf7c5579685a634f5edc03e880a75330414f9da93589271
|
4
|
+
data.tar.gz: 8c5d1e07dfa9f86178ae5705966701ef34cacff231c56aaad128112d885bfa69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dfdc8df5f95303f3629d94bf537d774088a0c265629b36d401b217a8bfeef959cf43f32a3ad07778177775492ce65240eee35e49fb4d56a6fa8d7e027746610
|
7
|
+
data.tar.gz: cc8ecb4c86595604fb45f1db90674f766ceeae356ac6d430eb99ab53bb803d496b5238c8aa43b9bc3aa22b6f037e636ebcfb83c0b1bf93b9eb0c46e04d44f1b4
|
data/lib/plate_id.rb
CHANGED
data/lib/uri/plate_id.rb
CHANGED
@@ -16,6 +16,7 @@ module URI
|
|
16
16
|
"Ngn::Attachment" => { host: "Base", base_class: "Attachment" },
|
17
17
|
"Ngn::Domain" => { host: "Base", base_class: "Domain" },
|
18
18
|
"Ngn::ClipboardItem" => { host: "Base", base_class: "ClipboardItem" },
|
19
|
+
"Ngn::VersionControl::Actions::Action" => { host: "Base", base_class: "VersionControl" },
|
19
20
|
|
20
21
|
"Ngn::Content::Post" => { host: "Content", base_class: "Post" },
|
21
22
|
"Ngn::Content::Section" => { host: "Content", base_class: "Section" },
|
@@ -24,6 +25,7 @@ module URI
|
|
24
25
|
"Ngn::Content::Element" => { host: "Content", base_class: "Element" },
|
25
26
|
"Ngn::Content::ContentObject" => { host: "Content", base_class: "ContentObject" },
|
26
27
|
"Ngn::Content::SiteTranslation" => { host: "Content", base_class: "SiteTranslation" },
|
28
|
+
"Ngn::Content::AuthenticationObject" => { host: "Content", base_class: "AuthenticationObject" },
|
27
29
|
|
28
30
|
"Ngn::ContentModel::ContentField" => { host: "ContentModel", base_class: "ContentField" },
|
29
31
|
"Ngn::ContentModel::ContentFieldTab" => { host: "ContentModel", base_class: "ContentFieldGroup" },
|
@@ -31,6 +33,7 @@ module URI
|
|
31
33
|
"Ngn::ContentModel::SectionType" => { host: "ContentModel", base_class: "SectionType" },
|
32
34
|
"Ngn::ContentModel::ElementType" => { host: "ContentModel", base_class: "ElementType" },
|
33
35
|
"Ngn::ContentModel::ObjectTypeKind" => { host: "ContentModel", base_class: "ContentType" },
|
36
|
+
"Ngn::ContentModel::ObjectType" => { host: "ContentModel", base_class: "ObjectType" }, # TODO: legacy, to be replaced with typed kinds
|
34
37
|
"Ngn::ContentModel::TrayType" => { host: "ContentModel", base_class: "TrayType" },
|
35
38
|
"Ngn::ContentModel::AuthenticationType" => { host: "ContentModel", base_class: "AuthenticationType" },
|
36
39
|
|
@@ -46,7 +49,9 @@ module URI
|
|
46
49
|
"Org::FormMessage" => { host: "Organization", base_class: "FormMessage" },
|
47
50
|
|
48
51
|
# Access control
|
49
|
-
"AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" }
|
52
|
+
"AccessControl::Policy" => { host: "AccessControl", base_class: "Policy" },
|
53
|
+
"AccessControl::Role" => { host: "AccessControl", base_class: "Role" },
|
54
|
+
"AccessControl::Group" => { host: "AccessControl", base_class: "Group" }
|
50
55
|
}
|
51
56
|
|
52
57
|
attr_reader :base_class, :id
|
@@ -83,7 +88,11 @@ module URI
|
|
83
88
|
# )
|
84
89
|
def build(args)
|
85
90
|
comps = Util.make_components_hash(self, args)
|
91
|
+
return unless comps
|
92
|
+
|
86
93
|
parts = MAPPING[comps[:model_name]].dup
|
94
|
+
return unless parts
|
95
|
+
|
87
96
|
parts[:scheme] = comps[:scheme]
|
88
97
|
parts[:id] = comps[:model_id]
|
89
98
|
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.8
|
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.
|