{"id":16737232,"url":"https://github.com/borisbresciani/rails_parse_head","last_synced_at":"2025-04-10T12:42:36.593Z","repository":{"id":36576382,"uuid":"228711116","full_name":"BorisBresciani/rails_parse_head","owner":"BorisBresciani","description":"Parse head element (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head) ","archived":false,"fork":false,"pushed_at":"2023-04-12T05:32:48.000Z","size":40,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T18:58:27.575Z","etag":null,"topics":["html-head","parse","parsing"],"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/BorisBresciani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-17T22:16:09.000Z","updated_at":"2020-07-05T14:31:06.000Z","dependencies_parsed_at":"2022-08-20T15:20:51.939Z","dependency_job_id":null,"html_url":"https://github.com/BorisBresciani/rails_parse_head","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBresciani%2Frails_parse_head","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBresciani%2Frails_parse_head/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBresciani%2Frails_parse_head/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorisBresciani%2Frails_parse_head/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BorisBresciani","download_url":"https://codeload.github.com/BorisBresciani/rails_parse_head/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217160,"owners_count":21066634,"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":["html-head","parse","parsing"],"created_at":"2024-10-13T00:25:23.932Z","updated_at":"2025-04-10T12:42:36.577Z","avatar_url":"https://github.com/BorisBresciani.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RailsParseHead\n\n[![Gem Version](https://badge.fury.io/rb/rails_parse_head.svg)](https://badge.fury.io/rb/rails_parse_head)\n[![Maintainability](https://api.codeclimate.com/v1/badges/afba4f764f278035b1c1/maintainability)](https://codeclimate.com/github/BorisBresciani/rails_parse_head/maintainability)\n[![Build Status](https://travis-ci.org/BorisBresciani/rails_parse_head.svg?branch=master)](https://travis-ci.org/BorisBresciani/rails_parse_head)\n[![security](https://hakiri.io/github/BorisBresciani/rails_parse_head/master.svg)](https://hakiri.io/github/BorisBresciani/rails_parse_head/master)\n![Gem](https://img.shields.io/gem/dt/rails_parse_head)\n[![Coverage Status](https://coveralls.io/repos/github/BorisBresciani/rails_parse_head/badge.svg?branch=master)](https://coveralls.io/github/BorisBresciani/rails_parse_head?branch=master)\n \nRailsParseHead is a simple Ruby library for parsing head element information from a website. \n\nLearn more about the head element at: \n- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head\n- https://github.com/joshbuchea/HEAD\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rails_parse_head'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rails_parse_head\n\n## Usage\n\n### Parsing an URL\n\n```ruby\nrph = RailsParseHead.fetch('https://github.com')\nrph.title # =\u003e \"The world’s leading software development platform · GitHub\"\nrph.metas # =\u003e [{:charset=\u003e\"utf-8\"}, {:name=\u003e\"viewport\", :content=\u003e\"width=device-width\"}]\nrph.links # =\u003e [{:rel=\u003e\"dns-prefetch\", :href=\u003e\"https://github.githubassets.com\"}, {:rel=\u003e\"dns-prefetch\", :href=\u003e\"https://avatars0.githubusercontent.com\"}]\n```\n\n#### Custom header request\n```ruby\nrph = RailsParseHead.fetch('https://github.com', headers: { accept: 'application/json' })\n```\n\nSee: https://github.com/httprb/http/wiki/Headers\n\n### Parsing a HTML string\n\n```ruby\nrph = RailsParseHead.parse(\"\u003cmeta charset='utf-8'\u003e\")\nrph.metas # =\u003e [{:charset=\u003e\"utf-8\"}]\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/BorisBresciani/rails_parse_head. 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## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the RailsParseHead project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/BorisBresciani/rails_parse_head/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborisbresciani%2Frails_parse_head","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborisbresciani%2Frails_parse_head","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborisbresciani%2Frails_parse_head/lists"}