{"id":16948485,"url":"https://github.com/technicalpickles/rankles","last_synced_at":"2025-04-11T20:12:29.861Z","repository":{"id":56890934,"uuid":"201500","full_name":"technicalpickles/rankles","owner":"technicalpickles","description":"Ranking algorithms.","archived":false,"fork":false,"pushed_at":"2013-06-21T16:51:27.000Z","size":113,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T20:12:24.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technicalpickles.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-05-15T03:21:41.000Z","updated_at":"2017-05-13T21:35:16.000Z","dependencies_parsed_at":"2022-08-20T15:20:40.760Z","dependency_job_id":null,"html_url":"https://github.com/technicalpickles/rankles","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Frankles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Frankles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Frankles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Frankles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technicalpickles","download_url":"https://codeload.github.com/technicalpickles/rankles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473126,"owners_count":21109628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:50:59.384Z","updated_at":"2025-04-11T20:12:29.841Z","avatar_url":"https://github.com/technicalpickles.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= rankles\n\nRankles is a collection of ranking algorithms (technically only one at the moment) implemented in Ruby.\n\nThe idea is simple. Give Rankles some data, and it will give you a number. You probably want to sort based on this number.\n\nQuick example:\n\n    reddit = Rankles::Reddit.new :date =\u003e entry.published_at,\n                                 :upvotes =\u003e entry.cached_upvotes_count,\n                                 :downvotes =\u003e entry.cached_downvotes_count\n\n    reddit.to_f\n\nIf you're dealing with ActiveRecord objects, you can actually assign the Rankles object to a float field, and it will handle converstion:\n\n    class Entry \u003c ActiveRecord::Base\n      # ommitted\n      def calculate_ranking\n        reddit_ranking = Rankles::Reddit.new :date =\u003e entry.published_at,\n                                     :upvotes =\u003e entry.cached_upvotes_count,\n                                     :downvotes =\u003e entry.cached_downvotes_count\n\n        update_attributes! :ranking =\u003e reddit_ranking\n      end\n    end\n\n== Copyright\n\nCopyright (c) 2009 Josh Nichols. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Frankles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnicalpickles%2Frankles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Frankles/lists"}