media_types-serialization 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: 3a1225815ea23d47af5c71f2dd37d409c01f0ed8d89cdb19749293b69f97f36d
4
- data.tar.gz: 2461ce3d3411bcffe257388d6664f923e7e08254c85a4cfa25515d0120afce81
3
+ metadata.gz: ad21aa89e0b5f448619f80f72462476021515c16c95d50dc269b2a8aa889ca45
4
+ data.tar.gz: d723be10de6a6eecdb3b5b7e540db46b02ca0b5f338961bd0973ffaa957e7fe8
5
5
  SHA512:
6
- metadata.gz: 69bfd29c4c01120ea65ef06a6cb0d5814004a390affcf310b89fb4114f43d8f07888dd14162ebb41b07a681bda20b394ad83db14e758b6d648ddea5841785239
7
- data.tar.gz: 7eeafca27e995fad16bd1f0a9e3e9a5f655b977765e73bb66ae7ed42dae4dc6350864e0376bf061039fc532ea0756761622ee43334a218c1fec5d28f57a1d2e1
6
+ metadata.gz: 612498a254d26d0288fcd035fbf18e6a84c9522069885fc30edba8898a3abc300716a2fd371d840fa65a688a9a089823d93b3aadc109e93ca052aa86d8299525
7
+ data.tar.gz: cffa94a6a3de91e71f75bd84eb7c30b8090dfdf45e179302ed2d479dea99038deee36c002af48d1a7ad7a9eeaf070a16171a92dfe6b0eb9cbf804ee6f9562f32
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2
4
+
5
+ - Rename `collect_links` to `header_links` to actually expose the links
6
+
3
7
  ## 0.3.1
4
8
 
5
9
  - Fix classes sharing `media_type_constructable`, `serializes_html_flag` and `media_type_versions`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- media_types-serialization (0.3.1)
4
+ media_types-serialization (0.3.2)
5
5
  actionpack (>= 4.0.0)
6
6
  activesupport (>= 4.0.0)
7
7
  http_headers-accept (< 1.0.0)
@@ -1,5 +1,5 @@
1
1
  module MediaTypes
2
2
  module Serialization
3
- VERSION = '0.3.1'
3
+ VERSION = '0.3.2'
4
4
  end
5
5
  end
@@ -27,12 +27,9 @@ module MediaTypes
27
27
  end
28
28
  alias to_h to_hash
29
29
 
30
- def collect_links
31
- if serializable && ::MediaTypes::Serialization.collect_links_for_collection
32
- __getobj__.send(:header_links)
33
- else
34
- {}
35
- end
30
+ def header_links(view: current_view)
31
+ return __getobj__.send(:header_links, view: view) if serializable && ::MediaTypes::Serialization.collect_links_for_collection
32
+ {}
36
33
  end
37
34
 
38
35
  private
@@ -27,12 +27,9 @@ module MediaTypes
27
27
  end
28
28
  alias to_h to_hash
29
29
 
30
- def collect_links
31
- if serializable && ::MediaTypes::Serialization.collect_links_for_index
32
- __getobj__.send(:header_links)
33
- else
34
- {}
35
- end
30
+ def header_links(view: current_view)
31
+ return __getobj__.send(:header_links, view: view) if serializable && ::MediaTypes::Serialization.collect_links_for_index
32
+ {}
36
33
  end
37
34
 
38
35
  private
@@ -25,9 +25,9 @@ module MediaTypes
25
25
  end
26
26
  alias to_h to_hash
27
27
 
28
- def collect_links
29
- return {} unless serializable
30
- __getobj__.send(:header_links)
28
+ def header_links(view: current_view)
29
+ return __getobj__.send(:header_links, view: view) if serializable
30
+ {}
31
31
  end
32
32
 
33
33
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: media_types-serialization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld