roar 0.12.4 → 0.12.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: 0d3ecc28432b3f2a039e743ea1503d71379cae06
4
- data.tar.gz: dc4f0e29a6c0e62599809b02f700fa97b8971c3b
3
+ metadata.gz: 07ecc948debf57f733cbd0afa35239bee7c3690d
4
+ data.tar.gz: 4595104d851b4a1acee53c2968e610c035fd25d1
5
5
  SHA512:
6
- metadata.gz: 096cf974e914065adc6bb7d098db53b9e4190a73402a3ae06be99a50e0ec7457186112ed5b78368d4c6a8d479c04f5832d86ac745a6907b1ab27fa0716909a81
7
- data.tar.gz: e7e465c95e3430976763afd86e5fd2445f128a369eb11337ee456926b7631be92923af84155291359aad102570be14ec73dc2886a101caa0629f8cc09d552a8c
6
+ metadata.gz: e84a209d661459eaf5f4c666367112c45cb821ce5469e32536ff9a30714e45f8deb06b7b164f4684d27bbcc82906c98f12bccf935f4a72f8018e23c40b251dc1
7
+ data.tar.gz: eac108c9d10735a92ff60d38e21affa0465ef850ed1245084285f33fe7648000e8e68718672abd3da8838781892aef0e66eee9d119118524f23597bb0af4ed39
data/CHANGES.markdown CHANGED
@@ -1,5 +1,6 @@
1
1
  # 0.12.5
2
2
 
3
+ * Roar runs with representable <= 1.8.
3
4
 
4
5
  # 0.12.4
5
6
 
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in roar.gemspec
4
4
  gemspec
5
5
 
6
- #gem "representable", :path => "../representable"
6
+ gem "representable", :path => "../representable"
7
7
  gem "sinatra-contrib", :git => "git@github.com:apotonick/sinatra-contrib.git", :branch => "runner"
@@ -72,7 +72,7 @@ module Roar
72
72
  private
73
73
  def links_definition_options
74
74
  # TODO: this method is never called.
75
- [:links_array, {:from => :link, :class => Feature::Hypermedia::Hyperlink, :collection => true,
75
+ [:links_array, {:as => :link, :class => Feature::Hypermedia::Hyperlink, :collection => true,
76
76
  :decorator_scope => true}] # TODO: merge with JSON.
77
77
  end
78
78
 
@@ -46,7 +46,7 @@ module Roar
46
46
  # TODO: move to instance method, or remove?
47
47
  def links_definition_options
48
48
  # FIXME: this doesn't belong into the generic JSON representer.
49
- [:links_array, {:from => :links, :class => Feature::Hypermedia::Hyperlink, :extend => HyperlinkRepresenter, :collection => true,
49
+ [:links_array, {:as => :links, :class => Feature::Hypermedia::Hyperlink, :extend => HyperlinkRepresenter, :collection => true,
50
50
  :decorator_scope => true}]
51
51
  end
52
52
  end
@@ -72,7 +72,7 @@ module Roar::Representer
72
72
 
73
73
  module ClassMethods
74
74
  def links_definition_options
75
- super.tap { |options| options[1].merge!(:from => :_links) }
75
+ super.tap { |options| options[1].merge!(:as => :_links) }
76
76
  end
77
77
  end
78
78
 
@@ -39,7 +39,7 @@ module Roar
39
39
 
40
40
  def links_definition_options
41
41
  # FIXME: this doesn't belong into the generic XML representer.
42
- [:links_array, {:from => :link, :class => Feature::Hypermedia::Hyperlink, :collection => true, :extend => XML::HyperlinkRepresenter,
42
+ [:links_array, {:as => :link, :class => Feature::Hypermedia::Hyperlink, :collection => true, :extend => XML::HyperlinkRepresenter,
43
43
  :decorator_scope => true}] # TODO: merge with JSON.
44
44
  end
45
45
 
data/lib/roar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Roar
2
- VERSION = "0.12.4"
2
+ VERSION = "0.12.5"
3
3
  end
@@ -34,9 +34,11 @@ class CollectionJsonTest < MiniTest::Spec
34
34
 
35
35
  describe "#to_json" do
36
36
  it "renders document" do
37
+ collection_key = Representable::VERSION =~ /^1.8/ ? "collection" : :collection
38
+
37
39
  [song].extend(rpr).to_hash.must_equal(
38
40
  {
39
- :collection=>{
41
+ collection_key=>{
40
42
  "version"=>"1.0",
41
43
  "href"=>"//songs/",
42
44
 
@@ -48,7 +50,7 @@ class CollectionJsonTest < MiniTest::Spec
48
50
  },
49
51
 
50
52
  "queries"=>[
51
- {:rel=>:search, :href=>"//search",
53
+ {:rel=>:search, :href=>"//search",
52
54
  :data=>[
53
55
  {:name=>"q", :value=>""}
54
56
  ]
@@ -153,7 +153,7 @@ class XMLRepresenterFunctionalTest < MiniTest::Spec
153
153
 
154
154
  self.representation_wrap= :order
155
155
  property :id
156
- collection :items, :class => ItemRepresenter, :from => :item
156
+ collection :items, :class => ItemRepresenter, :as => :item
157
157
  attr_accessor :id, :items
158
158
  end
159
159
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4
4
+ version: 0.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
11
+ date: 2014-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: representable