popit_representers 0.0.4 → 0.0.5

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: 385402da73d547ba262939307cd967682cefeb7a
4
- data.tar.gz: 01ccbe539f8c4cd58191afefa70578718a7fe94b
3
+ metadata.gz: 18be13f990f64ccc4924f858959eed472b6ed979
4
+ data.tar.gz: 9397274ba59b8bc99c97b5a64893540a671ae96f
5
5
  SHA512:
6
- metadata.gz: 9e73ca3342d48ba41e1b1d697ee82df26f5c7cc6b3a9c44e462c5149ca2e6861d43fdbc3d34fcfb632311744f32192cfe8bbedcc335269b51fc12f894a23d0d2
7
- data.tar.gz: da6f839e79050c3fbc6f2c73a83ab880d9c85b65fe9561736f7846f22da79f60aae928314ea5876cdcf8eada17d7ed516b49142664bce72e9d851f144a525bbd
6
+ metadata.gz: 3e4bdefafe2ece3fd6632943d543641cc2ef1fed9a73ebc1c94298ed987c41058083d39b0770902849aba318f12516819c8696f0c2289225050aed2d1921f947
7
+ data.tar.gz: fcda5bd45e355a65f7a61e05e2fbac8fbf3906d9c2cbecbd7aeb5855e9a6dae4d3d538bb7a821bc849bbda5f330cee5bad05912185ac7c8e1f87b45496045d36
@@ -0,0 +1,36 @@
1
+ require 'roar/representer/json'
2
+ require 'representable/json/collection'
3
+ require 'representable/json/hash'
4
+ require 'popit_representers/representers/person_representer'
5
+
6
+ module Popit
7
+ module PersonCollectionRepresenter
8
+ include Roar::Representer
9
+ include Roar::Representer::Feature::Hypermedia
10
+ # include Representable::JSON::Collection
11
+
12
+ module Initializer
13
+ def initialize
14
+ extend Popit::PersonCollectionRepresenter
15
+ extend Roar::Representer::Feature::Client
16
+ super
17
+ end
18
+ end
19
+
20
+ def self.included(klass)
21
+ klass.send :prepend, Initializer
22
+ klass.send :include, Roar::Representer::JSON
23
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
24
+ # klass.send :include, Representable::JSON::Collection
25
+ end
26
+
27
+ # items extend: PersonRepresenter, class: PopitPerson
28
+ # self.representation_wrap= :result
29
+
30
+ collection :result, :extend => PersonRepresenter, :class => PopitPerson
31
+
32
+ def persons
33
+ collect
34
+ end
35
+ end
36
+ end
@@ -23,7 +23,7 @@ module Popit
23
23
  klass.send :include, Roar::Representer::Feature::HttpVerbs
24
24
  end
25
25
 
26
- self.representation_wrap= :result
26
+ # self.representation_wrap= :result
27
27
 
28
28
  property :name
29
29
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'popit_representers'
3
- gem.version = '0.0.4'
3
+ gem.version = '0.0.5'
4
4
  gem.date = '2013-12-09'
5
5
  gem.summary = "Representers for the pop-it module of the Poplus project."
6
6
  gem.description = "Representers for the pop-it module of the Poplus project. These provide object-like access to remote data, using Resource-Oriented Architectures in Ruby (ROAR)."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popit_representers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Augsburger
@@ -50,6 +50,7 @@ files:
50
50
  - LICENSE
51
51
  - README.md
52
52
  - lib/popit_representers/popit_representers.rb
53
+ - lib/popit_representers/representers/person_collection_representer.rb
53
54
  - lib/popit_representers/representers/person_representer.rb
54
55
  - popit_representers.gemspec
55
56
  homepage: https://github.com/ciudadanointeligente/billit_representers