Permalink
Browse files

strips out a slash r that was causing trouble

  • Loading branch information...
1 parent 5f6e52f commit f4aa1d417d63d05c7f432fe541892c218850788e @daveheitzman committed Mar 18, 2012
Showing with 10 additions and 10 deletions.
  1. +9 −9 lib/gemqs.rb
  2. +1 −1 lib/gemqs/version.rb
View
@@ -50,18 +50,18 @@ def get_page
rpage=html_page
ritems = rpage.css('div.gems.border>ol>li')
ritems.each do |rli|
-#puts rli.css("a>strong").text
- self.results << [
- rli.children[1].text.split(" ").first.gsub(",","").to_i,
- rli.children[3].text.split("\n")[1],
- # rli.children[3].text.split("\n")[2],
- rli.css("a>strong").text,
- rli.children[1].text.split(" ").first
- ]
+ self.results << [
+ rli.children[1].text.split(" ").first.gsub(",","").to_i,
+ rli.children[3].text.split("\n")[1],
+ # rli.children[3].text.split("\n")[2],
+ rli.css("a").text.split("\n")[2].delete("\r"),
+ rli.css("a>strong").text,
+ rli.css("div>strong").text,
+ ]
end
results.sort{|a,b| b.first <=> a.first}.each do |i|
- printf("%-40.40s %14.14s downloads #{ i[2] }\n",i[1],i[3])
+ printf("%-40.40s %14.14s downloads #{ i[2] }\n",i[1],i[4] )
end
end
end
View
@@ -1,3 +1,3 @@
module Gemqs
- VERSION = "0.1.3"
+ VERSION = "0.1.4"
end

0 comments on commit f4aa1d4

Please sign in to comment.