opal-vite 0.2.2 → 0.2.3
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/lib/opal/vite/version.rb +1 -1
- data/opal/opal_vite/concerns/stimulus_helpers.rb +12 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e029e7e67ed9e66aa052a3a3d22270d54dae425acf1a59727258f89a5c4ef958
|
|
4
|
+
data.tar.gz: c49bc230e812d7b59eb27461481ea6b0b0181c1161f06df6e20161d528ff4a5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d40a68ab5d0014a65fa51a4afd3ed7f464cb3a6c3c31df660197de4c6123e61dfd1c40ede9bde91c9c4cf125d89dce725c0b5c3958efad1be669a98e679f23ad
|
|
7
|
+
data.tar.gz: 1e3f8787982405109068f33b4beff9ca9a9a6860a1069a442bdf09a19f96335997e3a0ba2fe2895a57d7f002f38eaf0217130a7b4dfa44e62b4ea6f7459b019d
|
data/lib/opal/vite/version.rb
CHANGED
|
@@ -1274,12 +1274,23 @@ module OpalVite
|
|
|
1274
1274
|
|
|
1275
1275
|
private
|
|
1276
1276
|
|
|
1277
|
-
# Convert snake_case to camelCase
|
|
1277
|
+
# Convert snake_case to camelCase, preserving existing camelCase
|
|
1278
1278
|
# @param name [Symbol, String] The name to convert
|
|
1279
1279
|
# @param capitalize_first [Boolean] Whether to capitalize first letter
|
|
1280
1280
|
# @return [String] camelCase string
|
|
1281
1281
|
def camelize(name, capitalize_first = true)
|
|
1282
1282
|
str = name.to_s
|
|
1283
|
+
|
|
1284
|
+
# If no underscores, assume already camelCase - just adjust first letter
|
|
1285
|
+
unless str.include?('_')
|
|
1286
|
+
if capitalize_first
|
|
1287
|
+
return str[0].upcase + str[1..-1].to_s
|
|
1288
|
+
else
|
|
1289
|
+
return str[0].downcase + str[1..-1].to_s
|
|
1290
|
+
end
|
|
1291
|
+
end
|
|
1292
|
+
|
|
1293
|
+
# Convert snake_case to camelCase
|
|
1283
1294
|
parts = str.split('_')
|
|
1284
1295
|
if capitalize_first
|
|
1285
1296
|
parts.map(&:capitalize).join
|