popit_representers 0.0.10 → 0.0.12

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: d293adbc6c33e8f6b608c9d73acd1194dd4b4a07
4
- data.tar.gz: 004938bd5796dc20ec999cf8a4f12c0ff2629551
3
+ metadata.gz: 50d635863a42a7a4d110d3e7de46d8cc14c7dc25
4
+ data.tar.gz: 3c0b81ca0141def77ff0f42b7c56388dce2d38d7
5
5
  SHA512:
6
- metadata.gz: f17e393fc18f08c787db1e7cc9cf598788251eb900d6b982a0926cc70eafefd7f20b88049029bc7f94a8349438b5b3bcd87b755b84e5de772733bd587430191f
7
- data.tar.gz: 5127170fb4c73580040598c08ea96cd8dfbde77e19e84ccc29fd68246185d41de80987a4c54e259ad8b23efe6661ad6e97e560f666c7986886bc5f1db52e84a2
6
+ metadata.gz: 4047f9c7418e75b7c3ad9cc5562c2ce8a8476b16ac5b58bbee8f77f95f10b68c4101c1cab279ed06ea19a16a737fcd49018672e81826645f7f751cdde08a0287
7
+ data.tar.gz: 8c3cee7deef7c13bb9ba99057f01c947be54717d846aa110aabe1ed5fc127ce28097459722fcdb8eecd7448646d3fc8a34da707d8fa45bd531c0fbf918e60bb7
@@ -0,0 +1,7 @@
1
+ require 'popit_representers/representers/organization_representer'
2
+
3
+ module Popit
4
+ class Organization
5
+ include Popit::OrganizationRepresenter
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'popit_representers/representers/organizationcollection_representer'
2
+
3
+ module Popit
4
+ class OrganizationCollection
5
+ include Popit::OrganizationCollectionRepresenter
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ require 'popit_representers/representers/personcommission_representer'
2
+ module Popit
3
+ class Personcommission
4
+ include Popit::PersoncommissionRepresenter
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'popit_representers/representers/personimage_representer'
2
+ module Popit
3
+ class Personimage
4
+ include Popit::PersonimageRepresenter
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'popit_representers/representers/personlink_representer'
2
+ module Popit
3
+ class Personlink
4
+ include Popit::PersonlinkRepresenter
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'popit_representers/representers/personmembership_representer'
2
+ module Popit
3
+ class Personmembership
4
+ include Popit::PersonmembershipRepresenter
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'popit_representers/representers/personperiod_representer'
2
+ module Popit
3
+ class Personperiod
4
+ include Popit::PersonperiodRepresenter
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require 'popit_representers/representers/personrepresent_representer'
2
+ module Popit
3
+ class Personrepresent
4
+ include Popit::PersonrepresentRepresenter
5
+ end
6
+ end
@@ -0,0 +1,28 @@
1
+ require 'popit_representers/models/personimage'
2
+ require 'popit_representers/models/personmembership'
3
+ require 'popit_representers/representers/personimage_representer'
4
+ require 'popit_representers/representers/personmembership_representer'
5
+
6
+ module Popit
7
+ class WrappedPerson
8
+ include Roar::Representer::JSON::HAL
9
+ include Roar::Representer::JSON
10
+ include Roar::Representer::Feature::HttpVerbs
11
+
12
+ def initialize
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+
17
+ self.representation_wrap = :result
18
+
19
+ property :id
20
+ property :name
21
+ property :slug
22
+ property :data
23
+
24
+ collection :images, extend: PersonimageRepresenter, class: Popit::Personimage
25
+ collection :memberships, extend: PersonmembershipRepresenter, class: Popit::Personmembership
26
+
27
+ end
28
+ end
@@ -0,0 +1,35 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ require 'popit_representers/models/personlink'
7
+ require 'popit_representers/representers/personlink_representer'
8
+
9
+ module Popit
10
+ module OrganizationRepresenter
11
+ include Roar::Representer::JSON::HAL
12
+
13
+ module Initializer
14
+ def initialize
15
+ extend Popit::OrganizationRepresenter
16
+ extend Roar::Representer::Feature::Client
17
+ super
18
+ end
19
+ end
20
+
21
+ def self.included(klass)
22
+ klass.send :prepend, Initializer
23
+ klass.send :include, Roar::Representer::JSON
24
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
25
+ end
26
+
27
+ property :id
28
+ property :founding_date
29
+ property :name
30
+ property :slug
31
+
32
+ collection :links, extend: PersonlinkRepresenter, class: Popit::Personlink
33
+
34
+ end
35
+ end
@@ -0,0 +1,30 @@
1
+ require 'roar/representer'
2
+ require 'popit_representers/models/organization'
3
+ require 'popit_representers/representers/organization_representer'
4
+
5
+ module Popit
6
+ module OrganizationCollectionRepresenter
7
+ include Roar::Representer
8
+
9
+ module Initializer
10
+ def initialize
11
+ extend Popit::OrganizationCollectionRepresenter
12
+ extend Roar::Representer::Feature::Client
13
+ super
14
+ end
15
+ end
16
+
17
+ def self.included(klass)
18
+ klass.send :prepend, Initializer
19
+ klass.send :include, Roar::Representer::JSON::HAL
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ klass.send :include, Roar::Representer::Feature::Hypermedia
22
+ end
23
+
24
+ collection :result, :extend => Popit::OrganizationRepresenter, :class => Popit::Organization
25
+
26
+ def organizations
27
+ self.result
28
+ end
29
+ end
30
+ end
@@ -3,6 +3,19 @@ require 'roar/representer/feature/http_verbs'
3
3
  require 'roar/representer/feature/client'
