popit_representers 0.0.4 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18be13f990f64ccc4924f858959eed472b6ed979
|
4
|
+
data.tar.gz: 9397274ba59b8bc99c97b5a64893540a671ae96f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/popit_representers.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = 'popit_representers'
|
3
|
-
gem.version = '0.0.
|
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
|
+
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
|