riddle 2.3.2 → 2.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a860b9ec8b23910ccc19ccb24c1e6b5e23e0d5a23522b51399a915859dbe5f5b
4
- data.tar.gz: 4c3f3b27ff3246cfbbf9dcfc75af8e25370ffdc15c6543eda64b2e3b45ea2c76
3
+ metadata.gz: f2f66eb6b310f5bee941d0677b0de214a1e6b26ea8b2aa2d5937091e39657125
4
+ data.tar.gz: 85b8280f963abffe8c6062509f1ff6021e74ea5e7b556f18cb63bf1dcb275005
5
5
  SHA512:
6
- metadata.gz: ab43f391a4086352d1e84a3c440d56cf51937f2726139da12bf7119ed783554c0e9da79762724e1d256eb969f6102ed9bb84f52385c3ecd3ace7ce20a11e5504
7
- data.tar.gz: 00dfaef9019672f5f26ec1efa985c4c257048b7e6a5cb9c59e246bdddca1a35ed30d11dca21ac031c74a9c84f1c98ecf8710a9ed484d823fca97e41aba1db082
6
+ metadata.gz: 2f5abe88c5b14a2224df75eb154d2c28faae75c8a28ecdafc2dc20c40cd31635132bb786477d407e2ffbc048cc8652ff6a7291ed46673a8a13b436c4f317abdd
7
+ data.tar.gz: 9a4b1d26d087d0167ea7c17ef703e71ed59f0148195a7579e18e3f15b5948226e6bc062dbf403d6d4346c6a19e98e84939f840f164be56af8a00c7437f04b0c5
@@ -1,31 +1,30 @@
1
1
  language: ruby
2
+ dist: xenial
2
3
  rvm:
3
- - 2.2.9
4
- - 2.3.6
5
- - 2.4.3
6
- - 2.5.0
7
- - jruby-9.1.14.0
4
+ - 2.3.8
5
+ - 2.4.6
6
+ - 2.5.5
7
+ - 2.6.3
8
+ - jruby-9.2.7.0
8
9
  env:
9
- global:
10
- - SPHINX_BIN=ext/sphinx/bin/
11
- - secure: aP3wCZnnqim/yBWbO8+N2DAJIDVuqewUayK3nBphR/Jt1POIMbqCIuHwk/SG/JfMc6pJIlH0QOX8wI3fF3y5GO6aIrN8xKAX0DoDm+Gkvk/YEk3cK/2fJUwvocR89M99EoV8ctLPaR03B3dm3h2Dh2oe8NQRBfcrL3WtiHHq3d0=
12
10
  matrix:
13
- - SPHINX_VERSION=2.0.10 SPHINX_ENGINE=sphinx
14
11
  - SPHINX_VERSION=2.1.9 SPHINX_ENGINE=sphinx
15
12
  - SPHINX_VERSION=2.2.11 SPHINX_ENGINE=sphinx
16
- - SPHINX_VERSION=3.0.2 SPHINX_ENGINE=sphinx
17
- - SPHINX_VERSION=2.6.3 SPHINX_ENGINE=manticore
13
+ - SPHINX_VERSION=3.0.3 SPHINX_ENGINE=sphinx
14
+ - SPHINX_VERSION=3.1.1 SPHINX_ENGINE=sphinx
15
+ - SPHINX_VERSION=2.6.4 SPHINX_ENGINE=manticore
16
+ - SPHINX_VERSION=2.7.5 SPHINX_ENGINE=manticore
17
+ - SPHINX_VERSION=2.8.2 SPHINX_ENGINE=manticore
18
18
  before_script:
19
19
  - killall searchd; echo ''
20
20
  - "./bin/loadsphinx $SPHINX_VERSION $SPHINX_ENGINE"
21
21
  addons:
22
22
  apt:
23
23
  packages:
24
- - cmake
25
- - bison
26
- - flex
24
+ - libodbc1
25
+ services:
26
+ - mysql
27
27
  before_install:
28
- - pip install --upgrade --user awscli
29
28
  - gem update --system
30
29
  after_script:
31
30
  - killall searchd; echo ''
