spyke 4.0.0 → 4.0.1

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: e980ff30e66724a75b850bd1f34c55e61811982a
4
- data.tar.gz: 6445b6f21a1636cdd84ecb64228583f7abb3fde1
3
+ metadata.gz: 89f544498e8d5c745ad7255f701ff8403d9199e9
4
+ data.tar.gz: cdda57ef83c4c6b3efbd7d7bcee9bc73332b2212
5
5
  SHA512:
6
- metadata.gz: 72b27fd9fc2e31c0d20a0d6659fe3df37e7608c35a86fa65d9f770ff9c5f86e7f54efcbed52cc277496ca321f82c30f729a337aa8a2ec6db91e9839e8d9b5978
7
- data.tar.gz: 366d92028af07c902f6e7a7dd4ef5c3938f1059de6e39caff50fa8dba158e70923b37b918f9e852ea33557cb9f18d471d2f872ab7eb5ba34fc4734201620fe85
6
+ metadata.gz: 5ea490a4c53f399e4b26b4365981b8018d9d4e87e0ed6cc56285e088991eace6d727a6ec81768b6266570a0f53fb77e1b477e336dfe8b1f0be479ad644c4652f
7
+ data.tar.gz: eb126a85144b37a05de296901d40b0ec1e153e519555a6e470d1751133652f8e8c87d1993403799aee88942556c0119f5f71e942952a12882b5847ad3d648139
@@ -62,6 +62,10 @@ module Spyke
62
62
  "#<#{self.class}(#{@uri_template}) id: #{id.inspect} #{inspect_attributes}>"
63
63
  end
64
64
 
65
+ def as_json(options = nil)
66
+ attributes.as_json(options)
67
+ end
68
+
65
69
  private
66
70
 
67
71
  def use_setters(attributes)
data/lib/spyke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spyke
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
  end
data/test/scopes_test.rb CHANGED
@@ -135,5 +135,10 @@ module Spyke
135
135
  Recipe.new.groups.unknown_method
136
136
  end
137
137
  end
138
+
139
+ def test_to_json
140
+ stub_request(:get, 'http://sushi.com/recipes').to_return_json(result: [{ id: 1, title: 'Sushi' }])
141
+ assert_equal '[{"id":1,"title":"Sushi"}]', Recipe.all.to_json
142
+ end
138
143
  end
139
144
  end
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: 4.0.0
4
+ version: 4.0.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: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport