billit_representers 0.8.2 → 0.8.3

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: 808d6c7f685ec2e3d5355d6db80275f0f4194ac7
4
- data.tar.gz: 01b3ed9eab4454799490e9012e55c7ab9c591817
3
+ metadata.gz: d5d7e8a6d21a09483bb00173dbd21b4e4389a6b7
4
+ data.tar.gz: 70c24d4f62e49153cedd95124ab17d63e8b86c64
5
5
  SHA512:
6
- metadata.gz: 4b0fca8a04999851a3b09e985a3a24b21fe1b4c922189646431621fd434aa4d57905b4120da9233600f98498f4e7397d9b9e6b1bbefb7e01e30f79dc3fbd48f0
7
- data.tar.gz: 8bafffb3e0a689205a6ec09a43e67b2938a1f3f3cf13200cca1c88499dce20a6935c151d9fa864622b999c58d2a58adaf0da172876320962f237afdb3661cfe3
6
+ metadata.gz: 792ab01ad1067c8b528ff501d6273242e6a4e1077bc5982e8db708046a96007d035557ab475bf1ebaf9912218741c7c760fde4a4bbf7f6861410593987a520d1
7
+ data.tar.gz: 7768eac61da8ae932f393a6723332f8ed97cb7675cdcb80c4d332378d7d87a6e314e2c853ed6093557ea102f62b890f6ab845b404b7bd9e28635a228cfc2e173
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'billit_representers'
3
- gem.version = '0.8.2'
4
- gem.date = '2014-02-04'
3
+ gem.version = '0.8.3'
4
+ gem.date = '2014-02-07'
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"]
@@ -1,142 +1,6 @@
1
- require 'roar/representer'
2
- require 'roar/representer/feature/http_verbs'
3
- require 'roar/representer/feature/client'
4
- require 'roar/representer/json'
5
- require 'roar/representer/json/hal'
6
- # require 'roar/rails/hal'
7
- require 'active_model'
8
- require 'billit_representers/representers/paperwork_representer'
9
- require 'billit_representers/representers/priority_representer'
10
- require 'billit_representers/representers/report_representer'
11
- require 'billit_representers/representers/document_representer'
12
- require 'billit_representers/representers/directive_representer'
13
- require 'billit_representers/representers/remark_representer'
14
- require 'billit_representers/representers/revision_representer'
15
- require 'billit_representers/models/paperwork'
16
- require 'billit_representers/models/priority'
17
- require 'billit_representers/models/report'
18
- require 'billit_representers/models/document'
19
- require 'billit_representers/models/directive'
20
- require 'billit_representers/models/remark'
21
- require 'billit_representers/models/revision'
22
-
1
+ require 'billit_representers/representers/bill_model_representer'
23
2
  module Billit
24
3
  class Bill
25
- include Roar::Representer::JSON::HAL
26
- include Roar::Representer::Feature::HttpVerbs
27
- include ActiveModel::Validations
28
- # include Roar::Rails::HAL
29
- # include Roar::Representer::JSON
30
-
31
- # validates_presence_of :uid
32
- # validates :subject_areas, inclusion: { in: @@subject_areas_valid_values }
33
- # validates :stage, inclusion: { in: @@stage_valid_values }
34
- # validates :initial_chamber, inclusion: { in: @@initial_chamber_valid_values }
35
- # validates :current_priority, inclusion: { in: @@current_priority_valid_values }
36
-
37
- def initialize
38
- extend Roar::Representer::Feature::Client
39
- super
40
- end
41
-
42
- property :uid
43
- property :title
44
- property :creation_date
45
- property :source
46
- property :initial_chamber
47
- property :current_priority
48
- property :stage
49
- property :sub_stage
50
- property :status
51
- property :resulting_document
52
- property :law_link
53
- property :merged_bills
54
- property :subject_areas
55
- property :authors
56
- property :publish_date
57
- property :abstract
58
- property :tags
59
- property :bill_draft_link
60
-
61
- collection :paperworks, extend: PaperworkRepresenter, class: Billit::Paperwork
62
- collection :priorities, extend: PriorityRepresenter, class: Billit::Priority
63
- collection :reports, extend: ReportRepresenter, class: Billit::Report
64
- collection :documents, extend: DocumentRepresenter, class: Billit::Document
65
- collection :directives, extend: DirectiveRepresenter, class: Billit::Directive
66
- collection :remarks, extend: RemarkRepresenter, class: Billit::Remark
67
- collection :revisions, extend: RevisionRepresenter, class: Billit::Revision
68
-
69
- link :self do
70
- bill_url(self.uid)
71
- end
72
-
73
- @@subject_areas_valid_values =
74
- [
75
- 'Defensa',
76
- 'Impuestos',
77
- 'Economía',
78
- 'Empresas',
79
- 'Hacienda',
80
- 'Relaciones Exteriores',
81
- 'Administración',
82
- 'Asunto Indígena',
83
- 'Zona Extrema',
84
- 'Regionalización',
85
- 'Salud',
86
- 'Minería',
87
- 'Medio Ambiente',
88
- 'Derechos Animales',
89
- 'Vivienda',
90
- 'Obras Públicas',
91
- 'Transporte',
92
- 'Telecomunicaciones',
93
- 'Trabajo',
94
- 'Protección Social',
95
- 'Cultura',
96
- 'Educación',
97
- 'Deportes',
98
- 'Transparencia',
99
- 'Probidad',
100
- 'Elecciones',
101
- 'Participación',
102
- 'Familia',
103
- 'Seguridad',
104
- 'Derechos Fundamentales',
105
- 'Nacionalidad',
106
- 'Reconstrucción Terremoto'
107
- ]
108
-
109
- @@stage_valid_values =
110
- [
111
- 'Archivado',
112
- 'Comisión Mixta Ley de Presupuesto',
113
- 'Comisión Mixta por rechazo de idea de legislar',
114
- 'Comisión Mixta por rechazo de modificaciones',
115
- 'Disc. informe C.Mixta por rechazo de modific. en C...',
116
- 'Discusión veto en Cámara de Origen',
117
- 'Discusión veto en Cámara Revisora',
118
- 'Insistencia',
119
- 'Primer trámite constitucional',
120
- 'Retirado',
121
- 'Segundo trámite constitucional',
122
- 'Tercer trámite constitucional',
123
- 'Tramitación terminada',
124
- 'Trámite de aprobacion presidencial',
125
- 'Trámite finalización en Cámara de Origen'
126
- ]
127
-
128
- @@initial_chamber_valid_values =
129
- [
130
- 'C.Diputados',
131
- 'Senado'
132
- ]
133
-
134
- @@current_priority_valid_values =
135
- [
136
- 'Discusión inmediata',
137
- 'Simple',
138
- 'Sin urgencia',
139
- 'Suma'
140
- ]
4
+ include Billit::BillModelRepresenter
141
5
  end
142
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billit_representers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
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-02-04 00:00:00.000000000 Z
11
+ date: 2014-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roar