talk 2.3.4 → 2.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/languages/js/templates/talk.js.erb +9 -0
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd6c53088019afec7a1eaf4af18482e702b4ce64
|
4
|
+
data.tar.gz: 6801ac23c0c3b5144ce9871e3a73be2ab1fe7ad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cba3b142ddfdfb34d896bd8c238b9a77d2f3243c7761203a46d970a5770f24c68a9b94223a9cfc9474fe3df31f92d054b8735a219f6ce1b4017c17dd31e0d2c5
|
7
|
+
data.tar.gz: cc85cc629abc26c1405d5332f53cc54d1e1b013332e897277e10f7281078fde2b3530b9258042a2ed669ffd96f93e2760e53954c61927bcab324c68a3177dd22
|
@@ -142,6 +142,11 @@ TalkObject.prototype.__validateInteger = function(key, param, unsigned, size)
|
|
142
142
|
var def = this.__definition[key];
|
143
143
|
|
144
144
|
// Validate number
|
145
|
+
if(typeof(param) == 'string')
|
146
|
+
{
|
147
|
+
if(param.match(new RegExp("^(0x)?[0-9]+$"))) param = parseInt(param);
|
148
|
+
}
|
149
|
+
|
145
150
|
if(typeof(param) != 'number')
|
146
151
|
{
|
147
152
|
var errMsg = "Expected " + key + " to be a number";
|
@@ -226,6 +231,10 @@ TalkObject.prototype.__validateInteger = function(key, param, unsigned, size)
|
|
226
231
|
TalkObject.prototype.__validateReal = function(key, param)
|
227
232
|
{
|
228
233
|
var def = this.__definition[key];
|
234
|
+
if(typeof(param) == 'string')
|
235
|
+
{
|
236
|
+
if(param.match(new RegExp("^[0-9]+(\.[0-9]+)?$"))) param = parseFloat(param);
|
237
|
+
}
|
229
238
|
if(typeof(param) != 'number') return "Expected numeric value for " + key;
|
230
239
|
if(def.minValue !== undefined && def.minValue !== null && param < def.minValue)
|
231
240
|
{
|
data/lib/version.rb
CHANGED