Skip to content
Merged
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
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ gem 'json'
gem 'kaminari'
gem 'lograge'
gem 'marc'
gem 'mitlibraries-theme', git: 'https://github.com/mitlibraries/mitlibraries-theme', tag: 'v1.4'
gem 'mitlibraries-theme', git: 'https://github.com/mitlibraries/mitlibraries-theme', tag: 'v1.5'
gem 'net-imap', require: false
gem 'net-pop', require: false
gem 'net-smtp', require: false
gem 'omniauth-rails_csrf_protection'
gem 'omniauth-saml'
gem 'paper_trail'
gem 'puma'
gem 'rails', '~> 7.2.0'
gem 'rails', '~> 8.1.0'
gem 'rubyzip'
gem 'sass-rails'
gem 'sentry-rails'
Expand All @@ -55,7 +55,6 @@ group :development, :test do
end

group :development do
gem 'annotate'
gem 'dotenv-rails'
gem 'letter_opener'
gem 'listen'
Expand Down
147 changes: 71 additions & 76 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,98 +1,96 @@
GIT
remote: https://github.com/mitlibraries/mitlibraries-theme
revision: ba5bdc9840ef817ba0b92e522b92da3f52669fc3
tag: v1.4
revision: 135390daff870937212f1d9020abb6aea53c87d9
tag: v1.5
specs:
mitlibraries-theme (1.0.2)
rails (>= 6, < 8)
mitlibraries-theme (1.1.0)
rails (>= 6, < 9)
sassc-rails (~> 2)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.3.1)
actionpack (= 7.2.3.1)
activesupport (= 7.2.3.1)
action_text-trix (2.1.19)
railties
actioncable (8.1.3)
actionpack (= 8.1.3)
activesupport (= 8.1.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.3.1)
actionpack (= 7.2.3.1)
activejob (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
actionmailbox (8.1.3)
actionpack (= 8.1.3)
activejob (= 8.1.3)
activerecord (= 8.1.3)
activestorage (= 8.1.3)
activesupport (= 8.1.3)
mail (>= 2.8.0)
actionmailer (7.2.3.1)
actionpack (= 7.2.3.1)
actionview (= 7.2.3.1)
activejob (= 7.2.3.1)
activesupport (= 7.2.3.1)
actionmailer (8.1.3)
actionpack (= 8.1.3)
actionview (= 8.1.3)
activejob (= 8.1.3)
activesupport (= 8.1.3)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.3.1)
actionview (= 7.2.3.1)
activesupport (= 7.2.3.1)
cgi
actionpack (8.1.3)
actionview (= 8.1.3)
activesupport (= 8.1.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.3)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.3.1)
actionpack (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
actiontext (8.1.3)
action_text-trix (~> 2.1.15)
actionpack (= 8.1.3)
activerecord (= 8.1.3)
activestorage (= 8.1.3)
activesupport (= 8.1.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.3.1)
activesupport (= 7.2.3.1)
actionview (8.1.3)
activesupport (= 8.1.3)
builder (~> 3.1)
cgi
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.3.1)
activesupport (= 7.2.3.1)
activejob (8.1.3)
activesupport (= 8.1.3)
globalid (>= 0.3.6)
activemodel (7.2.3.1)
activesupport (= 7.2.3.1)
activerecord (7.2.3.1)
activemodel (= 7.2.3.1)
activesupport (= 7.2.3.1)
activemodel (8.1.3)
activesupport (= 8.1.3)
activerecord (8.1.3)
activemodel (= 8.1.3)
activesupport (= 8.1.3)
timeout (>= 0.4.0)
activestorage (7.2.3.1)
actionpack (= 7.2.3.1)
activejob (= 7.2.3.1)
activerecord (= 7.2.3.1)
activesupport (= 7.2.3.1)
activestorage (8.1.3)
actionpack (= 8.1.3)
activejob (= 8.1.3)
activerecord (= 8.1.3)
activesupport (= 8.1.3)
marcel (~> 1.0)
activesupport (7.2.3.1)
activesupport (8.1.3)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1, < 6)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
administrate (1.0.0)
actionpack (>= 6.0, < 9.0)
actionview (>= 6.0, < 9.0)
activerecord (>= 6.0, < 9.0)
kaminari (~> 1.2.2)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
ansi (1.6.0)
ast (2.4.3)
aws-eventstream (1.4.0)
Expand Down Expand Up @@ -122,7 +120,6 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.3.0)
bcrypt (3.1.22)
benchmark (0.5.0)
bigdecimal (4.1.2)
bindex (0.8.1)
bootsnap (1.24.6)
Expand All @@ -143,7 +140,6 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cgi (0.5.2)
childprocess (5.1.0)
logger (~> 1.5)
climate_control (1.2.0)
Expand Down Expand Up @@ -172,7 +168,7 @@ GEM
dotenv (= 3.2.0)
railties (>= 6.1)
drb (2.2.3)
erb (6.0.4)
erb (6.0.5)
erubi (1.13.1)
execjs (2.10.1)
ffi (1.17.3)
Expand Down Expand Up @@ -228,10 +224,10 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.25.1)
loofah (2.25.2)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.9.0)
mail (2.9.1)
logger
mini_mime (>= 0.1.1)
net-imap
Expand Down Expand Up @@ -304,33 +300,32 @@ GEM
rack (>= 1.3)
rackup (2.3.1)
rack (>= 3)
rails (7.2.3.1)
actioncable (= 7.2.3.1)
actionmailbox (= 7.2.3.1)
actionmailer (= 7.2.3.1)
actionpack (= 7.2.3.1)
actiontext (= 7.2.3.1)
actionview (= 7.2.3.1)
activejob (= 7.2.3.1)
activemodel (= 7.2.3.1)
activerecord (= 7.2.3.1)
activestorage (= 7.2.3.1)
activesupport (= 7.2.3.1)
rails (8.1.3)
actioncable (= 8.1.3)
actionmailbox (= 8.1.3)
actionmailer (= 8.1.3)
actionpack (= 8.1.3)
actiontext (= 8.1.3)
actionview (= 8.1.3)
activejob (= 8.1.3)
activemodel (= 8.1.3)
activerecord (= 8.1.3)
activestorage (= 8.1.3)
activesupport (= 8.1.3)
bundler (>= 1.15.0)
railties (= 7.2.3.1)
railties (= 8.1.3)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.7.0)
loofah (~> 2.25)
rails-html-sanitizer (1.7.1)
loofah (~> 2.25, >= 2.25.2)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-mermaid_erd (0.8.0)
rails (>= 5.2)
railties (7.2.3.1)
actionpack (= 7.2.3.1)
activesupport (= 7.2.3.1)
cgi
railties (8.1.3)
actionpack (= 8.1.3)
activesupport (= 8.1.3)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -443,6 +438,7 @@ GEM
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
uniform_notifier (1.18.0)
uri (1.1.1)
useragent (0.16.11)
warden (1.2.9)
rack (>= 2.0.9)
Expand Down Expand Up @@ -470,7 +466,6 @@ PLATFORMS

