-
Notifications
You must be signed in to change notification settings - Fork 470
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
83 changed files
with
1,695 additions
and
706 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,6 +1,7 @@ | ||
*.gem | ||
.bundle | ||
.rbx | ||
gemfiles | ||
Gemfile.lock | ||
*.sublime-* | ||
pkg/* | ||
|
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,30 +1,39 @@ | ||
language: ruby | ||
rvm: | ||
- 2.0.0 | ||
- 2.1 | ||
- 2.2.2 | ||
- 2.3.1 | ||
- jruby-9.0.5.0 | ||
- 2.2.2 | ||
- 2.3.4 | ||
- 2.4.1 | ||
- jruby-9.1.10.0 | ||
before_install: | ||
- gem update --system | ||
- gem install bundler | ||
- pip install --upgrade --user awscli | ||
- gem update --system | ||
- gem install bundler | ||
before_script: | ||
- "mysql -e 'create database thinking_sphinx;' > /dev/null" | ||
- "psql -c 'create database thinking_sphinx;' -U postgres >/dev/null" | ||
- bundle exec appraisal install | ||
- mysql -e 'create database thinking_sphinx;' > /dev/null | ||
- psql -c 'create database thinking_sphinx;' -U postgres >/dev/null | ||
- "./bin/loadsphinx $SPHINX_VERSION" | ||
- "./bin/literals" | ||
- bundle exec appraisal install | ||
script: bundle exec appraisal rspec | ||
env: | ||
- DATABASE=mysql2 SPHINX_BIN=/usr/local/sphinx-2.0.10/bin/ SPHINX_VERSION=2.0.10 | ||
- DATABASE=postgresql SPHINX_BIN=/usr/local/sphinx-2.0.10/bin/ SPHINX_VERSION=2.0.10 | ||
- DATABASE=mysql2 SPHINX_BIN=/usr/local/sphinx-2.1.9/bin/ SPHINX_VERSION=2.1.9 | ||
- DATABASE=postgresql SPHINX_BIN=/usr/local/sphinx-2.1.9/bin/ SPHINX_VERSION=2.1.9 | ||
- DATABASE=mysql2 SPHINX_BIN=/usr/local/sphinx-2.2.6/bin/ SPHINX_VERSION=2.2.6 | ||
- DATABASE=postgresql SPHINX_BIN=/usr/local/sphinx-2.2.6/bin/ SPHINX_VERSION=2.2.6 | ||
global: | ||
- SPHINX_BIN=ext/sphinx/bin/ | ||
- secure: cUPinkilBafqDSPsTkl/PXYc2aXNKUQKXGK8poBBMqKN9/wjfJx1DWgtowDKalekdZELxDhc85Ye3bL1xlW4nLjOu+U6Tkt8eNw2Nhs1flodHzA/RyENdBLr/tBHt43EjkrDehZx5sBHmWQY4miHs8AJz0oKO9Ae2inTOHx9Iuc= | ||
matrix: | ||
- DATABASE=mysql2 SPHINX_VERSION=2.0.10 | ||
- DATABASE=postgresql SPHINX_VERSION=2.0.10 | ||
- DATABASE=mysql2 SPHINX_VERSION=2.1.9 | ||
- DATABASE=postgresql SPHINX_VERSION=2.1.9 | ||
- DATABASE=mysql2 SPHINX_VERSION=2.2.6 | ||
- DATABASE=postgresql SPHINX_VERSION=2.2.6 | ||
sudo: false | ||
addons: | ||
postgresql: "9.4" | ||
postgresql: '9.4' | ||
services: | ||
- postgresql | ||
- postgresql | ||
matrix: | ||
allow_failures: | ||
- rvm: jruby-9.0.5.0 | ||
exclude: | ||
- rvm: jruby-9.1.10.0 | ||
env: DATABASE=mysql2 SPHINX_VERSION=2.0.10 | ||
- rvm: jruby-9.1.10.0 | ||
env: DATABASE=postgresql SPHINX_VERSION=2.0.10 |
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,28 +1,32 @@ | ||
appraise 'rails_3_2' do | ||
gem 'rails', '~> 3.2.22.2' | ||
gem 'rack', '~> 1.0', :platforms => [:ruby_20, :ruby_21] | ||
end | ||
end if RUBY_VERSION.to_f <= 2.3 | ||
|
||
appraise 'rails_4_0' do | ||
gem 'rails', '~> 4.0.13' | ||
gem 'rack', '~> 1.0', :platforms => [:ruby_20, :ruby_21] | ||
end | ||
end if RUBY_VERSION.to_f <= 2.3 | ||
|
||
appraise 'rails_4_1' do | ||
gem 'rails', '~> 4.1.15' | ||
gem 'rack', '~> 1.0', :platforms => [:ruby_20, :ruby_21] | ||
end | ||
end if RUBY_VERSION.to_f <= 2.3 | ||
|
||
appraise 'rails_4_2' do | ||
gem 'rails', '~> 4.2.6' | ||
gem 'rack', '~> 1.0', :platforms => [:ruby_20, :ruby_21] | ||
end | ||
end if RUBY_VERSION.to_f <= 2.3 | ||
|
||
appraise 'rails_5_0' do | ||
gem 'rails', '~> 5.0.0' | ||
gem 'rails', '~> 5.0.2' | ||
# gem 'activerecord-jdbc-adapter', | ||
# :git => 'git://github.com/jruby/activerecord-jdbc-adapter.git', | ||
# :branch => 'rails-5', | ||
# :platform => :jruby, | ||
# :ref => 'c3570ce730' | ||
end if RUBY_VERSION.to_f >= 2.2 && RUBY_PLATFORM != 'java' | ||
|
||
appraise 'rails_5_1' do | ||
gem 'rails', '~> 5.1.0' | ||
end if RUBY_VERSION.to_f >= 2.2 && RUBY_PLATFORM != 'java' |
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
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,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "thinking_sphinx" | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# Pry.start | ||
|
||
require "irb" | ||
IRB.start(__FILE__) |
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,9 @@ | ||
if (ruby -e "exit RUBY_VERSION.to_f >= 2.4") | ||
then | ||
echo "Automatic frozen string literals are supported" | ||
gem install pragmater -v 4.0.0 | ||
pragmater --add lib --comments "# frozen_string_literal: true" --whitelist "**/*.rb" | ||
pragmater --add spec --comments "# frozen_string_literal: true" --whitelist "**/*.rb" | ||
else | ||
echo "Automatic frozen string literals are not supported." | ||
fi |
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,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
version=$1 | ||
name="sphinx-$version" | ||
url="http://sphinxsearch.com/files/$name-release.tar.gz" | ||
bucket="thinking-sphinx" | ||
directory="ext/sphinx" | ||
prefix="`pwd`/$directory" | ||
file="ext/$name.tar.gz" | ||
|
||
download_and_compile_source () { | ||
curl -O $url | ||
tar -zxf $name-release.tar.gz | ||
cd $name-release | ||
./configure --with-mysql --with-pgsql --enable-id64 --prefix=$prefix | ||
make | ||
make install | ||
cd .. | ||
rm -rf $name-release.tar.gz $name-release | ||
} | ||
|
||
load_cache () { | ||
aws s3 cp s3://$bucket/bincaches/$name.tar.gz $file | ||
tar -zxf $file | ||
} | ||
|
||
push_cache () { | ||
tar -czf $file $directory | ||
aws s3 cp $file s3://$bucket/bincaches/$name.tar.gz --acl public-read | ||
} | ||
|
||
if aws s3api head-object --bucket $bucket --key bincaches/$name.tar.gz | ||
then | ||
load_cache | ||
else | ||
download_and_compile_source | ||
push_cache | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.