diff --git a/Gemfile b/Gemfile index ae663b79f..47c2cd56a 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,7 @@ gem 'elasticsearch-rails', '~> 5.0', '>= 5.0.2' gem 'faraday_middleware-aws-sigv4', '~> 0.2.4' gem 'rack-utf8_sanitizer', '~> 1.6' gem 'oj_mimic_json', '~> 1.0', '>= 1.0.1' +gem 'turnout', '~> 2.5' group :development, :test do gem 'rspec-rails', '~> 3.5', '>= 3.5.2' diff --git a/Gemfile.lock b/Gemfile.lock index d86a1fb04..1273d6601 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,7 +55,7 @@ GEM api-pagination (4.8.2) arel (9.0.0) aws-eventstream (1.0.1) - aws-partitions (1.124.0) + aws-partitions (1.125.0) aws-sdk-core (3.44.0) aws-eventstream (~> 1.0) aws-partitions (~> 1.0) @@ -332,6 +332,8 @@ GEM docopt (~> 0.5) sysrandom rack (2.0.6) + rack-accept (0.4.5) + rack (>= 0.4) rack-cors (1.0.2) rack-test (1.1.0) rack (>= 1.0, < 3) @@ -454,6 +456,11 @@ GEM thread_safe (0.3.6) tilt (2.0.9) trollop (2.9.9) + turnout (2.5.0) + i18n (>= 0.7, < 2) + rack (>= 1.3, < 3) + rack-accept (~> 0.4) + tilt (>= 1.4, < 3) tzinfo (1.2.5) thread_safe (~> 0.1) unf (0.1.4) @@ -543,6 +550,7 @@ DEPENDENCIES spring-commands-rspec spring-watcher-listen (~> 2.0.0) strip_attributes (~> 1.8) + turnout (~> 2.5) vcr (~> 3.0.3) webmock (~> 3.1) diff --git a/config/initializers/turnout.rb b/config/initializers/turnout.rb new file mode 100644 index 000000000..df4a6ca76 --- /dev/null +++ b/config/initializers/turnout.rb @@ -0,0 +1,4 @@ +Turnout.configure do |config| + config.default_maintenance_page = Turnout::MaintenancePage::JSON + config.default_reason = "The site is temporarily down for maintenance. Please check https://status.datacite.org for more information." +end \ No newline at end of file