micromicro 5.0.0 → 5.0.1

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: 1e785f62dd853af203f0529138dae1538c09e6a3940370f7b939b552e8c0fbe1
4
+ data.tar.gz: 2c356c5616b6ca146d362c1c2ce3299e935371cf7005f5c7cfcbe93125b0fa5b
5
5
  SHA512:
6
- metadata.gz: 93c205bc429bc5b9bf76add264e131dd8e7fb4bb83fe9960eb94399cebfe52c04ffe71e6859770b216450cb52b0cdf604b8a3dff78745901900e860354cd1a2e
7
- data.tar.gz: ceee04c5ead6017a402f7c025f813e3d30b9b70c033966b14122f64897199a6e60c1b2dc89a47ed5798884ac2960d24055ed341b2e6bc85f877eb46a388745b4
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)
@@ -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 = "5.0.1"
5
5
  end
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
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.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: 2023-12-12 00:00:00.000000000 Z
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.0/CHANGELOG.md
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: