micromicro 5.0.0 → 6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0da58d9d4ae907a7a85ef964bcf30bb185e12023a6206a31ec41d53c38740fc1
4
- data.tar.gz: 4672c50b4dc4e5975599bd81feed4a10e5e7ebd25f786ea6d1a1a22c35647528
3
+ metadata.gz: d8258de3f0bc0c85a159a31fa2a88684ff690a125d5ef5eb0aebf9e1c13fa5e6
4
+ data.tar.gz: 35b21911518362e78360ab94ecbe6ec281a34e5a0ca28170f77be72c993e1166
5
5
  SHA512:
6
- metadata.gz: 93c205bc429bc5b9bf76add264e131dd8e7fb4bb83fe9960eb94399cebfe52c04ffe71e6859770b216450cb52b0cdf604b8a3dff78745901900e860354cd1a2e
7
- data.tar.gz: ceee04c5ead6017a402f7c025f813e3d30b9b70c033966b14122f64897199a6e60c1b2dc89a47ed5798884ac2960d24055ed341b2e6bc85f877eb46a388745b4
6
+ metadata.gz: 247993766529a1aec51a2d2da3308de6061d092a902609b74a8eabe331a6667d5827ca5591dae1019f0a32100d080b6bf03f80af2b2921d5ceca62fed1fccd61
7
+ data.tar.gz: 33cf941f897b4f35cdcc6530f3f8ff92572ee5df18ba6ff32ad9649371bb2d828c7f78a1f215112c646bd098224930aa25bd482a8b83641b4691e35eefe907ae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ > [!NOTE]
4
+ > From v6.0.0, changes are documented using [GitHub Releases](https://github.com/jgarber623/micromicro/releases). For a given release, metadata on RubyGems.org will link to that version's Release page.
5
+
6
+ ## 5.0.1 / 2024-01-01
7
+
8
+ - Use rubygems/release-gem action (#81) (ab39770)
9
+ - RuboCop: Style/WordArray (227a223)
10
+ - RuboCop: Style/StringLiteralsInInterpolation (f5c350c)
11
+ - RuboCop: Style/SymbolArray (6ccd949)
12
+ - RuboCop: Performance/StringIdentifierArgument (477e25a)
13
+ - Add `source_code_uri` to metadata (b3f49cf)
14
+
3
15
  ## 5.0.0 / 2023-12-11
4
16
 
5
17
  - Remove upper version constraint (#79) (86f09d8)
@@ -18,7 +18,7 @@ module MicroMicro
18
18
  #
19
19
  # :nocov:
20
20
  def inspect
21
- "#<#{self.class}:#{format('%#0x', object_id)} " \
21
+ "#<#{self.class}:#{format("%#0x", object_id)} " \
22
22
  "count: #{count}, " \
23
23
  "members: #{members.inspect}>"
24
24
  end
@@ -23,7 +23,7 @@ module MicroMicro
23
23
  #
24
24
  # :nocov:
25
25
  def inspect
26
- "#<#{self.class}:#{format('%#0x', object_id)} " \
26
+ "#<#{self.class}:#{format("%#0x", object_id)} " \
27
27
  "items: #{items.inspect}, " \
28
28
  "relationships: #{relationships.inspect}>"
29
29
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module MicroMicro
4
4
  module Helpers
5
- IGNORED_NODE_NAMES = %w[script style template].freeze
5
+ IGNORED_NODE_NAMES = ["script", "style", "template"].freeze
6
6
 
7
7
  private_constant :IGNORED_NODE_NAMES
8
8
 
@@ -91,7 +91,7 @@ module MicroMicro
91
91
  #
92
92
  # :nocov:
93
93
  def inspect
94
- "#<#{self.class}:#{format('%#0x', object_id)} " \
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['alt'] || img['src']} " }
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
- %i[year ordinal month day hours minutes seconds abbreviation zulu offset].each do |name|
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" => %w[del ins time],
8
- "title" => %w[abbr],
9
- "value" => %w[data input]
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" => %w[abbr link],
8
- "value" => %w[data input],
9
- "alt" => %w[area img]
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" => %w[a area link],
8
- "src" => %w[audio iframe img source video],
9
- "poster" => %w[video],
10
- "data" => %w[object]
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" => %w[abbr],
15
- "value" => %w[data input]
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" => %w[area img],
12
- "value" => %w[data],
13
- "title" => %w[abbr],
14
- "datetime" => %w[del ins time]
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]
@@ -105,7 +105,7 @@ module MicroMicro
105
105
  #
106
106
  # :nocov:
107
107
  def inspect
108
- "#<#{self.class}:#{format('%#0x', object_id)} " \
108
+ "#<#{self.class}:#{format("%#0x", object_id)} " \
109
109
  "name: #{name.inspect}, " \
110
110
  "prefix: #{prefix.inspect}, " \
111
111
  "value: #{value.inspect}>"
@@ -44,7 +44,7 @@ module MicroMicro
44
44
  #
45
45
  # :nocov:
46
46
  def inspect
47
- "#<#{self.class}:#{format('%#0x', object_id)} " \
47
+ "#<#{self.class}:#{format("%#0x", object_id)} " \
48
48
  "href: #{href.inspect}, " \
49
49
  "rels: #{rels.inspect}>"
50
50
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MicroMicro
4
- VERSION = "5.0.0"
4
+ VERSION = "6.0.0"
5
5
  end
data/lib/micromicro.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
+ require "uri"
4
5
 
5
6
  require "active_support/core_ext/array/grouping"
6
7
  require "active_support/core_ext/enumerable"
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 += %w[LICENSE CHANGELOG.md README.md]
20
- spec.files += %w[micromicro.gemspec]
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
- "changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
27
- "rubygems_mfa_required" => "true"
26
+ "changelog_uri" => "#{spec.homepage}/releases/tag/v#{spec.version}",
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.0
4
+ version: 6.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: 2023-12-12 00:00:00.000000000 Z
11
+ date: 2024-05-08 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.0/CHANGELOG.md
95
+ changelog_uri: https://github.com/jgarber623/micromicro/releases/tag/v6.0.0
96
96
  rubygems_mfa_required: 'true'
97
+ source_code_uri: https://github.com/jgarber623/micromicro/tree/v6.0.0
97
98
  post_install_message:
98
99
  rdoc_options: []
99
100
  require_paths:
@@ -109,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
110
  - !ruby/object:Gem::Version
110
111
  version: '0'
111
112
  requirements: []
112
- rubygems_version: 3.2.33
113
+ rubygems_version: 3.5.9
113
114
  signing_key:
114
115
  specification_version: 4
115
116
  summary: Extract microformats2-encoded data from HTML documents.