-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit sets up solr_wrapper for use in the local testing enviroment and in travis. It includes changes so that solr will run in travis and includes a fixture geoblacklight json file that is used in the feature tests that are also added in this commit.
- Loading branch information
Showing
12 changed files
with
116 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Place any default configuration for solr_wrapper here | ||
# port: 8983 | ||
instance_dir: tmp/solr-development | ||
download_dir: /var/tmp | ||
collection: | ||
persist: true | ||
dir: solr/conf/ | ||
name: blacklight-core | ||
name: aster-development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
production: | ||
development: | ||
url: http://127.0.0.1:<%= ENV['SOLR_TEST_PORT'] || 8983 %>/solr/aster-development | ||
test: | ||
url: http://127.0.0.1:<%= ENV['SOLR_TEST_PORT'] || 8985 %>/solr/aster-test | ||
production: | ||
url: http://127.0.0.1:8983/solr/aster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
port: 8985 | ||
instance_dir: tmp/solr-test | ||
collection: | ||
persist: false | ||
dir: solr/conf/ | ||
name: aster-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# frozen_string_literal: true | ||
unless Rails.env.production? | ||
namespace :aster do | ||
task :spec do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
unless Rails.env.production? | ||
APP_ROOT = File.dirname(__FILE__) | ||
require 'solr_wrapper' | ||
require 'solr_wrapper/rake_task' | ||
namespace :aster do | ||
desc 'Run Continuous Integration' | ||
task :travis do | ||
ENV['environment'] = 'test' | ||
solr_params = { | ||
port: 8985, | ||
verbose: true, | ||
managed: true | ||
} | ||
SolrWrapper.wrap(solr_params) do |solr| | ||
solr.with_collection( | ||
name: 'aster-test', | ||
persist: false, | ||
dir: Rails.root.join('solr', 'conf') | ||
) do | ||
Rake::Task['aster:ci'].invoke | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
RSpec.describe 'viewing content on the aster home page', type: :feature do | ||
scenario 'viewing the version' do | ||
visit '/' | ||
expect(page).to have_css '.version' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
|
||
RSpec.describe 'viewing content on the aster show page', type: :feature do | ||
before do | ||
Rake::Task['geoblacklight:solr:seed'].invoke | ||
end | ||
scenario 'viewing the show page' do | ||
visit solr_document_path 'gford-20140000-010015_belvegr' | ||
expect(page).to have_content 'Vegetation, Maya Forest, Belize, 1995' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"geoblacklight_version": "1.0", | ||
"dc_identifier_s": "ucsb:gford-20140000-010015_belvegr", | ||
"layer_slug_s":"gford-20140000-010015_belvegr", | ||
"dc_language_s": "English", | ||
"dc_publisher_s": "University of California, Santa Barbara. Map and Imagery Laboratory", | ||
"dc_rights_s": "Public", | ||
"dc_title_s": "Vegetation, Maya Forest, Belize, 1995", | ||
"dc_type_s": "Dataset", | ||
"dct_references_s": "{\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"http://geoservices-sandbox.library.ucsb.edu:8080/geoserver/ucsb/ows?service=WFS\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://geoservices-sandbox.library.ucsb.edu:8080/geoserver/ucsb/wms?service=WMS\"}", | ||
"solr_geom": "ENVELOPE(-88.0804, -89.2587, 18.4977, 15.8808)", | ||
"dct_spatial_sm": "Belize", | ||
"dc_subject_sm":"Belize", | ||
"dc_creator_sm":"UCSB", | ||
"dct_provenance_s": "UCSB", | ||
"layer_geom_type_s": "Polygon" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters