Sha256: bbdfdbd7c5cd6330e28169c2113651e00d2fd2c84a911241f44701d222c96c67
Contents?: true
Size: 464 Bytes
Versions: 6
Compression:
Stored size: 464 Bytes
Contents
module Popularity class Rubygems < Crawler def downloads response_json["downloads"] end def as_json(options = {}) {"downloads" => downloads} end def total downloads end def valid? host == 'rubygems.org' && @url =~ /\/gems\// end protected def gem_name @url.split("/").last end def request_url "https://rubygems.org/api/v1/gems/#{gem_name}.json" end end end
Version data entries
6 entries across 4 versions & 1 rubygems