DEPENDENCIES
administrate (~> 1.0.0)
annotate
aws-sdk-rails
aws-sdk-s3
aws-sdk-sqs
Expand Down Expand Up @@ -505,7 +500,7 @@ DEPENDENCIES
paper_trail
pg
puma
rails (~> 7.2.0)
rails (~> 8.1.0)
rails-mermaid_erd
rubocop
rubocop-rails
Expand Down
4 changes: 2 additions & 2 deletions app/models/active_storage_attachment_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module ActiveStorageAttachmentExtension
extend ActiveSupport::Concern

included do
enum purpose: %i[thesis_pdf thesis_source thesis_supplementary_file
proquest_form signature_page]
enum :purpose, %i[thesis_pdf thesis_source thesis_supplementary_file
proquest_form signature_page]
end
end
2 changes: 1 addition & 1 deletion app/models/archivematica_payload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ArchivematicaPayload < ApplicationRecord

before_create :set_metadata_csv, :set_payload_json

enum preservation_status: %i[unpreserved preserved]
enum :preservation_status, %i[unpreserved preserved]

private

Expand Down
2 changes: 1 addition & 1 deletion app/models/hold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Hold < ApplicationRecord
belongs_to :hold_source
has_many :users, through: :thesis

enum status: %i[active expired released]
enum :status, %i[active expired released]

validates :date_requested, presence: true
validates :date_start, presence: true
Expand Down
14 changes: 7 additions & 7 deletions app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Report
def card_empty_theses(collection)
{
'value' => collection.count,
'verb' => 'has',
'verb' => ['has', 'have'],
'label' => 'no attached files'
}
end
Expand All @@ -13,7 +13,7 @@ def card_files(collection, term)
subset = collection.joins(:files_attachments)
{
'value' => subset.pluck(:id).uniq.count,
'verb' => 'has',
'verb' => ['has', 'have'],
'label' => 'files attached',
'note' => 'Only theses with a status of "Not ready for publication" and "Publication review" will be visible ' \
'in the processing queue.',
Expand All @@ -35,23 +35,23 @@ def card_issues(collection)
def card_multiple_authors(collection)
{
'value' => collection.joins(:authors).group('theses.id').having('COUNT(authors.id) > 1').length,
'verb' => 'has',
'verb' => ['has', 'have'],
'label' => 'multiple authors'
}
end

def card_multiple_degrees(collection)
{
'value' => collection.joins(:degrees).group('theses.id').having('COUNT(degrees.id) > 1').length,
'verb' => 'has',
'verb' => ['has', 'have'],
'label' => 'multiple degrees'
}
end

def card_multiple_departments(collection)
{
'value' => collection.joins(:departments).group('theses.id').having('COUNT(departments.id) > 1').length,
'verb' => 'has',
'verb' => ['has', 'have'],
'label' => 'multiple departments'
}
end
Expand All @@ -60,7 +60,7 @@ def card_overall(collection, term)
searchterm = term if term != 'all'
{
'value' => collection.count,
'verb' => 'thesis record',
'verb' => ['thesis record', 'thesis records'],
'link' => {
'url' => url_helpers.admin_theses_path(search: searchterm),
'text' => 'See all in admin dashboard'
Expand All @@ -71,7 +71,7 @@ def card_overall(collection, term)
def card_student_contributions(collection)
{
'value' => collection.map(&:student_contributed?).count(true),
'verb' => 'has',
'verb' => ['has', 'have'],
'label' => 'had metadata contributed by students'
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/submission_information_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SubmissionInformationPackage < ApplicationRecord

before_create :set_metadata, :set_bag_declaration, :set_manifest, :set_bag_name

enum preservation_status: %i[unpreserved preserved]
enum :preservation_status, %i[unpreserved preserved]

def data
file_locations = {}
Expand Down
2 changes: 1 addition & 1 deletion app/models/thesis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Thesis < ApplicationRecord
}
scope :ready_for_proquest_export, -> { partial_proquest_export + full_proquest_export }

enum proquest_exported: ['Not exported', 'Full harvest', 'Partial harvest']
enum :proquest_exported, ['Not exported', 'Full harvest', 'Partial harvest']

# Looks up the thesis' accession number based on its degree period.
def accession_number
Expand Down
Loading