riddle 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -8
- data/Gemfile +2 -10
- data/HISTORY +3 -0
- data/README.markdown +1 -1
- data/Rakefile +2 -0
- data/bin/loadsphinx +39 -0
- data/lib/riddle.rb +2 -0
- data/lib/riddle/0.9.8.rb +2 -0
- data/lib/riddle/0.9.9.rb +2 -0
- data/lib/riddle/0.9.9/client.rb +2 -0
- data/lib/riddle/0.9.9/client/filter.rb +2 -0
- data/lib/riddle/0.9.9/configuration/searchd.rb +2 -0
- data/lib/riddle/1.10.rb +2 -0
- data/lib/riddle/1.10/client.rb +2 -0
- data/lib/riddle/2.0.1.rb +2 -0
- data/lib/riddle/2.0.1/client.rb +2 -0
- data/lib/riddle/2.1.0.rb +2 -0
- data/lib/riddle/auto_version.rb +2 -0
- data/lib/riddle/client.rb +2 -0
- data/lib/riddle/client/filter.rb +2 -0
- data/lib/riddle/client/message.rb +2 -0
- data/lib/riddle/client/response.rb +2 -0
- data/lib/riddle/command_failed_error.rb +2 -0
- data/lib/riddle/command_result.rb +2 -0
- data/lib/riddle/configuration.rb +2 -0
- data/lib/riddle/configuration/common.rb +2 -0
- data/lib/riddle/configuration/distributed_index.rb +2 -0
- data/lib/riddle/configuration/index.rb +2 -0
- data/lib/riddle/configuration/index_settings.rb +2 -0
- data/lib/riddle/configuration/indexer.rb +2 -0
- data/lib/riddle/configuration/parser.rb +1 -0
- data/lib/riddle/configuration/realtime_index.rb +2 -0
- data/lib/riddle/configuration/remote_index.rb +2 -0
- data/lib/riddle/configuration/searchd.rb +2 -0
- data/lib/riddle/configuration/section.rb +2 -0
- data/lib/riddle/configuration/source.rb +2 -0
- data/lib/riddle/configuration/sql_source.rb +2 -0
- data/lib/riddle/configuration/template_index.rb +2 -0
- data/lib/riddle/configuration/tsv_source.rb +2 -0
- data/lib/riddle/configuration/xml_source.rb +2 -0
- data/lib/riddle/controller.rb +2 -0
- data/lib/riddle/execute_command.rb +2 -0
- data/lib/riddle/query.rb +4 -1
- data/lib/riddle/query/delete.rb +2 -0
- data/lib/riddle/query/insert.rb +2 -0
- data/lib/riddle/query/select.rb +2 -0
- data/riddle.gemspec +3 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8a66c7b7cd5135ff4cd51a4d22fb0221bf811cf
|
4
|
+
data.tar.gz: b972aa2c33a99d6ac336e70ce8fd79977ee02953
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7fcc99152ccaaaa7f0b16428b818c18b6d2dfa74bc5bd588c4c348d2360b342768e45b7090b47b686f62c691800f62dd64afd993f6d563e3377fbbedb451644
|
7
|
+
data.tar.gz: 63435a5f30519f6acdeed8b8ef5f1b3baa57a25fc49e76e63074cc69db2f05037e0bc211dda0e13b2e1570e81dab1dad9c07ba9fe1dce2f728998bf74598ac27
|
data/.travis.yml
CHANGED
@@ -1,16 +1,22 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
- 2.2.8
|
4
|
+
- 2.3.5
|
5
|
+
- 2.4.2
|
6
|
+
- jruby-9.1.14.0
|
7
7
|
env:
|
8
|
-
|
9
|
-
- SPHINX_BIN
|
10
|
-
-
|
8
|
+
global:
|
9
|
+
- SPHINX_BIN=ext/sphinx/bin/
|
10
|
+
- secure: aP3wCZnnqim/yBWbO8+N2DAJIDVuqewUayK3nBphR/Jt1POIMbqCIuHwk/SG/JfMc6pJIlH0QOX8wI3fF3y5GO6aIrN8xKAX0DoDm+Gkvk/YEk3cK/2fJUwvocR89M99EoV8ctLPaR03B3dm3h2Dh2oe8NQRBfcrL3WtiHHq3d0=
|
11
|
+
matrix:
|
12
|
+
- SPHINX_VERSION=2.0.10
|
13
|
+
- SPHINX_VERSION=2.1.9
|
14
|
+
- SPHINX_VERSION=2.2.6
|
11
15
|
before_script:
|
12
16
|
- killall searchd; echo ''
|
13
|
-
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal";
|
17
|
+
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal";
|
18
|
+
fi; echo $RUBYOPT
|
19
|
+
- "./bin/loadsphinx $SPHINX_VERSION"
|
14
20
|
after_script:
|
15
21
|
- killall searchd; echo ''
|
16
22
|
sudo: false
|
data/Gemfile
CHANGED
@@ -1,16 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'http://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
7
|
gem 'mysql2', '0.3.20', :platform => :ruby
|
6
8
|
gem 'jdbc-mysql', '5.1.35', :platform => :jruby
|
7
|
-
|
8
|
-
%w[
|
9
|
-
rspec
|
10
|
-
rspec-core
|
11
|
-
rspec-expectations
|
12
|
-
rspec-mocks
|
13
|
-
rspec-support
|
14
|
-
].each do |library|
|
15
|
-
gem library, :git => "https://github.com/rspec/#{library}.git"
|
16
|
-
end
|
data/HISTORY
CHANGED
data/README.markdown
CHANGED
data/Rakefile
CHANGED
data/bin/loadsphinx
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
version=$1
|
4
|
+
name="sphinx-$version"
|
5
|
+
url="http://sphinxsearch.com/files/$name-release.tar.gz"
|
6
|
+
bucket="thinking-sphinx"
|
7
|
+
directory="ext/sphinx"
|
8
|
+
prefix="`pwd`/$directory"
|
9
|
+
file="ext/$name.tar.gz"
|
10
|
+
|
11
|
+
download_and_compile_source () {
|
12
|
+
curl -O $url
|
13
|
+
tar -zxf $name-release.tar.gz
|
14
|
+
cd $name-release
|
15
|
+
./configure --with-mysql --with-pgsql --enable-id64 --prefix=$prefix
|
16
|
+
make
|
17
|
+
make install
|
18
|
+
cd ..
|
19
|
+
rm -rf $name-release.tar.gz $name-release
|
20
|
+
}
|
21
|
+
|
22
|
+
load_cache () {
|
23
|
+
mkdir ext
|
24
|
+
curl -o $file http://$bucket.s3.amazonaws.com/bincaches/$name.tar.gz
|
25
|
+
tar -zxf $file
|
26
|
+
}
|
27
|
+
|
28
|
+
push_cache () {
|
29
|
+
tar -czf $file $directory
|
30
|
+
aws s3 cp $file s3://$bucket/bincaches/$name.tar.gz --acl public-read
|
31
|
+
}
|
32
|
+
|
33
|
+
if curl -i --head --fail http://$bucket.s3.amazonaws.com/bincaches/$name.tar.gz
|
34
|
+
then
|
35
|
+
load_cache
|
36
|
+
else
|
37
|
+
download_and_compile_source
|
38
|
+
push_cache
|
39
|
+
fi
|
data/lib/riddle.rb
CHANGED
data/lib/riddle/0.9.8.rb
CHANGED
data/lib/riddle/0.9.9.rb
CHANGED
data/lib/riddle/0.9.9/client.rb
CHANGED
data/lib/riddle/1.10.rb
CHANGED
data/lib/riddle/1.10/client.rb
CHANGED
data/lib/riddle/2.0.1.rb
CHANGED
data/lib/riddle/2.0.1/client.rb
CHANGED
data/lib/riddle/2.1.0.rb
CHANGED
data/lib/riddle/auto_version.rb
CHANGED
data/lib/riddle/client.rb
CHANGED
data/lib/riddle/client/filter.rb
CHANGED
data/lib/riddle/configuration.rb
CHANGED
data/lib/riddle/controller.rb
CHANGED
data/lib/riddle/query.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Riddle::Query
|
2
4
|
ESCAPE_CHARACTERS = /[\(\)\|\-!@~\/"\/\^\$\\><&=\?]/
|
3
5
|
# http://sphinxsearch.com/docs/current/extended-syntax.html
|
4
6
|
ESCAPE_WORDS = /\b(?:MAYBE|NEAR|PARAGRAPH|SENTENCE|ZONE|ZONESPAN)\b/
|
7
|
+
MYSQL2_ESCAPE = defined?(Mysql2) && defined?(Mysql::Client)
|
5
8
|
|
6
9
|
def self.connection(address = '127.0.0.1', port = 9312)
|
7
10
|
require 'mysql2'
|
@@ -112,7 +115,7 @@ module Riddle::Query
|
|
112
115
|
end
|
113
116
|
|
114
117
|
def self.sql_escape(string)
|
115
|
-
return Mysql2::Client.escape(string) if
|
118
|
+
return Mysql2::Client.escape(string) if MYSQL2_ESCAPE
|
116
119
|
|
117
120
|
string.gsub(/['"\\]/) { |character| "\\#{character}" }
|
118
121
|
end
|
data/lib/riddle/query/delete.rb
CHANGED
data/lib/riddle/query/insert.rb
CHANGED
data/lib/riddle/query/select.rb
CHANGED
data/riddle.gemspec
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# -*- encoding: utf-8 -*-
|
2
4
|
$:.push File.expand_path('../lib', __FILE__)
|
3
5
|
|
4
6
|
Gem::Specification.new do |s|
|
5
7
|
s.name = 'riddle'
|
6
|
-
s.version = '2.2.
|
8
|
+
s.version = '2.2.1'
|
7
9
|
s.platform = Gem::Platform::RUBY
|
8
10
|
s.authors = ['Pat Allan']
|
9
11
|
s.email = ['pat@freelancing-gods.com']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pat Allan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- LICENCE
|
67
67
|
- README.markdown
|
68
68
|
- Rakefile
|
69
|
+
- bin/loadsphinx
|
69
70
|
- lib/riddle.rb
|
70
71
|
- lib/riddle/0.9.8.rb
|
71
72
|
- lib/riddle/0.9.9.rb
|
@@ -127,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
128
|
version: '0'
|
128
129
|
requirements: []
|
129
130
|
rubyforge_project: riddle
|
130
|
-
rubygems_version: 2.6.
|
131
|
+
rubygems_version: 2.6.13
|
131
132
|
signing_key:
|
132
133
|
specification_version: 4
|
133
134
|
summary: An API for Sphinx, written in and for Ruby.
|