diff options
author | Christopher Baines <mail@cbaines.net> | 2018-03-16 08:51:54 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-03-29 07:55:01 +0100 |
commit | 051c8bf612126fa79699c8bf45a661dde127f4a0 (patch) | |
tree | 849a3b05b4ab4b59a426761d7cf1da3cc7036349 /config | |
parent | a8c8f68971dd9e20dee01d9f65c64283e41fe4a3 (diff) | |
download | govuk-mini-environment-admin-051c8bf612126fa79699c8bf45a661dde127f4a0.tar govuk-mini-environment-admin-051c8bf612126fa79699c8bf45a661dde127f4a0.tar.gz |
Add backend controllers, models and views
Also annotate existing models.
Diffstat (limited to 'config')
-rw-r--r-- | config/database.yml | 16 | ||||
-rw-r--r-- | config/routes.rb | 36 |
2 files changed, 36 insertions, 16 deletions
diff --git a/config/database.yml b/config/database.yml index 313bfde..4504ea0 100644 --- a/config/database.yml +++ b/config/database.yml @@ -5,13 +5,13 @@ default: &default development: <<: *default database: govuk_mini_environment_admin_development - url: <%= ENV['DATABASE_URL'] %> + #url: <%= ENV['DATABASE_URL'] %> -test: - <<: *default - database: govuk_mini_environment_admin_test - url: <%= ENV["DATABASE_URL"].try(:sub, /([-_]development)?$/, '_test')%> +# test: +# <<: *default +# database: govuk_mini_environment_admin_test +# url: <%= ENV["DATABASE_URL"].try(:sub, /([-_]development)?$/, '_test')%> -production: - <<: *default - database: govuk_mini_environment_admin_production +# production: +# <<: *default +# database: govuk_mini_environment_admin_production diff --git a/config/routes.rb b/config/routes.rb index 06470d3..51e5add 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,16 +1,28 @@ Rails.application.routes.draw do root :to => 'mini_environments#index' - resource :terraform_http_backend, - controller: :terraform_http_backend, - except: %i[new edit update] + scope :setup do + get '/', to: 'setup#show', as: 'setup' - resources :mini_environments, path: '/' do - post '/', to: 'mini_environments#perform_action', as: 'perform_action' - end + resources :govuk_guix_revisions, + controller: 'govuk_guix/revisions', + only: %i[show destroy] - namespace :govuk_guix do - get 'revisions', to: 'revisions#index' + post 'enqueue_fetch_govuk_guix_revision', + to: 'govuk_guix/revisions#enqueue_fetch_revision', + as: 'enqueue_fetch_govuk_guix_revision' + + scope '/backends' do + resources :terraform_aws, + as: 'terraform_aws_backends', + controller: 'backends/terraform_aws', + only: %i[create new show update destroy] + + resources :terraform_libvirt, + as: 'terraform_libvirt_backends', + controller: 'backends/terraform_libvirt', + only: %i[create new show update destroy] + end end resources :que_jobs, only: [] do @@ -19,4 +31,12 @@ Rails.application.routes.draw do post 'retry_now' end end + + resources :mini_environments, path: '/' do + post '/', to: 'mini_environments#perform_action', as: 'perform_action' + + resource :terraform_http_backend, + controller: :terraform_http_backend, + except: %i[new edit update] + end end |