plate_id 0.0.3 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adf5abc029fc6ad7fbdab71a5fd2f933d1dabc8b24e87931fb6122a2b03269d3
4
- data.tar.gz: 57c472817a704de57ec1eb5227ce231b6bdee8c16bc93c782cde4959c87f7579
3
+ metadata.gz: 723d95e019a4e8f50cf7c5579685a634f5edc03e880a75330414f9da93589271
4
+ data.tar.gz: 8c5d1e07dfa9f86178ae5705966701ef34cacff231c56aaad128112d885bfa69
5
5
  SHA512:
6
- metadata.gz: be634f68e2d205e453b1445adcdb722187a3641356399d516b30e72c1d00609a6a22f760f2e15f5d19c3d82c730a65126607d7a9ee65cb8711ab0f0904058e2d
7
- data.tar.gz: f86089d0089d685f4270722421014d7cbe5cdfa7132accefc11e6473a3e2e2bc32ac9b9d7086c66e7c4b2db0b58c55741ce985db7a007d102503aaad5a3b5c37
6
+ metadata.gz: 2dfdc8df5f95303f3629d94bf537d774088a0c265629b36d401b217a8bfeef959cf43f32a3ad07778177775492ce65240eee35e49fb4d56a6fa8d7e027746610
7
+ data.tar.gz: cc8ecb4c86595604fb45f1db90674f766ceeae356ac6d430eb99ab53bb803d496b5238c8aa43b9bc3aa22b6f037e636ebcfb83c0b1bf93b9eb0c46e04d44f1b4
data/lib/plate_id.rb CHANGED
@@ -4,7 +4,8 @@ class PlateID
4
4
  class << self
5
5
 
6
6
  def create(model)
7
- new(URI::PlateID.create(model))
7
+ uri = URI::PlateID.create(model)
8
+ new(uri) if uri
8
9
  end
9
10
 
10
11
  def parse(plate_id)
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "plate_id"
5
- spec.version = "0.0.3"
5
+ spec.version = "0.0.8"
6
6
  spec.authors = ["Kobus Post"]
7
7
  spec.email = ["kobus@getplate.com"]
8
8
  spec.homepage = "https://www.getplate.com"
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.3
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-02-24 00:00:00.000000000 Z
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.