{"id":19339038,"url":"https://github.com/librariesio/librariesio-url-parser","last_synced_at":"2025-07-08T04:13:12.425Z","repository":{"id":37955018,"uuid":"502172626","full_name":"librariesio/librariesio-url-parser","owner":"librariesio","description":"Parse the URL for various repositories tracked by libraries.io","archived":false,"fork":false,"pushed_at":"2024-12-16T01:32:39.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-02T10:01:35.486Z","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/librariesio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T20:27:35.000Z","updated_at":"2024-12-16T01:32:44.000Z","dependencies_parsed_at":"2024-08-08T22:28:59.368Z","dependency_job_id":"4301e817-a470-4cae-9439-9570de4e7cc5","html_url":"https://github.com/librariesio/librariesio-url-parser","commit_stats":{"total_commits":43,"total_committers":3,"mean_commits":"14.333333333333334","dds":0.2325581395348837,"last_synced_commit":"6f273096f802193b1ceffd5cf3d17eaa9c644cd8"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/librariesio/librariesio-url-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Flibrariesio-url-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Flibrariesio-url-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Flibrariesio-url-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Flibrariesio-url-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librariesio","download_url":"https://codeload.github.com/librariesio/librariesio-url-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librariesio%2Flibrariesio-url-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263800169,"owners_count":23513447,"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-11-10T03:19:35.176Z","updated_at":"2025-07-08T04:13:12.397Z","avatar_url":"https://github.com/librariesio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Libraries.io URL Parser\n\nRepository URL parsing library for https://libraries.io\n\n## Usage\n\nParse a org/repo string from an input string:\n\n```ruby\nGithubURLParser.parse(\"https://github.com/rails/rails/\") #=\u003e rails/rails\nGithubURLParser.parse(\"git@github.com:rails/rails.git\") #=\u003e rails/rails\nGithubURLParser.parse(\"https://github.com/rails/rails.git\") #=\u003e rails/rails\nGithubURLParser.parse(\"https://github.com\") #=\u003e nil\n```\n\nParse a full url from an input string:\n\n```ruby\nGithubURLParser.parse_to_full_url(\"https://github.com/rails/rails/\") #=\u003e https://github.com/rails/rails\nGithubURLParser.parse_to_full_url(\"git@github.com:rails/rails.git\") #=\u003e https://github.com/rails/rails\nGithubURLParser.parse_to_full_url(\"https://github.com/rails/rails.git\") #=\u003e https://github.com/rails/rails\nGithubURLParser.parse_to_full_url(\"https://github.com\") #=\u003e nil\n```\n\nParse an org/user url from an input string:\n\n```ruby\nGithubURLParser.parse_to_full_user_url(\"https://github.com/rails/rails/\") #=\u003e nil\nGithubURLParser.parse_to_full_user_url(\"git@github.com:rails/rails.git\") #=\u003e nil\nGithubURLParser.parse_to_full_user_url(\"https://github.com/rails/rails.git\") #=\u003e nil\nGithubURLParser.parse_to_full_user_url(\"https://github.com\") #=\u003e nil\nGithubURLParser.parse_to_full_user_url(\"https://github.com/rails\") #=\u003e https://github.com/rails\n```\n\nParse a full url from an input string where the repository is unknown\n\n```ruby\nURLParser.try_all(\"git@github.com:rails/rails.git\") #=\u003e https://github.com/rails/rails\nURLParser.try_all(\"git@gitlab.com:inkscape/inkscape.git\") #=\u003e \"https://gitlab.com/inkscape/inkscape\"\nURLParser.try_all(\"git@bitbucket.org:tildeslash/monit.git\") #=\u003e \"https://bitbucket.org/tildeslash/monit\"\n```\n\n## Supported repositories\n\n- GitHub\n- GitLab\n- Bitbucket\n- Apache SVN\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/librariesio/librariesio-url-parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrariesio%2Flibrariesio-url-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrariesio%2Flibrariesio-url-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrariesio%2Flibrariesio-url-parser/lists"}