pius-ruby-satisfaction 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/satisfaction/search.rb +2 -1
- data/ruby-satisfaction.gemspec +1 -1
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/satisfaction/search.rb
CHANGED
@@ -2,13 +2,14 @@ class Sfn::Search
|
|
2
2
|
attr_reader :results, :root_url, :loader
|
3
3
|
|
4
4
|
def initialize(root_url, loader)
|
5
|
-
@root_url = root_url
|
5
|
+
@root_url = root_url ? root_url : "http://api.getsatisfaction.com"
|
6
6
|
@loader = loader
|
7
7
|
@results = {}
|
8
8
|
end
|
9
9
|
|
10
10
|
def for_likely_matches_to(name, entities = %w(companies products))
|
11
11
|
@results = entities.inject({}) {|hash, entity|
|
12
|
+
#raise @root_url.inspect
|
12
13
|
query_string = "#{@root_url}/#{entity}.json?q=#{name}"
|
13
14
|
#result = Net::HTTP.get_response(URI.parse(query_string)).body
|
14
15
|
answer = @loader.get(query_string)
|
data/ruby-satisfaction.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ruby-satisfaction}
|
5
|
-
s.version = "0.4.
|
5
|
+
s.version = "0.4.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Scott Fleckenstein", "Josh Nichols", "Pius Uzamere"]
|