Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
16,762 additions
and
2,061 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 |
---|---|---|
|
@@ -19,3 +19,5 @@ spec/internal | |
jetty | ||
.DS_Store | ||
.idea/ | ||
.rakeTasks | ||
.internal_test_app |
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,99 @@ | ||
require: rubocop-rspec | ||
|
||
AllCops: | ||
DisplayCopNames: true | ||
TargetRubyVersion: 2.3 | ||
Exclude: | ||
- "lib/generators/blacklight_maps/templates/**/*" | ||
- "blacklight-maps.gemspec" | ||
|
||
# engine_cart block includes conditional, not duplication | ||
Bundler/DuplicatedGem: | ||
Exclude: | ||
- 'Gemfile' | ||
|
||
# engine_cart block is following default Rails order | ||
Bundler/OrderedGems: | ||
Exclude: | ||
- 'Gemfile' | ||
|
||
Layout/IndentationConsistency: | ||
EnforcedStyle: normal | ||
|
||
Metrics/AbcSize: | ||
Max: 20 | ||
Exclude: | ||
- 'lib/blacklight/maps/maps_search_builder.rb' | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- "spec/**/*" | ||
|
||
Metrics/ClassLength: | ||
Exclude: | ||
- 'lib/blacklight/maps/export.rb' | ||
|
||
Metrics/LineLength: | ||
Max: 200 | ||
Exclude: | ||
- 'lib/blacklight/maps/engine.rb' | ||
- 'spec/**/*' | ||
|
||
Metrics/MethodLength: | ||
Max: 15 | ||
|
||
Naming/HeredocDelimiterNaming: | ||
Enabled: false | ||
|
||
Naming/PredicateName: | ||
NamePrefixBlacklist: | ||
- is_ | ||
|
||
Rails: | ||
Enabled: true | ||
|
||
Rails/OutputSafety: | ||
Enabled: false | ||
|
||
RSpec/AnyInstance: | ||
Exclude: | ||
- 'spec/system/initial_view_spec.rb' | ||
|
||
RSpec/BeforeAfterAll: | ||
Enabled: false | ||
|
||
RSpec/DescribeClass: | ||
Exclude: | ||
- 'spec/system/*' | ||
|
||
RSpec/FilePath: | ||
Exclude: | ||
- 'spec/lib/blacklight/maps/*' | ||
|
||
RSpec/MessageSpies: | ||
EnforcedStyle: receive | ||
|
||
RSpec/MultipleExpectations: | ||
Max: 4 | ||
|
||
RSpec/NestedGroups: | ||
Max: 5 | ||
|
||
RSpec/PredicateMatcher: | ||
Exclude: | ||
- 'spec/lib/blacklight/maps/render_constraints_override_spec.rb' | ||
|
||
# https://github.com/rubocop-hq/rubocop/issues/6439 | ||
Style/AccessModifierDeclarations: | ||
Enabled: false | ||
|
||
Style/BracesAroundHashParameters: | ||
Exclude: | ||
- 'spec/lib/blacklight/maps/export_spec.rb' | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/SignalException: | ||
Exclude: | ||
- 'spec/**/*' |
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,7 @@ | ||
# Place any default configuration for solr_wrapper here | ||
# you must first run 'rake engine_cart:generate' to create the test app | ||
# before running 'solr_wrapper' from project root | ||
# port: 8983 | ||
collection: | ||
dir: ./.internal_test_app/solr/conf/ | ||
name: blacklight-core |
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,25 +1,30 @@ | ||
notifications: | ||
email: false | ||
language: ruby | ||
sudo: false | ||
rvm: | ||
- 2.6.0 | ||
dist: bionic | ||
|
||
matrix: | ||
include: | ||
env: "RAILS_VERSION=4.2.11" | ||
addons: | ||
chrome: stable | ||
|
||
before_install: | ||
- gem install bundler | ||
- google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost & | ||
|
||
env: | ||
- "RAILS_VERSION=4.2.6" | ||
|
||
notifications: | ||
irc: "irc.freenode.org#blacklight" | ||
email: | ||
- blacklight-commits@googlegroups.com | ||
|
||
global_env: | ||
global: | ||
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true | ||
- ENGINE_CART_RAILS_OPTIONS='--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test' | ||
|
||
matrix: | ||
include: | ||
- rvm: 2.7.0 | ||
env: "RAILS_VERSION=6.0.2.2" | ||
- rvm: 2.6.5 | ||
env: "RAILS_VERSION=6.0.2.2" | ||
- rvm: 2.6.5 | ||
env: "RAILS_VERSION=5.2.4.2" | ||
- rvm: 2.5.7 | ||
env: "RAILS_VERSION=5.2.4.2 BLACKLIGHT_API_TEST=true ENGINE_CART_RAILS_OPTIONS=\"--api --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-test\"" | ||
- rvm: 2.4.9 | ||
env: "RAILS_VERSION=5.2.4.2" | ||
fast_finish: true | ||
|
||
jdk: openjdk11 |
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,15 +1,48 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in blacklight-maps.gemspec | ||
gemspec | ||
|
||
group :test do | ||
gem 'simplecov', require: false | ||
group :development, :test do | ||
gem 'coveralls', require: false | ||
end | ||
|
||
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__)) | ||
if File.exists?(file) | ||
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` | ||
instance_eval File.read(file) | ||
gem 'engine_cart' | ||
# BEGIN ENGINE_CART BLOCK | ||
# engine_cart: 1.2.0 | ||
# engine_cart stanza: 0.10.0 | ||
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app. | ||
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__))) | ||
if File.exist?(file) | ||
begin | ||
eval_gemfile file | ||
rescue Bundler::GemfileError => e | ||
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:' | ||
Bundler.ui.warn e.message | ||
end | ||
else | ||
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies" | ||
|
||
if ENV['RAILS_VERSION'] | ||
if ENV['RAILS_VERSION'] == 'edge' | ||
gem 'rails', github: 'rails/rails' | ||
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks' | ||
else | ||
gem 'rails', ENV['RAILS_VERSION'] | ||
end | ||
end | ||
|
||
case ENV['RAILS_VERSION'] | ||
when /^5.[12]/, /^6.0/ | ||
gem 'sass-rails', '~> 5.0' | ||
when /^4.2/ | ||
gem 'responders', '~> 2.0' | ||
gem 'sass-rails', '>= 5.0' | ||
gem 'coffee-rails', '~> 4.1.0' | ||
gem 'json', '~> 1.8' | ||
when /^4.[01]/ | ||
gem 'sass-rails', '< 5.0' | ||
end | ||
end | ||
# END ENGINE_CART BLOCK |
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,43 +1,46 @@ | ||
require "bundler/gem_tasks" | ||
# frozen_string_literal: true | ||
|
||
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.6.0.zip" | ||
APP_ROOT = File.dirname(__FILE__) | ||
|
||
require 'rspec/core/rake_task' | ||
require 'engine_cart/rake_task' | ||
begin | ||
require 'bundler/setup' | ||
rescue LoadError | ||
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | ||
end | ||
|
||
require 'jettywrapper' | ||
require 'rdoc/task' | ||
RDoc::Task.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'BlacklightMaps' | ||
rdoc.options << '--line-numbers' | ||
rdoc.rdoc_files.include('README.rdoc') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
task default: :ci | ||
Bundler::GemHelper.install_tasks | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
Rake::Task.define_task(:environment) | ||
|
||
desc "Load fixtures" | ||
task :fixtures => ['engine_cart:generate'] do | ||
EngineCart.within_test_app do | ||
system "rake blacklight_maps:solr:seed RAILS_ENV=test" | ||
end | ||
end | ||
load 'lib/railties/blacklight_maps.rake' | ||
|
||
desc "Execute Continuous Integration build" | ||
task :ci => ['engine_cart:generate', 'jetty:clean', 'blacklight_maps:configure_jetty'] do | ||
|
||
require 'jettywrapper' | ||
jetty_params = Jettywrapper.load_config('test') | ||
task default: :ci | ||
|
||
error = Jettywrapper.wrap(jetty_params) do | ||
Rake::Task['fixtures'].invoke | ||
Rake::Task['spec'].invoke | ||
end | ||
raise "test failures: #{error}" if error | ||
end | ||
require 'engine_cart/rake_task' | ||
|
||
require 'solr_wrapper' | ||
|
||
namespace :blacklight_maps do | ||
desc "Copies the default SOLR config for the bundled Testing Server" | ||
task :configure_jetty do | ||
FileList['solr_conf/conf/*'].each do |f| | ||
cp("#{f}", 'jetty/solr/blacklight-core/conf/', :verbose => true) | ||
require 'rspec/core/rake_task' | ||
RSpec::Core::RakeTask.new | ||
|
||
require 'rubocop/rake_task' | ||
RuboCop::RakeTask.new(:rubocop) | ||
|
||
desc 'Run test suite' | ||
task ci: [:rubocop, 'engine_cart:generate'] do | ||
SolrWrapper.wrap do |solr| | ||
solr.with_collection do | ||
within_test_app do | ||
system 'RAILS_ENV=test rake blacklight_maps:index:seed' | ||
end | ||
Rake::Task['spec'].invoke | ||
end | ||
end | ||
end | ||
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 +1,4 @@ | ||
// for Blacklight.onLoad: | ||
//= require blacklight/core | ||
|
||
//= require leaflet | ||
//= require leaflet.markercluster | ||
|
||
//= require_tree . | ||
//= require_tree . |
Oops, something went wrong.