plate_id 0.0.5 → 0.0.10
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 +10 -0
- 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: 1e4267be40d69246b89d74c0283fb9d3b34ec0bc003cce9b963da1ec681aaa94
|
4
|
+
data.tar.gz: e26eafdaae1d8451cb7deb7ead2010d75e82610144120a0f5ab31b2daeb3f2c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f01562368e6c1bf753ef5a322e2025e74f4f98e6bfa0c2f86d731d1d1de64a7b9724ee3b88a6b3d15eab0481238eda0fc97c6875db078b9dd471f036059c0296
|
7
|
+
data.tar.gz: 33e7f1efe94ff3f0ff48ed4ffe8620942f542619e9cbde5fdfac03ff366f545fdf3b982df26e79c25170df859f285fd1d8f3ed94a017591069e642129bfedd3e
|
data/.gitignore
CHANGED
data/lib/plate_id.rb
CHANGED
data/lib/uri/plate_id.rb
CHANGED
@@ -13,9 +13,14 @@ 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" },
|
19
|
+
"Ngn::AttachmentSetting" => { host: "Base", base_class: "AttachmentSetting" },
|
20
|
+
"Ngn::AttachmentFolder" => { host: "Base", base_class: "AttachmentFolder" },
|
17
21
|
"Ngn::Domain" => { host: "Base", base_class: "Domain" },
|
18
22
|
"Ngn::ClipboardItem" => { host: "Base", base_class: "ClipboardItem" },
|
23
|
+
"Ngn::VersionControl::Actions::Action" => { host: "Base", base_class: "VersionControl" },
|
19
24
|
|
20
25
|
"Ngn::Content::Post" => { host: "Content", base_class: "Post" },
|
21
26
|
"Ngn::Content::Section" => { host: "Content", base_class: "Section" },
|
@@ -32,6 +37,7 @@ module URI
|
|
32
37
|
"Ngn::ContentModel::SectionType" => { host: "ContentModel", base_class: "SectionType" },
|
33
38
|
"Ngn::ContentModel::ElementType" => { host: "ContentModel", base_class: "ElementType" },
|
34
39
|
"Ngn::ContentModel::ObjectTypeKind" => { host: "ContentModel", base_class: "ContentType" },
|
40
|
+
"Ngn::ContentModel::ObjectType" => { host: "ContentModel", base_class: "ObjectType" }, # TODO: legacy, to be replaced with typed kinds
|
35
41
|
"Ngn::ContentModel::TrayType" => { host: "ContentModel", base_class: "TrayType" },
|
36
42
|
"Ngn::ContentModel::AuthenticationType" => { host: "ContentModel", base_class: "AuthenticationType" },
|
37
43
|
|
@@ -86,7 +92,11 @@ module URI
|
|
86
92
|
# )
|
87
93
|
def build(args)
|
88
94
|
comps = Util.make_components_hash(self, args)
|
95
|
+
return unless comps
|
96
|
+
|
89
97
|
parts = MAPPING[comps[:model_name]].dup
|
98
|
+
return unless parts
|
99
|
+
|
90
100
|
parts[:scheme] = comps[:scheme]
|
91
101
|
parts[:id] = comps[:model_id]
|
92
102
|
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.10
|
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.
|