spyke 1.1.0 → 1.1.1
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/README.md +7 -0
- data/lib/spyke/orm.rb +1 -0
- data/lib/spyke/version.rb +1 -1
- data/test/orm_test.rb +3 -3
- 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: fe31d061e32e3c43bbbd1f2ab65af081fd82d967
|
4
|
+
data.tar.gz: 388748ebaf5ab22e1ffae4ec9007559fc4ac127d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31f2734a11911f1149701b338482ce5faa379e415d3a745bd9d50615557018be61e934c3939215289a92a4ef3e638634fa469796900b7fb61e5fd41c96d0e82c
|
7
|
+
data.tar.gz: 2bf2903f8dab9d3ab41ce19b876ee4ca077bfa72b0af133b840a0d6b3d18d62912b774461f3ac63aafd7a33d5e7fb76aaff49c767ec9c614edb69360e8e7db2b
|
data/README.md
CHANGED
@@ -95,6 +95,13 @@ Spyke comes with Faraday middleware for Rails that will output helpful
|
|
95
95
|
ActiveRecord-like output to the main log as well as keep a record of
|
96
96
|
request/responses in `/log/faraday.log`.
|
97
97
|
|
98
|
+
```bash
|
99
|
+
Started GET "/posts" for 127.0.0.1 at 2014-12-01 14:31:20 +0000
|
100
|
+
Processing by PostsController#index as HTML
|
101
|
+
Parameters: {}
|
102
|
+
GET http://api.com/posts [200]
|
103
|
+
```
|
104
|
+
|
98
105
|
To use it, simply add it to the stack of middleware:
|
99
106
|
|
100
107
|
```ruby
|
data/lib/spyke/orm.rb
CHANGED
data/lib/spyke/version.rb
CHANGED
data/test/orm_test.rb
CHANGED
@@ -34,9 +34,9 @@ module Spyke
|
|
34
34
|
def test_404
|
35
35
|
stub_request(:get, 'http://sushi.com/recipes/1').to_return(status: 404, body: { message: 'Not found' }.to_json)
|
36
36
|
|
37
|
-
assert_raises
|
38
|
-
|
39
|
-
|
37
|
+
assert_raises(ResourceNotFound) { Recipe.find(1) }
|
38
|
+
assert_raises(ResourceNotFound) { Recipe.find(nil) }
|
39
|
+
assert_raises(ResourceNotFound) { Recipe.find('') }
|
40
40
|
end
|
41
41
|
|
42
42
|
def test_save_new_record
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spyke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|