Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

117 changes: 53 additions & 64 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,78 +1,67 @@
source 'https://rubygems.org'
# frozen_string_literal: true
# Attempts to determine if a global gem source has ready been added by another Gemfile
if @sources.global_rubygems_source == Bundler::SourceList.new.global_rubygems_source
Bundler.ui.info '[TestApp] Adding global rubygems source.'
source 'https://rubygems.org'
else
Bundler.ui.info "[TestApp] Global rubygems source already set: #{@sources.global_rubygems_source.inspect}"
end
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.4', '>= 5.2.4.3'
# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.3.0"
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'addressable', '2.8.1' # remove once https://github.com/postrank-labs/postrank-uri/issues/49 is fixed
gem 'sqlite3', '~> 1.4'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'bootstrap', '~> 4.0'
gem 'clamby', '~> 1.6'
gem 'coffee-rails', '~> 4.2'
gem 'dalli'
gem 'devise'
gem 'devise-guests', '~> 0.8'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
# Required because grpc and google-protobuf gem's binaries are not compatible with Alpine Linux.
# To install the package in Alpine: `apk add ruby-grpc`
# The pinned versions should match the version provided by the Alpine packages.

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
# gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'webdrivers', '~> 4.0'
if RUBY_PLATFORM =~ /musl/
# # Disabled due to dependency mismatches in Alpine packages (grpc 1.62.1 needs protobuf ~> 3.25)
# path '/usr/lib/ruby/gems/3.3.0' do
gem 'google-protobuf', force_ruby_platform: true
gem 'grpc', force_ruby_platform: true
# end
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'hydra-role-management'
gem 'hyrax', '~> 5.2.0'
gem 'jbuilder', '~> 2.5'
gem 'jquery-rails'
gem 'okcomputer'
gem 'pg', '~> 1.3'
gem 'puma'
gem 'rack-mini-profiler', require: ['prepend_net_http_patch']
gem 'rails', '6.1.7.10'
gem 'riiif', '~> 2.1'
gem 'rsolr', '>= 1.0', '< 3'
gem 'sass-rails', '~> 6.0'
gem 'sidekiq', '~> 7.0'
gem 'stackprof', require: false
gem 'turbolinks', '~> 5'
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'uglifier', '>= 1.3.0'
gem 'activerecord-nulldb-adapter', '~> 1.1'

gem 'hyrax', '~> 2.9'
group :development, :test do
gem 'solr_wrapper', '>= 0.3'
group :development do
gem 'better_errors' # add command line in browser when errors
gem 'binding_of_caller' # deeper stack trace used by better errors

# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
end

gem 'rsolr', '>= 1.0', '< 3'
gem 'bootstrap-sass', '~> 3.0'
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
gem 'jquery-rails'
gem 'devise'
gem 'devise-guests', '~> 0.6'
group :development, :test do
gem 'fcrepo_wrapper'
gem 'rspec-rails'
gem 'debug', '>= 1.0.0'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry-rescue'
end

gem 'riiif', '~> 2.0'
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
require_relative 'config/application'

Rails.application.load_tasks

require 'solr_wrapper/rake_task' unless Rails.env.production?
1 change: 0 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ class ApplicationController < ActionController::Base
helper Openseadragon::OpenseadragonHelper
# Adds a few additional behaviors into the application controller
include Blacklight::Controller
skip_after_action :discard_flash_if_xhr
include Hydra::Controller::ControllerBehavior

# Adds Hyrax behaviors into the application controller
Expand Down
1 change: 0 additions & 1 deletion app/models/search_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class SearchBuilder < Blacklight::SearchBuilder
include Blacklight::Solr::SearchBuilderBehavior
# Add a filter query to restrict the search to documents the current user has access to
include Hydra::AccessControlsEnforcement
include Hyrax::SearchFilters


Expand Down
5 changes: 0 additions & 5 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ class User < ApplicationRecord
include Hyrax::User
include Hyrax::UserUsageStats



if Blacklight::Utils.needs_attr_accessible?
attr_accessible :email, :password, :password_confirmation
end
# Connects this user object to Blacklights Bookmarks.
include Blacklight::User
# Include default devise modules. Others available are:
Expand Down
4 changes: 2 additions & 2 deletions config/blacklight.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
development:
adapter: solr
url: <%= ENV['SOLR_DEVELOPMENT_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hydra-development" %>
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hyrax-development" %>
test: &test
adapter: solr
url: <%= ENV['SOLR_TEST_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hydra-test" %>
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hyrax-test" %>
production:
adapter: solr
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %>
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_relative '../../app/middleware/disable_animations_in_test_environment'

Rails.application.configure do
config.middleware.use DisableAnimationsInTestEnvironment
# Settings specified here will take precedence over those in config/application.rb.
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/riiif.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
end
end

Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
Riiif::Image.authorization_service = Hyrax::IiifAuthorizationService

Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
Expand Down
4 changes: 2 additions & 2 deletions config/solr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is a sample config file that points to a solr server for each environment
development:
url: <%= ENV['SOLR_DEVELOPMENT_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hydra-development" %>
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_DEVELOPMENT_PORT', 8983)}/solr/hyrax-development" %>
test:
url: <%= ENV['SOLR_TEST_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hydra-test" %>
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/hyrax-test" %>
production:
url: <%= ENV['SOLR_URL'] || "http://your.production.server:8080/bl_solr/core0" %>
44 changes: 44 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: "3.8"

services:
fedora:
image: ghcr.io/samvera/fcrepo4:4.7.5
ports:
- "8986:8080" # Test port
volumes:
- fedora_data:/opt/fcrepo/data
environment:
- CATALINA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/fcrepo/rest"]
interval: 30s
timeout: 10s
retries: 5

solr:
image: solr:9.9
ports:
- "8985:8983" # Test port
volumes:
- solr_data:/var/solr:cached
- ./spec/internal_test_hyrax/solr/conf:/opt/solr/server/configsets/hyraxconf
command:
- sh
- -c
- "precreate-core hyrax-test /opt/solr/server/configsets/hyraxconf; solr-precreate hyrax /opt/solr/server/configsets/hyraxconf"
ulimits:
nofile:
soft: 65536
hard: 524288
environment:
- SOLR_CORE_CONF_DIR=/opt/solr/server/configsets/hyraxconf
- SOLR_MODULES=analysis-extras,extraction
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8983/solr/admin/cores"]
interval: 30s
timeout: 10s
retries: 5

volumes:
fedora_data:
solr_data:
31 changes: 0 additions & 31 deletions solr/conf/admin-extra.html

This file was deleted.

36 changes: 0 additions & 36 deletions solr/conf/elevate.xml

This file was deleted.

21 changes: 0 additions & 21 deletions solr/conf/protwords.txt

This file was deleted.

Loading