{"id":19156274,"url":"https://github.com/ess/absolution","last_synced_at":"2025-02-22T21:42:03.449Z","repository":{"id":16696233,"uuid":"19452802","full_name":"ess/absolution","owner":"ess","description":"A tiny ruby library for detecting/constructing absolute URLs","archived":false,"fork":false,"pushed_at":"2014-05-07T20:45:33.000Z","size":268,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-02-04T00:04:26.044Z","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/ess.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-05T10:51:39.000Z","updated_at":"2014-05-07T20:45:34.000Z","dependencies_parsed_at":"2022-09-20T03:20:59.988Z","dependency_job_id":null,"html_url":"https://github.com/ess/absolution","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fabsolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fabsolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fabsolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fabsolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ess","download_url":"https://codeload.github.com/ess/absolution/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240241802,"owners_count":19770463,"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-09T08:33:57.712Z","updated_at":"2025-02-22T21:42:03.431Z","avatar_url":"https://github.com/ess.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Absolution ##\n\nWant to know if a string is an absolute URL? Heck, want to construct an\nabsolute URL from a base URL and a path? This is your lucky day!\n\nThere's not much to this thing, and what's there exists only to serve the\nneeds that I've had for this sort of thing.\n\nThat said, pull requests are totally welcome :)\n\n## Gem Setup ##\n\n```ruby\ngem install absolution\n\n# Gemfile\ngem 'absolution'\n```\n## Basic usage (class methods) ##\n\n```ruby\nrequire 'absolution'\n\nAbsolution.absolute_url?('blah')\n  =\u003e false\nAbsolution.absolute_url?('/blah')\n  =\u003e false\nAbsolution.absolute_url?('http://blah')\n  =\u003e true\n\nAbsolution.construct_absolute_url('https://base.url', 'blah')\n  =\u003e 'https://base.url/blah'\n\nAbsolution.construct_absolue_url('http://base.url/path/to/namespace', 'blah')\n  =\u003e 'http://base.url/path/to/namespace/blah'\n```\n\n## Other usage (mixin) ##\n\nWant a class to know how to do this stuff on its own?\n\n```ruby\nrequire 'absolution'\n\nclass SomeClass\n  include Absolution\n\n  def absolute_url_to(somefile)\n    return somefile if absolute_url?(somefile)\n    construct_absolute_url('http://base.url', somefile)\n  end\nend\n```\n\n## Contributing ##\n\nDo you use git-flow? I sure do. Please base anything you do off of\n[the develop branch](https://github.com/ess/absolution/tree/develop).\n\n1. Fork it.\n2. Perform some BDD magic. Seriously. Be testing.\n3. Submit a pull request.\n\n## History ##\n\n* 0.0.6 - Handle path in base URL\n* 0.0.5 - Better relative path handling\n* 0.0.4 - Query strings are handled properly\n* 0.0.2 - Initial release\n\n## License ##\n\nMIT License. Copyright 2014 Dennis Walters\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fess%2Fabsolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fess%2Fabsolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fess%2Fabsolution/lists"}