Sha256: 7c5f801774b3b91a46a3b3f80638da9a60b5c517a59b615f407734f12d430e19

Contents?: true

Size: 893 Bytes

Versions: 8

Compression:

Stored size: 893 Bytes

Contents

#coding: utf-8
require 'wombat'

class ListCrawler
  include Wombat::Crawler

  base_url "http://www.rubygems.org"
  path "/"

  gems do
    new "css=#new_gems li", :list
    most_downloaded "css=#most_downloaded li", :list
    just_updated "css=#just_updated li", :list
  end
end

=begin
pp ListCrawler.new.crawl
{
  "gems"=>{
    "new"=>[
      "buffer (0.0.1)",
       "resque-telework (0.2.0)",
      "my_string_extend_lyk (0.0.1)",
      "specr (0.0.1)",
      "array-frequency (1.0.0)"
    ],
     "most_downloaded"=> [
       "rake-0.9.2.2 (7,128)",
       "mime-types-1.19 (5,331)",
       "tilt-1.3.3 (5,146)",
       "rack-1.4.1 (5,124)",
       "multi_json-1.3.6 (5,093)"
     ],
     "just_updated"=>[
       "wombat (2.0.0)",
       "pdf-reader-turtletext (0.2.1)",
       "minitest-reporters (0.10.0)",
       "cloudprint (0.1.3)",
       "greenletters (0.2.0)"
    ]
  }
}
=end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wombat-3.0.0 examples/list.rb
wombat-2.10.0 examples/list.rb
wombat-2.9.0 examples/list.rb
wombat-2.8.0 examples/list.rb
wombat-2.7.0 examples/list.rb
wombat-2.6.0 examples/list.rb
wombat-2.5.1 examples/list.rb
wombat-2.5.0 examples/list.rb