rrod 1.0.0.alpha.2 → 1.0.0.alpha.3

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
  SHA1:
3
- metadata.gz: 95ae98b20d5fcbe473c9a350fad0b168d599c4e0
4
- data.tar.gz: 454c37cfe3682918c89e72c69e586c30e261dd9c
3
+ metadata.gz: d82f0abda015c521b93a24bd2ef581f66fed60da
4
+ data.tar.gz: effc83e7e92771342ecb14ca08213544655d08a8
5
5
  SHA512:
6
- metadata.gz: 01f3c763fb67f2b88bb8ca2f1d1d1aa2c6ba240fb1b64f0e419bdc2fac9bf2e60778dff971152e6730dba2f68e40ebe0e851704249bc734944978e4d4fe5c781
7
- data.tar.gz: 919a75a3101a49e1bcebc69a822925ce59b39fe5da96c8785665d9a1b9072bbc1d21e58d8da2a122fb210b752da37059a43c19f8c6371bb6f0fee4f7984249c6
6
+ metadata.gz: 0a3348a6bab3571b808fa5807abbf050123e153102d5608c186ca3436d7ffccd9267d14ef1898e2bcbb6300254193bc5dcbee31bb1f167a082fc8a362cd97569
7
+ data.tar.gz: e07f22c44e916656083ab0a50a63bf30b4a7ecb286450bd9de97a5566c7dcf0327237c7686431eb8d138f5b7ca80a656fd95467754cdfe071ca849adfc84bb70
@@ -44,7 +44,7 @@ module Rrod
44
44
 
45
45
  def search(query)
46
46
  records = client.search(bucket_name, query.to_s)['docs']
47
- raise ArgumentError.new("NO RES ULTS") unless records.any?
47
+ raise NotFound.new unless records.any?
48
48
  records
49
49
  end
50
50
 
data/lib/rrod/version.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  Rrod = Module.new unless defined? Rrod
2
- Rrod::VERSION = '1.0.0.alpha.2'
2
+ Rrod::VERSION = '1.0.0.alpha.3'
@@ -49,7 +49,7 @@ describe Rrod::Model::Finders, integration: true do
49
49
  end
50
50
 
51
51
  it "will raise an exception if one can't be found with a !" do
52
- expect { model.find_by! zombies: true }.to raise_error(ArgumentError)
52
+ expect { model.find_by! zombies: true }.to raise_error(Rrod::Model::NotFound)
53
53
  end
54
54
  end
55
55
 
@@ -66,12 +66,12 @@ describe Rrod::Model::Finders, integration: true do
66
66
  expect {model.find_all_by(id: instance.id)}.to raise_error(ArgumentError)
67
67
  end
68
68
 
69
- it "will return an exeception if none can be found" do
70
- expect { model.find_all_by zombies: 'yes plz'}.to raise_error(ArgumentError)
69
+ it "will return an empty array if none can be found" do
70
+ expect(model.find_all_by(zombies: 'yes plz')).to be_empty
71
71
  end
72
72
 
73
73
  it "will raise an exception if none can be found with a !" do
74
- expect { model.find_all_by! brains: :none }.to raise_error(ArgumentError)
74
+ expect { model.find_all_by! brains: :none }.to raise_error(Rrod::Model::NotFound)
75
75
  end
76
76
  end
77
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrod
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.2
4
+ version: 1.0.0.alpha.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hunter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-29 00:00:00.000000000 Z
11
+ date: 2014-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riak-client