Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

strips out a slash r that was causing trouble

  • Loading branch information...
commit f4aa1d417d63d05c7f432fe541892c218850788e 1 parent 5f6e52f
@daveheitzman authored
Showing with 10 additions and 10 deletions.
  1. +9 −9 lib/gemqs.rb
  2. +1 −1  lib/gemqs/version.rb
View
18 lib/gemqs.rb
@@ -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
2  lib/gemqs/version.rb
@@ -1,3 +1,3 @@
module Gemqs
- VERSION = "0.1.3"
+ VERSION = "0.1.4"
end
Please sign in to comment.
Something went wrong with that request. Please try again.