elastic_searchable 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +47 -0
- data/Gemfile +1 -18
- data/Rakefile +2 -25
- data/VERSION +1 -1
- data/elastic_searchable.gemspec +25 -70
- data/lib/elastic_searchable/index.rb +1 -1
- metadata +98 -53
data/.gitignore
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# rcov generated
|
2
|
+
coverage
|
3
|
+
|
4
|
+
# rdoc generated
|
5
|
+
rdoc
|
6
|
+
|
7
|
+
# yard generated
|
8
|
+
doc
|
9
|
+
.yardoc
|
10
|
+
|
11
|
+
# bundler
|
12
|
+
.bundle
|
13
|
+
Gemfile.lock
|
14
|
+
|
15
|
+
# jeweler generated
|
16
|
+
pkg
|
17
|
+
|
18
|
+
# test files
|
19
|
+
test/*.log
|
20
|
+
test/*.sqlite3
|
21
|
+
|
22
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
23
|
+
#
|
24
|
+
# * Create a file at ~/.gitignore
|
25
|
+
# * Include files you want ignored
|
26
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
27
|
+
#
|
28
|
+
# After doing this, these files will be ignored in all your git projects,
|
29
|
+
# saving you from having to 'pollute' every project you touch with them
|
30
|
+
#
|
31
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
32
|
+
#
|
33
|
+
# For MacOS:
|
34
|
+
#
|
35
|
+
#.DS_Store
|
36
|
+
#
|
37
|
+
# For TextMate
|
38
|
+
#*.tmproj
|
39
|
+
#tmtags
|
40
|
+
#
|
41
|
+
# For emacs:
|
42
|
+
#*~
|
43
|
+
#\#*
|
44
|
+
#.\#*
|
45
|
+
#
|
46
|
+
# For vim:
|
47
|
+
#*.swp
|
data/Gemfile
CHANGED
@@ -1,19 +1,2 @@
|
|
1
|
-
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
gem "activerecord", "~> 2.3.5"
|
4
|
-
gem 'httparty', '~> 0.6.0'
|
5
|
-
gem 'backgrounded', '~> 0.7.0'
|
6
|
-
gem 'will_paginate', '~> 2.3.15'
|
7
|
-
gem 'larsklevan-after_commit', '~> 1.0.5', :require => 'after_commit'
|
1
|
+
gemspec
|
8
2
|
|
9
|
-
|
10
|
-
# Add dependencies to develop your gem here.
|
11
|
-
# Include everything needed to run rake, tests, features, etc.
|
12
|
-
group :development do
|
13
|
-
gem "shoulda", ">= 0"
|
14
|
-
gem "bundler", "~> 1.0.0"
|
15
|
-
gem 'mocha', '>= 0'
|
16
|
-
gem "jeweler", "~> 1.5.2"
|
17
|
-
gem "rcov", ">= 0"
|
18
|
-
gem 'sqlite3-ruby', '~> 1.3.2'
|
19
|
-
end
|
data/Rakefile
CHANGED
@@ -1,30 +1,7 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'bundler'
|
3
|
-
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'rake'
|
2
|
+
Bundler::GemHelper.install_tasks
|
11
3
|
|
12
|
-
require '
|
13
|
-
Jeweler::Tasks.new do |gem|
|
14
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
-
gem.name = "elastic_searchable"
|
16
|
-
gem.homepage = "http://github.com/wireframe/elastic_searchable"
|
17
|
-
gem.license = "MIT"
|
18
|
-
gem.summary = %Q{elastic search for activerecord}
|
19
|
-
gem.description = %Q{integrate the elastic search engine with rails}
|
20
|
-
gem.email = "ryan@codecrate.com"
|
21
|
-
gem.authors = ["Ryan Sonnek"]
|
22
|
-
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
-
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
|
-
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
-
end
|
27
|
-
Jeweler::RubygemsDotOrgTasks.new
|
4
|
+
require 'rake'
|
28
5
|
|
29
6
|
require 'rake/testtask'
|
30
7
|
Rake::TestTask.new(:test) do |test|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/elastic_searchable.gemspec
CHANGED
@@ -1,88 +1,43 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
1
|
Gem::Specification.new do |s|
|
7
2
|
s.name = %q{elastic_searchable}
|
8
|
-
s.version = "0.6.
|
3
|
+
s.version = "0.6.1"
|
9
4
|
|
10
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
6
|
s.authors = ["Ryan Sonnek"]
|
7
|
+
s.email = %q{ryan@codecrate.com}
|
12
8
|
s.date = %q{2011-03-08}
|
13
9
|
s.description = %q{integrate the elastic search engine with rails}
|
14
|
-
s.
|
15
|
-
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"Gemfile",
|
22
|
-
"LICENSE.txt",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"elastic_searchable.gemspec",
|
27
|
-
"lib/elastic_searchable.rb",
|
28
|
-
"lib/elastic_searchable/active_record.rb",
|
29
|
-
"lib/elastic_searchable/callbacks.rb",
|
30
|
-
"lib/elastic_searchable/index.rb",
|
31
|
-
"lib/elastic_searchable/queries.rb",
|
32
|
-
"test/database.yml",
|
33
|
-
"test/helper.rb",
|
34
|
-
"test/test_elastic_searchable.rb"
|
35
|
-
]
|
10
|
+
s.summary = %q{elastic search for activerecord}
|
11
|
+
|
36
12
|
s.homepage = %q{http://github.com/wireframe/elastic_searchable}
|
37
13
|
s.licenses = ["MIT"]
|
14
|
+
|
15
|
+
s.add_development_dependency "shoulda", ">= 0"
|
16
|
+
s.add_runtime_dependency 'commander', '>= 4.0'
|
17
|
+
s.add_runtime_dependency 'rest-client', '>= 1.4.0'
|
18
|
+
s.add_runtime_dependency 'json', '>= 1.4.6'
|
19
|
+
|
38
20
|
s.require_paths = ["lib"]
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
|
25
|
+
|
39
26
|
s.rubygems_version = %q{1.5.2}
|
40
|
-
s.summary = %q{elastic search for activerecord}
|
41
27
|
s.test_files = [
|
42
28
|
"test/helper.rb",
|
43
29
|
"test/test_elastic_searchable.rb"
|
44
30
|
]
|
45
31
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
|
-
s.add_development_dependency(%q<mocha>, [">= 0"])
|
58
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
59
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
60
|
-
s.add_development_dependency(%q<sqlite3-ruby>, ["~> 1.3.2"])
|
61
|
-
else
|
62
|
-
s.add_dependency(%q<activerecord>, ["~> 2.3.5"])
|
63
|
-
s.add_dependency(%q<httparty>, ["~> 0.6.0"])
|
64
|
-
s.add_dependency(%q<backgrounded>, ["~> 0.7.0"])
|
65
|
-
s.add_dependency(%q<will_paginate>, ["~> 2.3.15"])
|
66
|
-
s.add_dependency(%q<larsklevan-after_commit>, ["~> 1.0.5"])
|
67
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
68
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
69
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
70
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
71
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
72
|
-
s.add_dependency(%q<sqlite3-ruby>, ["~> 1.3.2"])
|
73
|
-
end
|
74
|
-
else
|
75
|
-
s.add_dependency(%q<activerecord>, ["~> 2.3.5"])
|
76
|
-
s.add_dependency(%q<httparty>, ["~> 0.6.0"])
|
77
|
-
s.add_dependency(%q<backgrounded>, ["~> 0.7.0"])
|
78
|
-
s.add_dependency(%q<will_paginate>, ["~> 2.3.15"])
|
79
|
-
s.add_dependency(%q<larsklevan-after_commit>, ["~> 1.0.5"])
|
80
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
81
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
82
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
83
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
84
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
85
|
-
s.add_dependency(%q<sqlite3-ruby>, ["~> 1.3.2"])
|
86
|
-
end
|
32
|
+
s.add_runtime_dependency(%q<activerecord>, ["~> 2.3.5"])
|
33
|
+
s.add_runtime_dependency(%q<httparty>, ["~> 0.6.0"])
|
34
|
+
s.add_runtime_dependency(%q<backgrounded>, ["~> 0.7.0"])
|
35
|
+
s.add_runtime_dependency(%q<will_paginate>, ["~> 2.3.15"])
|
36
|
+
s.add_runtime_dependency(%q<larsklevan-after_commit>, ["~> 1.0.5"])
|
37
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
38
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
39
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
40
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
41
|
+
s.add_development_dependency(%q<sqlite3-ruby>, ["~> 1.3.2"])
|
87
42
|
end
|
88
43
|
|
@@ -78,7 +78,7 @@ module ElasticSearchable
|
|
78
78
|
puts "Unable to bulk index record: #{record.inspect} [#{e.message}]"
|
79
79
|
end
|
80
80
|
end
|
81
|
-
ElasticSearchable.request
|
81
|
+
ElasticSearchable.request(:put, '/_bulk', :body => "\n#{actions.join("\n")}\n") if actions.any?
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_searchable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Sonnek
|
@@ -18,9 +18,71 @@ cert_chain: []
|
|
18
18
|
date: 2011-03-08 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: shoulda
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: commander
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 27
|
44
|
+
segments:
|
45
|
+
- 4
|
46
|
+
- 0
|
47
|
+
version: "4.0"
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rest-client
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 7
|
59
|
+
segments:
|
60
|
+
- 1
|
61
|
+
- 4
|
62
|
+
- 0
|
63
|
+
version: 1.4.0
|
64
|
+
type: :runtime
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: json
|
68
|
+
prerelease: false
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 11
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 4
|
78
|
+
- 6
|
79
|
+
version: 1.4.6
|
80
|
+
type: :runtime
|
81
|
+
version_requirements: *id004
|
21
82
|
- !ruby/object:Gem::Dependency
|
22
83
|
name: activerecord
|
23
|
-
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
24
86
|
none: false
|
25
87
|
requirements:
|
26
88
|
- - ~>
|
@@ -31,12 +93,12 @@ dependencies:
|
|
31
93
|
- 3
|
32
94
|
- 5
|
33
95
|
version: 2.3.5
|
34
|
-
prerelease: false
|
35
96
|
type: :runtime
|
36
|
-
|
97
|
+
version_requirements: *id005
|
37
98
|
- !ruby/object:Gem::Dependency
|
38
99
|
name: httparty
|
39
|
-
|
100
|
+
prerelease: false
|
101
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
40
102
|
none: false
|
41
103
|
requirements:
|
42
104
|
- - ~>
|
@@ -47,12 +109,12 @@ dependencies:
|
|
47
109
|
- 6
|
48
110
|
- 0
|
49
111
|
version: 0.6.0
|
50
|
-
prerelease: false
|
51
112
|
type: :runtime
|
52
|
-
|
113
|
+
version_requirements: *id006
|
53
114
|
- !ruby/object:Gem::Dependency
|
54
115
|
name: backgrounded
|
55
|
-
|
116
|
+
prerelease: false
|
117
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
56
118
|
none: false
|
57
119
|
requirements:
|
58
120
|
- - ~>
|
@@ -63,12 +125,12 @@ dependencies:
|
|
63
125
|
- 7
|
64
126
|
- 0
|
65
127
|
version: 0.7.0
|
66
|
-
prerelease: false
|
67
128
|
type: :runtime
|
68
|
-
|
129
|
+
version_requirements: *id007
|
69
130
|
- !ruby/object:Gem::Dependency
|
70
131
|
name: will_paginate
|
71
|
-
|
132
|
+
prerelease: false
|
133
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
72
134
|
none: false
|
73
135
|
requirements:
|
74
136
|
- - ~>
|
@@ -79,12 +141,12 @@ dependencies:
|
|
79
141
|
- 3
|
80
142
|
- 15
|
81
143
|
version: 2.3.15
|
82
|
-
prerelease: false
|
83
144
|
type: :runtime
|
84
|
-
|
145
|
+
version_requirements: *id008
|
85
146
|
- !ruby/object:Gem::Dependency
|
86
147
|
name: larsklevan-after_commit
|
87
|
-
|
148
|
+
prerelease: false
|
149
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
88
150
|
none: false
|
89
151
|
requirements:
|
90
152
|
- - ~>
|
@@ -95,12 +157,12 @@ dependencies:
|
|
95
157
|
- 0
|
96
158
|
- 5
|
97
159
|
version: 1.0.5
|
98
|
-
prerelease: false
|
99
160
|
type: :runtime
|
100
|
-
|
161
|
+
version_requirements: *id009
|
101
162
|
- !ruby/object:Gem::Dependency
|
102
163
|
name: shoulda
|
103
|
-
|
164
|
+
prerelease: false
|
165
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
104
166
|
none: false
|
105
167
|
requirements:
|
106
168
|
- - ">="
|
@@ -109,28 +171,12 @@ dependencies:
|
|
109
171
|
segments:
|
110
172
|
- 0
|
111
173
|
version: "0"
|
112
|
-
prerelease: false
|
113
|
-
type: :development
|
114
|
-
requirement: *id006
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: bundler
|
117
|
-
version_requirements: &id007 !ruby/object:Gem::Requirement
|
118
|
-
none: false
|
119
|
-
requirements:
|
120
|
-
- - ~>
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
hash: 23
|
123
|
-
segments:
|
124
|
-
- 1
|
125
|
-
- 0
|
126
|
-
- 0
|
127
|
-
version: 1.0.0
|
128
|
-
prerelease: false
|
129
174
|
type: :development
|
130
|
-
|
175
|
+
version_requirements: *id010
|
131
176
|
- !ruby/object:Gem::Dependency
|
132
177
|
name: mocha
|
133
|
-
|
178
|
+
prerelease: false
|
179
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
134
180
|
none: false
|
135
181
|
requirements:
|
136
182
|
- - ">="
|
@@ -139,12 +185,12 @@ dependencies:
|
|
139
185
|
segments:
|
140
186
|
- 0
|
141
187
|
version: "0"
|
142
|
-
prerelease: false
|
143
188
|
type: :development
|
144
|
-
|
189
|
+
version_requirements: *id011
|
145
190
|
- !ruby/object:Gem::Dependency
|
146
191
|
name: jeweler
|
147
|
-
|
192
|
+
prerelease: false
|
193
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
148
194
|
none: false
|
149
195
|
requirements:
|
150
196
|
- - ~>
|
@@ -155,12 +201,12 @@ dependencies:
|
|
155
201
|
- 5
|
156
202
|
- 2
|
157
203
|
version: 1.5.2
|
158
|
-
prerelease: false
|
159
204
|
type: :development
|
160
|
-
|
205
|
+
version_requirements: *id012
|
161
206
|
- !ruby/object:Gem::Dependency
|
162
207
|
name: rcov
|
163
|
-
|
208
|
+
prerelease: false
|
209
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
164
210
|
none: false
|
165
211
|
requirements:
|
166
212
|
- - ">="
|
@@ -169,12 +215,12 @@ dependencies:
|
|
169
215
|
segments:
|
170
216
|
- 0
|
171
217
|
version: "0"
|
172
|
-
prerelease: false
|
173
218
|
type: :development
|
174
|
-
|
219
|
+
version_requirements: *id013
|
175
220
|
- !ruby/object:Gem::Dependency
|
176
221
|
name: sqlite3-ruby
|
177
|
-
|
222
|
+
prerelease: false
|
223
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
178
224
|
none: false
|
179
225
|
requirements:
|
180
226
|
- - ~>
|
@@ -185,20 +231,19 @@ dependencies:
|
|
185
231
|
- 3
|
186
232
|
- 2
|
187
233
|
version: 1.3.2
|
188
|
-
prerelease: false
|
189
234
|
type: :development
|
190
|
-
|
235
|
+
version_requirements: *id014
|
191
236
|
description: integrate the elastic search engine with rails
|
192
237
|
email: ryan@codecrate.com
|
193
238
|
executables: []
|
194
239
|
|
195
240
|
extensions: []
|
196
241
|
|
197
|
-
extra_rdoc_files:
|
198
|
-
|
199
|
-
- README.rdoc
|
242
|
+
extra_rdoc_files: []
|
243
|
+
|
200
244
|
files:
|
201
245
|
- .document
|
246
|
+
- .gitignore
|
202
247
|
- Gemfile
|
203
248
|
- LICENSE.txt
|
204
249
|
- README.rdoc
|
@@ -243,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
288
|
requirements: []
|
244
289
|
|
245
290
|
rubyforge_project:
|
246
|
-
rubygems_version: 1.
|
291
|
+
rubygems_version: 1.6.1
|
247
292
|
signing_key:
|
248
293
|
specification_version: 3
|
249
294
|
summary: elastic search for activerecord
|