pebbles-uid 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,11 +27,11 @@ module Pebbles
27
27
  end
28
28
 
29
29
  def for_one?
30
- !wildcard_query? && terms.size == 1
30
+ !wildcard_query? && !list?
31
31
  end
32
32
 
33
33
  def list?
34
- terms.size != 1
34
+ terms.size != 1 or 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.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
@@ -84,6 +84,14 @@ describe Pebbles::Uid::Query do
84
84
  end
85
85
  end
86
86
 
87
+ context "for a list of resources, with one entry, but tailing comma - indicating a list" do
88
+ let(:term) { "post.doc:area51$abc," }
89
+ subject { Pebbles::Uid::Query.new(term) }
90
+
91
+ its(:for_one?) { should == false }
92
+ its(:list?) { should == true }
93
+ end
94
+
87
95
  context "for a collection of resources" do
88
96
  let(:term) { "post.*:area51.^a.b.c" }
89
97
  subject { Pebbles::Uid::Query.new(term) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-uid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70359179077380 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70359179077380
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  description: Handle pebble UIDs conveniently.
26
31
  email:
27
32
  - katrina.owen@gmail.com
@@ -72,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
77
  version: '0'
73
78
  requirements: []
74
79
  rubyforge_project:
75
- rubygems_version: 1.8.15
80
+ rubygems_version: 1.8.24
76
81
  signing_key:
77
82
  specification_version: 3
78
83
  summary: Unique identifiers in the Pebblestack universe, in the format species[.genus]:path$oid,