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: 80bee1f4818d3f152ede4f035094964b6c4d591c2ab05ffb6da1735ba58dc820
4
- data.tar.gz: 63b78a2f248722fa575cb120ed11ede947148a7055d549bb5f41dc3a1bc258cd
3
+ metadata.gz: 6ee47e450c765f1dfef7835d2de8d14ba6d5d6895198dc8da77318eeac29bcbd
4
+ data.tar.gz: 1dba552bd5fc5b7c29054a9063239289bfa20fea8414f1d2a1ee2f16ffced7cc
5
5
  SHA512:
6
- metadata.gz: 19f216661e0dcb398ff404aa45bc591fae394c9f0943155eef8986360e76478650da31be93b60552c6527a32e91b00231dde3c8d1ebe50f53c34d18a3c7c70a4
7
- data.tar.gz: 3abbe168e92ac303ccbef6d6318907e9e428619666fb8d35c96db108c7eb4ae482951c26daff71169786c5e01394beaf457acf422a9495dee9c2c944a2e165f9
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 }
@@ -210,7 +210,7 @@ module EPlat
210
210
  end
211
211
 
212
212
  def type_schema
213
- return unless schema.present? && schema.values.any?{|value| value == "string" or value == "hash" }
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.keys.first, action.values.first
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)
@@ -1,3 +1,3 @@
1
1
  module EPlat
2
- VERSION = "1.1.0-rc.11"
2
+ VERSION = "1.1.0-rc.12"
3
3
  end
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.11
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-06-22 00:00:00.000000000 Z
11
+ date: 2025-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler