e_plat 1.1.0.pre.rc.11 → 1.1.0.pre.rc.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee47e450c765f1dfef7835d2de8d14ba6d5d6895198dc8da77318eeac29bcbd
|
4
|
+
data.tar.gz: 1dba552bd5fc5b7c29054a9063239289bfa20fea8414f1d2a1ee2f16ffced7cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a79e241e73c0163deec7b874c91d0f444438775b9fbe5a5861e90225c1eaec83224fa0f33169bcd437d076e4093a89a538ffa761b3c07d251a191f98a05f30d
|
7
|
+
data.tar.gz: cea39c4d58da42d8d004eb9fbcbdda16c29def17566dfad860ab7ce994db6f375a4fd9d9e01fe2c780f0c9eca61a96302dac295ee743314797d47b57a092c595
|
@@ -40,6 +40,9 @@ module EPlat
|
|
40
40
|
keys.map do |key|
|
41
41
|
# Sanitize the key to ensure it's a valid Ruby method name
|
42
42
|
method_name = key.to_s.gsub(/[^a-zA-Z0-9_]/, '_')
|
43
|
+
# if first letter is a number, add an underscore.
|
44
|
+
# We don't have any numbers in our keys, but random woo apps might add some.
|
45
|
+
method_name = "_#{method_name}" if method_name[0] =~ /\d/
|
43
46
|
|
44
47
|
<<-STRING
|
45
48
|
def #{ method_name }
|
data/lib/e_plat/resource/base.rb
CHANGED
@@ -210,7 +210,7 @@ module EPlat
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def type_schema
|
213
|
-
return unless schema.present? && schema.values
|
213
|
+
return unless schema.present? && schema.try(:values)&.any?{|value| value == "string" or value == "hash" }
|
214
214
|
schema
|
215
215
|
end
|
216
216
|
|
@@ -10,7 +10,9 @@ module EPlat
|
|
10
10
|
processed = { getter: [], setter: [] }
|
11
11
|
|
12
12
|
aliases.each do |action|
|
13
|
-
action_name, args = action
|
13
|
+
action_name, args = action&.keys&.first, action&.values&.first
|
14
|
+
next unless action_name.present?
|
15
|
+
|
14
16
|
e_plat_key, native_key = args[:e_plat_key], args[:native_key]
|
15
17
|
@is_virtual = !!args[:virtual_collection]
|
16
18
|
|
@@ -49,6 +51,7 @@ module EPlat
|
|
49
51
|
proc_line = (proc) ? "current_value = #{ proc.strip }.call(current_value)" : nil
|
50
52
|
# Sanitize the key to ensure it's a valid Ruby method name
|
51
53
|
method_name = e_plat_key.to_s.gsub(/[^a-zA-Z0-9_]/, '_')
|
54
|
+
method_name = "_#{method_name}" if method_name[0] =~ /\d/
|
52
55
|
|
53
56
|
<<-STRING
|
54
57
|
def #{ method_name }
|
@@ -82,6 +85,7 @@ module EPlat
|
|
82
85
|
proc_line = (proc) ? "value = #{ proc.strip }.call(value)" : nil
|
83
86
|
# Sanitize the key to ensure it's a valid Ruby method name
|
84
87
|
method_name = e_plat_key.to_s.gsub(/[^a-zA-Z0-9_]/, '_')
|
88
|
+
method_name = "_#{method_name}" if method_name[0] =~ /\d/
|
85
89
|
|
86
90
|
<<-STRING
|
87
91
|
def #{ method_name }
|
@@ -98,6 +102,7 @@ module EPlat
|
|
98
102
|
proc_line = (proc) ? "value = #{ proc.strip }.call(value)" : nil
|
99
103
|
# Sanitize the key to ensure it's a valid Ruby method name
|
100
104
|
method_name = native_key.to_s.gsub(/[^a-zA-Z0-9_]/, '_')
|
105
|
+
method_name = "_#{method_name}" if method_name[0] =~ /\d/
|
101
106
|
|
102
107
|
<<-STRING
|
103
108
|
def #{method_name}=(value)
|
data/lib/e_plat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e_plat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.pre.rc.
|
4
|
+
version: 1.1.0.pre.rc.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- oliwoodsuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|