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 +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +2 -2
- data/lib/streamlined/helpers.rb +3 -1
- data/lib/streamlined/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 28c0d44d7cf42201f5c0e9b0b422ddfe9df80ad6f21f2312be0fe33a487b6ddd
|
|
4
|
+
data.tar.gz: abb694a7eaa29ca21c6681f4f51590e83f0831fbe1fdf257435bcbe733420a88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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.
|
|
84
|
+
rubocop-bridgetown (0.4.1)
|
|
85
85
|
rubocop (~> 1.23)
|
|
86
86
|
rubocop-performance (~> 1.12)
|
|
87
87
|
rubocop-minitest (0.20.1)
|
data/lib/streamlined/helpers.rb
CHANGED
|
@@ -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)}" }
|
data/lib/streamlined/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2023-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: serbea
|