From cb914ea644b066121972c09054c7fd4f1642d07c Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Tue, 20 Feb 2018 10:55:54 -0700 Subject: [PATCH 1/7] add annotot for CRUD of annotations --- Gemfile | 1 + Gemfile.lock | 347 ++++++++++++++++++++++++++--------------------- config/routes.rb | 1 + db/schema.rb | 44 +++--- 4 files changed, 217 insertions(+), 176 deletions(-) diff --git a/Gemfile b/Gemfile index 6cb0ea8..2bd94a1 100644 --- a/Gemfile +++ b/Gemfile @@ -68,6 +68,7 @@ gem 'blacklight_range_limit' gem 'mysql2' gem 'honeybadger' +gem 'annotot' group :deployment do gem 'dlss-capistrano' diff --git a/Gemfile.lock b/Gemfile.lock index 51b6af6..1d57c32 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,75 +1,79 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.6) - actionpack (= 5.0.6) - nio4r (>= 1.2, < 3.0) + actioncable (5.1.5) + actionpack (= 5.1.5) + nio4r (~> 2.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.6) - actionpack (= 5.0.6) - actionview (= 5.0.6) - activejob (= 5.0.6) + actionmailer (5.1.5) + actionpack (= 5.1.5) + actionview (= 5.1.5) + activejob (= 5.1.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.6) - actionview (= 5.0.6) - activesupport (= 5.0.6) + actionpack (5.1.5) + actionview (= 5.1.5) + activesupport (= 5.1.5) rack (~> 2.0) - rack-test (~> 0.6.3) + rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.6) - activesupport (= 5.0.6) + actionview (5.1.5) + activesupport (= 5.1.5) builder (~> 3.1) - erubis (~> 2.7.0) + erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.0.6) - activesupport (= 5.0.6) + activejob (5.1.5) + activesupport (= 5.1.5) globalid (>= 0.3.6) - activemodel (5.0.6) - activesupport (= 5.0.6) - activerecord (5.0.6) - activemodel (= 5.0.6) - activesupport (= 5.0.6) - arel (~> 7.0) - activesupport (5.0.6) + activemodel (5.1.5) + activesupport (= 5.1.5) + activerecord (5.1.5) + activemodel (= 5.1.5) + activesupport (= 5.1.5) + arel (~> 8.0) + activesupport (5.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.0) - public_suffix (~> 2.0, >= 2.0.2) - airbrussh (1.1.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) - archive-zip (0.7.0) + annotot (0.1.0) + rails (~> 5.1.4) + archive-zip (0.11.0) io-like (~> 0.3.0) - arel (7.1.4) - autoprefixer-rails (6.7.3) + arel (8.0.0) + autoprefixer-rails (8.0.0) execjs bcrypt (3.1.11) - blacklight (6.7.3) + bindex (0.5.0) + blacklight (6.14.1) bootstrap-sass (~> 3.2) deprecation globalid + jbuilder kaminari (>= 0.15) nokogiri (~> 1.6) rails (>= 4.2, < 6) rsolr (>= 1.0.6, < 3) twitter-typeahead-rails (= 0.11.1.pre.corejavascript) - blacklight_range_limit (6.1.0) - blacklight (~> 6.0) + blacklight_range_limit (6.3.2) + blacklight (>= 6.0.2) jquery-rails rails (>= 3.0) bootstrap-sass (3.3.7) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) builder (3.2.3) - bundler-audit (0.5.0) + bundler-audit (0.6.0) bundler (~> 1.2) thor (~> 0.18) - byebug (8.2.0) - capistrano (3.8.0) + byebug (10.0.0) + capistrano (3.10.1) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -77,68 +81,67 @@ GEM capistrano-bundle_audit (0.2.1) bundler-audit (~> 0.5) capistrano (~> 3.0) - capistrano-bundler (1.1.4) + capistrano-bundler (1.3.0) capistrano (~> 3.1) sshkit (~> 1.2) capistrano-one_time_key (0.0.1) capistrano (~> 3.0) capistrano-passenger (0.2.0) capistrano (~> 3.0) - capistrano-rails (1.1.5) + capistrano-rails (1.3.1) capistrano (~> 3.1) capistrano-bundler (~> 1.1) capistrano-rvm (0.1.2) capistrano (~> 3.0) sshkit (~> 1.2) - capistrano-shared_configs (0.1.2) - capybara (2.12.1) + capistrano-shared_configs (0.2.2) + capybara (2.18.0) addressable - mime-types (>= 1.16) + mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - xpath (~> 2.0) + xpath (>= 2.0, < 4.0) capybara-selenium (0.0.6) capybara selenium-webdriver childprocess (0.8.0) ffi (~> 1.0, >= 1.0.11) - chromedriver-helper (1.1.0) - archive-zip (~> 0.7.0) - nokogiri (~> 1.6) - coderay (1.1.0) - coffee-rails (4.2.1) + chromedriver-helper (1.2.0) + archive-zip (~> 0.10) + nokogiri (~> 1.8) + coderay (1.1.2) + coffee-rails (4.2.2) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.2.x) + railties (>= 4.0.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) concurrent-ruby (1.0.5) - config (1.4.0) + config (1.7.0) activesupport (>= 3.0) - deep_merge (~> 1.1.1) - coveralls (0.8.9) - json (~> 1.8) - rest-client (>= 1.6.8, < 2) - simplecov (~> 0.10.0) + deep_merge (~> 1.2.1) + dry-validation (>= 0.10.4) + coveralls (0.8.21) + json (>= 1.8, < 3) + simplecov (~> 0.14.1) term-ansicolor (~> 1.3) - thor (~> 0.19.1) - tins (~> 1.6.0) + thor (~> 0.19.4) + tins (~> 1.6) crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.3) - debug_inspector (0.0.2) - deep_merge (1.1.1) + deep_merge (1.2.1) deprecation (1.0.0) activesupport - devise (4.2.0) + devise (4.4.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) + railties (>= 4.1.0, < 5.2) responders warden (~> 1.2.3) - devise-guests (0.3.3) + devise-guests (0.6.0) devise diff-lcs (1.3) dlss-capistrano (3.4.1) @@ -147,47 +150,73 @@ GEM capistrano-one_time_key capistrano-shared_configs docile (1.1.5) - domain_name (0.5.25) - unf (>= 0.0.5, < 1.0.0) - erubis (2.7.0) + dry-configurable (0.7.0) + concurrent-ruby (~> 1.0) + dry-container (0.6.0) + concurrent-ruby (~> 1.0) + dry-configurable (~> 0.1, >= 0.1.3) + dry-core (0.4.4) + concurrent-ruby (~> 1.0) + dry-equalizer (0.2.0) + dry-logic (0.4.2) + dry-container (~> 0.2, >= 0.2.6) + dry-core (~> 0.2) + dry-equalizer (~> 0.2) + dry-types (0.12.2) + concurrent-ruby (~> 1.0) + dry-configurable (~> 0.1) + dry-container (~> 0.3) + dry-core (~> 0.2, >= 0.2.1) + dry-equalizer (~> 0.2) + dry-logic (~> 0.4, >= 0.4.2) + inflecto (~> 0.0.0, >= 0.0.2) + dry-validation (0.11.1) + concurrent-ruby (~> 1.0) + dry-configurable (~> 0.1, >= 0.1.3) + dry-core (~> 0.2, >= 0.2.1) + dry-equalizer (~> 0.2) + dry-logic (~> 0.4, >= 0.4.0) + dry-types (~> 0.12.0) + edtf (3.0.4) + activesupport (>= 3.0, < 6.0) + erubi (1.7.0) execjs (2.7.0) faraday (0.14.0) multipart-post (>= 1.2, < 3) - ffi (1.9.18) + ffi (1.9.21) font-awesome-rails (4.7.0.3) railties (>= 3.2, < 5.2) globalid (0.4.1) activesupport (>= 4.2.0) - hashdiff (0.3.2) - honeybadger (3.1.2) - http-cookie (1.0.2) - domain_name (~> 0.5) - i18n (0.9.3) + hashdiff (0.3.7) + honeybadger (3.3.0) + i18n (0.9.5) concurrent-ruby (~> 1.0) + inflecto (0.0.2) io-like (0.3.0) - iso-639 (0.2.5) - jbuilder (2.6.2) - activesupport (>= 3.0.0, < 5.1) - multi_json (~> 1.2) + iso-639 (0.2.8) + jbuilder (2.7.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.6) - kaminari (1.0.1) + json (2.1.0) + kaminari (1.1.1) activesupport (>= 4.1.0) - kaminari-actionview (= 1.0.1) - kaminari-activerecord (= 1.0.1) - kaminari-core (= 1.0.1) - kaminari-actionview (1.0.1) + kaminari-actionview (= 1.1.1) + kaminari-activerecord (= 1.1.1) + kaminari-core (= 1.1.1) + kaminari-actionview (1.1.1) actionview - kaminari-core (= 1.0.1) - kaminari-activerecord (1.0.1) + kaminari-core (= 1.1.1) + kaminari-activerecord (1.1.1) activerecord - kaminari-core (= 1.0.1) - kaminari-core (1.0.1) + kaminari-core (= 1.1.1) + kaminari-core (1.1.1) libv8 (3.16.14.19) - loofah (2.1.1) + loofah (2.2.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -195,7 +224,6 @@ GEM material_icons (2.2.1) railties (>= 3.2) method_source (0.9.0) - mime-types (2.99.3) mini_mime (1.0.0) mini_portile2 (2.3.0) minitest (5.11.3) @@ -205,119 +233,123 @@ GEM material_icons openseadragon tinymce-rails - mods (2.0.3) + mods (2.3.1) + edtf iso-639 nokogiri - nom-xml (~> 0.5.2) + nom-xml (~> 0.6.0) mods_display (0.3.4) i18n stanford-mods - multi_json (1.12.1) + multi_json (1.13.1) multipart-post (2.0.0) - mysql2 (0.4.5) + mysql2 (0.4.10) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (4.1.0) - netrc (0.11.0) + net-ssh (4.2.0) nio4r (2.2.0) nokogiri (1.8.2) mini_portile2 (~> 2.3.0) - nom-xml (0.5.4) + nom-xml (0.6.0) activesupport (>= 3.2.18) i18n nokogiri openseadragon (0.4.0) rails (> 3.2.0) orm_adapter (0.5.0) - public_suffix (2.0.5) - puma (3.7.0) + public_suffix (3.0.2) + puma (3.11.2) rack (2.0.4) - rack-test (0.6.3) - rack (>= 1.0) - rails (5.0.6) - actioncable (= 5.0.6) - actionmailer (= 5.0.6) - actionpack (= 5.0.6) - actionview (= 5.0.6) - activejob (= 5.0.6) - activemodel (= 5.0.6) - activerecord (= 5.0.6) - activesupport (= 5.0.6) + rack-test (0.8.2) + rack (>= 1.0, < 3) + rails (5.1.5) + actioncable (= 5.1.5) + actionmailer (= 5.1.5) + actionpack (= 5.1.5) + actionview (= 5.1.5) + activejob (= 5.1.5) + activemodel (= 5.1.5) + activerecord (= 5.1.5) + activesupport (= 5.1.5) bundler (>= 1.3.0) - railties (= 5.0.6) + railties (= 5.1.5) sprockets-rails (>= 2.0.0) - rails-controller-testing (1.0.1) - actionpack (~> 5.x) - actionview (~> 5.x) + rails-controller-testing (1.0.2) + actionpack (~> 5.x, >= 5.0.1) + actionview (~> 5.x, >= 5.0.1) activesupport (~> 5.x) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (5.0.6) - actionpack (= 5.0.6) - activesupport (= 5.0.6) + railties (5.1.5) + actionpack (= 5.1.5) + activesupport (= 5.1.5) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (12.3.0) - rdoc (4.3.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rdoc (6.0.1) ref (2.0.0) - responders (2.3.0) - railties (>= 4.2.0, < 5.1) - rest-client (1.8.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 3.0) - netrc (~> 0.7) + responders (2.4.0) + actionpack (>= 4.2.0, < 5.3) + railties (>= 4.2.0, < 5.3) retriable (3.1.1) rsolr (2.1.0) builder (>= 2.1.2) faraday (>= 0.9.0) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rspec-core (3.7.1) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) + rspec-support (~> 3.7.0) + rspec-mocks (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.2) + rspec-support (~> 3.7.0) + rspec-rails (3.7.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.1) ruby-progressbar (1.9.0) rubyzip (1.2.1) safe_yaml (1.0.4) - sass (3.4.23) - sass-rails (5.0.6) + sass (3.5.5) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sdoc (0.4.1) - json (~> 1.7, >= 1.7.7) - rdoc (~> 4.0) - selenium-webdriver (3.8.0) + sdoc (1.0.0) + rdoc (>= 5.0) + selenium-webdriver (3.9.0) childprocess (~> 0.5) - rubyzip (~> 1.0) - simplecov (0.10.0) + rubyzip (~> 1.2) + simplecov (0.14.1) docile (~> 1.1.0) - json (~> 1.8) + json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) + simplecov-html (0.10.2) solr_wrapper (1.2.0) faraday retriable ruby-progressbar rubyzip - spring (1.4.3) + spring (2.0.2) + activesupport (>= 4.2) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -325,21 +357,22 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.11) - sshkit (1.13.1) + sqlite3 (1.3.13) + sshkit (1.16.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - stanford-mods (1.1.5) - mods (~> 2.0.2) - term-ansicolor (1.3.2) + stanford-mods (2.5.1) + activesupport + mods (~> 2.2) + term-ansicolor (1.6.0) tins (~> 1.0) therubyracer (0.12.3) libv8 (~> 3.16.14.15) ref thor (0.19.4) thread_safe (0.3.6) - tilt (2.0.6) - tins (1.6.0) + tilt (2.0.8) + tins (1.16.3) tinymce-rails (4.7.6) railties (>= 3.1.1) twitter-typeahead-rails (0.11.1.pre.corejavascript) @@ -348,32 +381,30 @@ GEM railties (>= 3.1) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (3.2.0) + uglifier (4.1.6) execjs (>= 0.3.0, < 3) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.1) warden (1.2.7) rack (>= 1.0) - web-console (3.4.0) + web-console (3.5.1) actionview (>= 5.0) activemodel (>= 5.0) - debug_inspector + bindex (>= 0.4.0) railties (>= 5.0) - webmock (2.3.2) + webmock (3.3.0) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) - xpath (2.0.0) - nokogiri (~> 1.3) + xpath (3.0.0) + nokogiri (~> 1.8) PLATFORMS ruby DEPENDENCIES + annotot blacklight (~> 6.0) blacklight_range_limit byebug diff --git a/config/routes.rb b/config/routes.rb index 95afa14..beb4743 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ Rails.application.routes.draw do + mount Annotot::Engine => '/' root to: 'catalog#index' mount Blacklight::Engine => '/' diff --git a/db/schema.rb b/db/schema.rb index 78f9e32..7c354e8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,42 +10,50 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151117173600) do +ActiveRecord::Schema.define(version: 20180215190547) do + + create_table "annotot_annotations", force: :cascade do |t| + t.string "uuid" + t.string "canvas" + t.binary "data" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end create_table "bookmarks", force: :cascade do |t| - t.integer "user_id", null: false - t.string "user_type" - t.string "document_id" - t.string "title" + t.integer "user_id", null: false + t.string "user_type" + t.string "document_id" + t.string "title" t.datetime "created_at" t.datetime "updated_at" - t.string "document_type" + t.string "document_type" t.index ["user_id"], name: "index_bookmarks_on_user_id" end create_table "searches", force: :cascade do |t| - t.text "query_params" - t.integer "user_id" - t.string "user_type" + t.text "query_params" + t.integer "user_id" + t.string "user_type" t.datetime "created_at" t.datetime "updated_at" t.index ["user_id"], name: "index_searches_on_user_id" end create_table "users", force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "", null: false - t.string "reset_password_token" + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false + t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0, null: false + t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" - t.string "current_sign_in_ip" - t.string "last_sign_in_ip" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "guest", default: false + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "guest", default: false t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end From b677f6fa652b7129c1e9043b50a68e96bece412e Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Tue, 20 Feb 2018 12:15:58 -0700 Subject: [PATCH 2/7] update migrations to be rails 5.1 compliant --- db/migrate/20151117173554_create_searches.blacklight.rb | 2 +- db/migrate/20151117173555_create_bookmarks.blacklight.rb | 2 +- ...151117173556_add_polymorphic_type_to_bookmarks.blacklight.rb | 2 +- db/migrate/20151117173558_devise_create_users.rb | 2 +- db/migrate/20151117173600_add_devise_guests_to_users.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/db/migrate/20151117173554_create_searches.blacklight.rb b/db/migrate/20151117173554_create_searches.blacklight.rb index 8bc708f..af3ce66 100644 --- a/db/migrate/20151117173554_create_searches.blacklight.rb +++ b/db/migrate/20151117173554_create_searches.blacklight.rb @@ -1,6 +1,6 @@ # This migration comes from blacklight (originally 20140202020201) # -*- encoding : utf-8 -*- -class CreateSearches < ActiveRecord::Migration +class CreateSearches < ActiveRecord::Migration[4.2] def self.up create_table :searches do |t| t.text :query_params diff --git a/db/migrate/20151117173555_create_bookmarks.blacklight.rb b/db/migrate/20151117173555_create_bookmarks.blacklight.rb index 069e691..7056966 100644 --- a/db/migrate/20151117173555_create_bookmarks.blacklight.rb +++ b/db/migrate/20151117173555_create_bookmarks.blacklight.rb @@ -1,6 +1,6 @@ # This migration comes from blacklight (originally 20140202020202) # -*- encoding : utf-8 -*- -class CreateBookmarks < ActiveRecord::Migration +class CreateBookmarks < ActiveRecord::Migration[4.2] def self.up create_table :bookmarks do |t| t.integer :user_id, :null=>false diff --git a/db/migrate/20151117173556_add_polymorphic_type_to_bookmarks.blacklight.rb b/db/migrate/20151117173556_add_polymorphic_type_to_bookmarks.blacklight.rb index 16a02a8..75b9427 100644 --- a/db/migrate/20151117173556_add_polymorphic_type_to_bookmarks.blacklight.rb +++ b/db/migrate/20151117173556_add_polymorphic_type_to_bookmarks.blacklight.rb @@ -1,6 +1,6 @@ # This migration comes from blacklight (originally 20140320000000) # -*- encoding : utf-8 -*- -class AddPolymorphicTypeToBookmarks < ActiveRecord::Migration +class AddPolymorphicTypeToBookmarks < ActiveRecord::Migration[4.2] def change add_column(:bookmarks, :document_type, :string) diff --git a/db/migrate/20151117173558_devise_create_users.rb b/db/migrate/20151117173558_devise_create_users.rb index 74adf30..83d51c9 100644 --- a/db/migrate/20151117173558_devise_create_users.rb +++ b/db/migrate/20151117173558_devise_create_users.rb @@ -1,4 +1,4 @@ -class DeviseCreateUsers < ActiveRecord::Migration +class DeviseCreateUsers < ActiveRecord::Migration[4.2] def change create_table(:users) do |t| ## Database authenticatable diff --git a/db/migrate/20151117173600_add_devise_guests_to_users.rb b/db/migrate/20151117173600_add_devise_guests_to_users.rb index 445a7d1..8d3b1c5 100644 --- a/db/migrate/20151117173600_add_devise_guests_to_users.rb +++ b/db/migrate/20151117173600_add_devise_guests_to_users.rb @@ -1,4 +1,4 @@ -class AddDeviseGuestsToUsers < ActiveRecord::Migration +class AddDeviseGuestsToUsers < ActiveRecord::Migration[4.2] def self.up change_table(:users) do |t| ## Database authenticatable From 6220bf706063457b0c6d76a0a5ac23208eaf2847 Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Tue, 20 Feb 2018 12:22:19 -0700 Subject: [PATCH 3/7] downgrade stanford-mods for compatibility --- Gemfile | 2 ++ Gemfile.lock | 15 ++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 2bd94a1..939e2d8 100644 --- a/Gemfile +++ b/Gemfile @@ -62,6 +62,8 @@ gem 'devise' gem 'devise-guests' gem 'config' gem 'mods_display', '0.3.4' +gem 'stanford-mods', '1.1.5' + gem 'coderay' gem 'blacklight_range_limit' diff --git a/Gemfile.lock b/Gemfile.lock index 1d57c32..a1db67b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -177,8 +177,6 @@ GEM dry-equalizer (~> 0.2) dry-logic (~> 0.4, >= 0.4.0) dry-types (~> 0.12.0) - edtf (3.0.4) - activesupport (>= 3.0, < 6.0) erubi (1.7.0) execjs (2.7.0) faraday (0.14.0) @@ -233,11 +231,10 @@ GEM material_icons openseadragon tinymce-rails - mods (2.3.1) - edtf + mods (2.0.3) iso-639 nokogiri - nom-xml (~> 0.6.0) + nom-xml (~> 0.5.2) mods_display (0.3.4) i18n stanford-mods @@ -250,7 +247,7 @@ GEM nio4r (2.2.0) nokogiri (1.8.2) mini_portile2 (~> 2.3.0) - nom-xml (0.6.0) + nom-xml (0.5.4) activesupport (>= 3.2.18) i18n nokogiri @@ -361,9 +358,8 @@ GEM sshkit (1.16.0) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - stanford-mods (2.5.1) - activesupport - mods (~> 2.2) + stanford-mods (1.1.5) + mods (~> 2.0.2) term-ansicolor (1.6.0) tins (~> 1.0) therubyracer (0.12.3) @@ -440,6 +436,7 @@ DEPENDENCIES solr_wrapper spring sqlite3 + stanford-mods (= 1.1.5) therubyracer tzinfo-data uglifier From 6b37a9d640be37cbb3afda2da6ca3115638026ea Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Tue, 27 Feb 2018 17:20:16 -0700 Subject: [PATCH 4/7] update annotot --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a1db67b..835381e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) - annotot (0.1.0) + annotot (0.2.1) rails (~> 5.1.4) archive-zip (0.11.0) io-like (~> 0.3.0) @@ -257,7 +257,7 @@ GEM public_suffix (3.0.2) puma (3.11.2) rack (2.0.4) - rack-test (0.8.2) + rack-test (0.8.3) rack (>= 1.0, < 3) rails (5.1.5) actioncable (= 5.1.5) From c1bfb17df5285ffdd9dd6fd334c13ba153901753 Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Tue, 27 Feb 2018 18:14:45 -0700 Subject: [PATCH 5/7] add expected shape for Blacklight upgrade compatibility --- spec/helpers/facets_helper_spec.rb | 1 + spec/helpers/render_constraints_helper_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/spec/helpers/facets_helper_spec.rb b/spec/helpers/facets_helper_spec.rb index 7cffe2f..34eb127 100644 --- a/spec/helpers/facets_helper_spec.rb +++ b/spec/helpers/facets_helper_spec.rb @@ -7,6 +7,7 @@ before(:each) do allow(helper).to receive(:blacklight_config).and_return blacklight_config + allow(controller).to receive(:search_state_class).and_return(Blacklight::SearchState) end describe 'render_refine_facet_partials' do diff --git a/spec/helpers/render_constraints_helper_spec.rb b/spec/helpers/render_constraints_helper_spec.rb index 23c4b56..d315510 100644 --- a/spec/helpers/render_constraints_helper_spec.rb +++ b/spec/helpers/render_constraints_helper_spec.rb @@ -10,6 +10,7 @@ before do # the helper methods below infer paths from the current route controller.request.path_parameters[:controller] = 'catalog' + allow(controller).to receive(:search_state_class).and_return(Blacklight::SearchState) allow(helper).to receive(:search_action_path) do |*args| root_path *args end From 779ec4a05addec5a602c8c9b135a4436d67a7cb4 Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Wed, 28 Feb 2018 08:09:00 -0700 Subject: [PATCH 6/7] use unsafe params explicitly (Rails upgrade) --- app/views/catalog/_refine_facets.html.erb | 4 ++-- spec/views/catalog/_refine_facets.html.erb_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/catalog/_refine_facets.html.erb b/app/views/catalog/_refine_facets.html.erb index d7e09f1..ce1bd45 100644 --- a/app/views/catalog/_refine_facets.html.erb +++ b/app/views/catalog/_refine_facets.html.erb @@ -6,7 +6,7 @@
<% if query_has_facet_constraints?(params) %> -
<%= render_clear_all(t('blacklight.search.filters.clear-all'), params) %>
+
<%= render_clear_all(t('blacklight.search.filters.clear-all'), params.to_unsafe_h) %>
<% end %>
-<% end %> \ No newline at end of file +<% end %> diff --git a/spec/views/catalog/_refine_facets.html.erb_spec.rb b/spec/views/catalog/_refine_facets.html.erb_spec.rb index 9368a76..f6d83e1 100644 --- a/spec/views/catalog/_refine_facets.html.erb_spec.rb +++ b/spec/views/catalog/_refine_facets.html.erb_spec.rb @@ -4,7 +4,7 @@ describe 'facet limits with facet constraints in query' do before(:each) do allow(view).to receive(:has_facet_values?).and_return(true) - allow(view).to receive(:params).and_return(double(f: { language: ['Latin'] })) + allow(view).to receive(:params).and_return(double(to_unsafe_h: {f: { language: ['Latin'] }})) allow(view).to receive(:query_has_facet_constraints?).and_return(true) allow(view).to receive(:render_clear_all).and_return(raw('
Clear all
')) allow(view).to receive(:render_facet_tabs).and_return(raw('
Facet tabs
')) From b66953218f9df95128b0c39875eaee9697c1a80f Mon Sep 17 00:00:00 2001 From: Jack Reed Date: Wed, 28 Feb 2018 15:11:43 -0700 Subject: [PATCH 7/7] update annotot --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 835381e..509a7c4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) - annotot (0.2.1) + annotot (0.3.0) rails (~> 5.1.4) archive-zip (0.11.0) io-like (~> 0.3.0)