billit_representers 0.0.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'billit_representers'
3
- gem.version = '0.0.7'
4
- gem.date = '2013-05-20'
3
+ gem.version = '0.2.0'
4
+ gem.date = '2013-06-24'
5
5
  gem.summary = "Representers for the bill-it module of the Poplus project."
6
6
  gem.description = "Representers for the bill-it module of the Poplus project. These provide object-like access to remote data, using Resource-Oriented Architectures in Ruby (ROAR)."
7
7
  gem.authors = ["Marcel Augsburger"]
@@ -11,4 +11,5 @@ Gem::Specification.new do |gem|
11
11
  gem.files = `git ls-files`.split("\n")
12
12
 
13
13
  gem.add_runtime_dependency "roar"
14
+ gem.add_runtime_dependency "roar_generic_pagination_representer"
14
15
  end
@@ -0,0 +1,18 @@
1
+ require 'roar/representer/json'
2
+ require 'roar_generic_pagination_representer/representers/pagination_representer'
3
+
4
+ module Billit
5
+ module BillCollectionPageRepresenter
6
+ include Roar::Representer::JSON
7
+ include PaginationRepresenter
8
+
9
+ collection :items, :extend => BillRepresenter, :class => Bill
10
+
11
+ property :current_page
12
+ property :total_pages
13
+
14
+ def page_url(*args)
15
+ url_for(args.reduce(args[0]) {|hash, elems| hash.merge(elems)})
16
+ end
17
+ end
18
+ end
@@ -1,7 +1,7 @@
1
1
  require 'roar/representer/json'
2
2
 
3
3
  module Billit
4
- module BillsRepresenter
4
+ module BillCollectionRepresenter
5
5
  include Roar::Representer::JSON
6
6
  include Roar::Representer::Feature::Hypermedia
7
7
 
@@ -35,4 +35,4 @@ module Billit
35
35
  bill_url(self.uid)
36
36
  end
37
37
  end
38
- end
38
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billit_representers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-20 00:00:00.000000000 Z
12
+ date: 2013-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: roar
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: roar_generic_pagination_representer
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  description: Representers for the bill-it module of the Poplus project. These provide
31
47
  object-like access to remote data, using Resource-Oriented Architectures in Ruby
32
48
  (ROAR).
@@ -39,8 +55,9 @@ files:
39
55
  - README.md
40
56
  - billit_representers.gemspec
41
57
  - lib/billit_representers.rb
58
+ - lib/billit_representers/representers/bill_collection_page_representer.rb
59
+ - lib/billit_representers/representers/bill_collection_representer.rb
42
60
  - lib/billit_representers/representers/bill_representer.rb
43
- - lib/billit_representers/representers/bills_representer.rb
44
61
  homepage: https://github.com/ciudadanointeligente/billit_representers
45
62
  licenses: []
46
63
  post_install_message: