solrsan 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +17 -0
- data/lib/solrsan/capistrano.rb +21 -0
- data/lib/solrsan/version.rb +1 -1
- metadata +9 -8
data/README.markdown
CHANGED
@@ -27,6 +27,23 @@ The generator will copy the following files into your application.
|
|
27
27
|
config/initializers/solrsan.rb
|
28
28
|
lib/tasks/solr.rake
|
29
29
|
|
30
|
+
The rake file will add
|
31
|
+
rake solr:start
|
32
|
+
rake solr:stop
|
33
|
+
rake solr:clear_index
|
34
|
+
rake solr:index
|
35
|
+
#you will need to alter clear_index/index to match your models
|
36
|
+
|
37
|
+
Deploy tasks via capistrano:
|
38
|
+
add to your deploy.rb
|
39
|
+
require 'solrsan/capistrano'
|
40
|
+
|
41
|
+
This will add the following methods which will just call the
|
42
|
+
corresponding rake tasks:
|
43
|
+
cap solr:start
|
44
|
+
cap solr:stop
|
45
|
+
cap solr:reindex
|
46
|
+
|
30
47
|
##
|
31
48
|
The fields are required for each solr document:
|
32
49
|
id, db_id, type
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# add require 'solrsan/capistrano', be sure to have solr.rake in your tasks dir
|
2
|
+
|
3
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
4
|
+
namespace :solr do
|
5
|
+
desc "starts solr"
|
6
|
+
task :start, :roles => :search do
|
7
|
+
run "cd #{current_path} && rake solr:start RAILS_ENV=#{stage}"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "stops solr"
|
11
|
+
task :stop, :roles => :search do
|
12
|
+
run "cd #{current_path} && rake solr:stop RAILS_ENV=#{stage}"
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "clear and re-index"
|
16
|
+
task :reindex, :roles => :search do
|
17
|
+
run "cd #{current_path} && rake solr:clear_index RAILS_ENV=#{stage}"
|
18
|
+
run "cd #{current_path} && rake solr:index RAILS_ENV=#{stage}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/solrsan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solrsan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.23
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-03-
|
12
|
+
date: 2011-03-23 00:00:00.000000000 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
17
|
-
requirement: &
|
17
|
+
requirement: &2170187480 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 1.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2170187480
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activemodel
|
28
|
-
requirement: &
|
28
|
+
requirement: &2170186980 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 3.0.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2170186980
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: activesupport
|
39
|
-
requirement: &
|
39
|
+
requirement: &2170186520 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: 3.0.5
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2170186520
|
48
48
|
description: solrsan is a lightweight wrapper for using Apache Solr within a Ruby
|
49
49
|
application including Rails and Sinatra.
|
50
50
|
email:
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/rails/generators/solrsan/config/templates/solrsan.rb
|
79
79
|
- lib/rails/generators/solrsan_generator.rb
|
80
80
|
- lib/solrsan.rb
|
81
|
+
- lib/solrsan/capistrano.rb
|
81
82
|
- lib/solrsan/config.rb
|
82
83
|
- lib/solrsan/indexer.rb
|
83
84
|
- lib/solrsan/search.rb
|