grape-hypertext_application_language 0.1.4 → 0.1.5

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: e46af6952349fb8ed7db6a02d9f1c116d20c87c2
4
- data.tar.gz: df72d0ed9f17dea4e33c0609b9708eebe30e8a70
3
+ metadata.gz: 98a3a3db3eb7f8df691c2066df09c52f3319063f
4
+ data.tar.gz: 1ea8d2159f2694e2a24638ad9b9fc546448d6b60
5
5
  SHA512:
6
- metadata.gz: b4a3bc2850b73d2e0a7d5828c6973067ff3dd04e394979ba4c6d6d216771c848dbc27fd4b96c17aefcdf4a411fca31134ce4ddc3e5f2a25345bcc32e99037281
7
- data.tar.gz: 675fec846df805c0974566871ff77913b48c60fdd91bfaafa8d2709d6058cdab308f796d7176703f3bfb451060b9e104def789e4e3d31d6e53d9565bd974a008
6
+ metadata.gz: 780669290cd539c7e0762515f37da2388e3bf0cba83f37a16a690e3779b486e0fa648fb9ae3910f4575f4685a5b15bfcf0f93c83664b8dffea695cfab74c753b
7
+ data.tar.gz: a23e9c4873d7be47c242c2ee251d3c9a5db5edfaad1aacfe4149905bd29b311d5aa637b7d7b499ebf8dc9d42ea27b0c9665b813c1012140902e29de9ed97824d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-hypertext_application_language (0.1.4)
4
+ grape-hypertext_application_language (0.1.5)
5
5
  addressable
6
6
  grape
7
7
  hypertext_application_language
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'grape-hypertext_application_language'
3
- spec.version = '0.1.4'
3
+ spec.version = '0.1.5'
4
4
  spec.summary = %q{Grape extensions for Hypertext Application Language}
5
5
  spec.description = %q{}
6
6
  spec.homepage = 'http://stateless.co/hal_specification.html'
@@ -41,12 +41,15 @@ module Grape::Formatter::Hal
41
41
 
42
42
  rel = env['PATH_INFO'].split('/').last
43
43
  body.each do |resource|
44
- continue unless resource.respond_to?(:to_hal)
44
+ next unless resource.respond_to?(:to_hal)
45
45
  resource_representation = resource.to_hal(env: env)
46
46
  representation.with_link(rel, resource_representation.link.href)
47
47
  representation.with_representation(rel, resource_representation)
48
48
  end
49
49
 
50
+ properties = env['hypertext_application_language.collection.properties']
51
+ representation.properties = properties if properties
52
+
50
53
  body = representation
51
54
  else
52
55
  return body unless body.respond_to?(:to_hal)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-hypertext_application_language
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roy Ratcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-22 00:00:00.000000000 Z
11
+ date: 2015-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape