elasticsearch-rails 0.1.9 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -10
- data/Rakefile +4 -11
- data/elasticsearch-rails.gemspec +6 -9
- data/lib/elasticsearch/rails/version.rb +1 -1
- metadata +22 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 460140b9ca9e72f6ac482371715fdd9ca2e3509c
|
4
|
+
data.tar.gz: f49d5406e5b165f0f4a438740a0df23aac6e5ce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 831d09153372874f5bc79e7fb975fbb5777d7719c00f3f54ddc4ce72f3103b160c3af05c4b3668ebf7ea5cada45c5349c77145599ba919add435a3311d49dc0c
|
7
|
+
data.tar.gz: 545a75481001b56b7623b0903c8cc6f0650ca267d3faf5588cbe2ba547d2f42783354ad0508d9e54f79d163731a8de63a0eb4ef122f11ebd80ddd6fd7c965486
|
data/README.md
CHANGED
@@ -1,10 +1,22 @@
|
|
1
1
|
# Elasticsearch::Rails
|
2
2
|
|
3
3
|
The `elasticsearch-rails` library is a companion for the
|
4
|
-
the [`elasticsearch-model`](https://github.com/
|
4
|
+
the [`elasticsearch-model`](https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model)
|
5
5
|
library, providing features suitable for Ruby on Rails applications.
|
6
6
|
|
7
|
-
|
7
|
+
## Compatibility
|
8
|
+
|
9
|
+
This library is compatible with Ruby 1.9.3 and higher.
|
10
|
+
|
11
|
+
The library version numbers follow the Elasticsearch major versions, and the `master` branch
|
12
|
+
is compatible with the Elasticsearch `master` branch, therefore, with the next major version.
|
13
|
+
|
14
|
+
| Rubygem | | Elasticsearch |
|
15
|
+
|:-------------:|:-:| :-----------: |
|
16
|
+
| 0.1 | → | 1.x |
|
17
|
+
| 2.x | → | 2.x |
|
18
|
+
| 5.x | → | 5.x |
|
19
|
+
| master | → | master |
|
8
20
|
|
9
21
|
## Installation
|
10
22
|
|
@@ -14,11 +26,11 @@ Install the package from [Rubygems](https://rubygems.org):
|
|
14
26
|
|
15
27
|
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://bundler.io):
|
16
28
|
|
17
|
-
gem 'elasticsearch-rails', git: 'git://github.com/
|
29
|
+
gem 'elasticsearch-rails', git: 'git://github.com/elastic/elasticsearch-rails.git', branch: '5.x'
|
18
30
|
|
19
31
|
or install it from a source code checkout:
|
20
32
|
|
21
|
-
git clone https://github.com/
|
33
|
+
git clone https://github.com/elastic/elasticsearch-rails.git
|
22
34
|
cd elasticsearch-rails/elasticsearch-rails
|
23
35
|
bundle install
|
24
36
|
rake install
|
@@ -87,22 +99,22 @@ You should see the duration of the request to Elasticsearch as part of each log
|
|
87
99
|
You can generate a fully working example Ruby on Rails application, with an `Article` model and a search form,
|
88
100
|
to play with (it even downloads _Elasticsearch_ itself, generates the application skeleton and leaves you with
|
89
101
|
a _Git_ repository to explore the steps and the code) with the
|
90
|
-
[`01-basic.rb`](https://github.com/
|
102
|
+
[`01-basic.rb`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/01-basic.rb) template:
|
91
103
|
|
92
104
|
```bash
|
93
|
-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/
|
105
|
+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb
|
94
106
|
```
|
95
107
|
|
96
108
|
Run the same command again, in the same folder, with the
|
97
|
-
[`02-pretty`](https://github.com/
|
109
|
+
[`02-pretty`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb)
|
98
110
|
template to add features such as a custom `Article.search` method, result highlighting and
|
99
111
|
[_Bootstrap_](http://getbootstrap.com) integration:
|
100
112
|
|
101
113
|
```bash
|
102
|
-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/
|
114
|
+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/02-pretty.rb
|
103
115
|
```
|
104
116
|
|
105
|
-
Run the same command with the [`03-expert.rb`](https://github.com/
|
117
|
+
Run the same command with the [`03-expert.rb`](https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/rails/templates/03-expert.rb)
|
106
118
|
template to refactor the application into a more complex use case,
|
107
119
|
with couple of hundreds of The New York Times articles as the example content.
|
108
120
|
The template will extract the Elasticsearch integration into a `Searchable` "concern" module,
|
@@ -110,7 +122,7 @@ define complex mapping, custom serialization, implement faceted navigation and s
|
|
110
122
|
a complex query, and add a _Sidekiq_-based worker for updating the index in the background.
|
111
123
|
|
112
124
|
```bash
|
113
|
-
rails new searchapp --skip --skip-bundle --template https://raw.github.com/
|
125
|
+
rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-expert.rb
|
114
126
|
```
|
115
127
|
|
116
128
|
## License
|
data/Rakefile
CHANGED
@@ -8,28 +8,21 @@ task :test => 'test:unit'
|
|
8
8
|
|
9
9
|
require 'rake/testtask'
|
10
10
|
namespace :test do
|
11
|
-
task :ci_reporter do
|
12
|
-
ENV['CI_REPORTS'] ||= 'tmp/reports'
|
13
|
-
require 'ci/reporter/rake/minitest'
|
14
|
-
Rake::Task['ci:setup:minitest'].invoke
|
15
|
-
end
|
16
|
-
|
17
11
|
Rake::TestTask.new(:unit) do |test|
|
18
|
-
Rake::Task['test:ci_reporter'].invoke if ENV['CI']
|
19
12
|
test.libs << 'lib' << 'test'
|
20
13
|
test.test_files = FileList["test/unit/**/*_test.rb"]
|
21
|
-
|
22
|
-
|
14
|
+
test.verbose = false
|
15
|
+
test.warning = false
|
23
16
|
end
|
24
17
|
|
25
18
|
Rake::TestTask.new(:integration) do |test|
|
26
|
-
Rake::Task['test:ci_reporter'].invoke if ENV['CI']
|
27
19
|
test.libs << 'lib' << 'test'
|
28
20
|
test.test_files = FileList["test/integration/**/*_test.rb"]
|
21
|
+
test.verbose = false
|
22
|
+
test.warning = false
|
29
23
|
end
|
30
24
|
|
31
25
|
Rake::TestTask.new(:all) do |test|
|
32
|
-
Rake::Task['test:ci_reporter'].invoke if ENV['CI']
|
33
26
|
test.libs << 'lib' << 'test'
|
34
27
|
test.test_files = FileList["test/unit/**/*_test.rb", "test/integration/**/*_test.rb"]
|
35
28
|
end
|
data/elasticsearch-rails.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.required_ruby_version = ">= 1.9.3"
|
25
25
|
|
26
26
|
s.add_development_dependency "bundler", "~> 1.3"
|
27
|
-
s.add_development_dependency "rake", "
|
27
|
+
s.add_development_dependency "rake", "~> 11.1"
|
28
28
|
|
29
29
|
s.add_development_dependency "elasticsearch-extensions"
|
30
30
|
s.add_development_dependency "elasticsearch-model"
|
@@ -34,19 +34,16 @@ Gem::Specification.new do |s|
|
|
34
34
|
|
35
35
|
s.add_development_dependency "lograge"
|
36
36
|
|
37
|
-
s.add_development_dependency "minitest"
|
38
|
-
s.add_development_dependency "test-unit"
|
37
|
+
s.add_development_dependency "minitest"
|
38
|
+
s.add_development_dependency "test-unit"
|
39
39
|
s.add_development_dependency "shoulda-context"
|
40
40
|
s.add_development_dependency "mocha"
|
41
41
|
s.add_development_dependency "turn"
|
42
42
|
s.add_development_dependency "yard"
|
43
43
|
s.add_development_dependency "ruby-prof"
|
44
44
|
s.add_development_dependency "pry"
|
45
|
-
s.add_development_dependency "ci_reporter", "~> 1.9"
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
s.add_development_dependency "require-prof"
|
51
|
-
end
|
46
|
+
s.add_development_dependency "simplecov"
|
47
|
+
s.add_development_dependency "cane"
|
48
|
+
s.add_development_dependency "require-prof"
|
52
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '11.
|
33
|
+
version: '11.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '11.
|
40
|
+
version: '11.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: elasticsearch-extensions
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,18 +112,18 @@ dependencies:
|
|
112
112
|
name: minitest
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: test-unit
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: shoulda-context
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: mocha
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: turn
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: yard
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
@@ -193,7 +193,7 @@ dependencies:
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
196
|
+
name: ruby-prof
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
@@ -207,19 +207,19 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: pry
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - "
|
213
|
+
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
215
|
+
version: '0'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- - "
|
220
|
+
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
222
|
+
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: simplecov
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -327,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
327
327
|
version: '0'
|
328
328
|
requirements: []
|
329
329
|
rubyforge_project:
|
330
|
-
rubygems_version: 2.
|
330
|
+
rubygems_version: 2.6.10
|
331
331
|
signing_key:
|
332
332
|
specification_version: 4
|
333
333
|
summary: Ruby on Rails integrations for Elasticsearch.
|
@@ -335,4 +335,3 @@ test_files:
|
|
335
335
|
- test/test_helper.rb
|
336
336
|
- test/unit/instrumentation/instrumentation_test.rb
|
337
337
|
- test/unit/instrumentation/lograge_test.rb
|
338
|
-
has_rdoc:
|