talk 2.2.3 → 2.2.4
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/bin/maketalk +2 -1
- data/lib/languages/js/templates/talk.js.erb +9 -0
- data/lib/talk.rb +1 -1
- data/lib/version.rb +3 -0
- data/talk.gemspec +5 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 963aee9e434631bd8d20cd86f11645b6478425e9
|
4
|
+
data.tar.gz: 364d02b88f3a18aa97c40001314140453b34f00d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bd86f190ae3dc6863b78620bd484ef63b78f7481569c04ea8ecac4c895eb5dbf6728c460affb2a55d506d747be72181b235662ac5367a1bc4ee2593f10f24c9
|
7
|
+
data.tar.gz: e526a3c98a908f0c3dc9c638ebf9bc51084a933fc9edb0ad91ecf08d7ccb4e1dc86fc0540cd4167f94005b3182b88600e546b638131234e0e0ca68ca18038fa2
|
data/bin/maketalk
CHANGED
@@ -10,7 +10,7 @@ require 'trollop'
|
|
10
10
|
require 'pp'
|
11
11
|
|
12
12
|
$opts = Trollop::options do
|
13
|
-
version "Talk
|
13
|
+
version "Talk #{Talk::VERSION} (c) 2013 Jonas Acres"
|
14
14
|
banner <<-EOS
|
15
15
|
Talk is a compile-to-source protocol specification language.
|
16
16
|
|
@@ -26,6 +26,7 @@ EOS
|
|
26
26
|
opt :no, "Do not render specified tag type at any level", :type => :string, :multi => true
|
27
27
|
opt :json, "Dump raw JSON to console"
|
28
28
|
opt :upgrade, "Upgrade old-style protocols to new-style"
|
29
|
+
opt :version, "Show Talk version"
|
29
30
|
end
|
30
31
|
|
31
32
|
Trollop::die :omit, "cannot be combined with include" if $opts[:omit].length > 0 and $opts[:include].length > 0
|
@@ -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/talk.rb
CHANGED
data/lib/version.rb
ADDED
data/talk.gemspec
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'version'
|
4
|
+
|
1
5
|
Gem::Specification.new do |s|
|
2
6
|
s.name = 'talk'
|
3
7
|
s.executables << 'maketalk'
|
4
|
-
s.version =
|
8
|
+
s.version = Talk::VERSION
|
5
9
|
s.date = '2014-06-12'
|
6
10
|
s.summary = "Compile-to-source protocol contract specification language"
|
7
11
|
s.description = "A lightweight language for specifying protocol contracts. Compiles to source in Java, Javascript, ObjC and Ruby."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: talk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Acres
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/parser.rb
|
119
119
|
- lib/registry.rb
|
120
120
|
- lib/talk.rb
|
121
|
+
- lib/version.rb
|
121
122
|
- talk.gemspec
|
122
123
|
homepage: http://github.com/jonasacres/talk
|
123
124
|
licenses:
|