streamlined 0.3.0 → 0.3.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: c9c83355498ef547dddeb348be536ffa6cc9a469b8fe8004cf18e593586a10d6
4
- data.tar.gz: ca0af7657dc791a511c5b65e1f30bbfd49547203c2c3851d2aed1df93b1ffe83
3
+ metadata.gz: 28c0d44d7cf42201f5c0e9b0b422ddfe9df80ad6f21f2312be0fe33a487b6ddd
4
+ data.tar.gz: abb694a7eaa29ca21c6681f4f51590e83f0831fbe1fdf257435bcbe733420a88
5
5
  SHA512:
6
- metadata.gz: b4cf6b122586ce5ece9490ff7ca6138d979c5534356ff3f769ffce133a7d9210a17e61cae7aadc08fe36f59a300034bedcea29cd5c9f6ffc037b3fee6946a22e
7
- data.tar.gz: c36e14f2737233f2ea364d797cdd94380f4e9e0318eaa8cddeca77a12e6a94af51ad927e1bcf287b07d12d927a68f785d95a25fba57e1290f113aa809c8cd550
6
+ metadata.gz: 36a0cf9af8a3595d35fb970887ad1ddcfa8ca4a90d052c3f32bc17aee00ab1893365529c20c3f928be87c18cb67fa451fe0f18a1e6540e109681b00849b7f8aa
7
+ data.tar.gz: c35f3f75ea443343cc1a4d5c763d4e4be861f8cbdeb95a7b87ddd79818ad1a5929249874684e3953682b5b59b1d6525f2f1a06347cb14146d5114648b08b99fa
data/.rubocop.yml CHANGED
@@ -7,7 +7,7 @@ inherit_gem:
7
7
  rubocop-bridgetown: .rubocop.yml
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 3.0
10
+ TargetRubyVersion: 3.1
11
11
  NewCops: enable
12
12
 
13
13
  Exclude:
@@ -45,6 +45,9 @@ Metrics/MethodLength:
45
45
  Exclude:
46
46
  - test/**/*.rb
47
47
 
48
+ Naming/BlockForwarding:
49
+ Enabled: false
50
+
48
51
  # Disabled to aid in template readability
49
52
  Style/NestedParenthesizedCalls:
50
53
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.3.1] - 2023-11-10
6
+
7
+ - Ensure false or nil values for attributes avoid rendering attributes at all
8
+
9
+ ## [0.3.0] - 2023-11-07
10
+
11
+ - Fix escaping bug due to bad test
12
+
5
13
  ## [0.2.0] - 2023-11-07
6
14
 
7
15
  - Back out of more complicated `render_in` mechanics
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- streamlined (0.3.0)
4
+ streamlined (0.3.1)
5
5
  serbea (>= 2.1)
6
6
  zeitwerk (~> 2.5)
7
7
 
@@ -81,7 +81,7 @@ GEM
81
81
  unicode-display_width (>= 2.4.0, < 3.0)
82
82
  rubocop-ast (1.30.0)
83
83
  parser (>= 3.2.1.0)
84
- rubocop-bridgetown (0.4.0)
84
+ rubocop-bridgetown (0.4.1)
85
85
  rubocop (~> 1.23)
86
86
  rubocop-performance (~> 1.12)
87
87
  rubocop-minitest (0.20.1)
@@ -44,10 +44,12 @@ module Streamlined
44
44
  # @param prefix_space [Boolean] add a starting space if attributes are present,
45
45
  # useful in tag builders
46
46
  # @return [String]
47
- def html_attributes(options = nil, prefix_space: false, **kwargs)
47
+ def html_attributes(options = nil, prefix_space: false, **kwargs) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
48
48
  options ||= kwargs
49
49
  segments = []
50
50
  options.each do |attr, option|
51
+ next if option == false || option.nil?
52
+
51
53
  attr = dashed(attr)
52
54
  if option.is_a?(Hash)
53
55
  option = option.transform_keys { |key| "#{attr}-#{dashed(key)}" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Streamlined
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamlined
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-08 00:00:00.000000000 Z
11
+ date: 2023-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: serbea