muck-solr 3.0.0 → 3.0.1
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.
- data/VERSION +1 -1
- data/lib/acts_as_solr.rb +2 -2
- data/lib/acts_as_solr/railtie.rb +3 -3
- data/lib/tasks/database.rake +2 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1
|
data/lib/acts_as_solr.rb
CHANGED
@@ -44,8 +44,8 @@ module ActsAsSolr
|
|
44
44
|
class Post
|
45
45
|
def self.execute(request, core = nil)
|
46
46
|
begin
|
47
|
-
if File.exists?(
|
48
|
-
config = YAML::load_file(
|
47
|
+
if File.exists?(::Rails.root+'/config/solr.yml')
|
48
|
+
config = YAML::load_file(::Rails.root+'/config/solr.yml')
|
49
49
|
url = config[ENV['RAILS_ENV']]['url']
|
50
50
|
# for backwards compatibility
|
51
51
|
url ||= "http://#{config[ENV['RAILS_ENV']]['host']}:#{config[ENV['RAILS_ENV']]['port']}/#{config[ENV['RAILS_ENV']]['servlet_path']}"
|
data/lib/acts_as_solr/railtie.rb
CHANGED
@@ -5,9 +5,9 @@ module ActsAsSolr
|
|
5
5
|
class Railtie < ::Rails::Railtie
|
6
6
|
# Load rake tasks
|
7
7
|
rake_tasks do
|
8
|
-
load "
|
9
|
-
load "
|
10
|
-
load "
|
8
|
+
load "tasks/database.rake"
|
9
|
+
load "tasks/solr.rake"
|
10
|
+
load "tasks/test.rake"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/tasks/database.rake
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
dir = File.dirname(__FILE__)
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
require 'net/http'
|
5
1
|
require 'active_record'
|
6
|
-
require File.expand_path("#{
|
2
|
+
require File.expand_path("#{File.dirname(__FILE__)}/../acts_as_solr/solr_fixtures")
|
7
3
|
|
8
4
|
namespace :db do
|
9
5
|
namespace :fixtures do
|
@@ -12,7 +8,7 @@ namespace :db do
|
|
12
8
|
begin
|
13
9
|
ActsAsSolr::Post.execute(Solr::Request::Delete.new(:query => "*:*"))
|
14
10
|
ActsAsSolr::Post.execute(Solr::Request::Commit.new)
|
15
|
-
(ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(
|
11
|
+
(ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(::Rails.root, 'test', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
|
16
12
|
ActsAsSolr::SolrFixtures.load(File.basename(fixture_file, '.*'))
|
17
13
|
end
|
18
14
|
puts "The fixtures loaded have been added to Solr"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-solr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 1
|
10
|
+
version: 3.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mathias Meyer, Joel Duffin, Justin Ball
|