4
4
  require 'roar/representer/json/hal'
5
5
 
6
+ require 'popit_representers/models/personimage'
7
+ require 'popit_representers/models/personmembership'
8
+ require 'popit_representers/models/personlink'
9
+ require 'popit_representers/models/personcommission'
10
+ require 'popit_representers/models/personrepresent'
11
+ require 'popit_representers/models/personperiod'
12
+ require 'popit_representers/representers/personimage_representer'
13
+ require 'popit_representers/representers/personmembership_representer'
14
+ require 'popit_representers/representers/personlink_representer'
15
+ require 'popit_representers/representers/personcommission_representer'
16
+ require 'popit_representers/representers/personrepresent_representer'
17
+ require 'popit_representers/representers/personperiod_representer'
18
+
6
19
  module Popit
7
20
  module PersonRepresenter
8
21
  include Roar::Representer::JSON::HAL
@@ -24,7 +37,15 @@ module Popit
24
37
  property :id
25
38
  property :name
26
39
  property :slug
27
- property :images
40
+ property :data
41
+ property :birth_date
42
+
43
+ collection :images, extend: PersonimageRepresenter, class: Popit::Personimage
44
+ collection :memberships, extend: PersonmembershipRepresenter, class: Popit::Personmembership
45
+ collection :links, extend: PersonlinkRepresenter, class: Popit::Personlink
46
+ collection :commissions, extend: PersoncommissionRepresenter, class: Popit::Personcommission
47
+ collection :represent, extend: PersonrepresentRepresenter, class: Popit::Personrepresent
48
+ collection :parliamentarian_period, extend: PersonperiodRepresenter, class: Popit::Personperiod
28
49
 
29
50
  end
30
51
  end
