Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitch Birti committed Mar 6, 2018
2 parents b9d4e63 + eb1ad99 commit d84b6cd
Show file tree
Hide file tree
Showing 54 changed files with 595 additions and 409 deletions.
50 changes: 21 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,40 @@ services:
jdk:
- oraclejdk8
rvm:
- 2.2.8
- 2.3.5
- 2.4.2
- 2.4.3
env:
global:
- TEST_CLUSTER_NODES=1
matrix:
- ES_VERSION=2.4.4
- ES_VERSION=5.6.2
- ES_VERSION=5.6.7
gemfile:
- gemfiles/rails.4.0.activerecord.gemfile
- gemfiles/rails.4.1.activerecord.gemfile
- gemfiles/rails.4.2.activerecord.gemfile
- gemfiles/rails.5.0.activerecord.gemfile
- gemfiles/rails.5.1.activerecord.gemfile
- gemfiles/rails.4.2.mongoid.5.1.gemfile
- gemfiles/rails.5.0.mongoid.6.0.gemfile
- gemfiles/rails.5.1.mongoid.6.1.gemfile
- gemfiles/rails.5.0.mongoid.6.1.gemfile
- gemfiles/rails.5.1.mongoid.6.3.gemfile
- gemfiles/sequel.4.45.gemfile
matrix:
exclude:
- rvm: 2.2.8
env: ES_VERSION=5.6.2
- rvm: 2.3.5
env: ES_VERSION=2.4.4
- gemfile: gemfiles/rails.4.0.activerecord.gemfile
env: ES_VERSION=5.6.2
- gemfile: gemfiles/rails.4.1.activerecord.gemfile
env: ES_VERSION=5.6.2
- gemfile: gemfiles/rails.4.2.mongoid.5.1.gemfile
env: ES_VERSION=5.6.2
- gemfile: gemfiles/rails.5.1.mongoid.6.0.gemfile
env: ES_VERSION=5.6.2
- rvm: 2.4.2
include:
- rvm: 2.2.9
gemfile: gemfiles/rails.4.0.activerecord.gemfile
- rvm: 2.4.2
env: ES_VERSION=2.4.6
- rvm: 2.2.9
gemfile: gemfiles/rails.4.1.activerecord.gemfile
env: ES_VERSION=2.4.6
- rvm: 2.3.6
gemfile: gemfiles/rails.4.2.activerecord.gemfile
env: ES_VERSION=2.4.6
- rvm: 2.3.6
gemfile: gemfiles/rails.4.2.mongoid.5.2.gemfile
env: ES_VERSION=2.4.6
- rvm: 2.5.0
gemfile: gemfiles/rails.5.2.activerecord.gemfile
env: ES_VERSION=5.6.7
before_install:
- curl -s https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.4/elasticsearch-2.4.4.tar.gz | tar xz -C /tmp
- curl -s https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.2.tar.gz | tar xz -C /tmp
- curl -s https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.6/elasticsearch-2.4.6.tar.gz | tar xz -C /tmp
- curl -s https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.7.tar.gz | tar xz -C /tmp
before_script:
- /tmp/elasticsearch-2.4.4/bin/plugin install delete-by-query
- /tmp/elasticsearch-2.4.6/bin/plugin install delete-by-query
- TEST_CLUSTER_COMMAND=/tmp/elasticsearch-$ES_VERSION/bin/elasticsearch TEST_CLUSTER_LOGS=/tmp/log rake es:start
script:
- bundle exec rspec
Expand Down
30 changes: 23 additions & 7 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,31 @@ end
gem 'aws-sdk-sqs', require: false
gem 'sidekiq', require: false

gem 'kaminari-core', '~> 1.0.0', require: false
gem 'kaminari-core', '~> 1.1.0', require: false
gem 'will_paginate', require: false

gem 'parallel', require: false
end
end

appraise 'rails.4.2.mongoid.5.1' do
gem 'mongoid', '~> 5.1.0'
appraise 'rails.5.2.activerecord' do
gem 'activerecord', '~> 5.2.0.rc1'
gem 'activesupport', '~> 5.2.0.rc1'

gem 'activejob', '~> 5.2.0.rc1'
gem 'resque', require: false
gem 'shoryuken', require: false
gem 'aws-sdk-sqs', require: false
gem 'sidekiq', require: false

gem 'kaminari-core', '~> 1.1.0', require: false
gem 'will_paginate', require: false

gem 'parallel', require: false
end

appraise 'rails.4.2.mongoid.5.2' do
gem 'mongoid', '~> 5.2.0'
gem 'activesupport', '~> 4.2.0'

gem 'activejob', '~> 4.2.0'
Expand All @@ -50,7 +66,7 @@ appraise 'rails.4.2.mongoid.5.1' do
gem 'parallel', require: false
end

{'5.0' => '6.0', '5.1' => '6.1'}.each do |activesupport, mongoid|
{'5.0' => '6.1', '5.1' => '6.3'}.each do |activesupport, mongoid|
appraise "rails.#{activesupport}.mongoid.#{mongoid}" do
gem 'mongoid', "~> #{mongoid}.0"
gem 'activesupport', "~> #{activesupport}.0"
Expand All @@ -61,7 +77,7 @@ end
gem 'aws-sdk-sqs', require: false
gem 'sidekiq', require: false

gem 'kaminari-core', '~> 1.0.0', require: false
gem 'kaminari-core', '~> 1.1.0', require: false
gem 'will_paginate', require: false

gem 'parallel', require: false
Expand All @@ -71,9 +87,9 @@ end
%w[4.45].each do |sequel|
appraise "sequel.#{sequel}" do
gem 'sequel', "~> #{sequel}.0"
gem 'activesupport', '~> 5.0.0'
gem 'activesupport', '~> 5.1.0'

gem 'kaminari-core', '~> 1.0.0', require: false
gem 'kaminari-core', '~> 1.1.0', require: false
gem 'will_paginate', require: false

gem 'parallel', require: false
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
# master

# Version 5.0.0

## Breaking changes

* Try to align the gem version with the ElasticSearch version we support

* `Chewy.default_field_type` is `text` now.

* `Chewy::Stash` was split onto two indexes - `Chewy::Stash::Specification` and `Chewy::Stash::Journal`

* Data for journal and specification is stored in binary fields base64-encoded to bypass the limits of other fields.

* Don't underscore suggested index name (@dm1try, #626)

## Changes

