webmention-client-ruby

A Ruby gem for sending and verifying Webmention notifications.

Gem Downloads Build

Key Features

  • Crawl a URL for mentioned URLs.
  • Perform endpoint discovery on mentioned URLs.
  • Send webmentions to one or more mentioned URLs (and optionally include a vouch URL).
  • Verify that a received webmention's source URL links to a target URL (and optionally verify that a vouch URL mentions the source URL's domain).

Getting Started

Before installing and using webmention-client-ruby, you'll want to have Ruby 3.0 (or newer) installed. Using a Ruby version managment tool like rbenv, chruby, or rvm is recommended.

webmention-client-ruby is developed using Ruby 3.0.0 and is tested against additional Ruby versions using GitHub Actions.

Installation

Add webmention-client-ruby to your project's Gemfile and run bundle install:

source "https://rubygems.org"

gem "webmention-client"

Usage

See USAGE.md for documentation of webmention-client-ruby's features.

Migrating to version 6

webmention-client-ruby was completely rewritten for version 6 to better support new features and future development. Some notes on migrating to the new version:

♻️ Renamed: for clarity and consistency, the Webmention.send_mention method has been renamed Webmention.send_webmention. Both methods use the same interface.

Removed: the Webmention.client method has been removed in favor of the additional module methods noted above. While the underlying Webmention::Client class still exists, its interface has changed and its direct usage is generally unnecessary.

Removed: Webmention::Client#send_all_mentions has been removed in favor of Webmention.send_webmentions. Combine Webmention.mentioned_urls and Webmention.send_webmentions to achieve similar results.

🛠 Refactored: Exception handling has been greatly improved as noted above.

Contributing

See CONTRIBUTING.md for more on how to contribute to webmention-client-ruby. Your help is greatly appreciated!

By contributing to and participating in the development of webmention-client-ruby, you acknowledge that you have read and agree to the IndieWeb Code of Conduct.

Acknowledgments

webmention-client-ruby is written and maintained by Jason Garber (@jgarber623) with help from these additional contributors. Prior to 2018, webmention-client-ruby was written and maintained by Aaron Parecki (@aaronpk) and Nat Welch (@icco).

To learn more about Webmention, see indieweb.org/Webmention and webmention.net.

License

webmention-client-ruby is freely available under the Apache License 2.0. See LICENSE for more details.