honkster-acts_as_solr 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -61,7 +61,7 @@ begin
61
61
  s.homepage = "http://github.com/mattmatt/acts_as_solr"
62
62
  s.description = "This plugin adds full text search capabilities and many other nifty features from Apache�s Solr to any Rails model. I'm currently rearranging the test suite to include a real unit test suite, and adding a few features I need myself."
63
63
  s.authors = ["Mathias Meyer"]
64
- s.files = FileList["[A-Z]*", "{bin,generators,lib,solr,test}/**/*"]
64
+ s.files = FileList["[A-Z]*", "{bin,generators,config,lib,solr,test}/**/*"]
65
65
  end
66
66
  rescue LoadError
67
67
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
data/config/solr.yml ADDED
@@ -0,0 +1,15 @@
1
+ # Config file for the acts_as_solr plugin.
2
+ #
3
+ # If you change the host or port number here, make sure you update
4
+ # them in your Solr config file
5
+
6
+ development:
7
+ url: http://127.0.0.1:8982/solr
8
+
9
+ production:
10
+ url: http://127.0.0.1:8983/solr
11
+ jvm_options: -server -d64 -Xmx1024M -Xms64M
12
+
13
+ test:
14
+ url: http://127.0.0.1:8981/solr
15
+
@@ -0,0 +1,23 @@
1
+ ENV['RAILS_ENV'] = (ENV['RAILS_ENV'] || 'development').dup
2
+ # RAILS_ROOT isn't defined yet, so figure it out.
3
+ require "uri"
4
+ dir = File.dirname(__FILE__)
5
+ SOLR_PATH = File.expand_path("#{dir}/../solr") unless defined? SOLR_PATH
6
+
7
+ SOLR_LOGS_PATH = "#{RAILS_ROOT}/log" unless defined? SOLR_LOGS_PATH
8
+ SOLR_PIDS_PATH = "#{RAILS_ROOT}/tmp/pids" unless defined? SOLR_PIDS_PATH
9
+ SOLR_DATA_PATH = "#{RAILS_ROOT}/solr/#{ENV['RAILS_ENV']}" unless defined? SOLR_DATA_PATH
10
+
11
+ unless defined? SOLR_PORT
12
+ config = YAML::load_file(RAILS_ROOT+'/config/solr.yml')
13
+
14
+ SOLR_PORT = ENV['PORT'] || URI.parse(config[ENV['RAILS_ENV']]['url']).port
15
+ end
16
+
17
+ SOLR_JVM_OPTIONS = config[ENV['RAILS_ENV']]['jvm_options'] unless defined? SOLR_JVM_OPTIONS
18
+
19
+ if ENV['RAILS_ENV'] == 'test'
20
+ DB = (ENV['DB'] ? ENV['DB'] : 'mysql') unless defined?(DB)
21
+ MYSQL_USER = (ENV['MYSQL_USER'].nil? ? 'root' : ENV['MYSQL_USER']) unless defined? MYSQL_USER
22
+ require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'test', 'db', 'connections', DB, 'connection.rb')
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honkster-acts_as_solr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Meyer
@@ -31,6 +31,8 @@ files:
31
31
  - Rakefile
32
32
  - TESTING_THE_PLUGIN
33
33
  - VERSION
34
+ - config/solr.yml
35
+ - config/solr_environment.rb
34
36
  - lib/acts_as_solr.rb
35
37
  - lib/acts_as_solr/acts_methods.rb
36
38
  - lib/acts_as_solr/class_methods.rb