-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2a4693
commit 48e8a9f
Showing
17 changed files
with
190 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ public/system | |
.env.production* | ||
.env.local | ||
.env | ||
*~undo-tree~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Users | ||
class SessionsController < Devise::SessionsController | ||
def destroy | ||
# Preserve the saml_uid and saml_session_index in the session | ||
saml_uid = session['saml_uid'] | ||
saml_session_index = session['saml_session_index'] | ||
super do | ||
session['saml_uid'] = saml_uid | ||
session['saml_session_index'] = saml_session_index | ||
end | ||
end | ||
|
||
def after_sign_out_path_for(_) | ||
Rails.logger.error("~~~~~~~~~~~ #{session['saml_uid']} && #{session['saml_session_index']} && #{IDP_METADATA[:idp_slo_service_url]}") | ||
if session['saml_uid'] && session['saml_session_index'] && IDP_METADATA[:idp_slo_service_url] | ||
user_saml_omniauth_authorize_path + "/spslo" | ||
else | ||
super | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
development: | ||
adapter: solr | ||
url: <%= ENV['SOLR_DEVELOPMENT_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hydra-development" %> | ||
beta: | ||
adapter: solr | ||
url: <%= ENV['SOLR_BETA_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_BETA_PORT', 8983)}/solr/hydra-beta" %> | ||
test: &test | ||
adapter: solr | ||
url: <%= ENV['SOLR_TEST_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hydra-test" %> | ||
production: | ||
adapter: solr | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %> | ||
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
server "libarchive.linnbenton.edu", user: "notch8", roles: %w{app db web} | ||
|
||
set :systemd_unit, "hyrax-beta.service" | ||
set :systemd_use_sudo, true | ||
set :systemd_roles, %w(app) | ||
|
||
set :rails_env, 'beta' | ||
set :deploy_to, "/var/www/hyrax-beta" | ||
|
||
# Configuration | ||
# ============= | ||
# You can set any configuration variable like in config/deploy.rb | ||
# These variables are then only loaded and set in this stage. | ||
# For available Capistrano configuration variables see the documentation page. | ||
# http://capistranorb.com/documentation/getting-started/configuration/ | ||
# Feel free to add new variables to customise your setup. | ||
|
||
|
||
|
||
# Custom SSH Options | ||
# ================== | ||
# You may pass any option but keep in mind that net/ssh understands a | ||
# limited set of options, consult the Net::SSH documentation. | ||
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start | ||
# | ||
# Global options | ||
# -------------- | ||
# set :ssh_options, { | ||
# keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(password) | ||
# } | ||
# | ||
# The server-based syntax can be used to override options: | ||
# ------------------------------------ | ||
# server "example.com", | ||
# user: "user_name", | ||
# roles: %w{web app}, | ||
# ssh_options: { | ||
# user: "user_name", # overrides user setting above | ||
# keys: %w(/home/user_name/.ssh/id_rsa), | ||
# forward_agent: false, | ||
# auth_methods: %w(publickey password) | ||
# # password: "please use keys" | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Rails.application.configure do | ||
# Settings specified here will take precedence over those in config/application.rb. | ||
|
||
# In the development environment your application's code is reloaded on | ||
# every request. This slows down response time but is perfect for development | ||
# since you don't have to restart the web server when you make code changes. | ||
config.cache_classes = false | ||
|
||
# Do not eager load code on boot. | ||
config.eager_load = false | ||
|
||
# Show full error reports. | ||
config.consider_all_requests_local = true | ||
|
||
# Enable/disable caching. By default caching is disabled. | ||
if Rails.root.join('tmp/caching-dev.txt').exist? | ||
config.action_controller.perform_caching = true | ||
|
||
config.cache_store = :memory_store | ||
config.public_file_server.headers = { | ||
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" | ||
} | ||
else | ||
config.action_controller.perform_caching = false | ||
|
||
config.cache_store = :null_store | ||
end | ||
|
||
# Don't care if the mailer can't send. | ||
config.action_mailer.raise_delivery_errors = false | ||
|
||
config.action_mailer.perform_caching = false | ||
|
||
# Print deprecation notices to the Rails logger. | ||
config.active_support.deprecation = :log | ||
|
||
# Raise an error on page load if there are pending migrations. | ||
config.active_record.migration_error = :page_load | ||
|
||
# Debug mode disables concatenation and preprocessing of assets. | ||
# This option may cause significant delays in view rendering with a large | ||
# number of complex assets. | ||
config.assets.debug = true | ||
|
||
# Suppress logger output for asset requests. | ||
config.assets.quiet = true | ||
|
||
# Raises error for missing translations | ||
# config.action_view.raise_on_missing_translations = true | ||
|
||
# Use an evented file watcher to asynchronously detect changes in source code, | ||
# routes, locales, etc. This feature depends on the listen gem. | ||
#config.file_watcher = ActiveSupport::EventedFileUpdateChecker | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ production: | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- support@nothc8.com | ||
- support@notch8.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace :derivatives do | ||
desc 'Loop over all objects and regenerative derivatives' | ||
task regenerate: [:environment] do | ||
Hyrax.config.curation_concerns.each do |concern| | ||
concern.all.map(&:members).each do |members| | ||
next if members.blank? | ||
members.each do |member| | ||
next unless member.is_a?(FileSet) | ||
if member.original_file.nil? | ||
puts "No :original_file relation returned for FileSet (#{member.id})" | ||
next | ||
end | ||
wrapper = JobIoWrapper.find_by(file_set_id: member.id) | ||
path_hint = wrapper.uploaded_file ? wrapper.uploaded_file.uploader.path : wrapper.path | ||
Rails.logger.debug("Regenerating derivatives for FileSet #{member.id} in the background") | ||
puts "Queueing (#{member.id})" | ||
CharacterizeJob.perform_later(member, member.original_file.id, path_hint) | ||
sleep(40) | ||
end | ||
end | ||
end | ||
end | ||
end |