pebbles-uid 0.0.17 → 0.0.19

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,15 +1,7 @@
1
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=
2
+ SHA1:
3
+ metadata.gz: 9f1bf5b61101cf67c6f0ef169d4cd9233db7f9ec
4
+ data.tar.gz: 530393b0ea0648008ac270b41ac98a79eb90a9b8
5
+ SHA512:
6
+ metadata.gz: 433861dfdd24ec9dc4e03363a3c208d00e1177f98a2246f4e8d2871ba3c57b9e6b79f2e32adb066deeaa1b98968a28580a7efcac2be43d38a5f86431afe1112e
7
+ data.tar.gz: 7e808508c3028bc0649c0ba37c7d5d36419c2104b96e42ef9bb99b037e583d9e5d866d0cc587c1de913674a917ce88aed8bcddd0315308955fa8296aa95cbe52
@@ -31,7 +31,7 @@ module Pebbles
31
31
  end
32
32
 
33
33
  def list?
34
- terms.size != 1 or term.strip[-1..-1] == ","
34
+ terms.size != 1 or %w(, |).include?(term.strip[-1..-1])
35
35
  end
36
36
 
37
37
  def list
@@ -1,5 +1,5 @@
1
1
  module Pebbles
2
2
  class Uid
3
- VERSION = "0.0.17"
3
+ VERSION = "0.0.19"
4
4
  end
5
5
  end
@@ -5,7 +5,12 @@ module Pebbles
5
5
  class << self
6
6
 
7
7
  def valid?(path)
8
- stars_are_solitary?(path) && single_caret?(path) && pipes_are_interleaved?(path) && carets_are_leading?(path) && stars_are_terminating?(path)
8
+ path &&
9
+ stars_are_solitary?(path) &&
10
+ single_caret?(path) &&
11
+ pipes_are_interleaved?(path) &&
12
+ carets_are_leading?(path) &&
13
+ stars_are_terminating?(path)
9
14
  end
10
15
 
11
16
  # a.*.c passes
data/pebbles-uid.gemspec CHANGED
@@ -15,5 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Pebbles::Uid::VERSION
17
17
 
18
+ gem.add_development_dependency "rake"
18
19
  gem.add_development_dependency "rspec"
20
+ gem.add_development_dependency "its"
19
21
  end
@@ -1,4 +1,5 @@
1
1
  require 'pebbles-uid/conditions'
2
+ require 'its'
2
3
 
3
4
  describe Pebbles::Uid::Conditions do
4
5
 
@@ -7,6 +7,16 @@ describe Pebbles::Uid::Wildcard do
7
7
  Pebbles::Uid::Wildcard.valid?('a.b.d').should == true
8
8
  end
9
9
 
10
+ describe '#valid?' do
11
+ it 'returns false for nil' do
12
+ Pebbles::Uid::Wildcard.valid?(nil).should == nil
13
+ end
14
+
15
+ it 'returns true for empty string' do
16
+ Pebbles::Uid::Wildcard.valid?('').should == true
17
+ end
18
+ end
19
+
10
20
  context "terminating asterisk representing entire label" do
11
21
  [
12
22
  '*', 'a.b.c.*', 'a.b|c.*', 'a.^b.c.*'
metadata CHANGED
@@ -1,27 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-uid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-03 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rspec
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - ! '>='
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: its
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
18
46
  - !ruby/object:Gem::Version
19
47
  version: '0'
20
48
  type: :development
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - ! '>='
52
+ - - ">="
25
53
  - !ruby/object:Gem::Version
26
54
  version: '0'
27
55
  description: Handle pebble UIDs conveniently.
@@ -31,7 +59,7 @@ executables: []
31
59
  extensions: []
32
60
  extra_rdoc_files: []
33
61
  files:
34
- - .gitignore
62
+ - ".gitignore"
35
63
  - Gemfile
36
64
  - LICENSE
37
65
  - README.md
@@ -63,17 +91,17 @@ require_paths:
63
91
  - lib
64
92
  required_ruby_version: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - ! '>='
94
+ - - ">="
67
95
  - !ruby/object:Gem::Version
68
96
  version: '0'
69
97
  required_rubygems_version: !ruby/object:Gem::Requirement
70
98
  requirements:
71
- - - ! '>='
99
+ - - ">="
72
100
  - !ruby/object:Gem::Version
73
101
  version: '0'
74
102
  requirements: []
75
103
  rubyforge_project:
76
- rubygems_version: 2.0.6
104
+ rubygems_version: 2.2.2
77
105
  signing_key:
78
106
  specification_version: 4
79
107
  summary: Unique identifiers in the Pebblestack universe, in the format species[.genus]:path$oid,
@@ -86,4 +114,3 @@ test_files:
86
114
  - spec/roots_spec.rb
87
115
  - spec/uid_spec.rb
88
116
  - spec/wildcard_spec.rb
89
- has_rdoc: