Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Ruby libraries on framework.dev #753

Open
kenslachtajr opened this issue Mar 21, 2023 · 0 comments
Open

Add support for Ruby libraries on framework.dev #753

kenslachtajr opened this issue Mar 21, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@kenslachtajr
Copy link
Contributor

kenslachtajr commented Mar 21, 2023

Description

  • Ruby is not supported out of the box and a research spike was conducted to determine the best way to add support for Ruby libraries on framework.dev. This ticket involves and adding support for comparing different Ruby libraries based on certain properties. At the end of this text, you can see some suggested properties for comparison which we can use.

  • Adding badges for Ruby libraries is an additional need for this ticket. We are able to make use of the same properties in implementing badge functionality as well. Please refer to the original spike ticket for more context: SPIKE: Investigate fixing comparison tool #577

Ruby

In Ruby, RubyGems.org is the index of Ruby gems (packages) and there is also BestGems.org which offers download statistics for Ruby gems.

For example, BestGems.org has the following endpoints for getting downloads and ranking:

RubyGems.org can get you other information about a package:

// GET https://rubygems.org/api/v1/gems/aws-sdk-core.json

{
  "name": "aws-sdk-core",
  "downloads": 873693539,
  "version": "3.169.0",
  "version_created_at": "2023-01-18T20:31:20.443Z",
  "version_downloads": 691524,
  "platform": "ruby",
  "authors": "Amazon Web Services",
  "info": "Provides API clients for AWS. This gem is part of the official AWS SDK for Ruby.",
  "licenses": [
    "Apache-2.0"
  ],
  "metadata": {
    "changelog_uri": "https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core/CHANGELOG.md",
    "source_code_uri": "https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core"
  },
  "yanked": false,
  "sha": "81e75e70dfd4a17c55554b593ad2de5534b6cab9197cd8e278eb8b0a9ad4051b",
  "project_uri": "https://rubygems.org/gems/aws-sdk-core",
  "gem_uri": "https://rubygems.org/gems/aws-sdk-core-3.169.0.gem",
  "homepage_uri": "https://github.com/aws/aws-sdk-ruby",
  "wiki_uri": null,
  "documentation_uri": null,
  "mailing_list_uri": null,
  "source_code_uri": "https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core",
  "bug_tracker_uri": null,
  "changelog_uri": "https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core/CHANGELOG.md",
  "funding_uri": null,
  "dependencies": {}
}

GitHub stars can be retrieved directly from GitHub via the https://api.github.com/repos/[owner]/[project] API endpoint. For example:

// GET https://api.github.com/repos/Seldaek/monolog

{
  "id": 1376664,
  "node_id": "MDEwOlJlcG9zaXRvcnkxMzc2NjY0",
  "name": "monolog",
  "full_name": "Seldaek/monolog",
  "private": false,
  // ...
  "size": 3709,
  "stargazers_count": 20133,
  "watchers_count": 20133,
}

For framework.dev, we might consider:

  • Daily ranking
  • Daily downloads
  • GitHub stars
@kenslachtajr kenslachtajr added the help wanted Extra attention is needed label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant