blacklight 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +2 -3
- data/{test_support/.rspec → .rspec} +0 -0
- data/.travis.yml +4 -4
- data/Rakefile +8 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/checkbox_submit.js +1 -1
- data/app/controllers/bookmarks_controller.rb +2 -2
- data/app/helpers/blacklight/facets_helper_behavior.rb +17 -15
- data/app/views/layouts/blacklight.html.erb +0 -1
- data/blacklight.gemspec +2 -1
- data/config/jetty.yml +4 -0
- data/{test_support/features → features}/bookmarks.feature +0 -0
- data/{test_support/features → features}/did_you_mean.feature +0 -0
- data/{test_support/features → features}/librarian_view.feature +0 -0
- data/{test_support/features → features}/record_view.feature +0 -0
- data/{test_support/features → features}/saved_searches.feature +0 -0
- data/{test_support/features → features}/search.feature +0 -0
- data/{test_support/features → features}/search_filters.feature +0 -0
- data/{test_support/features → features}/search_history.feature +0 -0
- data/{test_support/features → features}/search_pagination.feature +0 -0
- data/{test_support/features → features}/search_results.feature +0 -0
- data/{test_support/features → features}/search_sort.feature +0 -0
- data/{test_support/features → features}/step_definitions/bookmarks_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/error_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/general_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/record_view_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/saved_searches_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/search_facets_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/search_history_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/search_pagination_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/search_result_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/search_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/user_steps.rb +0 -0
- data/{test_support/features → features}/step_definitions/web_steps.rb +0 -0
- data/{test_support/features → features}/support/env.rb +0 -0
- data/{test_support/features → features}/support/paths.rb +0 -0
- data/{test_support/features → features}/support/selectors.rb +0 -0
- data/lib/railties/blacklight_cucumber.rake +1 -1
- data/{test_support/spec → spec}/controllers/application_controller_spec.rb +0 -0
- data/spec/controllers/bookmarks_controller_spec.rb +42 -0
- data/{test_support/spec → spec}/controllers/catalog_controller_spec.rb +0 -0
- data/{test_support/spec → spec}/controllers/search_history_controller_spec.rb +0 -0
- data/{test_support/spec → spec}/data/sample_docs.yml +0 -0
- data/{test_support/spec → spec}/data/test_data.utf8.mrc +0 -0
- data/{test_support/spec → spec}/helpers/blacklight_helper_spec.rb +0 -0
- data/{test_support/spec → spec}/helpers/catalog_helper_spec.rb +0 -0
- data/{test_support/spec → spec}/helpers/facets_helper_spec.rb +31 -4
- data/{test_support/spec → spec}/helpers/hash_as_hidden_fields_spec.rb +0 -0
- data/{test_support/spec → spec}/helpers/html_head_helper_spec.rb +0 -0
- data/{test_support/spec → spec}/helpers/render_constraints_helper_spec.rb +0 -0
- data/{test_support/spec → spec}/helpers/search_history_constraints_helper_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_configurable_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_configuration_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_email_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_sms_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_solr_document_dublin_core_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_solr_document_marc_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_solr_document_more_like_this_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_solr_document_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_solr_response_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/blacklight_spec.rb +1 -1
- data/{test_support/spec → spec}/lib/blacklight_user_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/facet_paginator_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/marc_export_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/search_fields_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/solr_helper_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/tasks/blacklight_task_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/tasks/solr_marc_task_spec.rb +0 -0
- data/{test_support/spec → spec}/lib/utils_spec.rb +0 -0
- data/{test_support/spec → spec}/models/bookmark_spec.rb +0 -0
- data/{test_support/spec → spec}/models/record_mailer_spec.rb +0 -0
- data/{test_support/spec → spec}/models/search_spec.rb +0 -0
- data/{test_support/spec → spec}/models/solr_docment_spec.rb +0 -0
- data/{test_support/spec → spec}/rcov.opts +0 -0
- data/{test_support/spec → spec}/requests/alternate_controller_spec.rb +0 -0
- data/{test_support/spec → spec}/routing/catalog_routing_spec.rb +0 -0
- data/{test_support/spec → spec}/spec.opts +0 -0
- data/{test_support/spec → spec}/spec_helper.rb +2 -3
- data/{test_support/spec → spec}/support/assert_difference.rb +0 -0
- data/{test_support/spec → spec}/support/include_text.rb +0 -0
- data/spec/test_app_templates/Gemfile.extra +38 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +40 -0
- data/spec/test_app_templates/lib/tasks/rspec.rake +8 -0
- data/{test_support/spec → spec}/views/catalog/_constraints_element.html.erb_spec.rb +0 -0
- data/{test_support/spec → spec}/views/catalog/_document_list.html.erb_spec.rb +0 -0
- data/{test_support/spec → spec}/views/catalog/_facets.html.erb_spec.rb +0 -0
- data/{test_support/spec → spec}/views/catalog/_index_default.erb_spec.rb +0 -0
- data/{test_support/spec → spec}/views/catalog/_show_default.erb_spec.rb +0 -0
- data/{test_support/spec → spec}/views/catalog/_show_sidebar.erb_spec.rb +0 -0
- data/{test_support/spec → spec}/views/catalog/index.atom.builder_spec.rb +0 -0
- data/tasks/blacklight.rake +97 -0
- metadata +178 -83
- metadata.gz.sig +0 -0
- data/test_support/bin/run-tests.sh +0 -56
- data/test_support/bin/setup-test-app.sh +0 -119
- data/test_support/bin/test.sh +0 -147
metadata.gz.sig
CHANGED
|
Binary file
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# test.sh
|
|
3
|
-
# Create a default rails appliaction, install blacklight, and run all the tests.
|
|
4
|
-
|
|
5
|
-
before="$(date +%s)"
|
|
6
|
-
benchmark()
|
|
7
|
-
{
|
|
8
|
-
after="$(date +%s)"
|
|
9
|
-
elapsed_seconds="$(expr $after - $before)"
|
|
10
|
-
echo "Total Time: ${elapsed_seconds} sec"
|
|
11
|
-
# as a bonus, make our script exit with the right error code.
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
check_errs()
|
|
15
|
-
{
|
|
16
|
-
# Function. Parameter 1 is the return code
|
|
17
|
-
# Para. 2 is text to display on failure.
|
|
18
|
-
if [ "${1}" -ne "0" ]; then
|
|
19
|
-
echo "ERROR # ${1} : ${2}"
|
|
20
|
-
|
|
21
|
-
benchmark
|
|
22
|
-
exit 1
|
|
23
|
-
fi
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
# Make sure we are in the blacklight directory
|
|
27
|
-
if [ ! -f "blacklight.gemspec" ]
|
|
28
|
-
then
|
|
29
|
-
echo "You must execute test.sh from the root of your blacklight checkout."
|
|
30
|
-
exit 1
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
if [[ $# -gt 0 ]]
|
|
34
|
-
then
|
|
35
|
-
# Make certain rvn will work correctly.
|
|
36
|
-
# Load RVM into a shell session *as a function*
|
|
37
|
-
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
|
|
38
|
-
# First try to load from a user install
|
|
39
|
-
source "$HOME/.rvm/scripts/rvm"
|
|
40
|
-
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
|
|
41
|
-
# Then try to load from a root install
|
|
42
|
-
source "/usr/local/rvm/scripts/rvm"
|
|
43
|
-
else
|
|
44
|
-
printf "ERROR: An RVM installation was not found.\n"
|
|
45
|
-
exit 1
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
rvm use "$@" --create
|
|
50
|
-
check_errs $? "rvm failed. please run 'rvm install $@', and then re-run these tests."
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
cd tmp/test_app
|
|
54
|
-
bundle exec rake blacklight:hudson RAILS_ENV=test
|
|
55
|
-
check_errs $? "Tests failed."
|
|
56
|
-
benchmark
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# test.sh
|
|
3
|
-
# Create a default rails appliaction, install blacklight, and run all the tests.
|
|
4
|
-
|
|
5
|
-
#If null or empty, use default value
|
|
6
|
-
RAILS_VERSION=${RAILS_VERSION:-"~> 3.2"}
|
|
7
|
-
JETTY_URL=${JETTY_URL:-"https://github.com/projectblacklight/blacklight-jetty/zipball/v3.5.0"}
|
|
8
|
-
|
|
9
|
-
before="$(date +%s)"
|
|
10
|
-
benchmark()
|
|
11
|
-
{
|
|
12
|
-
after="$(date +%s)"
|
|
13
|
-
elapsed_seconds="$(expr $after - $before)"
|
|
14
|
-
echo "Total Time: ${elapsed_seconds} sec"
|
|
15
|
-
# as a bonus, make our script exit with the right error code.
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
check_errs()
|
|
19
|
-
{
|
|
20
|
-
# Function. Parameter 1 is the return code
|
|
21
|
-
# Para. 2 is text to display on failure.
|
|
22
|
-
if [ "${1}" -ne "0" ]; then
|
|
23
|
-
echo "ERROR # ${1} : ${2}"
|
|
24
|
-
benchmark
|
|
25
|
-
exit 1
|
|
26
|
-
fi
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
# Make sure we are in the blacklight directory
|
|
30
|
-
if [ ! -f "blacklight.gemspec" ]
|
|
31
|
-
then
|
|
32
|
-
echo "You must execute test.sh from the root of your blacklight checkout."
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
# Clear out the tmp/ directory.
|
|
37
|
-
rm -rf tmp/test_app
|
|
38
|
-
mkdir -p tmp/test_app
|
|
39
|
-
cd tmp
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if [[ $# -gt 0 ]]
|
|
43
|
-
then
|
|
44
|
-
# Make certain rvm will work correctly.
|
|
45
|
-
# Load RVM into a shell session *as a function*
|
|
46
|
-
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
|
|
47
|
-
# First try to load from a user install
|
|
48
|
-
source "$HOME/.rvm/scripts/rvm"
|
|
49
|
-
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
|
|
50
|
-
# Then try to load from a root install
|
|
51
|
-
source "/usr/local/rvm/scripts/rvm"
|
|
52
|
-
else
|
|
53
|
-
echo "WARNING: An RVM installation was not found.\n"
|
|
54
|
-
exit 1
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
rvm use "$@" --create
|
|
58
|
-
check_errs $? "rvm failed. please run 'rvm install $@', and then re-run these tests."
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
if ! gem query -n rails -v "$RAILS_VERSION" --installed > /dev/null; then
|
|
62
|
-
gem install --no-rdoc --no-ri 'rails' -v "$RAILS_VERSION"
|
|
63
|
-
fi
|
|
64
|
-
|
|
65
|
-
if ! gem query -n bundler -v ">=1.0" --installed > /dev/null; then
|
|
66
|
-
gem install --no-rdoc --no-ri 'bundler'
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
rails "_${RAILS_VERSION}_" new test_app
|
|
70
|
-
|
|
71
|
-
cd test_app
|
|
72
|
-
rm public/index.html
|
|
73
|
-
|
|
74
|
-
echo "
|
|
75
|
-
platforms :jruby do
|
|
76
|
-
gem 'jruby-openssl'
|
|
77
|
-
gem 'activerecord-jdbcsqlite3-adapter'
|
|
78
|
-
gem 'jdbc-sqlite3'
|
|
79
|
-
gem 'mediashelf-loggable', '>= 0.4.8'
|
|
80
|
-
gem 'therubyrhino'
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
platforms :ruby do
|
|
84
|
-
gem 'sqlite3'
|
|
85
|
-
gem 'execjs'
|
|
86
|
-
gem 'therubyracer', '~> 0.10.2'
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
gem 'blacklight', :path => '../../'
|
|
90
|
-
gem 'jquery-rails'
|
|
91
|
-
|
|
92
|
-
# For testing
|
|
93
|
-
group :development, :test do
|
|
94
|
-
gem 'rspec-rails', '~> 2.12.0'
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
group :test do
|
|
98
|
-
gem 'cucumber-rails', :require => false
|
|
99
|
-
gem 'generator_spec'
|
|
100
|
-
gem 'database_cleaner'
|
|
101
|
-
gem 'capybara'
|
|
102
|
-
gem 'rcov', :platform => :mri_18
|
|
103
|
-
gem 'simplecov', :platform => :mri_19
|
|
104
|
-
gem 'simplecov-rcov', :platform => :mri_19
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
gem 'jettywrapper', '>= 1.2.0'
|
|
108
|
-
" >> Gemfile
|
|
109
|
-
|
|
110
|
-
bundle install
|
|
111
|
-
check_errs $? "Bundle install failed."
|
|
112
|
-
|
|
113
|
-
rails generate blacklight -d
|
|
114
|
-
check_errs $? "Blacklight generator failed"
|
|
115
|
-
|
|
116
|
-
bundle exec rake db:migrate
|
|
117
|
-
check_errs $? "Rake Migration failed"
|
|
118
|
-
|
|
119
|
-
benchmark
|
data/test_support/bin/test.sh
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# test.sh
|
|
3
|
-
# Create a default rails appliaction, install blacklight, and run all the tests.
|
|
4
|
-
|
|
5
|
-
#If null or empty, use default valueRAILS
|
|
6
|
-
JETTY_URL=${JETTY_URL:-"https://github.com/projectblacklight/blacklight-jetty/zipball/v4.0.0"}
|
|
7
|
-
|
|
8
|
-
before="$(date +%s)"
|
|
9
|
-
benchmark()
|
|
10
|
-
{
|
|
11
|
-
after="$(date +%s)"
|
|
12
|
-
elapsed_seconds="$(expr $after - $before)"
|
|
13
|
-
echo "Total Time: ${elapsed_seconds} sec"
|
|
14
|
-
# as a bonus, make our script exit with the right error code.
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
check_errs()
|
|
18
|
-
{
|
|
19
|
-
# Function. Parameter 1 is the return code
|
|
20
|
-
# Para. 2 is text to display on failure.
|
|
21
|
-
if [ "${1}" -ne "0" ]; then
|
|
22
|
-
echo "ERROR # ${1} : ${2}"
|
|
23
|
-
benchmark
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
# Make sure we are in the blacklight directory
|
|
29
|
-
if [ ! -f "blacklight.gemspec" ]
|
|
30
|
-
then
|
|
31
|
-
echo "You must execute test.sh from the root of your blacklight checkout."
|
|
32
|
-
exit 1
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
# Clear out the tmp/ directory.
|
|
36
|
-
rm -rf tmp/test_app
|
|
37
|
-
mkdir -p tmp/test_app
|
|
38
|
-
cd tmp
|
|
39
|
-
|
|
40
|
-
if [[ $# -gt 0 ]]
|
|
41
|
-
then
|
|
42
|
-
# Make certain rvm will work correctly.
|
|
43
|
-
# Load RVM into a shell session *as a function*
|
|
44
|
-
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
|
|
45
|
-
# First try to load from a user install
|
|
46
|
-
source "$HOME/.rvm/scripts/rvm"
|
|
47
|
-
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
|
|
48
|
-
# Then try to load from a root install
|
|
49
|
-
source "/usr/local/rvm/scripts/rvm"
|
|
50
|
-
else
|
|
51
|
-
echo "WARNING: An RVM installation was not found.\n"
|
|
52
|
-
exit 1
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
rvm use "$@" --create
|
|
56
|
-
check_errs $? "rvm failed. please run 'rvm install $@', and then re-run these tests."
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
rails new test_app
|
|
60
|
-
|
|
61
|
-
cd test_app
|
|
62
|
-
|
|
63
|
-
if [ -e public/index.html ]; then
|
|
64
|
-
rm public/index.html
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if [ "${TRAVIS}" = "true" ]; then
|
|
69
|
-
echo "adding utf-8 header for the css under travis"
|
|
70
|
-
echo '@charset "UTF-8";'|cat - app/assets/stylesheets/application.css > app/assets/stylesheets/application.css.utf8 && mv app/assets/stylesheets/application.css.utf8 app/assets/stylesheets/application.css
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
echo "
|
|
75
|
-
platforms :jruby do
|
|
76
|
-
gem 'jruby-openssl'
|
|
77
|
-
gem 'activerecord-jdbcsqlite3-adapter'
|
|
78
|
-
gem 'jdbc-sqlite3'
|
|
79
|
-
gem 'mediashelf-loggable', '>= 0.4.8'
|
|
80
|
-
gem 'therubyrhino'
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
platforms :ruby do
|
|
84
|
-
gem 'sqlite3'
|
|
85
|
-
gem 'execjs'
|
|
86
|
-
gem 'therubyracer', '~> 0.10.2'
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
gem 'blacklight', :path => '../../'
|
|
90
|
-
gem 'jquery-rails'
|
|
91
|
-
|
|
92
|
-
# For testing
|
|
93
|
-
group :development, :test do
|
|
94
|
-
gem 'rspec-rails', '~> 2.12.0'
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
group :test do
|
|
98
|
-
gem 'generator_spec'
|
|
99
|
-
gem 'cucumber-rails', :require => false
|
|
100
|
-
gem 'database_cleaner', '>= 1.0.0.RC1'
|
|
101
|
-
if defined? :JRUBY_VERSION
|
|
102
|
-
gem 'capybara', '~> 1.0'
|
|
103
|
-
else
|
|
104
|
-
gem 'capybara'
|
|
105
|
-
end
|
|
106
|
-
gem 'rcov', :platform => :mri_18
|
|
107
|
-
gem 'simplecov', :platform => :mri_19
|
|
108
|
-
gem 'simplecov-rcov', :platform => :mri_19
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
gem 'jettywrapper', '>= 1.2.0'
|
|
112
|
-
" >> Gemfile
|
|
113
|
-
|
|
114
|
-
export BUNDLE_GEMFILE=`pwd`/Gemfile
|
|
115
|
-
|
|
116
|
-
bundle install
|
|
117
|
-
check_errs $? "Bundle install failed."
|
|
118
|
-
|
|
119
|
-
rails generate blacklight -d
|
|
120
|
-
check_errs $? "Blacklight generator failed"
|
|
121
|
-
|
|
122
|
-
bundle exec rake db:migrate RAILS_ENV=test
|
|
123
|
-
check_errs $? "Rake Migration failed"
|
|
124
|
-
|
|
125
|
-
rails g cucumber:install &> /dev/null
|
|
126
|
-
|
|
127
|
-
rails g blacklight:test_support
|
|
128
|
-
|
|
129
|
-
jetty_zip=$( JETTY_URL=$JETTY_URL ruby -e 'puts "/tmp/blacklight_jetty_#{ENV["JETTY_URL"].split("/").last}"')
|
|
130
|
-
if [ ! -f $jetty_zip ]
|
|
131
|
-
then
|
|
132
|
-
curl -L $JETTY_URL -o $jetty_zip
|
|
133
|
-
check_errs $? "Jetty file does not exist, and cannot be downloaded."
|
|
134
|
-
fi
|
|
135
|
-
|
|
136
|
-
rails g blacklight:jetty test_jetty -e test -d $jetty_zip
|
|
137
|
-
check_errs $? "Jetty setup failed."
|
|
138
|
-
|
|
139
|
-
rake jetty:start RAILS_ENV=test
|
|
140
|
-
bundle exec rake solr:marc:index_test_data RAILS_ENV=test
|
|
141
|
-
rake jetty:stop RAILS_ENV=test
|
|
142
|
-
sleep 2
|
|
143
|
-
|
|
144
|
-
bundle exec rake blacklight:hudson RAILS_ENV=test
|
|
145
|
-
check_errs $? "Tests failed."
|
|
146
|
-
|
|
147
|
-
benchmark
|