parliament-routes 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/routes.rb +89 -0
- data/lib/parliament/engine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f035dffd525a53e41d1d6b0f9cb255421dc86935
|
4
|
+
data.tar.gz: ac5e300484ac2206f80657940468feca933170b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b849679b4779362b5db23cab2889d17079c85b71ed8e0f34603ac2e8eb5a4204991229a349199f3255eaa86efe8de6c38d919e96bc1fdbbde55655c5143c56d
|
7
|
+
data.tar.gz: 9576d5cb00046b3c20c3753d77b638052e6c7c0602e7020215b46e3156a8f11cca9cc71b5ae5d043f1223a42216667ede1be63dcb3a428095168674ecf67beb4
|
data/config/routes.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
1
2
|
# require mapper class which holds methods for routing
|
2
3
|
require_relative '../app/lib/ext/action_dispatch/routing/mapper.rb'
|
3
4
|
|
@@ -27,6 +28,7 @@ Rails.application.routes.draw do
|
|
27
28
|
# /search
|
28
29
|
get '/search', to: 'search#index', as: :search
|
29
30
|
get '/search/opensearch', to: 'search#opensearch', as: :opensearch_description
|
31
|
+
get '/redirect', to: 'search#redirect', as: :redirect
|
30
32
|
|
31
33
|
### People ###
|
32
34
|
# /people (multiple 'people' scope)
|
@@ -54,6 +56,24 @@ Rails.application.routes.draw do
|
|
54
56
|
|
55
57
|
# /people/:person_id/parties
|
56
58
|
build_root_and_current_routes('people/parties', 'parties')
|
59
|
+
|
60
|
+
# /people/:person_id/committees
|
61
|
+
scope '/committees', as: 'committees' do
|
62
|
+
scope '/memberships', as: 'memberships' do
|
63
|
+
# /people/:person_id/committees/memberships
|
64
|
+
get '/', to: 'people/committees/memberships#index'
|
65
|
+
|
66
|
+
scope '/current', as: 'current' do
|
67
|
+
# /people/:person_id/committees/memberships/current
|
68
|
+
get '/', to: 'people/committees/memberships#current'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# /people/:person_id/committees/chairs
|
73
|
+
scope '/chairs', as: 'chairs' do
|
74
|
+
get '/', to: 'people/committees/chairs#index'
|
75
|
+
end
|
76
|
+
end
|
57
77
|
end
|
58
78
|
|
59
79
|
# Allow lookups - but ensure they are SECOND in the routes list after /people/:person_id
|
@@ -152,6 +172,18 @@ Rails.application.routes.draw do
|
|
152
172
|
scope '/:house_id' do
|
153
173
|
get '/', to: 'houses#show', house_id: id_format_regex
|
154
174
|
|
175
|
+
# /houses/:house_id/committees
|
176
|
+
scope '/committees', as: 'committees' do
|
177
|
+
get '/', to: 'houses/committees#index'
|
178
|
+
listable('houses/committees#a_to_z', 'houses/committees#letters')
|
179
|
+
|
180
|
+
# /houses/:house_id/committees/current
|
181
|
+
scope '/current', as: 'current' do
|
182
|
+
get '/', to: 'houses/committees#current'
|
183
|
+
listable('houses/committees#a_to_z_current', 'houses/committees#current_letters')
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
155
187
|
# /houses/:house_id/members
|
156
188
|
build_members_routes('houses/members', current: true)
|
157
189
|
|
@@ -328,4 +360,61 @@ Rails.application.routes.draw do
|
|
328
360
|
end
|
329
361
|
end
|
330
362
|
end
|
363
|
+
|
364
|
+
## Committees ##
|
365
|
+
scope '/committees', as: 'committees' do
|
366
|
+
# /committees
|
367
|
+
get '/', to: 'committees#index'
|
368
|
+
post '/lookup', to: 'postcodes#lookup'
|
369
|
+
|
370
|
+
lookupable('committees#lookup_by_letters')
|
371
|
+
|
372
|
+
listable('committees#a_to_z', 'committees#letters')
|
373
|
+
|
374
|
+
# /committees/current
|
375
|
+
scope '/current', as: 'current' do
|
376
|
+
get '/', to: 'committees#current'
|
377
|
+
listable('committees#a_to_z_current', 'committees#current_letters')
|
378
|
+
end
|
379
|
+
|
380
|
+
# /committees/:committee_id
|
381
|
+
scope '/:committee_id', as: 'show' do
|
382
|
+
get '/', to: 'committees#show', committee_id: id_format_regex
|
383
|
+
|
384
|
+
# /committees/:committee_id/memberships
|
385
|
+
scope '/memberships', as: 'memberships' do
|
386
|
+
get '/', to: 'committees/memberships#index'
|
387
|
+
listable('committees/memberships#a_to_z', 'committees/memberships#letters')
|
388
|
+
|
389
|
+
# /committees/:committee_id/memberships/current
|
390
|
+
scope '/current', as: 'current' do
|
391
|
+
get '/', to: 'memberships#current'
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
# /committees/:committee_id/chairs
|
396
|
+
scope '/chairs', as: 'chairs' do
|
397
|
+
get '/', to: 'committees/chairs#index'
|
398
|
+
end
|
399
|
+
|
400
|
+
# /committees/:committee_id/sub-committees
|
401
|
+
scope '/sub-committees', as: 'sub_committees' do
|
402
|
+
get '/', to: 'committees/sub_committees#index'
|
403
|
+
|
404
|
+
scope '/current', as: 'current' do
|
405
|
+
get '/', to: 'sub_committees#current'
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
# /committees/:committee_id/houses
|
410
|
+
scope '/houses', as: 'houses' do
|
411
|
+
get '/', to: 'committees/houses#index'
|
412
|
+
end
|
413
|
+
|
414
|
+
# /committees/:committee_id/parent
|
415
|
+
scope '/parent', as: 'parent' do
|
416
|
+
get '/', to: 'committees#parent'
|
417
|
+
end
|
418
|
+
end
|
419
|
+
end
|
331
420
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryony Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|