Project

webmention

0.03
A long-lived project that still receives updates
A Ruby gem for sending Webmention notifications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Runtime

 Project Readme

webmention-client-ruby

A Ruby gem for sending and verifying Webmention notifications.

Gem Downloads Build Maintainability Coverage

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 2.6 (or newer) installed. It's recommended that you use a Ruby version managment tool like rbenv, chruby, or rvm.

webmention-client-ruby is developed using Ruby 2.6.10 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using GitHub Actions.

Installation

If you're using Bundler to manage gem dependencies, add webmention-client-ruby to your project's Gemfile:

gem 'webmention'

…and run bundle install in your shell.

To install the gem manually, run the following in your shell:

gem install webmention

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

Interested in helping improve webmention-client-ruby? Awesome! Your help is greatly appreciated. See CONTRIBUTING.md for details.

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.