data/Gemfile CHANGED
@@ -4,5 +4,5 @@ source 'http://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'mysql2', '0.5.0', :platform => :ruby
8
- gem 'jdbc-mysql', '5.1.35', :platform => :jruby
7
+ gem 'mysql2', '~> 0.5.2', :platform => :ruby
8
+ gem 'jdbc-mysql', '~> 5.1.47', :platform => :jruby
data/HISTORY CHANGED
@@ -1,3 +1,10 @@
1
+ 2.4.0 - July 28th 2019
2
+ - Escape slashes and single quotes for attribute and field values in INSERT/REPLACE statements, rather than removing them (#103).
3
+ - Remove support for Sphinx 2.0.
4
+ - Add Manticore 2.7 and 2.8.
5
+ - Test suite improvements.
6
+ - Gemspec improvements (Olle Jonsson #105)
7
+
1
8
  2.3.2 - September 23rd 2018
2
9
  - Fix attempt to modify a frozen string when generating configuration.
3
10
  - Test against Manticore 2.6.3.
@@ -14,7 +14,7 @@ Riddle is available as a gem, so you can install it directly:
14
14
 
15
15
  Or include it in a Gemfile:
16
16
 
17
- gem 'riddle', '~> 2.3.2'
17
+ gem 'riddle', '~> 2.4'
18
18
 
19
19
  ## Usage
20
20
 
@@ -2,65 +2,67 @@
2
2
 
3
3
  version=$1
4
4
  engine=$2
5
- name="$engine-$version"
6
- bucket="thinking-sphinx"
7
- directory="ext/sphinx"
8
- prefix="`pwd`/$directory"
9
- file="ext/$name.tar.gz"
10
5
 
11
- if [ "$engine" == "sphinx" ]; then
12
- url="http://sphinxsearch.com/files/$name-release.tar.gz"
13
- else
14
- url="https://github.com/manticoresoftware/manticore.git"
15
- fi
6
+ set -e
16
7
 
17
- download_and_compile_source () {
18
- if [ "$engine" == "sphinx" ]; then
19
- download_and_compile_sphinx
20
- else
21
- download_and_compile_manticore
8
+ load_sphinx () {
9
+ distro="xenial"
10
+
11
+ case $version in
12
+ 2.1.9)
13
+ url="http://sphinxsearch.com/files/sphinxsearch_2.1.9-release-0ubuntu11~trusty_amd64.deb"
14
+ format="deb"
15
+ distro="trusty";;
16
+ 2.2.11)
17
+ url="http://sphinxsearch.com/files/sphinxsearch_2.2.11-release-1~xenial_amd64.deb"
18
+ format="deb";;
19
+ 3.0.3)
20
+ url="http://sphinxsearch.com/files/sphinx-3.0.3-facc3fb-linux-amd64.tar.gz"
21
+ format="gz";;
22
+ 3.1.1)
23
+ url="http://sphinxsearch.com/files/sphinx-3.1.1-612d99f-linux-amd64.tar.gz"
24
+ format="gz";;
25
+ *)
26
+ echo "No Sphinx version $version available"
27
+ exit 1;;
28
+ esac
29
+
30
+ if [ "$distro" == "trusty" ]; then
31
+ curl --location http://launchpadlibrarian.net/247512886/libmysqlclient18_5.6.28-1ubuntu3_amd64.deb -o libmysql.deb
32
+ sudo apt-get install ./libmysql.deb
22
33
  fi
23
- }
24
34
 
25
- download_and_compile_sphinx () {
26
- curl -O $url
27
- tar -zxf $name-release.tar.gz
28
- cd $name-release
29
- ./configure --with-mysql --with-pgsql --enable-id64 --prefix=$prefix
30
- make
31
- make install
32
- cd ..
33
- rm -rf $name-release.tar.gz $name-release
35
+ if [ "$format" == "deb" ]; then
36
+ curl --location $url -o sphinx.deb
37
+ sudo apt-get install ./sphinx.deb
38
+ else
39
+ curl $url -o sphinx.tar.gz
40
+ tar -zxvf sphinx.tar.gz
41
+ sudo mv sphinx-$version/bin/* /usr/local/bin/.
42
+ fi
34
43
  }
35
44
 
36
- download_and_compile_manticore () {
37
- git clone $url $engine
38
- cd $engine
39
- git checkout $version
40
- mkdir build
41
- cd build
42
- cmake -D WITH_MYSQL=TRUE -D WITH_PGSQL=TRUE -D DISABLE_TESTING=TRUE -D CMAKE_INSTALL_PREFIX=$prefix ..
43
- make -j4
44
- make install
45
- cd ../..
46
- rm -rf $engine
47
- }
45
+ load_manticore () {
46
+ url="https://github.com/manticoresoftware/manticore/releases/download/$version/manticore_$version.deb"
48
47
 
49
- load_cache () {
50
- mkdir ext
51
- curl -o $file http://$bucket.s3.amazonaws.com/bincaches/$name.tar.gz
52
- tar -zxf $file
53
- }
48
+ case $version in
49
+ 2.6.4)
50
+ url="https://github.com/manticoresoftware/manticoresearch/releases/download/2.6.4/manticore_2.6.4-180503-37308c3-release-stemmer.xenial_amd64-bin.deb";;
51
+ 2.7.5)
52
+ url="https://github.com/manticoresoftware/manticoresearch/releases/download/2.7.5/manticore_2.7.5-181204-4a31c54-release-stemmer.xenial_amd64-bin.deb";;
53
+ 2.8.2)
54
+ url="https://github.com/manticoresoftware/manticoresearch/releases/download/2.8.2/manticore_2.8.2-190402-4e81114-release-stemmer.xenial_amd64-bin.deb";;
55
+ *)
56
+ echo "No Manticore version $version available"
57
+ exit 1;;
58
+ esac
54
59
 
55
- push_cache () {
56
- tar -czf $file $directory
57
- aws s3 cp $file s3://$bucket/bincaches/$name.tar.gz --acl public-read
60
+ curl --location $url -o manticore.deb
61
+ sudo apt-get install ./manticore.deb
58
62
  }
59
63
 
60
- if curl -i --head --fail http://$bucket.s3.amazonaws.com/bincaches/$name.tar.gz
61
- then
62
- load_cache
64
+ if [ "$engine" == "sphinx" ]; then
65
+ load_sphinx
63
66
  else
64
- download_and_compile_source
65
- push_cache
67
+ load_manticore
66
68
  fi
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'date'
3
4
  require 'thread'
4
5
  require 'socket'
5
6
  require 'stringio'
@@ -29,7 +29,6 @@ class Riddle::Query::Insert
29
29
  columns.collect { |column|
30
30
  column.to_s == 'id' ? 'id' : "`#{column}`"
31
31
  }.join(', ')
32
-
33
32
  end
34
33
 
35
34
  def values_to_s
@@ -43,7 +42,7 @@ class Riddle::Query::Insert
43
42
  def translated_value(value)
44
43
  case value
45
44
  when String
46
- "'#{value.gsub(/['\\]/, '').gsub(/\s+/, ' ')}'"
45
+ "'#{Riddle::Query.sql_escape(value).gsub(/\s+/, ' ')}'"
47
46
  when TrueClass, FalseClass
48
47
  value ? 1 : 0
49
48
  when Time
@@ -5,7 +5,7 @@ $:.push File.expand_path('../lib', __FILE__)
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'riddle'
8
- s.version = '2.3.2'
8
+ s.version = '2.4.0'
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ['Pat Allan']
11
11
  s.email = ['pat@freelancing-gods.com']
@@ -14,8 +14,6 @@ Gem::Specification.new do |s|
14
14
  s.description = %q{A Ruby API and configuration helper for the Sphinx search service.}
15
15
  s.license = 'MIT'
16
16
 
17
- s.rubyforge_project = 'riddle'
18
-
19
17
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
18
  s.require_paths = ['lib']
21
19
 
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.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-23 00:00:00.000000000 Z
11
+ date: 2019-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -127,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  requirements: []
130
- rubyforge_project: riddle
131
- rubygems_version: 2.7.6
130
+ rubygems_version: 3.0.4
132
131
  signing_key:
133
132
  specification_version: 4
134
133
  summary: An API for Sphinx, written in and for Ruby.