restpack_serializer 0.5.0 → 0.5.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8306de0e143806588fef98d814a5192f60f65ae0
|
4
|
+
data.tar.gz: c398f21e59a7f5b05132a3f9b7910d58373493e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 226bf5411139df7703abb7c32d90e9d07f6537b823bdb18792ea38cd449b80d6c29e5ffd11bed89e1939241211a63d8ab6244e310d469e031e1b75385dc7a7a7
|
7
|
+
data.tar.gz: 327070d269ca743f15d2217cce4e3a9c5b013ae39bf8a3e13eb0f2f9eff398bc142cdc62e8c405a615b92fb1b714a87ab313f97b03c5f57cdb197a23a3cdfae2
|
@@ -190,18 +190,32 @@ describe RestPack::Serializer do
|
|
190
190
|
end
|
191
191
|
|
192
192
|
describe "#key" do
|
193
|
-
|
194
|
-
|
193
|
+
context "with default key" do
|
194
|
+
it "returns the correct key" do
|
195
|
+
PersonSerializer.key.should == :people
|
196
|
+
end
|
197
|
+
|
198
|
+
it "has correct #singular_key" do
|
199
|
+
PersonSerializer.singular_key.should == :person
|
200
|
+
end
|
201
|
+
|
202
|
+
it "has correct #plural_key" do
|
203
|
+
PersonSerializer.plural_key.should == :people
|
204
|
+
end
|
195
205
|
end
|
196
206
|
|
197
207
|
context "with custom key" do
|
198
208
|
class SerializerWithCustomKey
|
199
209
|
include RestPack::Serializer
|
200
|
-
self.key = :
|
210
|
+
self.key = :customers
|
201
211
|
end
|
202
212
|
|
203
213
|
it "returns the correct key" do
|
204
|
-
SerializerWithCustomKey.key.should == :
|
214
|
+
SerializerWithCustomKey.key.should == :customers
|
215
|
+
end
|
216
|
+
|
217
|
+
it "has correct #singular_key" do
|
218
|
+
SerializerWithCustomKey.singular_key.should == :customer
|
205
219
|
end
|
206
220
|
end
|
207
221
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|