* `pipeline` import option support (@eManPrague, #598)

* Proper Rails check (@nattfodd, #625)

* Bypass strategy performance improvements (@DNNX, #623)

* Avoid index update calls for empty data (@robertasg, #620)

* Do not underscore suggested index name on `Chewy::Index.index_name` call.

* It is possible now to call `root` method several times inside a single type definition, the options will be merged. Also, the block isn't required anymore.

* Fixed some Sequel deprecation warnings (@arturtr - #565, @matchbookmac - #577)

## Bugfixes

* Fixed index settings logic error (@yahooguntu, #593)

* Missed check in higlight method (@heartfulbird, #567)

# Version 0.10.1

## Changes
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ If you would like to use AWS's ElasticSearch using an IAM user policy, you will
define_type User.active.includes(:country, :badges, :projects) do
root date_detection: false do
template 'about_translations.*', type: 'string', analyzer: 'standard'
template 'about_translations.*', type: 'text', analyzer: 'standard'
field :first_name, :last_name
field :email, analyzer: 'email'
Expand Down Expand Up @@ -335,7 +335,7 @@ This will automatically set the type or root field to `object`. You may also spe
To define a multi field you have to specify any type except for `object` or `nested` in the root field:

```ruby
field :full_name, type: 'string', value: ->{ full_name.strip } do
field :full_name, type: 'text', value: ->{ full_name.strip } do
field :ordered, analyzer: 'ordered'
field :untouched, index: 'not_analyzed'
end
Expand Down Expand Up @@ -986,9 +986,9 @@ rake chewy:reset[-users,places] # resets every index in the application except s
Performs reset exactly the same way as `chewy:reset` does, but only when the index specification (setting or mapping) was changed.
It works only when index specification is locked in `Chewy::Stash` index. The first run will reset all indexes and lock their specifications.
It works only when index specification is locked in `Chewy::Stash::Specification` index. The first run will reset all indexes and lock their specifications.
See [Chewy::Stash](lib/chewy/stash.rb) and [Chewy::Index::Specification](lib/chewy/index/specification.rb) for more details.
See [Chewy::Stash::Specification](lib/chewy/stash.rb) and [Chewy::Index::Specification](lib/chewy/index/specification.rb) for more details.
```bash
Expand Down
12 changes: 6 additions & 6 deletions chewy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ Gem::Specification.new do |spec| # rubocop:disable BlockLength
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_development_dependency 'rake'
spec.add_development_dependency 'appraisal'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rspec-its'
spec.add_development_dependency 'rspec-collection_matchers'
spec.add_development_dependency 'sqlite3'
spec.add_development_dependency 'database_cleaner'
spec.add_development_dependency 'elasticsearch-extensions'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'resque_spec'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rspec-collection_matchers'
spec.add_development_dependency 'rspec-its'
spec.add_development_dependency 'rubocop', '0.52.1'
spec.add_development_dependency 'sqlite3'
spec.add_development_dependency 'timecop'
spec.add_development_dependency 'rubocop', '0.50.0'

spec.add_development_dependency 'method_source'
spec.add_development_dependency 'unparser'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "mongoid", "~> 5.1.0"
gem "mongoid", "~> 5.2.0"
gem "activesupport", "~> 4.2.0"
gem "activejob", "~> 4.2.0"
gem "resque", require: false
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails.5.0.activerecord.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem "resque", require: false
gem "shoryuken", require: false
gem "aws-sdk-sqs", require: false
gem "sidekiq", require: false
gem "kaminari-core", "~> 1.0.0", require: false
gem "kaminari-core", "~> 1.1.0", require: false
gem "will_paginate", require: false
gem "parallel", require: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

source "https://rubygems.org"

gem "mongoid", "~> 6.0.0"
gem "mongoid", "~> 6.1.0"
gem "activesupport", "~> 5.0.0"
gem "activejob", "~> 5.0.0"
gem "resque", require: false
gem "shoryuken", require: false
gem "aws-sdk-sqs", require: false
gem "sidekiq", require: false
gem "kaminari-core", "~> 1.0.0", require: false
gem "kaminari-core", "~> 1.1.0", require: false
gem "will_paginate", require: false
gem "parallel", require: false

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails.5.1.activerecord.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem "resque", require: false
gem "shoryuken", require: false
gem "aws-sdk-sqs", require: false
gem "sidekiq", require: false
gem "kaminari-core", "~> 1.0.0", require: false
gem "kaminari-core", "~> 1.1.0", require: false
gem "will_paginate", require: false
gem "parallel", require: false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

source "https://rubygems.org"

gem "mongoid", "~> 6.1.0"
gem "mongoid", "~> 6.3.0"
gem "activesupport", "~> 5.1.0"
gem "activejob", "~> 5.1.0"
gem "resque", require: false
gem "shoryuken", require: false
gem "aws-sdk-sqs", require: false
gem "sidekiq", require: false
gem "kaminari-core", "~> 1.0.0", require: false
gem "kaminari-core", "~> 1.1.0", require: false
gem "will_paginate", require: false
gem "parallel", require: false

Expand Down
16 changes: 16 additions & 0 deletions gemfiles/rails.5.2.activerecord.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord", "~> 5.2.0.rc1"
gem "activesupport", "~> 5.2.0.rc1"
gem "activejob", "~> 5.2.0.rc1"
gem "resque", require: false
gem "shoryuken", require: false
gem "aws-sdk-sqs", require: false
gem "sidekiq", require: false
gem "kaminari-core", "~> 1.1.0", require: false
gem "will_paginate", require: false
gem "parallel", require: false

gemspec path: "../"
4 changes: 2 additions & 2 deletions gemfiles/sequel.4.45.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
source "https://rubygems.org"

gem "sequel", "~> 4.45.0"
gem "activesupport", "~> 5.0.0"
gem "kaminari-core", "~> 1.0.0", require: false
gem "activesupport", "~> 5.1.0"
gem "kaminari-core", "~> 1.1.0", require: false
gem "will_paginate", require: false
gem "parallel", require: false

Expand Down
1 change: 1 addition & 0 deletions lib/chewy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
require 'i18n/core_ext/hash'
require 'chewy/backports/deep_dup' unless Object.respond_to?(:deep_dup)
require 'singleton'
require 'base64'

require 'elasticsearch'

Expand Down
Loading

0 comments on commit d84b6cd

Please sign in to comment.