oat 0.4.6 → 0.4.7

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: a56613cc3b7d20d015369d97b0690153f7dcadf9
4
- data.tar.gz: 2f786daef5e0b151100f7da50facb9654b31110d
3
+ metadata.gz: 6119b57e5a68a59050cdebb3b16d90f75bc2ce9a
4
+ data.tar.gz: a33f4b5e3e01b3554f7f04b0ce0cfadbb7477e79
5
5
  SHA512:
6
- metadata.gz: fcedb948f276b849b4252a3955e8deac185062d5130154f188a252bb653a390cbd37b9a19fe11609b7eaa6fb4ef6f1e09dd7a9d37bc71870bdc90a519be69ed6
7
- data.tar.gz: 70e5907449c358f1ebaa2b386b886abc37623b46200c785fc32202997d16bac2201a3323ebec0c9bdeb99ca20670c916448fe3c41c68fcc976737f0983782c16
6
+ metadata.gz: 987245ceead54d06e645bd3af2b965aa0f01aa109aa2529149aeb6115f26074cc1e99759719345e5b9d8fbbcce47d233405b0e2fe96b4d07c14e8def8318e3a9
7
+ data.tar.gz: 7c096108dee29fac37563fd090b6867557d2183f7861c215e9dc9cd844472d90996f8d1f548af7d49dfc8abedf0f72e155442300e41bfd87067b7ac4f1fe26bf
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  rvm:
3
4
  - 2.1.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.4.6](https://github.com/ismasan/oat/tree/v0.4.6)
4
+ [Full Changelog](https://github.com/ismasan/oat/compare/v0.4.5...v0.4.6)
5
+ #### 07/02/15
6
+ - *Merged pull-request:* HAL support for an array of linked objects [\#60](https://github.com/ismasan/oat/pull/60) ([abargnesi](https://github.com/abargnesi))
7
+
8
+ - *Merged pull-request:* Fixing Nested Serializers example [\#57](https://github.com/ismasan/oat/pull/57) ([coderdave](https://github.com/coderdave))
9
+
10
+ - *Merged pull-request:* Fix spelling in README.md [\#53](https://github.com/ismasan/oat/pull/53) ([killpack](https://github.com/killpack))
11
+
12
+ - *Merged pull-request:* provide an example of using Rails responders to support requests using a Hypermedia mime type [\#52](https://github.com/ismasan/oat/pull/52) ([apsoto](https://github.com/apsoto))
13
+
14
+ - *Merged pull-request:* Stop entities/entity from duplicating entries in linked hash. [\#49](https://github.com/ismasan/oat/pull/49) ([dpdawson](https://github.com/dpdawson))
15
+
16
+ - *Merged pull-request:* Better documentation for Oat::Adapters::JsonAPI#collection [\#46](https://github.com/ismasan/oat/pull/46) ([emilesilvis](https://github.com/emilesilvis))
17
+
18
+ - *Merged pull-request:* add the required rel attribute for Siren sub-entities [\#45](https://github.com/ismasan/oat/pull/45) ([apsoto](https://github.com/apsoto))
19
+
20
+ - *Closed issue:* is lib/support/class\_attribute necessary? [\#44](https://github.com/ismasan/oat/issues/44)
21
+
22
+ - *Closed issue:* Oat, Rails Responders and hypermedia mime types [\#50](https://github.com/ismasan/oat/issues/50)
23
+
24
+ - *Closed issue:* Array serialization [\#54](https://github.com/ismasan/oat/issues/54)
25
+
26
+ - *Closed issue:* Nested serializers: undefined method [\#56](https://github.com/ismasan/oat/issues/56)
27
+
28
+ - *Closed issue:* HAL support for multiple link objects per relationship? [\#58](https://github.com/ismasan/oat/issues/58)
29
+
30
+ - *Closed issue:* Serialize to vanilla JSON using the same serializer class [\#59](https://github.com/ismasan/oat/issues/59)
31
+
3
32
  ## [v0.4.5](https://github.com/ismasan/oat/tree/v0.4.5)
4
33
  [Full Changelog](https://github.com/ismasan/oat/compare/v0.4.4...v0.4.5)
5
34
  #### 09/07/14
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in oat.gemspec
4
+ gem 'i18n', '0.6.9'
4
5
  gem 'activesupport', '~>3.0.20'
5
- gem 'i18n'
6
6
  gem 'rake', '< 10.2'
7
7
  gemspec :path => "../"
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in oat.gemspec
4
+ gem 'i18n', '0.6.9'
4
5
  gem 'activesupport', '~>3.1.12'
5
- gem 'i18n'
6
6
  gem 'rake', '< 10.2'
7
7
  gemspec :path => "../"
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in oat.gemspec
4
+ gem 'i18n', '0.6.9'
4
5
  gem 'activesupport', '~>3.2.16'
5
6
  gem 'rake', '< 10.2'
6
7
  gemspec :path => "../"
@@ -22,7 +22,7 @@ module Oat
22
22
  end
23
23
 
24
24
  def link(rel, opts = {})
25
- data[:links] << {:rel => [rel]}.merge(opts)
25
+ data[:links] << {:rel => [rel].flatten}.merge(opts)
26
26
  end
27
27
 
28
28
  def properties(&block)
data/lib/oat/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Oat
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -121,5 +121,22 @@ describe Oat::Adapters::Siren do
121
121
  expect(embedded_managers.size).to be 0
122
122
  end
123
123
  end
124
+
125
+ context 'with multiple rels specified as an array for a single link' do
126
+ let(:serializer_class) do
127
+ Class.new(Oat::Serializer) do
128
+ schema do
129
+ type 'users'
130
+ link ['describedby', 'http://rels.foo.bar.com/type'], :href => "http://foo.bar.com/meta/user"
131
+ end
132
+ end
133
+ end
134
+
135
+ it 'renders the rels as a Siren-compliant non-nested, flat array' do
136
+ expect(hash.fetch(:links)).to include(
137
+ {:rel=>["describedby", "http://rels.foo.bar.com/type"], :href=>"http://foo.bar.com/meta/user"}
138
+ )
139
+ end
140
+ end
124
141
  end
125
142
  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.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ismael Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2016-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.2.2
144
+ rubygems_version: 2.4.5
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Adapters-based serializers with Hypermedia support