oat 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/oat/adapters/json_api.rb +2 -1
- data/lib/oat/version.rb +1 -1
- data/spec/adapters/json_api_spec.rb +4 -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: ab0e0900530f72cfdc130451cf424e554b149972
|
4
|
+
data.tar.gz: 090fe04c19edcf264da20b974649ed23f306056f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7f8e7ba4461bdc707484ed4f80cfd14833fe220c41f68dc1d6525ce3f2259005c00e42c1e1a3d4744ffe10a7cc8e9a5864ea444df4f2acb7bcf12ec848c5995
|
7
|
+
data.tar.gz: 29c1759132d79afba8def1a1a5887658d361cd99288e8ded27cd433a35578e1ffc4737457abf1994b180f5c4f05802a64dfbeb4e3df063ce8cdca621f57a4cf9
|
@@ -24,6 +24,7 @@ module Oat
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def link(rel, opts = {})
|
27
|
+
templated = false
|
27
28
|
if opts.is_a?(Hash)
|
28
29
|
templated = opts.delete(:templated)
|
29
30
|
if templated
|
@@ -32,7 +33,7 @@ module Oat
|
|
32
33
|
check_link_keys(opts)
|
33
34
|
end
|
34
35
|
end
|
35
|
-
data[:links][rel] = opts
|
36
|
+
data[:links][rel] = opts unless templated
|
36
37
|
end
|
37
38
|
|
38
39
|
def check_link_keys(opts)
|
data/lib/oat/version.rb
CHANGED
@@ -344,6 +344,10 @@ describe Oat::Adapters::JsonAPI do
|
|
344
344
|
"user.friends" => "http://foo.bar.com/{user.id}/friends"
|
345
345
|
})
|
346
346
|
end
|
347
|
+
|
348
|
+
it "doesn't render them as links on the resource" do
|
349
|
+
expect(hash.fetch(:users).first).to_not have_key(:links)
|
350
|
+
end
|
347
351
|
end
|
348
352
|
end
|
349
353
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Celis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|