parliament-routes 0.6.20 → 0.6.21

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: b4fd3a59a05f804a0d2e6bcbe3b3e70bac0f1cb9
4
- data.tar.gz: 55c67cc058bc011f977cd22079823cb7452d9795
3
+ metadata.gz: 16fed93c785054eb1c34cf1fcbccdb896fe649a2
4
+ data.tar.gz: 51099caf40e2817f9913ded4264d7319f4870486
5
5
  SHA512:
6
- metadata.gz: e8f01f31074ddc9849466c303c50b17d2af58f9640ad6894f22371de63612feb0cff423b64630c4935471c474be8d2c02c6a7c83aaa0dfec8bdbc8e3712c0f6e
7
- data.tar.gz: b042bc313adfb0f312b4f94e5442b555dcfb093af2c0f6be0814be44fd0a8c947aea92469c15beac194cd2a8ce6f7729a41fab057e7b013eabcef993889ebdef
6
+ metadata.gz: 9781815e64700e644b999043a6ed420eec483579fd9d9a16d6a28e1d08e71885fa0670acdc86e6225a5ac10ff2d9d8c2696dd0807fad486fde5c51aa56adcbf2
7
+ data.tar.gz: 403eddbc8295498320ecec90511228668633eb607a72374d8df7f53f40a77e0bc1f81840e0c48c36cda2e1ebe5a7af34a43866016d0f6c5db634aca9f3c8e735
data/config/routes.rb CHANGED
@@ -40,10 +40,6 @@ Rails.application.routes.draw do
40
40
  get '/statutory-instruments', to: 'statutory_instruments#index', as: :statutory_instruments
41
41
  get '/statutory-instruments/:statutory_instrument_id', to: 'statutory_instruments#show', as: :statutory_instrument
42
42
 
43
- ## Work Packages ##
44
- get '/work-packages', to: 'work_packages#index', as: :work_packages
45
- get '/work-packages/:work_package_id', to: 'work_packages#show', as: :work_package
46
-
47
43
  ## Procedures ##
48
44
  get '/procedures', to: 'procedures#index', as: :procedures
49
45
  get '/procedures/:procedure_id', to: 'procedures#show', as: :procedure
@@ -575,4 +571,42 @@ Rails.application.routes.draw do
575
571
  end
576
572
  end
577
573
  end
574
+
575
+ ### Work Packages ###
576
+
577
+ # /work-packages (multiple 'work packages' scope)
578
+ scope '/work-packages', as: 'work_packages' do
579
+ get '/', to: 'work_packages#index'
580
+
581
+ # /work-packages/current
582
+ scope '/current', as: 'current' do
583
+ get '/', to: 'work_packages#current'
584
+ end
585
+
586
+ # /work-packages/paper-types
587
+ scope '/paper-types', as: 'paper_types' do
588
+ get '/', to: 'work_packages/paper_types#index'
589
+ end
590
+
591
+ scope '/paper-types', as: 'paper_type' do
592
+ # /work-packages/paper-types/:paper-type
593
+ paper_type = ['statutory-instruments', 'proposed-negative-statutory-instruments']
594
+
595
+ scope '/:paper_type', constraints: lambda { |req| paper_type.include?(req.params[:paper_type]) } do
596
+ get '/', to: 'work_packages/paper_types#show'
597
+
598
+ # /work-packages/paper-types/:paper-type/current
599
+ scope '/current', as: 'current' do
600
+ get '/', to: 'work_packages/paper_types#current'
601
+ end
602
+ end
603
+ end
604
+ end
605
+
606
+ # /work-packages/:work_package_id
607
+ scope '/work-packages', as: 'work_package' do
608
+ scope '/:work_package_id' do
609
+ get '/', to: 'work_packages#show'
610
+ end
611
+ end
578
612
  end
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Engine
3
- VERSION = '0.6.20'.freeze
3
+ VERSION = '0.6.21'.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.6.20
4
+ version: 0.6.21
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-11-02 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails