From 232175f90a78efafba552c8168edef8b3350a0e0 Mon Sep 17 00:00:00 2001 From: John Perry Date: Thu, 15 Aug 2013 17:21:31 -0400 Subject: [PATCH 1/2] fixed typo in FTM top contributors method name --- lib/gov_kit/follow_the_money.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gov_kit/follow_the_money.rb b/lib/gov_kit/follow_the_money.rb index bbc0407..6c50fc0 100644 --- a/lib/gov_kit/follow_the_money.rb +++ b/lib/gov_kit/follow_the_money.rb @@ -1,6 +1,6 @@ module GovKit - # Subclass of {Resource} for FollowTheMoney data. This + # Subclass of {Resource} for FollowTheMoney data. This # is subclassed further for each of the different types of record # returned by FollowTheMoney. # @@ -42,7 +42,7 @@ def self.get_xml(path, options) doc end - + # Convert the hash array returned by Nokogiri, which has Nokogiri::XML::Attr objects as values, # to an array of hashes with string values. # @@ -53,7 +53,7 @@ def self.stringify_values_of(result) end end - # Provides classes to wrap {http://www.followthemoney.org/index.phtml FollowTheMoney} data. + # Provides classes to wrap {http://www.followthemoney.org/index.phtml FollowTheMoney} data. # # For the details on the FollowTheMoney queries, see {http://www.followthemoney.org/services/methods.phtml the FollowTheMoney API documentation}. module FollowTheMoney @@ -115,7 +115,7 @@ def self.find(nimsp_id) # # @return [[Contribution]] an array of Contribution objects. def self.top(nimsp_id) - doc = get_xml("/candidates.top_contributor.php", :query => {"imsp_candidate_id" => nimsp_id}) + doc = get_xml("/candidates.top_contributors.php", :query => {"imsp_candidate_id" => nimsp_id}) result = doc.search('//top_contributor').collect { |x| x.attributes } stringify_values_of(result) From c49cd136e5344493c616d97e33d62f99a83cb06d Mon Sep 17 00:00:00 2001 From: John Perry Date: Thu, 15 Aug 2013 17:52:46 -0400 Subject: [PATCH 2/2] require_relative --- lib/govkit.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/govkit.rb b/lib/govkit.rb index b29e087..d7bb24b 100644 --- a/lib/govkit.rb +++ b/lib/govkit.rb @@ -1 +1,2 @@ -require 'gov_kit' +#require File.expand_path('../govkit', __FILE__) +require_relative 'gov_kit'