Skip to content

Commit abd77c2

Browse files
committed
allow travis to run sunspot_solr specs
1 parent 0b9c431 commit abd77c2

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
*.gem
22
Gemfile.lock
3-
vendor/bundle
4-
sunspot/vendor/bundle
3+
.bundle
4+
**/*/vendor/bundle
55
sunspot_rails/spec/rails2/vendor
66
sunspot_rails/spec/rails3/vendor
7-
**/*/vendor/bundle
87
sunspot-solr.pid
98
sunspot_solr/solr/solr-webapp
109
.yardoc

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
- GEM=sunspot_rails RAILS=4.0.0
1818
- GEM=sunspot_rails RAILS=4.1.0
1919
- GEM=sunspot_rails RAILS=4.2.0
20+
- GEM=sunspot_solr
2021

2122
# Limit the size of the matrix by only performing the most common builds
2223
matrix:

ci/travis.sh

+15-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ wait_until_solr_responds() {
1919

2020
case $GEM in
2121
"sunspot")
22-
22+
2323
cd sunspot
2424
/bin/echo -n "Starting Solr on port 8983 for Sunspot specs..."
2525
bundle install --quiet --path vendor/bundle
@@ -28,20 +28,20 @@ case $GEM in
2828
bundle exec sunspot-solr start -p 8983
2929
wait_until_solr_responds 8983
3030
/bin/echo "done."
31-
31+
3232
# Invoke the sunspot specs
3333
bundle exec rake spec
3434
rv=$?
35-
35+
3636
/bin/echo -n "Stopping Solr... "
3737
bundle exec sunspot-solr stop
3838
/bin/echo "done."
3939

4040
exit $rv
4141
;;
42-
42+
4343
"sunspot_rails")
44-
44+
4545
cd sunspot
4646
/bin/echo -n "Starting Solr on port 8983 for Sunspot specs..."
4747
bundle install --quiet --path vendor/bundle
@@ -50,15 +50,15 @@ case $GEM in
5050
bundle exec sunspot-solr start -p 8983
5151
wait_until_solr_responds 8983
5252
/bin/echo "done."
53-
53+
5454
# Install gems for test Rails application
5555
# Allow user to pass in SPEC_OPTS that are passed to spec in order to specify
5656
# things like the random test seed in order to replicate results from failed tests.
5757
# e.g. GEM=sunspot_rails RAILS=4.0.0 SPEC_OPTS="--order random:64549" travis.sh
5858
cd ../sunspot_rails
5959
rake spec RAILS=$RAILS SPEC_OPTS="$SPEC_OPTS"
6060
rv=$?
61-
61+
6262
# Cleanup Solr
6363
/bin/echo -n "Stopping Solr... "
6464
cd ../sunspot
@@ -67,6 +67,13 @@ case $GEM in
6767

6868
exit $rv
6969
;;
70-
70+
71+
"sunspot_solr")
72+
73+
cd sunspot_solr
74+
bundle install --quiet --path vendor/bundle
75+
bundle exec rake spec
76+
exit $?
77+
;;
7178
*)
7279
esac

0 commit comments

Comments
 (0)