plate_id 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70bf5412c0dfcfdfe2993c7d3012b8073c5512500c843345fd4f856288595fce
4
- data.tar.gz: 27ab91fbc63de055ad1e5726c311c354869a763549166bc514d81e27b18ad69b
3
+ metadata.gz: 4a739c97b4695a5e4215733bf61da11d9a062f4efad404f6457f3af84297076d
4
+ data.tar.gz: 554eb95e24f95a830446d45c404677d47f86986d2d593aae9caa7f38be932e2b
5
5
  SHA512:
6
- metadata.gz: d70fc2247e4ac453643ef1cb299b551c6a5d4426e1d197c7340e75d8ca1485e7d965bc27ddd1597dde2ba75ca1e4fa0fbd5185c4731057a8ab6e9dbb179de9f1
7
- data.tar.gz: b1db3f55237419a7313d548de16847e2586bc7595c72e07fa56b4c29360a11c11f0de0effef8cab56ce1fbc400fabe064206e5d088681554002e3bbec57f703c
6
+ metadata.gz: 6a74bde97760d74f9bb9ac4a172423eaec845a8c55cbe528154b6a130c968b02cb8e14124cfdff70f4d71cc259152450489c2290b7f57c8192634371891c8fac
7
+ data.tar.gz: 6a0022c025bd6916448f2bee27c9a372ab49e9e737d8a5c55fa0009359dcd35599d7743bc6d95f8acc5856264efa8f406d72146bfbe2372d46e01b43f3090004
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
@@ -87,7 +87,11 @@ module URI
87
87
  # )
88
88
  def build(args)
89
89
  comps = Util.make_components_hash(self, args)
90
+ return unless comps
91
+
90
92
  parts = MAPPING[comps[:model_name]].dup
93
+ return unless parts
94
+
91
95
  parts[:scheme] = comps[:scheme]
92
96
  parts[:id] = comps[:model_id]
93
97
  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.6"
5
+ spec.version = "0.0.7"
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.6
4
+ version: 0.0.7
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-03-22 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.