micromicro 3.1.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/CONTRIBUTING.md +2 -2
- data/README.md +1 -1
- data/lib/micro_micro/document.rb +2 -2
- data/lib/micro_micro/helpers.rb +1 -1
- data/lib/micro_micro/item.rb +1 -1
- data/lib/micro_micro/relationship.rb +1 -1
- data/lib/micro_micro/version.rb +1 -1
- data/micromicro.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4ed4ff8b2b7284cd01096982ef345571ffb1de9c10e5943b725976aa6778674
|
4
|
+
data.tar.gz: 9275bb41d54398977ea98439e76b0adab839ffa38869a2ecbe63468fed0dc376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e87a9b3275b7c212e485459a520ea3b7a687550450f42ff5ade89069e1fc610d64e9c918eec27c1a88be8807f14f652351c81150a3028884b37a050db7c0f70
|
7
|
+
data.tar.gz: 50278fa0b0130004d98b5851dc4530f19c6888028266538bd0d05e43820ff3b3d64af6aadc937e1497cce158a134553c1605857e342cc2511e67450c1314411d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.0.0 / 2023-03-14
|
4
|
+
|
5
|
+
- Parse HTML with `Nokogiri::HTML5::Document.parse` (330a2d1, 0de40d7)
|
6
|
+
- Update Nokogiri and nokogiri-html-ext constraints (e038606, cb6e499, 9793b17)
|
7
|
+
- Remove code-scanning-rubocop and rspec-github gems (2fbb9c5)
|
8
|
+
- Update development Ruby to v2.7.7 (a333103)
|
9
|
+
|
3
10
|
## 3.1.0 / 2022-09-24
|
4
11
|
|
5
12
|
- **New feature:** parse `img[srcset]` (microformats/microformats2-parsing#7) (cdda328)
|
data/CONTRIBUTING.md
CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve MicroMicro:
|
|
8
8
|
|
9
9
|
## Getting Started
|
10
10
|
|
11
|
-
MicroMicro is developed using Ruby 2.7.
|
11
|
+
MicroMicro 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/jgarber623/micromicro/actions).
|
12
12
|
|
13
|
-
Before making changes to MicroMicro, you'll want to install Ruby 2.7.
|
13
|
+
Before making changes to MicroMicro, 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:
|
14
14
|
|
15
15
|
```sh
|
16
16
|
bundle install
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
[](https://rubygems.org/gems/micromicro)
|
6
6
|
[](https://rubygems.org/gems/micromicro)
|
7
|
-
[](https://github.com/jgarber623/micromicro/actions/workflows/ci.yml)
|
8
8
|
[](https://codeclimate.com/github/jgarber623/micromicro)
|
9
9
|
[](https://codeclimate.com/github/jgarber623/micromicro/code)
|
10
10
|
|
data/lib/micro_micro/document.rb
CHANGED
@@ -16,7 +16,7 @@ module MicroMicro
|
|
16
16
|
# @param markup [String] The HTML to parse for microformats2-encoded data.
|
17
17
|
# @param base_url [String] The URL associated with markup. Used for relative URL resolution.
|
18
18
|
def initialize(markup, base_url)
|
19
|
-
@document = Nokogiri::
|
19
|
+
@document = Nokogiri::HTML5::Document.parse(markup, base_url).resolve_relative_urls!
|
20
20
|
end
|
21
21
|
|
22
22
|
# @return [String]
|
@@ -63,7 +63,7 @@ module MicroMicro
|
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
-
# @return [Nokogiri::
|
66
|
+
# @return [Nokogiri::HTML5::Document]
|
67
67
|
attr_reader :document
|
68
68
|
end
|
69
69
|
end
|
data/lib/micro_micro/helpers.rb
CHANGED
@@ -62,7 +62,7 @@ module MicroMicro
|
|
62
62
|
# @see https://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
|
63
63
|
# microformats.org: microformats2 parsing specification § Parsing for implied properties
|
64
64
|
#
|
65
|
-
# @param context [Nokogiri::
|
65
|
+
# @param context [Nokogiri::HTML5::Document, Nokogiri::XML::NodeSet, Nokogiri::XML::Element]
|
66
66
|
# @yield [context]
|
67
67
|
# @return [String]
|
68
68
|
def self.text_content_from(context)
|
data/lib/micro_micro/item.rb
CHANGED
@@ -32,7 +32,7 @@ module MicroMicro
|
|
32
32
|
|
33
33
|
# Extract {MicroMicro::Item}s from a context.
|
34
34
|
#
|
35
|
-
# @param context [Nokogiri::
|
35
|
+
# @param context [Nokogiri::HTML5::Document, Nokogiri::XML::NodeSet, Nokogiri::XML::Element]
|
36
36
|
# @return [Array<MicroMicro::Item>]
|
37
37
|
def self.from_context(context)
|
38
38
|
ItemNodeSearch
|
@@ -6,7 +6,7 @@ module MicroMicro
|
|
6
6
|
|
7
7
|
# Extract {MicroMicro::Relationship}s from a context.
|
8
8
|
#
|
9
|
-
# @param context [Nokogiri::
|
9
|
+
# @param context [Nokogiri::HTML5::Document, Nokogiri::XML::Element]
|
10
10
|
# @return [Array<MicroMicro::Relationship>]
|
11
11
|
def self.from_context(context)
|
12
12
|
context.css('[href][rel]:not([rel=""])')
|
data/lib/micro_micro/version.rb
CHANGED
data/micromicro.gemspec
CHANGED
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
}
|
29
29
|
|
30
30
|
spec.add_runtime_dependency 'activesupport', '~> 7.0'
|
31
|
-
spec.add_runtime_dependency 'nokogiri', '>= 1.
|
32
|
-
spec.add_runtime_dependency 'nokogiri-html-ext', '~> 0.
|
31
|
+
spec.add_runtime_dependency 'nokogiri', '>= 1.14'
|
32
|
+
spec.add_runtime_dependency 'nokogiri-html-ext', '~> 0.4.0'
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micromicro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.14'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.14'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri-html-ext
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.4.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.4.0
|
55
55
|
description: Extract microformats2-encoded data from HTML documents.
|
56
56
|
email:
|
57
57
|
- jason@sixtwothree.org
|
@@ -94,7 +94,7 @@ licenses:
|
|
94
94
|
- MIT
|
95
95
|
metadata:
|
96
96
|
bug_tracker_uri: https://github.com/jgarber623/micromicro/issues
|
97
|
-
changelog_uri: https://github.com/jgarber623/micromicro/blob/
|
97
|
+
changelog_uri: https://github.com/jgarber623/micromicro/blob/v4.0.0/CHANGELOG.md
|
98
98
|
rubygems_mfa_required: 'true'
|
99
99
|
post_install_message:
|
100
100
|
rdoc_options: []
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
|
-
rubygems_version: 3.3.
|
117
|
+
rubygems_version: 3.3.26
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Extract microformats2-encoded data from HTML documents.
|