{"id":16552653,"url":"https://github.com/postmodern/nokogiri-ext","last_synced_at":"2025-03-21T10:32:13.544Z","repository":{"id":56885679,"uuid":"451836537","full_name":"postmodern/nokogiri-ext","owner":"postmodern","description":"Useful extensions to nokogiri","archived":false,"fork":false,"pushed_at":"2024-01-25T07:17:50.000Z","size":81,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T22:01:53.379Z","etag":null,"topics":["extensions","nokogiri","ruby"],"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/postmodern.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-01-25T10:42:55.000Z","updated_at":"2022-01-30T00:43:22.000Z","dependencies_parsed_at":"2024-10-11T19:45:44.606Z","dependency_job_id":"9a436bca-5359-4f88-87ff-9b90bb950591","html_url":"https://github.com/postmodern/nokogiri-ext","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"232cabd8d89df85cbbb7ce3e375a1cea8b35dcff"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fnokogiri-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fnokogiri-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fnokogiri-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fnokogiri-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postmodern","download_url":"https://codeload.github.com/postmodern/nokogiri-ext/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244778008,"owners_count":20508830,"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":["extensions","nokogiri","ruby"],"created_at":"2024-10-11T19:45:39.338Z","updated_at":"2025-03-21T10:32:13.226Z","avatar_url":"https://github.com/postmodern.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nokogiri-ext\n\n[![CI](https://github.com/postmodern/nokogiri-ext/actions/workflows/ruby.yml/badge.svg)](https://github.com/postmodern/nokogiri-ext/actions/workflows/ruby.yml)\n[![Gem Version](https://badge.fury.io/rb/fake_io.svg)](https://badge.fury.io/rb/fake_io)\n\n* [Source](https://github.com/postmodern/nokogiri-ext)\n* [Issues](https://github.com/postmodern/nokogiri-ext/issues)\n* [Documentation](http://rubydoc.info/gems/fake_io/frames)\n\n## Description\n\nnokogiri-ext is a collection of useful extensions to the [nokogiri] gem.\n\n## Features\n\n* Adds an `==` method to {Nokogiri::XML::Element}, {Nokogiri::XML::Attr},\n  {Nokogiri::XML::Text}, {Nokogiri::XML::Node}.\n* Adds a `traverse_count` method to {Nokogiri::XML::Document} and\n  {Nokogiri::XML::Node}.\n* Adds the {Nokogiri::XML::Node#traverse_text} method.\n\n## Requirements\n\n* [Ruby] \u003e= 2.6.0\n* [nokogiri] ~\u003e 1.0\n\n## Install\n\n```shell\n$ gem install nokogiri-ext\n```\n\n### gemspec\n\n```ruby\ngem.add_dependency 'nokogiri-ext', '~\u003e 1.0'\n```\n\n### Gemfile\n\n```ruby\ngem 'nokogiri-ext', '~\u003e 1.0'\n```\n\n## Examples\n\n### equality\n\nCompare the contents of two XML/HTML elements:\n\n```ruby\nrequire 'nokogiri/ext/equality'\n\ndoc1.at('//node') == doc2.at('//node')\n```\n\nComparing the contents of two XML/HTML documents:\n\n```ruby\ndoc1 == doc2\n```\n\n### traverse_count\n\nCount the total number of elements under a XML/HTML element:\n\n```ruby\nrequire 'nokogiri/ext/traverse_count'\n\ndoc.at('//node').traverse_count\n# =\u003e 7\n```\n\nCount the total number of elements within a XML/HTML document:\n\n```ruby\ndoc.traverse_count\n# =\u003e 42\n```\n\n### traverse_text\n\nTraverses all text nodes in a XML/HTML document or node:\n\n```ruby\nrequire 'nokogiri/ext/traverse_text'\n\ndoc.traverse_text do |text|\n  puts text\nend\n```\n\n## License\n\nSee {file:LICENSE.txt} for details.\n\n[Ruby]: https://www.ruby-lang.org/\n[nokogiri]: https://github.com/sparklemotion/nokogiri#readme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fnokogiri-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostmodern%2Fnokogiri-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fnokogiri-ext/lists"}