primedia-endeca 0.9.3 → 0.9.4
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/lib/endeca.rb +1 -1
- data/lib/endeca/document.rb +7 -1
- data/spec/endeca/document_spec.rb +8 -0
- metadata +2 -6
- data/.gitignore +0 -7
- data/endeca.gemspec +0 -34
data/lib/endeca.rb
CHANGED
data/lib/endeca/document.rb
CHANGED
@@ -75,6 +75,8 @@ module Endeca
|
|
75
75
|
case what
|
76
76
|
when Integer, /^[A-Z\d]+$/
|
77
77
|
by_id(what, query_options)
|
78
|
+
when String
|
79
|
+
all(what)
|
78
80
|
when :first
|
79
81
|
first(query_options)
|
80
82
|
when :all
|
@@ -103,7 +105,11 @@ module Endeca
|
|
103
105
|
private
|
104
106
|
|
105
107
|
def self.request(query_options)
|
106
|
-
query_options
|
108
|
+
if query_options.respond_to?(:merge)
|
109
|
+
new_query_options = get_default_params.merge(query_options)
|
110
|
+
query_options = transform_query_options(new_query_options)
|
111
|
+
end
|
112
|
+
|
107
113
|
Endeca::Request.perform(get_path, query_options)
|
108
114
|
end
|
109
115
|
end
|
@@ -130,6 +130,14 @@ describe Endeca::Document do
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
+
describe 'with an query string' do
|
134
|
+
it "should call find with the argument and the query options" do
|
135
|
+
query_string = 'N=0&Ntk=propertycity&Ntt=Atlanta'
|
136
|
+
Endeca::Document.should_receive(:all).with(query_string)
|
137
|
+
Endeca::Document.find(query_string)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
133
141
|
describe 'with only query options' do
|
134
142
|
it 'should call .all with the query options' do
|
135
143
|
Endeca::Document.should_receive(:all).with(@query_options)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primedia-endeca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rein Henrichs
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-01-
|
13
|
+
date: 2009-01-27 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -32,17 +32,13 @@ extra_rdoc_files:
|
|
32
32
|
- History.txt
|
33
33
|
- Manifest.txt
|
34
34
|
- README.rdoc
|
35
|
-
- lib/.endeca.rb.swp
|
36
35
|
files:
|
37
|
-
- .gitignore
|
38
36
|
- History.txt
|
39
37
|
- Manifest.txt
|
40
38
|
- README.rdoc
|
41
39
|
- Rakefile
|
42
|
-
- endeca.gemspec
|
43
40
|
- example/benchmark.rb
|
44
41
|
- example/listing.rb
|
45
|
-
- lib/.endeca.rb.swp
|
46
42
|
- lib/class_to_proc.rb
|
47
43
|
- lib/core_ext.rb
|
48
44
|
- lib/endeca.rb
|
data/.gitignore
DELETED
data/endeca.gemspec
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{endeca}
|
5
|
-
s.version = "0.9.3"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Rein Henrichs", "Andy Stone"]
|
9
|
-
s.date = %q{2009-01-26}
|
10
|
-
s.description = %q{An Endeca client library for Ruby.}
|
11
|
-
s.email = %q{}
|
12
|
-
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc", "lib/.endeca.rb.swp"]
|
13
|
-
s.files = [".gitignore", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "endeca.gemspec", "example/benchmark.rb", "example/listing.rb", "lib/.endeca.rb.swp", "lib/class_to_proc.rb", "lib/core_ext.rb", "lib/endeca.rb", "lib/endeca/dimension.rb", "lib/endeca/document.rb", "lib/endeca/document_collection.rb", "lib/endeca/map.rb", "lib/endeca/readers.rb", "lib/endeca/refinement.rb", "lib/endeca/request.rb", "lib/endeca/transformer.rb", "spec/core_ext_spec.rb", "spec/endeca/dimension_spec.rb", "spec/endeca/document_collection_spec.rb", "spec/endeca/document_spec.rb", "spec/endeca/map_spec.rb", "spec/endeca/readers_spec.rb", "spec/endeca/refinement_spec.rb", "spec/endeca/request_spec.rb", "spec/endeca/transformer_spec.rb", "spec/endeca_spec.rb", "spec/rcov.opts", "spec/spec.opts", "spec/spec_helper.rb"]
|
14
|
-
s.has_rdoc = true
|
15
|
-
s.homepage = %q{http://github.com/primedia/endeca-ruby}
|
16
|
-
s.rdoc_options = ["--main", "README.rdoc"]
|
17
|
-
s.require_paths = ["lib"]
|
18
|
-
s.rubyforge_project = %q{endeca-ruby}
|
19
|
-
s.rubygems_version = %q{1.3.1}
|
20
|
-
s.summary = %q{An Endeca client library for Ruby}
|
21
|
-
|
22
|
-
if s.respond_to? :specification_version then
|
23
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
|
-
s.specification_version = 2
|
25
|
-
|
26
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_development_dependency(%q<bones>, [">= 2.3.0"])
|
28
|
-
else
|
29
|
-
s.add_dependency(%q<bones>, [">= 2.3.0"])
|
30
|
-
end
|
31
|
-
else
|
32
|
-
s.add_dependency(%q<bones>, [">= 2.3.0"])
|
33
|
-
end
|
34
|
-
end
|