webmention 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,7 @@ Webmention Client
3
3
 
4
4
  A Ruby gem for sending [webmention](http://indiewebcamp.com/webmention) (and [pingback](http://indiewebcamp.com/pingback)) notifications.
5
5
 
6
- [![Build Status](https://travis-ci.org/icco/mention-client-ruby.png?branch=master)](https://travis-ci.org/icco/mention-client-ruby)
6
+ [![Build Status](https://travis-ci.org/indieweb/mention-client-ruby.png?branch=master)](https://travis-ci.org/indieweb/mention-client-ruby)
7
7
 
8
8
  Installation
9
9
  ------------
@@ -46,7 +46,7 @@ end
46
46
  Webmention
47
47
  ----------
48
48
 
49
- To learn more about Webmention, see [webmention.org](http://webmention.org).
49
+ To learn more about Webmention, see [webmention.org](http://webmention.org) and [indiewebcamp.com/webmention](http://indiewebcamp.com/webmention).
50
50
 
51
51
 
52
52
  License
@@ -130,12 +130,12 @@ module Webmention
130
130
 
131
131
  def self.discover_webmention_endpoint_from_html html
132
132
  doc = Nokogiri::HTML(html)
133
- if !doc.css('link[rel="webmention"]').empty?
134
- doc.css('link[rel="webmention"]').attribute("href").value
135
- elsif !doc.css('link[rel="http://webmention.org/"]').empty?
136
- doc.css('link[rel="http://webmention.org/"]').attribute("href").value
137
- elsif !doc.css('link[rel="http://webmention.org"]').empty?
138
- doc.css('link[rel="http://webmention.org"]').attribute("href").value
133
+ if !doc.css('[rel="webmention"]').empty?
134
+ doc.css('[rel="webmention"]').attribute("href").value
135
+ elsif !doc.css('[rel="http://webmention.org/"]').empty?
136
+ doc.css('[rel="http://webmention.org/"]').attribute("href").value
137
+ elsif !doc.css('[rel="http://webmention.org"]').empty?
138
+ doc.css('[rel="http://webmention.org"]').attribute("href").value
139
139
  else
140
140
  false
141
141
  end
@@ -1,3 +1,3 @@
1
1
  module Webmention
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -10,6 +10,15 @@ class SampleData
10
10
  eos
11
11
  end
12
12
 
13
+ def self.rel_webmention_a_href
14
+ <<-eos
15
+ <html>
16
+ <head>
17
+ <a rel="webmention" href="http://webmention.io/example/webmention">webmention</a>
18
+ </head>
19
+ </html>
20
+ eos
21
+ end
13
22
  def self.rel_href_webmention
14
23
  <<-eos
15
24
  <html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmention
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -163,4 +163,3 @@ test_files:
163
163
  - test/lib/webmention/url_test.rb
164
164
  - test/lib/webmention/version_test.rb
165
165
  - test/test_helper.rb
166
- has_rdoc: