pebbles-uid 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MGE1NzBkZGQ0ZGUwNDRiOGZkYzY2OTdmOTcwYTc3M2VmMWZjOWMyMg==
5
+ data.tar.gz: !binary |-
6
+ NDI0M2NjOGRjYWQ2YWYxZTk4NTM4NzcyZDNlNTQ0MTA1YzU1NmI2NA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YmMyNjQ3YTI3ZjI3YTU5YjZlZGVmMDg4OTgzNzdhY2JlOGIwMjRhZGI5YTlm
10
+ YTY1OWE2NTMzYWZlYTM4N2E4ZWQwZTBkZGUwOGMzZDI2MjhiYzA2NDM2NzQ1
11
+ NzM0NWZlYjYyMGQ2YWQwNTIzNTg4NTFlY2M0MDMwYjYwODhkMWE=
12
+ data.tar.gz: !binary |-
13
+ MGEyOTk0MmNkNGE0YmY0NGY0Nzc3OTE5MGZmMzIwYTkxMTFhOTNhMDVjNzFj
14
+ NmI1ZWVjY2YwMmU1MDkwNDBhYzQ3MjkyN2Q3NGQyZTVjMTA2M2YxMjg2MmUx
15
+ M2QzNWNmMmIzN2VhNTRhMTQ5ZDVhZjZjYWI0MmY0NjkyMmFjMDU=
@@ -7,7 +7,7 @@ module Pebbles
7
7
  end
8
8
 
9
9
  def parse(s)
10
- /^(?<species>.*):(?<path>[^\$]*)\$?(?<oid>.*)$/ =~ s
10
+ /^(?<species>[^:]*):(?<path>[^\$]*)\$?(?<oid>.*)$/ =~ s
11
11
  [species, path, oid && oid.empty? ? nil : oid]
12
12
  end
13
13
 
@@ -1,5 +1,5 @@
1
1
  module Pebbles
2
2
  class Uid
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
5
5
  end
data/spec/uid_spec.rb CHANGED
@@ -45,6 +45,14 @@ describe Pebbles::Uid do
45
45
  end
46
46
  end
47
47
 
48
+ describe "when oid contains a colon" do
49
+ it "correctly parses klass, path and oid" do
50
+ Pebbles::Uid.new('post:tourism$:foo').oid.should eq ':foo'
51
+ Pebbles::Uid.new('post:tourism$fo:o').oid.should eq 'fo:o'
52
+ Pebbles::Uid.new('post.foo:tourism$:foo').species.should eq 'post.foo'
53
+ end
54
+ end
55
+
48
56
  describe "when uid is invalid" do
49
57
  it "returns nil oid" do
50
58
  Pebbles::Uid.oid('1').should be_nil
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-uid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
5
- prerelease:
4
+ version: 0.0.17
6
5
  platform: ruby
7
6
  authors:
8
7
  - Katrina Owen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -59,27 +56,26 @@ files:
59
56
  - spec/wildcard_spec.rb
60
57
  homepage: ''
61
58
  licenses: []
59
+ metadata: {}
62
60
  post_install_message:
63
61
  rdoc_options: []
64
62
  require_paths:
65
63
  - lib
66
64
  required_ruby_version: !ruby/object:Gem::Requirement
67
- none: false
68
65
  requirements:
69
66
  - - ! '>='
70
67
  - !ruby/object:Gem::Version
71
68
  version: '0'
72
69
  required_rubygems_version: !ruby/object:Gem::Requirement
73
- none: false
74
70
  requirements:
75
71
  - - ! '>='
76
72
  - !ruby/object:Gem::Version
77
73
  version: '0'
78
74
  requirements: []
79
75
  rubyforge_project:
80
- rubygems_version: 1.8.25
76
+ rubygems_version: 2.0.6
81
77
  signing_key:
82
- specification_version: 3
78
+ specification_version: 4
83
79
  summary: Unique identifiers in the Pebblestack universe, in the format species[.genus]:path$oid,
84
80
  where the path is a dot-delimited set of labels, the first of which (realm) is required.
85
81
  test_files:
@@ -90,3 +86,4 @@ test_files:
90
86
  - spec/roots_spec.rb
91
87
  - spec/uid_spec.rb
92
88
  - spec/wildcard_spec.rb
89
+ has_rdoc: