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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29daa48acfa55036cbe55f6a00346d2f2763166a
4
- data.tar.gz: d76e9111cc5ac06483e0ea84448012b23dd6f225
3
+ metadata.gz: ab0e0900530f72cfdc130451cf424e554b149972
4
+ data.tar.gz: 090fe04c19edcf264da20b974649ed23f306056f
5
5
  SHA512:
6
- metadata.gz: 1ad23decf7d3026c53cabebe75d671c39ac1330d68284be96268b3fa8cd9493ed7b64e4c666e20d55fca18a3cbc69e2a7ef6fc8ccef41a311d848643b22babb1
7
- data.tar.gz: b309089b7338ef562134aa7e83b14554d73bb0cbd43c3b2f7ee49bcc0c7bae91bbbfaa40ef01cbb4f408f06ee2f05f37e27f617c39604839e0ae568400a033fc
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
@@ -1,3 +1,3 @@
1
1
  module Oat
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -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.2
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-04-29 00:00:00.000000000 Z
11
+ date: 2014-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport