Skip to content

Commit 6d3933e

Browse files
committed
Make Blacklight 6 start to work
1 parent b95019b commit 6d3933e

12 files changed

+525
-465
lines changed

Gemfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,9 @@ gem 'osullivan'
131131
## Add translations for activerecord and co
132132
gem 'rails-i18n'#, github: 'svenfuchs/rails-i18n', branch: 'rails-4-x' # For 4.x
133133

134-
gem 'gruff'
134+
gem 'gruff'
135+
group :development, :test do
136+
gem 'solr_wrapper', '>= 0.3'
137+
end
138+
139+
gem 'rsolr', '>= 1.0'

Gemfile.lock

+14
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ GEM
168168
formtastic_i18n (0.6.0)
169169
globalid (0.4.1)
170170
activesupport (>= 4.2.0)
171+
gruff (0.7.0)
172+
rmagick (~> 2.13, >= 2.13.4)
171173
has_scope (0.7.1)
172174
actionpack (>= 4.1, < 5.2)
173175
activesupport (>= 4.1, < 5.2)
@@ -296,6 +298,8 @@ GEM
296298
responders (2.4.0)
297299
actionpack (>= 4.2.0, < 5.3)
298300
railties (>= 4.2.0, < 5.3)
301+
retriable (3.1.1)
302+
rmagick (2.16.0)
299303
rolify (5.2.0)
300304
rsolr (2.1.0)
301305
builder (>= 2.1.2)
@@ -314,6 +318,8 @@ GEM
314318
rspec-support (~> 3.7.0)
315319
rspec-support (3.7.1)
316320
ruby-prof (0.17.0)
321+
ruby-progressbar (1.9.0)
322+
rubyzip (1.2.1)
317323
sass (3.5.5)
318324
sass-listen (~> 4.0.0)
319325
sass-listen (4.0.0)
@@ -327,6 +333,11 @@ GEM
327333
tilt (>= 1.1, < 3)
328334
sdoc (1.0.0)
329335
rdoc (>= 5.0)
336+
solr_wrapper (1.2.0)
337+
faraday
338+
retriable
339+
ruby-progressbar
340+
rubyzip
330341
sprockets (3.7.1)
331342
concurrent-ruby (~> 1.0)
332343
rack (> 1, < 3)
@@ -385,6 +396,7 @@ DEPENDENCIES
385396
devise
386397
devise-i18n
387398
exception_notification
399+
gruff
388400
htmlentities
389401
i18n-js (>= 3.0.0.rc11)
390402
jbuilder
@@ -405,10 +417,12 @@ DEPENDENCIES
405417
rails-i18n
406418
rails3-jquery-autocomplete!
407419
rolify
420+
rsolr (>= 1.0)
408421
rspec
409422
ruby-prof
410423
sass-rails
411424
sdoc
425+
solr_wrapper (>= 0.3)
412426
sunspot_rails (~> 2.2)
413427
sunspot_solr (~> 2.2)
414428
turbolinks

Rakefile

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
require File.expand_path('../config/application', __FILE__)
55

66
Muscat::Application.load_tasks
7+
8+
require 'solr_wrapper/rake_task' unless Rails.env.production?
+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
@import 'bootstrap-sprockets';
12

3+
@import 'bootstrap';
4+
5+
@import 'blacklight/blacklight';
6+
7+
// From muscat
28
@import 'variables';
39
@import 'rism_theme';
410
@import 'bootstrap';
5-
@import 'blacklight/blacklight';
6-
@import 'ekko-lightbox';
11+
//@import 'blacklight/blacklight';
12+
@import 'ekko-lightbox';

app/controllers/application_controller.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
class ApplicationController < ActionController::Base
2+
# Adds a few additional behaviors into the application controller
3+
include Blacklight::Controller
4+
layout 'blacklight'
5+
26
# Adds a few additional behaviors into the application controller
37
include Blacklight::Controller
48
# Please be sure to impelement current_user and user_session. Blacklight depends on

app/models/search_builder.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
class SearchBuilder < Blacklight::SearchBuilder
23
include Blacklight::Solr::SearchBuilderBehavior
34
end

app/models/user.rb

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
class User < ApplicationRecord
22

3+
if Blacklight::Utils.needs_attr_accessible?
4+
attr_accessible :email, :password, :password_confirmation
5+
end
6+
# Connects this user object to Blacklights Bookmarks.
7+
include Blacklight::User
8+
39
has_and_belongs_to_many :workgroups
410
attr_accessible :email, :password, :preference_wf_stage, :password_confirmation if Rails::VERSION::MAJOR < 4
511
has_many :sources, foreign_key: 'wf_owner'

app/views/catalog/_search_form.html.erb

-18
This file was deleted.

app/views/map/_show.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
//var storytellingWidget = new StorytellingWidget(storytelling,storytellingDiv);
7070
*/
7171

72-
var data1 = GeoTemConfig.getJson("/catalog/geosearch/852a_facet_sm.json?<%=params.to_query.html_safe%>");
72+
var data1 = GeoTemConfig.getJson("/catalog/geosearch/852a_facet_sm.json?<%=params.permit!.to_query.html_safe%>");
7373
// This is for source-based navigation
7474
//var data1 = GeoTemConfig.getJson("/catalog.json?utf8=✓&search_field=any_field&per_page=2000000&q=<%=params[:q]%>");
7575

config/locales/blacklight.en.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
en:
2+
blacklight:
3+
application_name: 'Blacklight'

db/migrate/20180202101517_drop_dnb_table.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class DropDnbTable < ActiveRecord::Migration
1+
class DropDnbTable < ActiveRecord::Migration[4.2]
22
def change
33
drop_table :DNB if ActiveRecord::Base.connection.table_exists? 'DNB' do |t|
44
t.integer "id", limit: 4, default: 0, null: false

0 commit comments

Comments
 (0)