oat 0.1.0 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8bb1271b6a91bda9b273a02d29e48f999e240a35
4
- data.tar.gz: 6ac4f8595d78f974ed688182ef021bc688958e65
3
+ metadata.gz: 0301b4c113c6202d3f7ba67f5c4acb07c3021407
4
+ data.tar.gz: b35bb46fe71c4334bb37fec794fd160ab8654414
5
5
  SHA512:
6
- metadata.gz: 5a4d8281a3a0a38e6a21556388df68c43c20dcd41c2e8df4cbd57e695a2d43d966361e3475b58a233f055d4afd1f433b9e73b571d3cad1f1638da73745505296
7
- data.tar.gz: df432c06d285565c54a7102d96cb48cd13c4470bf283f23d94b91d2b809c900611140b139a299bc8cfd884a429702cf7d3fed43916313ee7b52db9eb1b0c9b7e
6
+ metadata.gz: c641981d4467f2fcf9793b322269bbabd055f334b2c9568dd0df40c5a82d8d84d5f76a0a3a83a9bd644f56172dda578481fe23620e40207b516116129330955d
7
+ data.tar.gz: 08ea3bad413a1c6c2655a8ad6d9491d2cb1f47aedd2bb745c46b0ad2307cbcae5fc5556cef14db2baaa4608f2ed0a18ea80331c1b88c77375dda2b152d0da617
data/README.md CHANGED
@@ -560,7 +560,6 @@ Or install it yourself as:
560
560
 
561
561
  ## TODO / contributions welcome
562
562
 
563
- * Siren actions.
564
563
  * JsonAPI URL and ID modes, top-level links
565
564
  * testing module that can be used for testing spec-compliance in user apps?
566
565
 
@@ -571,3 +570,7 @@ Or install it yourself as:
571
570
  3. Commit your changes (`git commit -am 'Add some feature'`)
572
571
  4. Push to the branch (`git push origin my-new-feature`)
573
572
  5. Create new Pull Request
573
+
574
+ ## Contributors
575
+
576
+ Many thanks to all contributors! https://github.com/ismasan/oat/graphs/contributors
@@ -3,7 +3,7 @@ module Oat
3
3
  module Adapters
4
4
  class HAL < Oat::Adapter
5
5
  def link(rel, opts = {})
6
- data[:_links][rel] = opts
6
+ data[:_links][rel] = opts if opts[:href]
7
7
  end
8
8
 
9
9
  def properties(&block)
data/lib/oat/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oat
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -17,6 +17,8 @@ describe Oat::Adapters::HAL do
17
17
  h[:controller_name].should == 'some_controller'
18
18
  # links
19
19
  h[:_links][:self][:href].should == "http://foo.bar.com/#{user.id}"
20
+ # HAL Spec says href is REQUIRED
21
+ h[:_links].should_not include(:empty)
20
22
  # embedded manager
21
23
  h[:_embedded][:manager].tap do |m|
22
24
  m[:id].should == manager.id
data/spec/fixtures.rb CHANGED
@@ -12,6 +12,7 @@ module Fixtures
12
12
  schema do
13
13
  type 'user'
14
14
  link :self, href: url_for(item.id)
15
+ link :empty, href: nil
15
16
 
16
17
  property :id, item.id
17
18
  map_properties :name, :age
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.1.0
4
+ version: 0.1.1
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-01-14 00:00:00.000000000 Z
11
+ date: 2014-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport