{"id":26967082,"url":"https://github.com/yb66/tag-uri","last_synced_at":"2025-07-07T07:06:53.362Z","repository":{"id":7137138,"uuid":"8433763","full_name":"yb66/tag-uri","owner":"yb66","description":"An implementation of the tag URI scheme. See RFC4151 http://tools.ietf.org/html/rfc4151","archived":false,"fork":false,"pushed_at":"2019-11-02T04:37:43.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T21:49:05.756Z","etag":null,"topics":["atom","permalink","rfc","rfc-4151","ruby","tag-uri","tag-uris","uri"],"latest_commit_sha":null,"homepage":"","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/yb66.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-26T14:08:52.000Z","updated_at":"2024-03-29T16:44:58.000Z","dependencies_parsed_at":"2022-08-20T06:50:51.528Z","dependency_job_id":null,"html_url":"https://github.com/yb66/tag-uri","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/yb66/tag-uri","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yb66%2Ftag-uri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yb66%2Ftag-uri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yb66%2Ftag-uri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yb66%2Ftag-uri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yb66","download_url":"https://codeload.github.com/yb66/tag-uri/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yb66%2Ftag-uri/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262361446,"owners_count":23299081,"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":["atom","permalink","rfc","rfc-4151","ruby","tag-uri","tag-uris","uri"],"created_at":"2025-04-03T08:38:32.462Z","updated_at":"2025-07-07T07:06:53.346Z","avatar_url":"https://github.com/yb66.png","language":"Ruby","readme":"# TagURI\n\nAn implementation of the tag URI scheme.\nSee RFC4151 http://tools.ietf.org/html/rfc4151\n\n### Build status ###\n\nMaster branch:\n[![Build Status](https://travis-ci.org/yb66/tag-uri.png?branch=master)](https://travis-ci.org/yb66/tag-uri)\n\n## Why? ##\n\nI originally wrote this because every Atom entry must have a globally unique ID, in the `id` element, and I was writing an atom feed.\n\n* The ID must be a valid URI, as defined by RFC 2396.\n* The ID must be globally unique, across all Atom feeds, everywhere, for all time. This part is actually easier than it sounds.\n* The ID must never, ever change.\n\nSome people use a permalink for this, but we all know that permalinks change, so use a tag URI instead. See the following articles for a bit more info:\n\n- [IBM developer works, Managing XML data: Tag URIs](http://www.ibm.com/developerworks/library/x-mxd6/index.html)\n- [Tag URI](http://taguri.org)\n- [How to make a good ID in Atom](http://web.archive.org/web/20110514113830/http://diveintomark.org/archives/2004/05/28/howto-atom-id)\n\nYou don't have to just use it with Atom, it's also useful anywhere that a non-tied-to-location URI might make sense. As one of the linked articles states:\n\n\u003e Tag URIs finally let URIs do what they were meant to do: identify without implying any sort of location or behavior that they don't have. They're easy to create, they're human legible, they work with existing systems, they're an open standard, and they don't have any backward compatibility issues. What's not to like?\n\n\n## Usage\n\n    require 'tag_uri'\n\n### THE MOST BASIC WAY\n\n    tag_uri = TagURI::URI.new authority_name: \"helpful-iain@theprintedbird.com\",\n                    date: \"2019-01-09\",\n                    specific: \"My slippers\"\n\n    tag_uri.to_s\n    # =\u003e \"tag:helpful-iain@theprintedbird.com,2019-01-09:My%20slippers\"\n    tag.authority_name\n    # =\u003e \"helpful-iain@theprintedbird.com\"\n    tag.date\n    # =\u003e 2019-01-09 00:00:00 +0900 # You get a Time object back\n    tag.specific \"My slippers\"\n\n### ANOTHER MOST BASIC WAY\n\n    TagURI::URI.new email: \"helpful-iain@theprintedbird.com\",\n                    date: \"2019-01-09\",\n                    specific: \"My slippers\"\n\n    tag_uri.to_s\n    # =\u003e \"tag:helpful-iain@theprintedbird.com,2019-01-09:My%20slippers\"\n    tag.authority_name\n    # =\u003e \"helpful-iain@theprintedbird.com\"\n    tag.date\n    # =\u003e 2019-01-09 00:00:00 +0900\n    tag.specific \"My slippers\"\n\n### (NOT TO FLOG A DEAD HORSE BUT) ANOTHER MOST BASIC WAY\n\n    TagURI::URI.new domain: \"theprintedbird.com\",\n                    date: \"2019-01-09\",\n                    specific: \"My slippers\"\n\n    tag_uri.to_s\n    # =\u003e \"tag:theprintedbird.com,2019-01-09:My%20slippers\"\n    tag.authority_name\n    # =\u003e \"theprintedbird.com\"\n    tag.date\n    # =\u003e 2019-01-09 00:00:00 +0900\n    tag.specific \"My slippers\"\n\n\n### YOU HAVE A WEB LINK TO AN ARTICLE ABOUT BEESWAX (WHY NOT?) AND YOU'RE FEELING LAZY\n\n    Don't be this lazy as you'll be letting a computer and my programming try to guess what you wanted. But…\n\n    # Imagine it's the 2018-03-11 today, because today is the day that'll be\n    # chosen for your tag date.\n    tag_uri = TagURI::URI.new uri: \"http://www.example.com/posts/beeswax#bees\"\n\n    tag_uri.to_s\n    # =\u003e \"tag:www.example.com,2018-03-11:/posts/beeswax#bees\"\n    tag_uri.authority_name\n    # =\u003e \"www.example.com\"\n    tag_uri.specific\n    # =\u003e \"/posts/beeswax\"\n    tag_uri.fragment # yes, you get fragments too!\n    # =\u003e \"bees\"\n\nGiven a model:\n\n    class Post \u003c Sequel::Model # it doesn't have to be Sequel\n    end\n\n    post = Post.create title: \"How to make a good ID in Atom\"\n    post.slug\n    # =\u003e \"howto-atom-linkblog\"\n    post.created_at\n    # =\u003e 2004-05-27 00:00:00 0100\n    post.prefix\n    # =\u003e \"/archives/2004/05/27/\" # Why? It's up to you.\n\n    tag_uri = TagURI::URI.new authority_name: request.host,\n                    date: post.created_at,\n                    specific: \"#{post.prefix}#{slug}\"\n\n    tag_uri.to_s\n    # =\u003e \"tag:diveintomark.org,2013-02-26:/archives/2004/05/27/howto-atom-linkblog\"\n\nor something like that.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'tag_uri'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tag_uri\n\n## Even better installation\n\nI'm trying to be a [responsible citizen regarding security](https://keybase.io/iainb) so I've followed the [instructions here](https://guides.rubygems.org/security/) and created a [public certicate](https://gist.github.com/yb66/0fb0e3007de4d4279aeaf162e0ced40a#file-yb66-pem) and signed the gem, so you can install it via:\n\n    gem cert --add \u003c(curl -Ls https://gist.githubusercontent.com/yb66/0fb0e3007de4d4279aeaf162e0ced40a/raw/49466a801e1fd237fffe4658143a96c6cca6c961/yb66.pem)\n\n    gem install tag_uri -P MediumSecurity\n\nThe MediumSecurity trust profile will verify signed gems, but allow the installation of unsigned dependencies.\n\nIf all of TagURI’s dependencies are signed you can use HighSecurity.\n\n    gem install tag_uri -P HighSecurity\n\nIt's just one more [good reason](https://cfoc.org/rubygems-vulnerability-can-compel-installing-malware/) to get on to gem authors and ask them to sign their gems, and ask the Rubygems authors to be [proactive with security measures](https://github.com/rubygems/rubygems/issues/2496).\n\n## Versioning ##\n\nThis library uses [semver](http://semver.org).\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyb66%2Ftag-uri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyb66%2Ftag-uri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyb66%2Ftag-uri/lists"}