micromicro 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/micro_micro/collections/base_collection.rb +1 -1
- data/lib/micro_micro/document.rb +1 -1
- data/lib/micro_micro/helpers.rb +1 -1
- data/lib/micro_micro/item.rb +1 -1
- data/lib/micro_micro/parsers/base_property_parser.rb +1 -1
- data/lib/micro_micro/parsers/date_time_parser.rb +2 -2
- data/lib/micro_micro/parsers/date_time_property_parser.rb +3 -3
- data/lib/micro_micro/parsers/plain_text_property_parser.rb +3 -3
- data/lib/micro_micro/parsers/url_property_parser.rb +6 -6
- data/lib/micro_micro/parsers/value_class_pattern_parser.rb +4 -4
- data/lib/micro_micro/property.rb +1 -1
- data/lib/micro_micro/relationship.rb +1 -1
- data/lib/micro_micro/version.rb +1 -1
- data/micromicro.gemspec +4 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e785f62dd853af203f0529138dae1538c09e6a3940370f7b939b552e8c0fbe1
|
4
|
+
data.tar.gz: 2c356c5616b6ca146d362c1c2ce3299e935371cf7005f5c7cfcbe93125b0fa5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 615ad86af5e5da61652aec270f5927b131982388e92d9dae7b519d30a9d59a565819db13ed877770b1c1da54457940f9f6b03170eabf48a1ca0f41b9378b257e
|
7
|
+
data.tar.gz: 2676e978a705fd3af691ca6eaca603d1a50efc2def0947abe1a06b8dc0e85aef10b3ae5ee74930d60a10af21cd22cdb6b3c98c8db43861081de745d24352e42e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.0.1 / 2024-01-01
|
4
|
+
|
5
|
+
- Use rubygems/release-gem action (#81) (ab39770)
|
6
|
+
- RuboCop: Style/WordArray (227a223)
|
7
|
+
- RuboCop: Style/StringLiteralsInInterpolation (f5c350c)
|
8
|
+
- RuboCop: Style/SymbolArray (6ccd949)
|
9
|
+
- RuboCop: Performance/StringIdentifierArgument (477e25a)
|
10
|
+
- Add `source_code_uri` to metadata (b3f49cf)
|
11
|
+
|
3
12
|
## 5.0.0 / 2023-12-11
|
4
13
|
|
5
14
|
- Remove upper version constraint (#79) (86f09d8)
|
data/lib/micro_micro/document.rb
CHANGED
data/lib/micro_micro/helpers.rb
CHANGED
data/lib/micro_micro/item.rb
CHANGED
@@ -91,7 +91,7 @@ module MicroMicro
|
|
91
91
|
#
|
92
92
|
# :nocov:
|
93
93
|
def inspect
|
94
|
-
"#<#{self.class}:#{format(
|
94
|
+
"#<#{self.class}:#{format("%#0x", object_id)} " \
|
95
95
|
"types: #{types.inspect}, " \
|
96
96
|
"properties: #{properties.count}, " \
|
97
97
|
"children: #{children.count}>"
|
@@ -18,7 +18,7 @@ module MicroMicro
|
|
18
18
|
def value
|
19
19
|
@value ||=
|
20
20
|
Helpers.text_content_from(node) do |context|
|
21
|
-
context.css("img").each { |img| img.content = " #{img[
|
21
|
+
context.css("img").each { |img| img.content = " #{img["alt"] || img["src"]} " }
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -39,9 +39,9 @@ module MicroMicro
|
|
39
39
|
|
40
40
|
# Define getter and predicate methods for all possible named captures
|
41
41
|
# returned by the DATE_TIME_TIMEZONE_REGEXP regular expression.
|
42
|
-
|
42
|
+
[:year, :ordinal, :month, :day, :hours, :minutes, :seconds, :abbreviation, :zulu, :offset].each do |name|
|
43
43
|
define_method(name) { values[name] }
|
44
|
-
define_method("#{name}?") { public_send(name).present? }
|
44
|
+
define_method(:"#{name}?") { public_send(name).present? }
|
45
45
|
end
|
46
46
|
|
47
47
|
# @return [String, nil]
|
@@ -4,9 +4,9 @@ module MicroMicro
|
|
4
4
|
module Parsers
|
5
5
|
class DateTimePropertyParser < BasePropertyParser
|
6
6
|
HTML_ATTRIBUTES_MAP = {
|
7
|
-
"datetime" =>
|
8
|
-
"title" =>
|
9
|
-
"value" =>
|
7
|
+
"datetime" => ["del", "ins", "time"],
|
8
|
+
"title" => ["abbr"],
|
9
|
+
"value" => ["data", "input"]
|
10
10
|
}.freeze
|
11
11
|
|
12
12
|
# @see https://microformats.org/wiki/microformats2-parsing#parsing_a_dt-_property
|
@@ -4,9 +4,9 @@ module MicroMicro
|
|
4
4
|
module Parsers
|
5
5
|
class PlainTextPropertyParser < BasePropertyParser
|
6
6
|
HTML_ATTRIBUTES_MAP = {
|
7
|
-
"title" =>
|
8
|
-
"value" =>
|
9
|
-
"alt" =>
|
7
|
+
"title" => ["abbr", "link"],
|
8
|
+
"value" => ["data", "input"],
|
9
|
+
"alt" => ["area", "img"]
|
10
10
|
}.freeze
|
11
11
|
|
12
12
|
# @see https://microformats.org/wiki/microformats2-parsing#parsing_a_p-_property
|
@@ -4,15 +4,15 @@ module MicroMicro
|
|
4
4
|
module Parsers
|
5
5
|
class UrlPropertyParser < BasePropertyParser
|
6
6
|
HTML_ATTRIBUTES_MAP = {
|
7
|
-
"href" =>
|
8
|
-
"src" =>
|
9
|
-
"poster" =>
|
10
|
-
"data" =>
|
7
|
+
"href" => ["a", "area", "link"],
|
8
|
+
"src" => ["audio", "iframe", "img", "source", "video"],
|
9
|
+
"poster" => ["video"],
|
10
|
+
"data" => ["object"]
|
11
11
|
}.freeze
|
12
12
|
|
13
13
|
EXTENDED_HTML_ATTRIBUTES_MAP = {
|
14
|
-
"title" =>
|
15
|
-
"value" =>
|
14
|
+
"title" => ["abbr"],
|
15
|
+
"value" => ["data", "input"]
|
16
16
|
}.freeze
|
17
17
|
|
18
18
|
# @see https://microformats.org/wiki/microformats2-parsing#parsing_a_u-_property
|
@@ -8,10 +8,10 @@ module MicroMicro
|
|
8
8
|
# @see https://microformats.org/wiki/value-class-pattern#Date_and_time_values
|
9
9
|
# microformats.org: Value Class Pattern § Date and time values
|
10
10
|
HTML_ATTRIBUTES_MAP = {
|
11
|
-
"alt" =>
|
12
|
-
"value" =>
|
13
|
-
"title" =>
|
14
|
-
"datetime" =>
|
11
|
+
"alt" => ["area", "img"],
|
12
|
+
"value" => ["data"],
|
13
|
+
"title" => ["abbr"],
|
14
|
+
"datetime" => ["del", "ins", "time"]
|
15
15
|
}.freeze
|
16
16
|
|
17
17
|
# @param context [Nokogiri::XML::NodeSet, Nokogiri::XML::Element]
|
data/lib/micro_micro/property.rb
CHANGED
@@ -105,7 +105,7 @@ module MicroMicro
|
|
105
105
|
#
|
106
106
|
# :nocov:
|
107
107
|
def inspect
|
108
|
-
"#<#{self.class}:#{format(
|
108
|
+
"#<#{self.class}:#{format("%#0x", object_id)} " \
|
109
109
|
"name: #{name.inspect}, " \
|
110
110
|
"prefix: #{prefix.inspect}, " \
|
111
111
|
"value: #{value.inspect}>"
|
data/lib/micro_micro/version.rb
CHANGED
data/micromicro.gemspec
CHANGED
@@ -16,15 +16,16 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
18
18
|
spec.files = Dir["lib/**/*"].reject { |f| File.directory?(f) }
|
19
|
-
spec.files +=
|
20
|
-
spec.files +=
|
19
|
+
spec.files += ["LICENSE", "CHANGELOG.md", "README.md"]
|
20
|
+
spec.files += ["micromicro.gemspec"]
|
21
21
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.metadata = {
|
25
25
|
"bug_tracker_uri" => "#{spec.homepage}/issues",
|
26
26
|
"changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
|
27
|
-
"rubygems_mfa_required" => "true"
|
27
|
+
"rubygems_mfa_required" => "true",
|
28
|
+
"source_code_uri" => "#{spec.homepage}/tree/v#{spec.version}"
|
28
29
|
}
|
29
30
|
|
30
31
|
spec.add_runtime_dependency "activesupport", "~> 7.0"
|
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: 5.0.
|
4
|
+
version: 5.0.1
|
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: 2024-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -92,8 +92,9 @@ licenses:
|
|
92
92
|
- MIT
|
93
93
|
metadata:
|
94
94
|
bug_tracker_uri: https://github.com/jgarber623/micromicro/issues
|
95
|
-
changelog_uri: https://github.com/jgarber623/micromicro/blob/v5.0.
|
95
|
+
changelog_uri: https://github.com/jgarber623/micromicro/blob/v5.0.1/CHANGELOG.md
|
96
96
|
rubygems_mfa_required: 'true'
|
97
|
+
source_code_uri: https://github.com/jgarber623/micromicro/tree/v5.0.1
|
97
98
|
post_install_message:
|
98
99
|
rdoc_options: []
|
99
100
|
require_paths:
|