solrpanel 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'http://rubygems.org'
2
+ #source 'http://gemcutter.org'
3
+
4
+ gem 'rspec', '~>2.4'
5
+ gem 'httpclient', '~>2.1'
6
+ gem 'nokogiri', '~>1.4'
data/Manifest CHANGED
@@ -1,3 +1,4 @@
1
+ Gemfile
1
2
  History.txt
2
3
  PostInstall.txt
3
4
  README.rdoc
data/README.rdoc CHANGED
@@ -4,18 +4,39 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- SolrPanel is a lightweight package used to access Apache Solr, specifically the Solr Cell module.
7
+ SolrPanel is a lightweight package used to access Apache Solr, specifically the Solr Cell module. It is far from what would be called full feature. As this library matures, I'm hoping to fill out the functionality.
8
8
 
9
9
  == SYNOPSIS:
10
10
 
11
11
  Adding Documents
12
12
 
13
+ To add a document, invoke update and commit on a Solr::Panel instance.
14
+
15
+ solr = SolrPanel::Client.new
16
+ solr.update(document.source.path, document.id, {'literal.company_id' => document.company_id})
17
+ solr.commit
18
+
13
19
 
14
20
  Deleting Documents
15
21
 
22
+ To delete a document, invoke delete and commit on a Solr::Panel instance.
23
+ solr = SolrPanel::Client.new
24
+ solr.delete(document_id)
25
+ solr.commit
26
+
16
27
 
17
28
  Searching Documents
18
29
 
30
+ To search for documents, class the search method with the search string.
31
+
32
+ sunlight = SolrPanel::Client.new
33
+ @results = sunlight.search(@search.search_string)
34
+ if @results
35
+ doc_list = @results.collect() do |r|
36
+ r.id
37
+ end
38
+ end
39
+
19
40
 
20
41
  == REQUIREMENTS:
21
42
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'echoe'
2
2
 
3
- Echoe.new('solrpanel', '0.1.0') do |p|
3
+ Echoe.new('solrpanel', '0.1.1') do |p|
4
4
  p.author = "Ryan Stawarz and Robert Lasch"
5
5
  p.summary = "A client for connecting to Apache Solr Cell."
6
6
  p.url = "http://github.com/rlasch/solrpanel"
@@ -25,7 +25,7 @@ module SolrPanel
25
25
  VERSION = '0.0.1'
26
26
 
27
27
  # Main client for the SolrPanel library.
28
- class Ray
28
+ class Client
29
29
  attr_accessor :base_url
30
30
  attr_accessor :default_query_parameters
31
31
 
data/solrpanel.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{solrpanel}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Stawarz and Robert Lasch"]
9
- s.date = %q{2010-10-10}
9
+ s.date = %q{2011-01-25}
10
10
  s.description = %q{A client for connecting to Apache Solr Cell.}
11
11
  s.email = %q{}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/solrpanel.rb", "lib/solrpanel/result.rb", "lib/solrpanel/solrpanel.rb", "tasks/rspec.rake"]
13
- s.files = ["History.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "lib/solrpanel.rb", "lib/solrpanel/result.rb", "lib/solrpanel/solrpanel.rb", "solrpanel.gemspec", "tasks/rspec.rake", "Manifest"]
13
+ s.files = ["Gemfile", "History.txt", "PostInstall.txt", "README.rdoc", "Rakefile", "lib/solrpanel.rb", "lib/solrpanel/result.rb", "lib/solrpanel/solrpanel.rb", "solrpanel.gemspec", "tasks/rspec.rake", "Manifest"]
14
14
  s.homepage = %q{http://github.com/rlasch/solrpanel}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Solrpanel", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
data/tasks/rspec.rake CHANGED
@@ -1,11 +1,7 @@
1
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
2
+
1
3
  begin
2
- require 'spec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- require 'spec'
6
- end
7
- begin
8
- require 'spec/rake/spectask'
4
+ require 'rspec/core/rake_task'
9
5
  rescue LoadError
10
6
  puts <<-EOS
11
7
  To use rspec for testing you must install rspec gem:
@@ -15,7 +11,14 @@ EOS
15
11
  end
16
12
 
17
13
  desc "Run the specs under spec/models"
18
- Spec::Rake::SpecTask.new do |t|
19
- t.spec_opts = ['--options', "spec/spec.opts"]
20
- t.spec_files = FileList['spec/**/*_spec.rb']
14
+ # Spec::Rake::SpecTask.new do |t|
15
+ # t.spec_opts = ['--options', "spec/spec.opts"]
16
+ # t.spec_files = FileList['spec/**/*_spec.rb']
17
+ # end
18
+
19
+ desc "Run the specs under spec/models"
20
+ RSpec::Core::RakeTask.new do |t|
21
+ t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"]
22
+ t.pattern = 'spec/**/*_spec.rb'
21
23
  end
24
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Stawarz and Robert Lasch
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-10 00:00:00 -05:00
17
+ date: 2011-01-25 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -62,6 +62,7 @@ extra_rdoc_files:
62
62
  - lib/solrpanel/solrpanel.rb
63
63
  - tasks/rspec.rake
64
64
  files:
65
+ - Gemfile
65
66
  - History.txt
66
67
  - PostInstall.txt
67
68
  - README.rdoc