brut 0.2.0 → 0.2.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: 6dad66a7dffc78b032c11605c85ad58139b151316d46ebc0c232dfa91cf76412
4
- data.tar.gz: 1dc1a82264b6e3c026aceaf817ad5e4ca6b5b308013861bd38ce185186fbbd1f
3
+ metadata.gz: 5b4143ae1c71fb813785c00b58ed14ad8e46ca14b478e3f1877269e11e1bc80b
4
+ data.tar.gz: 4abf1ea02f989223bdb0e22fc44360ce1df8e2ddff8237482a9f97b43f712955
5
5
  SHA512:
6
- metadata.gz: 3b0397fc6583b5ed0f85507c0d3605cc65cb3f11bf29f04ec5bf366d930ef905195c254b07413f6ded4b4ff229ad5fad47619730d02f88de632b7ea9f405d81a
7
- data.tar.gz: c998ae7f7e8fd97ac5b340c35fa027dd3e86ee284ce6868243ea39c333197b8f44ca685fd1af97a56d92c3cf4c87f9a54cdfbf888682b1f86cc9c69b3689e1e5
6
+ metadata.gz: ffa7f2050d752e63ce98151bd6825f94d5c0ecdbe19ce7ff96a57c1fa26c56ad63d00c450f8d3b4fb4a8ba9a0852680569d22b7dc25e7d16b1881fc0cef22f66
7
+ data.tar.gz: 67e37d24873dd84185881f16c63120dbf50de4660e60821d40e5c2dd2e66d487da70be283e85b26c09cf3ecd0f95d02a9f7e2072aa0379049ea490296495a2cb
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Brut CHANGELOG
2
+
3
+ ## v0.2.1 - July 10, 2025
4
+
5
+ * **Fix bug with select component where a blank value would cause an exception**
6
+
7
+ ## v0.2.0 - July 10, 2025
8
+
9
+ * **Re-implement `RichString.underscorize` + add tests for `RichString`**
10
+
11
+ `RichString` may not survive until 1.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brut (0.2.0)
4
+ brut (0.2.1)
5
5
  concurrent-ruby
6
6
  i18n
7
7
  irb
@@ -63,7 +63,7 @@ class Brut::FrontEnd::Components::Inputs::SelectTagWithOptions < Brut::FrontEnd:
63
63
  @html_attributes = default_html_attributes.merge(html_attributes)
64
64
  @html_attributes[:name] = name
65
65
 
66
- if input_value.nil?
66
+ if input_value.nil? || input_value.to_s.strip == ""
67
67
  @selected_value = nil # explicitly nothing is selected
68
68
  else
69
69
  if input_value.kind_of?(Array)
@@ -72,7 +72,7 @@ class Brut::FrontEnd::Components::Inputs::SelectTagWithOptions < Brut::FrontEnd:
72
72
  option = options.detect { |option|
73
73
  input_value == option.send(@value_attribute)
74
74
  }
75
- if option.nil? && option.to_s.strip != ""
75
+ if option.nil?
76
76
  raise ArgumentError, "selected_value #{input_value}/#{input_value.class} was not the value for #{value_attribute} on any of the options: #{options.map { |option| option.send(value_attribute) }.join(', ')}"
77
77
  end
78
78
  @selected_value = option.send(@value_attribute)
data/lib/brut/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Brut
2
2
  # @!visibility private
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Bryant Copeland
@@ -398,6 +398,7 @@ files:
398
398
  - ".nvim.lua"
399
399
  - ".projections.json"
400
400
  - ".rspec"
401
+ - CHANGELOG.md
401
402
  - CODE_OF_CONDUCT.txt
402
403
  - Dockerfile.dx
403
404
  - Gemfile