slipcover 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: b62699c6646708ec6b08a6350cf49393c20c70e8
4
- data.tar.gz: 0569fa1c37986f8db74ceb8f142f520c24c9c49e
3
+ metadata.gz: 8ced59e9a5789c91f034b55b574a55ae57440c3f
4
+ data.tar.gz: bd722f1f98e0b9b05350377018edd78eaefe3cb0
5
5
  SHA512:
6
- metadata.gz: 3aa0fec9eb262d71c41e174929e67a76a0fccad539be45ead17afa6e24c5bf67099bb8899001068f7113577717995371cad54250db96dede5b376caa21a38400
7
- data.tar.gz: 5a40e987c471f97a972e7936670315814c78cf4f1f12a4968e993dbe612968509d6c64349068b10c433e78f32e7a6eb89ab5e1062ee53dcd0fa924ee468ef414
6
+ metadata.gz: 069cfef5b41f9f73f5b8387229e96b4c92d1234bc503b23284e226975a939d29a2a248ad254cbeb0f07eab85b6217f34a67c2da184a44473e863b4c828cf7738
7
+ data.tar.gz: 21a9ec7275ef8e34889fe3607b527be22aef838a43c6ac055ce4959c426f4c657e62fc976de175ba1e6ee2317e87e8c60e9c54d5f1e98ce2ac5f591c79b0ac7a
@@ -56,6 +56,7 @@ module Slipcover
56
56
  response = JSON.parse(e.response) rescue Hash.new
57
57
  case response["reason"]
58
58
  when "no_db_file" then raise DBNotFound, e.response
59
+ when "Database does not exist." then raise DBNotFound, e.response
59
60
  when "missing_named_view" then raise NamedViewNotFound, e.response
60
61
  when "missing" then raise DocumentNotFound, e.response
61
62
  else
@@ -1,3 +1,3 @@
1
1
  module Slipcover
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -50,6 +50,13 @@ describe Slipcover::HttpAdapter do
50
50
  end.to raise_error(Slipcover::HttpAdapter::DBNotFound)
51
51
  end
52
52
 
53
+ it "raises DBNotFound when the error reason is 'Database does not exist.'" do
54
+ RestClient.stub(:post).and_raise(RestClient::ResourceNotFound.new('{"error": "not_found", "reason": "Database does not exist."}'))
55
+ expect do
56
+ adapter.post('http://url.com/non_existing_db/document_to_update', {})
57
+ end.to raise_error(Slipcover::HttpAdapter::DBNotFound)
58
+ end
59
+
53
60
  it "raises NamedViewNotFound when the error reason is 'missing_named_view'" do
54
61
  RestClient.stub(:post).and_raise(RestClient::ResourceNotFound.new('{"error": "not_found", "reason": "missing_named_view"}'))
55
62
  expect do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slipcover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kane Baccigalupi
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-06-09 00:00:00.000000000 Z
14
+ date: 2014-06-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rest-client