Skip to content

Commit 6157a0a

Browse files
authored
Update documentation (#34)
* Remove unnecessary rules * Add Code of Conduct file * Update documentation files
1 parent fce7e11 commit 6157a0a

5 files changed

Lines changed: 27 additions & 32 deletions

File tree

.editorconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,3 @@ insert_final_newline = true
88
indent_size = 2
99
indent_style = space
1010
trim_trailing_whitespace = true
11-
12-
[*.md]
13-
indent_size = 4
14-
indent_style = tab

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
By contributing to and participating in the development of indieweb-endpoints-ruby, you acknowledge that you have read and agree to the [IndieWeb Code of Conduct](https://indieweb.org/code-of-conduct).

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
There are a couple ways you can help improve webmention-client-ruby:
44

5-
1. Fix an existing [issue][issues] and submit a [pull request][pulls].
6-
1. Review open [pull requests][pulls].
7-
1. Report a new [issue][issues]. _Only do this after you've made sure the behavior or problem you're observing isn't already documented in an open issue._
5+
1. Fix an existing [Issue][issues] and submit a [Pull Request][pulls].
6+
1. Review open [Pull Requests][pulls].
7+
1. Report a new [Issue][issues]. _Only do this after you've made sure the behavior or problem you're observing isn't already documented in an open issue._
88

99
## Getting Started
1010

11-
webmention-client-ruby is developed using Ruby 2.7.7 and is additionally tested against Ruby 3.0, 3.1, and 3.2 using [GitHub Actions](https://github.com/indieweb/webmention-client-ruby/actions).
11+
webmention-client-ruby is developed using Ruby 2.7.8 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/indieweb/webmention-client-ruby/actions).
1212

13-
Before making changes to webmention-client-ruby, you'll want to install Ruby 2.7.7. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.7.7 using your method of choice, install the project's gems by running:
13+
Before making changes to webmention-client-ruby, you'll want to install Ruby 2.7.8. Using a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm) is recommended. Once you've installed Ruby 2.7.8 using your method of choice, install the project's gems by running:
1414

1515
```sh
1616
bundle install
@@ -25,11 +25,11 @@ bundle install
2525
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bundle exec rspec`.
2626
1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. _(See [this excellent article](https://chris.beams.io/posts/git-commit/) for tips on writing useful Git commit messages.)_
2727
1. Push the branch to your fork: `git push -u origin my-new-feature`.
28-
1. Create a new [pull request][pulls] and we'll review your changes.
28+
1. Create a new [Pull Request][pulls] and we'll review your changes.
2929

3030
## Code Style
3131

32-
Code formatting conventions are defined in the `.editorconfig` file which uses the [EditorConfig](http://editorconfig.org) syntax. There are [plugins for a variety of editors](http://editorconfig.org/#download) that utilize the settings in the `.editorconfig` file. We recommended you install the EditorConfig plugin for your editor of choice.
32+
Code formatting conventions are defined in the `.editorconfig` file which uses the [EditorConfig](http://editorconfig.org) syntax. There are [plugins for a variety of editors](http://editorconfig.org/#download) that utilize the settings in the `.editorconfig` file. We recommended installing the EditorConfig plugin for your editor of choice.
3333

3434
Your bug fix or feature addition won't be rejected if it runs afoul of any (or all) of these guidelines, but following the guidelines will definitely make everyone's lives a little easier.
3535

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,18 @@
1515

1616
## Getting Started
1717

18-
Before installing and using webmention-client-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (or newer) installed. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm).
18+
Before installing and using webmention-client-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (or newer) installed. Using a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm) is recommended.
1919

20-
webmention-client-ruby is developed using Ruby 2.7.7 and is additionally tested against Ruby 3.0, 3.1, and 3.2 using [GitHub Actions](https://github.com/indieweb/webmention-client-ruby/actions).
20+
webmention-client-ruby is developed using Ruby 2.7.8 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/indieweb/webmention-client-ruby/actions).
2121

2222
## Installation
2323

24-
If you're using [Bundler](https://bundler.io) to manage gem dependencies, add webmention-client-ruby to your project's `Gemfile`:
24+
Add webmention-client-ruby to your project's `Gemfile` and run `bundle install`:
2525

2626
```ruby
27-
gem 'webmention'
28-
```
29-
30-
…and run `bundle install` in your shell.
27+
source "https://rubygems.org"
3128

32-
To install the gem manually, run the following in your shell:
33-
34-
```sh
35-
gem install webmention
29+
gem "webmention-client"
3630
```
3731

3832
## Usage
@@ -53,7 +47,9 @@ webmention-client-ruby was completely rewritten for version 6 to better support
5347

5448
## Contributing
5549

56-
Interested in helping improve webmention-client-ruby? Awesome! Your help is greatly appreciated. See [CONTRIBUTING.md](https://github.com/indieweb/webmention-client-ruby/blob/main/CONTRIBUTING.md) for details.
50+
See [CONTRIBUTING.md](https://github.com/indieweb/webmention-client-ruby/blob/main/CONTRIBUTING.md) for more on how to contribute to webmention-client-ruby. Your help is greatly appreciated!
51+
52+
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](https://indieweb.org/code-of-conduct).
5753

5854
## Acknowledgments
5955

USAGE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Before using webmention-client-ruby, please read the [Getting Started](https://g
77
With webmention-client-ruby installed, you may send a webmention from a source URL to a target URL:
88

99
```ruby
10-
require 'webmention'
10+
require "webmention"
1111

12-
source = 'https://jgarber.example/post/100' # A post on your website
13-
target = 'https://aaronpk.example/post/100' # A post on someone else's website
12+
source = "https://jgarber.example/post/100" # A post on your website
13+
target = "https://aaronpk.example/post/100" # A post on someone else's website
1414

1515
response = Webmention.send_webmention(source, target)
1616
```
@@ -61,8 +61,8 @@ response.uri #=> HTTP::URI
6161
To send webmentions to multiple target URLs mentioned by a source URL:
6262

6363
```ruby
64-
source = 'https://jgarber.example/post/100'
65-
targets = ['https://aaronpk.example/notes/1', 'https://adactio.example/notes/1']
64+
source = "https://jgarber.example/post/100"
65+
targets = ["https://aaronpk.example/notes/1", "https://adactio.example/notes/1"]
6666

6767
responses = Webmention.send_webmentions(source, targets)
6868
```
@@ -75,18 +75,18 @@ webmention-client-ruby supports submitting a [vouch](https://indieweb.org/Vouch)
7575

7676
```ruby
7777
# Send a webmention with a vouch URL to a target URL
78-
Webmention.send_webmention(source, target, vouch: 'https://tantek.example/notes/1')
78+
Webmention.send_webmention(source, target, vouch: "https://tantek.example/notes/1")
7979

8080
# Send webmentions with a vouch URL to multiple target URLs
81-
Webmention.send_webmentions(source, targets, vouch: 'https://tantek.example/notes/1')
81+
Webmention.send_webmentions(source, targets, vouch: "https://tantek.example/notes/1")
8282
```
8383

8484
## Discovering mentioned URLs
8585

8686
To retrieve unique URLs mentioned by a URL:
8787

8888
```ruby
89-
urls = Webmention.mentioned_urls('https://jgarber.example/post/100')
89+
urls = Webmention.mentioned_urls("https://jgarber.example/post/100")
9090
```
9191

9292
`Webmention.mentioned_urls` will crawl the provided URL, parse the response body, and return a sorted list of unique URLs. Response bodies are parsed using MIME type-specific rules as noted in the [Verifying a webmention](#verifying-a-webmention) section below.
@@ -129,7 +129,7 @@ verification = Webmention.verify_webmention(source, target)
129129

130130
# Verify that a source URL links to a target URL and that the vouch URL mentions
131131
# the source URL's domain
132-
verification = Webmention.verify_webmention(source, target, vouch: 'https://tantek.example/notes/1')
132+
verification = Webmention.verify_webmention(source, target, vouch: "https://tantek.example/notes/1")
133133
```
134134

135135
`Webmention.verify_webmention` returns an instance of `Webmention::Verification` which includes the following methods (each returns either `true` or `false`):

0 commit comments

Comments
 (0)