slipcover 0.2.2 → 0.2.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 +4 -4
- data/lib/slipcover/http_adapter.rb +1 -0
- data/lib/slipcover/version.rb +1 -1
- data/spec/http_adapter_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ced59e9a5789c91f034b55b574a55ae57440c3f
|
|
4
|
+
data.tar.gz: bd722f1f98e0b9b05350377018edd78eaefe3cb0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/slipcover/version.rb
CHANGED
data/spec/http_adapter_spec.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
14
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: rest-client
|