diff options
author | Christopher Baines <mail@cbaines.net> | 2018-06-23 09:26:52 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-23 12:58:05 +0100 |
commit | 0736fd5ab32eeb57de52fb6d581d16c2824b2fc2 (patch) | |
tree | 6ed6e54772a6e23a047942e8be7d1ff114949f3d /app/controllers | |
parent | b6c1930ffe65afbbccf1252ca084a932d19c2d64 (diff) | |
download | govuk-mini-environment-admin-0736fd5ab32eeb57de52fb6d581d16c2824b2fc2.tar govuk-mini-environment-admin-0736fd5ab32eeb57de52fb6d581d16c2824b2fc2.tar.gz |
Add a Guix module
Which contains an available_locally? function.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/govuk_guix/data_snapshots_controller.rb | 25 | ||||
-rw-r--r-- | app/controllers/govuk_guix/revisions_controller.rb | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/app/controllers/govuk_guix/data_snapshots_controller.rb b/app/controllers/govuk_guix/data_snapshots_controller.rb new file mode 100644 index 0000000..95bee66 --- /dev/null +++ b/app/controllers/govuk_guix/data_snapshots_controller.rb @@ -0,0 +1,25 @@ +# GOV.UK Mini Environment Admin +# Copyright © 2018 Christopher Baines <mail@cbaines.net> +# +# This file is part of the GOV.UK Mini Environment Admin. +# +# The GOV.UK Mini Environment Admin is free software: you can +# redistribute it and/or modify it under the terms of the GNU Affero +# General Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any later +# version. +# +# The GOV.UK Mini Environment Admin is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with the GOV.UK Mini Environment Admin. If not, see +# <http://www.gnu.org/licenses/>. + +class GovukGuix::DataSnapshotsController < ApplicationController + def show + @data_snapshot = GovukGuix::DataSnapshot.find(params['id']) + end +end diff --git a/app/controllers/govuk_guix/revisions_controller.rb b/app/controllers/govuk_guix/revisions_controller.rb index f7c7f56..838bdae 100644 --- a/app/controllers/govuk_guix/revisions_controller.rb +++ b/app/controllers/govuk_guix/revisions_controller.rb @@ -27,7 +27,7 @@ class GovukGuix::RevisionsController < ApplicationController revision = params.require('revision') # Attempt to check if this can be performed locally - if File.exist? '/var/guix/daemon-socket/socket' + if Guix.available_locally? options = {} else # Assume that the AWS backend is in use |