indieweb-authorship 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +9 -7
- data/README.md +2 -2
- data/indieweb-authorship.gemspec +1 -1
- data/lib/indieweb/authorship.rb +9 -2
- data/lib/indieweb/authorship/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0b6bdddfb538e51fff2646b140a2f341e104b8ad6cc02286c9fbf9d4a54594b
|
4
|
+
data.tar.gz: 7184d8be08fae80b7e5e7978294b89b3cc335b549baa0538bc52a8cfd0080949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12fa1aefea90229108e3e286d51bac73680d42e585c5f5966680003ba3f48c505d3d4cee50dfeb0503c5998d27a820caf954797e58e2b8b6cb6317dbdf6f9dac
|
7
|
+
data.tar.gz: e9960f6f68eda276db9435969d25d0393175cbda98c4f65ba2824f115ac10ff57882b5629ae906ce3f2d3ecc4f1c02af05d2131a1760c61eed3672216404d7f7
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.2.2] - 2021-04-03
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Support encoded emails within the h-card.
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
- Update microformats gem to a minimum of 4.2.1 (to remove Ruby 2.7 deprecation warning).
|
18
|
+
|
19
|
+
### Security
|
20
|
+
|
21
|
+
- Update nokogiri from 1.10.10 to 1.11.2
|
22
|
+
|
9
23
|
## [0.2.1] - 2020-08-02
|
10
24
|
|
11
25
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
indieweb-authorship (0.2.
|
5
|
-
microformats (~> 4.0, >= 4.1
|
4
|
+
indieweb-authorship (0.2.2)
|
5
|
+
microformats (~> 4.0, >= 4.2.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.3)
|
11
|
-
json (2.
|
12
|
-
microformats (4.2.
|
11
|
+
json (2.5.1)
|
12
|
+
microformats (4.2.1)
|
13
13
|
json (~> 2.2)
|
14
14
|
nokogiri (~> 1.10)
|
15
|
-
mini_portile2 (2.
|
16
|
-
nokogiri (1.
|
17
|
-
mini_portile2 (~> 2.
|
15
|
+
mini_portile2 (2.5.0)
|
16
|
+
nokogiri (1.11.2)
|
17
|
+
mini_portile2 (~> 2.5.0)
|
18
|
+
racc (~> 1.4)
|
19
|
+
racc (1.5.2)
|
18
20
|
rake (13.0.1)
|
19
21
|
rspec (3.7.0)
|
20
22
|
rspec-core (~> 3.7.0)
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ If an author is identified then the output will be a hash containing the fields
|
|
42
42
|
|
43
43
|
## Contributing
|
44
44
|
|
45
|
-
Bug reports
|
45
|
+
Bug reports can be added at [https://code.deeden.co.uk/indieweb-authorship/issues](https://code.deeden.co.uk/indieweb-authorship/issues), while patches are welcome at [https://code.deeden.co.uk/indieweb-authorship/patches](https://code.deeden.co.uk/indieweb-authorship/patches).
|
46
46
|
|
47
47
|
## License
|
48
48
|
|
@@ -50,7 +50,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
50
50
|
|
51
51
|
## Code of Conduct
|
52
52
|
|
53
|
-
|
53
|
+
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
54
54
|
|
55
55
|
## Credits
|
56
56
|
|
data/indieweb-authorship.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_runtime_dependency "microformats", "~> 4.0", ">= 4.1
|
31
|
+
spec.add_runtime_dependency "microformats", "~> 4.0", ">= 4.2.1"
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.16"
|
34
34
|
spec.add_development_dependency "rake", "~> 13.0"
|
data/lib/indieweb/authorship.rb
CHANGED
@@ -3,11 +3,12 @@
|
|
3
3
|
require 'indieweb/authorship/version'
|
4
4
|
require 'microformats'
|
5
5
|
require 'net/http'
|
6
|
+
require 'cgi'
|
6
7
|
|
7
8
|
module Indieweb
|
8
9
|
module Authorship
|
9
10
|
def self.identify(url, html = nil)
|
10
|
-
collection = microformats_from(html: html, url: url)
|
11
|
+
collection = microformats_from(html: unescaped_html_for(html), url: url)
|
11
12
|
|
12
13
|
# 1. start with a particular h-entry to determine authorship for, and
|
13
14
|
# no author. if no h-entry, then there's no post to find authorship
|
@@ -64,7 +65,7 @@ module Indieweb
|
|
64
65
|
|
65
66
|
def self.microformats_from(html: nil, url:)
|
66
67
|
html ||= Net::HTTP.get(URI(url))
|
67
|
-
::Microformats.parse(html, base: url)
|
68
|
+
::Microformats.parse(unescaped_html_for(html), base: url)
|
68
69
|
end
|
69
70
|
private_class_method :microformats_from
|
70
71
|
|
@@ -182,5 +183,11 @@ module Indieweb
|
|
182
183
|
hcard['properties']['name'][0],
|
183
184
|
hcard['properties']['photo'][0])
|
184
185
|
end
|
186
|
+
|
187
|
+
def self.unescaped_html_for(html)
|
188
|
+
return if html.nil?
|
189
|
+
CGI.unescape(html)
|
190
|
+
end
|
191
|
+
private_class_method :unescaped_html_for
|
185
192
|
end
|
186
193
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indieweb-authorship
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Rushe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: microformats
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.0'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 4.1
|
22
|
+
version: 4.2.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.0'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 4.1
|
32
|
+
version: 4.2.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.1.4
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Identify the author of an IndieWeb post
|