diff --git a/Gemfile b/Gemfile index f09b9adc8..1d102d515 100644 --- a/Gemfile +++ b/Gemfile @@ -10,11 +10,12 @@ gem 'active-fedora', '~> 14.0' gem 'active_elastic_job', github: 'active-elastic-job/active-elastic-job', ref: 'ec51c5d9dedc4a1b47f2db41f26d5fceb251e979', group: %i[aws] gem 'activerecord-nulldb-adapter' gem 'addressable', '2.8.1' # remove once https://github.com/postrank-labs/postrank-uri/issues/49 is fixed -gem 'apartment' +gem 'apartment', github: 'scientist-softserv/apartment', branch: 'development' gem 'aws-sdk-sqs', group: %i[aws] gem 'blacklight', '~> 7.29' gem 'blacklight_oai_provider', '~> 7.0' gem 'bolognese', '>= 1.9.10' +gem 'bootstrap', '~> 4.6' gem 'bootstrap-datepicker-rails' gem 'bulkrax', '~> 5.3' gem 'byebug', group: %i[development test] @@ -28,12 +29,13 @@ gem 'database_cleaner', group: %i[test] gem 'devise' gem 'devise-guests', '~> 0.3' gem 'devise-i18n' -gem 'devise_invitable', '~> 1.6' +gem 'devise_invitable', '~> 2.0' gem 'dry-monads', '~> 1.5' gem 'easy_translate', group: %i[development] gem 'factory_bot_rails', group: %i[test] gem 'fcrepo_wrapper', '~> 0.4', group: %i[development test] gem 'flutie' +gem 'googleauth', '= 1.8.1' # 1.9.0 got yanked from rubygems, hard pinning until we can upgrade gem 'hyrax', github: 'samvera/hyrax', tag: 'hyrax-v5.0.0.rc2' gem 'hyrax-doi', github: 'samvera-labs/hyrax-doi', branch: 'rails_hyrax_upgrade' gem 'hyrax-iiif_av', github: 'samvera-labs/hyrax-iiif_av', branch: 'rails_hyrax_upgrade' diff --git a/Gemfile.lock b/Gemfile.lock index fc61e6b27..5ebb4c929 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,6 +99,17 @@ GIT valkyrie (~> 3.1.1) view_component (~> 2.74.1) +GIT + remote: https://github.com/scientist-softserv/apartment.git + revision: e1a24b5574dca7116f69e99f140372c42b75e041 + branch: development + specs: + apartment (2.2.1) + activerecord (>= 3.1.2, < 7.0) + parallel (>= 0.7.1) + public_suffix (>= 2) + rack (>= 1.3.6) + GIT remote: https://github.com/scientist-softserv/iiif_print.git revision: e476998ab453afabf1bcb8afa059b4416af9b705 @@ -214,11 +225,10 @@ GEM aes_key_wrap (1.1.0) almond-rails (0.3.0) rails (>= 4.2) - apartment (0.24.3) - activerecord (>= 3.1.2) - rack (>= 1.3.6) ast (2.4.2) attr_required (1.0.1) + autoprefixer-rails (10.4.16.0) + execjs (~> 2) awesome_nested_set (3.6.0) activerecord (>= 4.0.0, < 7.2) aws-eventstream (1.3.0) @@ -314,6 +324,10 @@ GEM rdf-rdfxml (~> 3.1) rdf-turtle (~> 3.1) thor (>= 0.19) + bootstrap (4.6.2) + autoprefixer-rails (>= 9.1.0) + popper_js (>= 1.16.1, < 2) + sassc-rails (>= 2.0.0) bootstrap-datepicker-rails (1.10.0.1) railties (>= 3.0) breadcrumbs_on_rails (3.0.1) @@ -420,9 +434,9 @@ GEM devise devise-i18n (1.12.0) devise (>= 4.9.0) - devise_invitable (1.7.5) - actionmailer (>= 4.1.0) - devise (>= 4.0.0) + devise_invitable (2.0.9) + actionmailer (>= 5.0) + devise (>= 4.6) diff-lcs (1.5.0) disposable (0.6.3) declarative (>= 0.0.9, < 1.0.0) @@ -551,11 +565,8 @@ GEM webrick google-apis-drive_v3 (0.46.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-env (2.0.1) - faraday (>= 1.0, < 3.a) - googleauth (1.9.0) - faraday (>= 1.0, < 3.a) - google-cloud-env (~> 2.0, >= 2.0.1) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) multi_json (~> 1.11) os (>= 0.9, < 2.0) @@ -887,6 +898,7 @@ GEM ast (~> 2.4.0) parslet (2.0.0) pg (1.5.4) + popper_js (1.16.1) posix-spawn (0.3.15) postrank-uri (1.1) addressable (>= 2.4.0) @@ -1319,11 +1331,12 @@ DEPENDENCIES active_elastic_job! activerecord-nulldb-adapter addressable (= 2.8.1) - apartment + apartment! aws-sdk-sqs blacklight (~> 7.29) blacklight_oai_provider (~> 7.0) bolognese (>= 1.9.10) + bootstrap (~> 4.6) bootstrap-datepicker-rails bulkrax (~> 5.3) byebug @@ -1337,12 +1350,13 @@ DEPENDENCIES devise devise-guests (~> 0.3) devise-i18n - devise_invitable (~> 1.6) + devise_invitable (~> 2.0) dry-monads (~> 1.5) easy_translate factory_bot_rails fcrepo_wrapper (~> 0.4) flutie + googleauth (= 1.8.1) hyku_knapsack! hyrax! hyrax-doi! diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index df9e83c18..04b9aebbf 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -14,10 +14,12 @@ //= require codemirror-autorefresh //= require codemirror/modes/css //= require jquery3 -//= require jquery_ujs +//= require rails-ujs +//= require popper +//= require bootstrap //= require jquery.fontselect -//= require dataTables/jquery.dataTables -//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap +//= require jquery.dataTables +//= require dataTables.bootstrap4 //= require stat_slider //= require turbolinks //= require cocoon @@ -25,6 +27,7 @@ //= require tether // Required by Blacklight //= require blacklight/blacklight +//= require blacklight_gallery // Moved the Hyku JS *above* the Hyrax JS to resolve #1187 (following // a pattern found in ScholarSphere) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 8b66c7d5d..9694fb3af 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -15,7 +15,7 @@ *= require codemirror *= require codemirror-theme *= require hyrax - *= require dataTables/bootstrap/3/jquery.dataTables.bootstrap + *= require dataTables.bootstrap4 *= require bootstrap-datepicker *= require single_signon *= require_self diff --git a/app/assets/stylesheets/hyku.scss b/app/assets/stylesheets/hyku.scss index 8979ddd16..118e799ac 100644 --- a/app/assets/stylesheets/hyku.scss +++ b/app/assets/stylesheets/hyku.scss @@ -16,7 +16,7 @@ } } -@media (min-width: $screen-sm-min) { +@media (min-width: 768px) { .logo-set { display: flex; flex-direction: column; @@ -131,7 +131,7 @@ footer.navbar { .sidebar { .h5 { - padding: $nav-link-padding; + padding: 10px 15px; } &.maximized { @@ -275,7 +275,7 @@ footer.navbar { } .callout-danger { - background-color: $well-bg; + background-color: #f5f5f5; border-color: $brand-danger; h1, @@ -374,7 +374,7 @@ a.btn.btn-default.restore-default-color.with-color-hint { height: auto; } -@media (min-width: $screen-lg-min) { +@media (min-width: 1200px) { a.restore-default-color { margin-top: 2em; } @@ -388,7 +388,7 @@ a.btn.btn-default.restore-default-color.with-color-hint { display: inline-block; } -@media (max-width: $screen-md-min) { +@media (max-width: 992px) { .product-features { .grid-item { width: 50%; @@ -396,7 +396,7 @@ a.btn.btn-default.restore-default-color.with-color-hint { } } -@media (max-width: $screen-sm-min) { +@media (max-width: 768px) { .product-features { .grid-item { width: 100%; @@ -433,7 +433,7 @@ body.public-facing { } // FEATURED COLLECTIONS -@media (max-width: $screen-sm-min) { +@media (max-width: 768px) { .admin-show-page .collection-title-row-wrapper .collection-title-row-content diff --git a/app/assets/stylesheets/hyrax.scss b/app/assets/stylesheets/hyrax.scss index 5efe46c15..411eca65f 100644 --- a/app/assets/stylesheets/hyrax.scss +++ b/app/assets/stylesheets/hyrax.scss @@ -5,18 +5,17 @@ */ @import "variables"; @import "bootstrap-default-overrides"; -@import "bootstrap-sprockets"; @import "bootstrap"; @import "blacklight/blacklight"; +@import "blacklight_gallery/gallery"; +@import "blacklight_gallery/masonry"; +@import "blacklight_gallery/slideshow"; +@import "blacklight_gallery/osd_viewer"; +@import "hyrax/blacklight_gallery"; @import "font-awesome"; @import "hyrax/hyrax"; @import "hyku"; @import "accounts"; @import "viewer"; -@import "blacklight_gallery/gallery"; -@import "blacklight_gallery/masonry"; -@import "blacklight_gallery/slideshow"; -@import "blacklight_gallery/osd_viewer"; - @import "themes/*"; diff --git a/app/assets/stylesheets/themes/cultural_repository.scss b/app/assets/stylesheets/themes/cultural_repository.scss index fc451c0c7..811e8e7dc 100644 --- a/app/assets/stylesheets/themes/cultural_repository.scss +++ b/app/assets/stylesheets/themes/cultural_repository.scss @@ -14,7 +14,7 @@ body.dashboard { padding-top: 100px !important; - @media (max-width: $screen-md-min) { + @media (max-width: 992px) { padding-top: 0 !important; } @@ -162,7 +162,7 @@ .facet-panel-background-color { background-color: #ffffff; - @media (max-width: $screen-md-min) { + @media (max-width: 992px) { background-color: transparent; } @@ -240,14 +240,14 @@ ////// Media Queries ////// - @media (min-width: $screen-xs-min) and (max-width: $screen-md-max) { + @media (min-width: 480px) and (max-width: 1199px) { .mt-reverse-mb { margin-bottom: 40px; margin-top: 0; } } - @media (max-width: $screen-sm-max) { + @media (max-width: 991px) { div.home_page_text.homepage-text-container { height: 0; margin-bottom: 30px; @@ -255,7 +255,7 @@ } } - @media screen and (max-width: $screen-md-min) { + @media screen and (max-width: 992px) { div.recently-uploaded:nth-of-type(2n+3), div.featured-works-6-column-layout:nth-of-type(2n+3), div.featured-works-4-column-layout:nth-of-type(2n+3) { diff --git a/app/assets/stylesheets/themes/neutral_repository.scss b/app/assets/stylesheets/themes/neutral_repository.scss index ec037fa89..26639ca41 100644 --- a/app/assets/stylesheets/themes/neutral_repository.scss +++ b/app/assets/stylesheets/themes/neutral_repository.scss @@ -152,13 +152,13 @@ ////// Media Queries ////// - @media (max-width: $screen-md-min) { + @media (max-width: 992px) { div.neutral-repository-collections:nth-of-type(2n+3) { clear: left; } } - @media (min-width: $screen-md-min) { + @media (min-width: 992px) { div.neutral-repository-collections:nth-of-type(3n+4) { clear: left; } diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9449da3c0..424590530 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,8 +6,6 @@ class ApplicationController < ActionController::Base # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception, prepend: true - force_ssl if: :ssl_configured? - helper Openseadragon::OpenseadragonHelper # Adds a few additional behaviors into the application controller include Blacklight::Controller @@ -24,7 +22,6 @@ class ApplicationController < ActionController::Base before_action :require_active_account!, if: :multitenant? before_action :set_account_specific_connections! before_action :elevate_single_tenant!, if: :singletenant? - skip_after_action :discard_flash_if_xhr rescue_from Apartment::TenantNotFound do raise ActionController::RoutingError, 'Not Found' @@ -131,8 +128,4 @@ def append_info_to_payload(payload) payload[:user_id] = current_user.id if current_user payload[:account_id] = current_account.cname if current_account end - - def ssl_configured? - ActiveRecord::Type::Boolean.new.cast(current_account.ssl_configured) - end end diff --git a/app/helpers/blacklight/blacklight_helper_behavior.rb b/app/helpers/blacklight/blacklight_helper_behavior.rb.old similarity index 100% rename from app/helpers/blacklight/blacklight_helper_behavior.rb rename to app/helpers/blacklight/blacklight_helper_behavior.rb.old diff --git a/app/models/user.rb b/app/models/user.rb index 7bfdd16cf..cf903b102 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -9,7 +9,6 @@ class User < ApplicationRecord include Hyrax::User include Hyrax::UserUsageStats - attr_accessible :email, :password, :password_confirmation if Blacklight::Utils.needs_attr_accessible? # Connects this user object to Blacklights Bookmarks. include Blacklight::User # Include default devise modules. Others available are: diff --git a/config/analytics.yml b/config/analytics.yml index 42cbb1452..9b5ab5a7f 100644 --- a/config/analytics.yml +++ b/config/analytics.yml @@ -9,3 +9,7 @@ # privkey_path: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_PATH'] %> # privkey_secret: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_SECRET'] %> # client_email: <%= ENV['GOOGLE_OAUTH_CLIENT_EMAIL'] %> +# matomo: +# base_url: <%= ENV['MATOMO_BASE_URL'] %> +# site_id: <%= ENV['MATOMO_SITE_ID'] %> +# auth_token: <%= ENV['MATOMO_AUTH_TOKEN'] %> diff --git a/config/environments/development.rb b/config/environments/development.rb index 9bafa102c..4a0d92943 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -63,4 +63,6 @@ # 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 + + config.hosts << "hyku.test" end diff --git a/config/environments/production.rb b/config/environments/production.rb index 311b96965..249a5507b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -44,7 +44,7 @@ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. diff --git a/config/initializers/hyrax.rb b/config/initializers/hyrax.rb index 1d2480ddc..1269df850 100644 --- a/config/initializers/hyrax.rb +++ b/config/initializers/hyrax.rb @@ -27,7 +27,6 @@ # Specify a Google Analytics tracking ID to gather usage statistics # This is set by account settings - # config.google_analytics_id = 'UA-99999999-1' # Specify a date you wish to start collecting Google Analytic statistics for. # config.analytic_start_date = DateTime.new(2014,9,10)