@@ -0,0 +1,28 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ module Popit
7
+ module PersoncommissionRepresenter
8
+ include Roar::Representer::JSON::HAL
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Popit::PersoncommissionRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
22
+
23
+ property :permanent
24
+ property :special
25
+ property :researcher
26
+
27
+ end
28
+ end
@@ -0,0 +1,26 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ module Popit
7
+ module PersonimageRepresenter
8
+ include Roar::Representer::JSON::HAL
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Popit::PersonimageRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
22
+
23
+ property :url
24
+
25
+ end
26
+ end
@@ -0,0 +1,28 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ module Popit
7
+ module PersonlinkRepresenter
8
+ include Roar::Representer::JSON::HAL
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Popit::PersonlinkRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
22
+
23
+ property :id
24
+ property :note
25
+ property :url
26
+
27
+ end
28
+ end
@@ -0,0 +1,38 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ module Popit
7
+ module PersonmembershipRepresenter
8
+ include Roar::Representer::JSON::HAL
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Popit::PersonmembershipRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
22
+
23
+ property :id
24
+ property :person_id
25
+ property :role
26
+ property :post_id
27
+ property :label
28
+ property :start_date
29
+ property :end_date
30
+ property :area_id
31
+ property :area_name
32
+ property :organization_id
33
+ property :links
34
+ property :contact_detail
35
+ property :url
36
+
37
+ end
38
+ end
@@ -0,0 +1,26 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ module Popit
7
+ module PersonperiodRepresenter
8
+ include Roar::Representer::JSON::HAL
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Popit::PersonperiodRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
22
+
23
+ property :date
24
+
25
+ end
26
+ end
@@ -0,0 +1,28 @@
1
+ require 'roar/representer'
2
+ require 'roar/representer/feature/http_verbs'
3
+ require 'roar/representer/feature/client'
4
+ require 'roar/representer/json/hal'
5
+
6
+ module Popit
7
+ module PersonrepresentRepresenter
8
+ include Roar::Representer::JSON::HAL
9
+
10
+ module Initializer
11
+ def initialize
12
+ extend Popit::PersonrepresentRepresenter
13
+ extend Roar::Representer::Feature::Client
14
+ super
15
+ end
16
+ end
17
+
18
+ def self.included(klass)
19
+ klass.send :prepend, Initializer
20
+ klass.send :include, Roar::Representer::Feature::HttpVerbs
21
+ end
22
+
23
+ property :district
24
+ property :comunas
25
+ property :region
26
+
27
+ end
28
+ end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'popit_representers'
3
- gem.version = '0.0.10'
4
- gem.date = '2014-01-07'
3
+ gem.version = '0.0.12'
4
+ gem.date = '2014-02-18'
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)."
7
7
  gem.authors = ["Marcel Augsburger"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popit_representers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Augsburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-07 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roar
@@ -49,9 +49,26 @@ files:
49
49
  - .gitignore
50
50
  - LICENSE
51
51
  - README.md
52
+ - lib/popit_representers/models/organization.rb
53
+ - lib/popit_representers/models/organization_collection.rb
54
+ - lib/popit_representers/models/personcommission.rb
55
+ - lib/popit_representers/models/personimage.rb
56
+ - lib/popit_representers/models/personlink.rb
57
+ - lib/popit_representers/models/personmembership.rb
58
+ - lib/popit_representers/models/personperiod.rb
59
+ - lib/popit_representers/models/personrepresent.rb
60
+ - lib/popit_representers/models/wrapped_person.rb
52
61
  - lib/popit_representers/popit_representers.rb
62
+ - lib/popit_representers/representers/organization_representer.rb
63
+ - lib/popit_representers/representers/organizationcollection_representer.rb
53
64
  - lib/popit_representers/representers/person_collection_representer.rb
54
65
  - lib/popit_representers/representers/person_representer.rb
66
+ - lib/popit_representers/representers/personcommission_representer.rb
67
+ - lib/popit_representers/representers/personimage_representer.rb
68
+ - lib/popit_representers/representers/personlink_representer.rb
69
+ - lib/popit_representers/representers/personmembership_representer.rb
70
+ - lib/popit_representers/representers/personperiod_representer.rb
71
+ - lib/popit_representers/representers/personrepresent_representer.rb
55
72
  - popit_representers.gemspec
56
73
  homepage: https://github.com/ciudadanointeligente/billit_representers
57
74
  licenses:
@@ -73,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
90
  version: '0'
74
91
  requirements: []
75
92
  rubyforge_project:
76
- rubygems_version: 2.1.11
93
+ rubygems_version: 2.2.1
77
94
  signing_key:
78
95
  specification_version: 4
79
96
  summary: Representers for the pop-it module of the Poplus project.