pius-ruby-satisfaction 0.4.1 → 0.4.2

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.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 4
4
- :patch: 1
4
+ :patch: 2
@@ -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)
@@ -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.1"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pius-ruby-satisfaction
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein