parliament-routes 0.5.4 → 0.6.0

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: c21f9bc7a3532b1dd7fa9881de88303f13ce14cf
4
- data.tar.gz: 461734e8c1e94ec6dfe921b619904d0bf6356218
3
+ metadata.gz: 5b9aae077c017bda18e024d62e5c2aa0bccbdda8
4
+ data.tar.gz: 56210166ea7f5789e4d467e3ed5c9587ad9444f9
5
5
  SHA512:
6
- metadata.gz: 270b8b20934d4726456b4299b2b33765f63459d8ae47ea12ce7c815a5ad3bee8319323685f0a7a80cfbca939756abb9691d439f6edbf7388f2c2a2e065e46c62
7
- data.tar.gz: bc34a96d532c01ab4e69cfebe33f10d9206e90c4432f118f33bab0709844c042328c1e134656fcd3d6c18c86e1d89d3d70b3b5ec5fbda49a09fdba63fbf62024
6
+ metadata.gz: 87f20ce60209bf1cb6876032ff3217598ae6741add74d76b2655d258066b65494cc4494740d16fe663219ec87fd877df10c0317cbeea9c180fe0a2f8968b2295
7
+ data.tar.gz: 2e1775599102600384b981d05a3821b8c908ccee361eb36354d97f52d02bb35669789139947e154f8b71a91420d71a34e783a4f14c6c63e194768e6b6106914a
data/config/routes.rb CHANGED
@@ -28,8 +28,12 @@ Rails.application.routes.draw do
28
28
  get '/articles/:article_id', to: 'articles#show', article_id: id_format_regex, as: :article
29
29
 
30
30
  ### Concepts ###
31
- get '/concepts/:concept_id', to: 'concepts#show', concept_id: id_format_regex, as: :concept
32
- get '/concepts', to: 'concepts#index', as: :concepts
31
+ get '/concepts', to: 'concepts#index', as: :concepts
32
+ get '/concepts/:concept_id', to: 'concepts#show', as: :concept, concept_id: id_format_regex
33
+
34
+ ### Collections ###
35
+ get '/collections', to: 'collections#index', as: :collections
36
+ get '/collections/:collection_id', to: 'collections#show', as: :collection, collection_id: id_format_regex
33
37
 
34
38
  ### Hybrid Bill Petitions ###
35
39
  # /petition-a-hybrid-bill
@@ -379,6 +383,67 @@ Rails.application.routes.draw do
379
383
  end
380
384
  end
381
385
 
386
+
387
+ scope '/groups', as: 'group' do
388
+ # /groups/:group_id
389
+ scope '/:group_id' do
390
+ get '/', to: 'groups#show', group_id: id_format_regex
391
+
392
+ # /groups/:group_id/houses
393
+ scope '/houses', as: 'houses' do
394
+ get '/', to: 'groups/houses#index'
395
+ end
396
+
397
+ # /groups/:group_id/positions
398
+ scope '/positions', as: 'positions' do
399
+ get '/', to: 'groups/positions#index'
400
+
401
+ scope 'chairs', as: 'chairs' do
402
+ get '/', to: 'groups/positions/chairs#index'
403
+ scope '/current', as: 'current' do
404
+ get '/', to: 'groups/positions/chairs#current'
405
+ end
406
+ end
407
+ scope '/current', as: 'current' do
408
+ get '/', to: 'groups/positions#current'
409
+ end
410
+ end
411
+
412
+ end
413
+ end
414
+
415
+ ## Groups
416
+ scope '/groups', as: 'groups' do
417
+ # /groups
418
+
419
+ get '/', to: 'groups#index'
420
+
421
+ listable('groups#a_to_z', 'groups#letters')
422
+
423
+ # /groups/government-departments
424
+ scope '/government-organisations', as: 'government_organisations' do
425
+ get '/', to: 'groups/government_organisations#index'
426
+ listable('groups/government_organisations#a_to_z', 'groups/government_organisations#letters')
427
+
428
+ scope '/current', as: 'current' do
429
+ get '/', to: 'groups/government_organisations#current'
430
+ listable('groups/government_organisations#a_to_z_current', 'groups/government_organisations#current_letters')
431
+ end
432
+ end
433
+
434
+ post '/lookup', to: 'groups#lookup'
435
+ scope '/current', as: 'current' do
436
+ get '/', to: 'groups#current'
437
+
438
+ listable('groups#a_to_z_current', 'groups#current_letters')
439
+ end
440
+ lookupable('groups#lookup_by_letters')
441
+
442
+
443
+ end
444
+
445
+
446
+
382
447
  ## Committees ##
383
448
  scope '/committees', as: 'committees' do
384
449
  # /committees
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Engine
3
- VERSION = '0.5.4'.freeze
3
+ VERSION = '0.6.0'.freeze
4
4
  end
5
5
  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.5.4
4
+ version: 0.6.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: 2018-02-02 00:00:00.000000000 Z
11
+ date: 2018-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails