Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace jettywrapper legacy stuff, for the new new solr_wrapper #29

Merged
merged 4 commits into from
Feb 15, 2017
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: 5 additions & 0 deletions .solr_wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Place any default configuration for solr_wrapper here
# port: 8983
collection:
dir: config/solr_configs/
name: blacklight-core
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ language: ruby
rvm:
- '2.2.3'
sudo: false
jdk:
- oraclejdk8
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end
gem 'webmock', group: :test

gem 'blacklight', '>= 5.3.0'
gem 'jettywrapper', '>= 2.0'
gem 'solr_wrapper'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
gem 'rsolr', '~> 1.0.6'
gem 'devise'
Expand Down
21 changes: 8 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.5.8)
ffi (~> 1.0, >= 1.0.11)
cliver (0.3.2)
coderay (1.1.0)
coffee-rails (4.1.0)
Expand Down Expand Up @@ -138,7 +136,6 @@ GEM
execjs (2.6.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
globalid (0.3.6)
activesupport (>= 4.1.0)
hashdiff (0.2.3)
Expand All @@ -149,12 +146,6 @@ GEM
jbuilder (2.3.2)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jettywrapper (2.0.3)
activesupport (>= 3.0.0)
childprocess
i18n
logger
rubyzip
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
Expand All @@ -164,7 +155,6 @@ GEM
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
libv8 (3.16.14.13)
logger (1.2.8)
loofah (2.0.3)
nokogiri (>= 1.5.9)
lyberteam-capistrano-devel (3.2.0)
Expand Down Expand Up @@ -255,7 +245,8 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rubyzip (1.1.7)
ruby-progressbar (1.8.1)
rubyzip (1.2.1)
safe_yaml (1.0.4)
sass (3.4.19)
sass-rails (5.0.4)
Expand All @@ -273,6 +264,10 @@ GEM
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
solr_wrapper (0.21.0)
faraday
ruby-progressbar
rubyzip
spring (1.4.3)
sprockets (3.4.0)
rack (> 1, < 3)
Expand Down Expand Up @@ -341,7 +336,6 @@ DEPENDENCIES
devise
devise-guests (~> 0.3)
jbuilder (~> 2.0)
jettywrapper (>= 2.0)
jquery-rails
lyberteam-capistrano-devel
mods_display (= 0.3.4)
Expand All @@ -351,6 +345,7 @@ DEPENDENCIES
rspec-rails (< 2.99)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
solr_wrapper
spring
sqlite3
therubyracer
Expand All @@ -360,4 +355,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
1.10.6
1.14.4
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@


This is the codebase for the Colligo application, showcasing digital manuscripts.

## Running the server for development
```sh
$ bundle exec rake colligo:server # Spins up Solr, Indexes data, Runs Rails server
```

You can do all of these things manually if you like:

```sh
$ solr_wrapper # start solr
$ bundle exec rake colligo:fixtures # Index fixtures
$ rails s # Start Rails server
```
15 changes: 6 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks

ZIP_URL = 'https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.3.zip'
require 'jettywrapper'

desc 'Execute the test build that runs on travis'
task ci: [:environment] do
if Rails.env.test?
Rake::Task['db:migrate'].invoke
Rake::Task['colligo:download_and_unzip_jetty'].invoke
Rake::Task['colligo:copy_solr_configs'].invoke
Jettywrapper.wrap(Jettywrapper.load_config) do
Rake::Task['colligo:fixtures'].invoke
Rake::Task['spec'].invoke
SolrWrapper.wrap(port: '8983') do |solr|
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), 'config', 'solr_configs')) do
Rake::Task['db:migrate'].invoke
Rake::Task['colligo:fixtures'].invoke
Rake::Task['spec'].invoke
end
end
else
system('RAILS_ENV=test rake ci')
Expand Down
5 changes: 3 additions & 2 deletions config/blacklight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

development:
adapter: solr
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8984/solr/blacklight-core" %>
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %>
test: &test
adapter: solr
url: <%= "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8888}/solr/blacklight-core" %>
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV['TEST_JETTY_PORT'] || 8983}/solr/blacklight-core" %>
production:
adapter: solr
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %>

3 changes: 3 additions & 0 deletions config/solr_configs/_rest_managed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"initArgs":{},
"managedList":[]}
31 changes: 31 additions & 0 deletions config/solr_configs/admin-extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- The content of this page will be statically included into the top
of the admin page. Uncomment this as an example to see there the content
will show up.

<hr>
<i>This line will appear before the first table</i>
<tr>
<td colspan="2">
This row will be appended to the end of the first table
</td>
</tr>
<hr>

-->
36 changes: 36 additions & 0 deletions config/solr_configs/elevate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- If this file is found in the config directory, it will only be
loaded once at startup. If it is found in Solr's data
directory, it will be re-loaded every commit.
-->

<elevate>
<query text="foo bar">
<doc id="1" />
<doc id="2" />
<doc id="3" />
</query>

<query text="ipod">
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
</query>

</elevate>
Loading