talk 2.0.0
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 +7 -0
- data/bin/talk +37 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a961d23df0572382861cd34abb8d8faca663dccf
|
4
|
+
data.tar.gz: 49ea322b27a7a7196a8b5e84dae44030ecfb5b16
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5d4b2bb25cd179fd2f96e23c1e14fce9aa0fd0307085f0f7cd809dc1fb997f2544401e3cc19cd06b1c96bfadb300716264698c2931c64784c046ea0449fbd237
|
7
|
+
data.tar.gz: 314cfc96f37d88afafa2b19a8e1992181172b389f8752464c07fcba66a9be419bb6f1e79e70d71156c3cb715093ca682eee773406c0af5eb6a288b213f2313d8
|
data/bin/talk
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
basepath = File.expand_path(File.dirname(__FILE__) + '/..')
|
4
|
+
lib = File.join(basepath, 'lib')
|
5
|
+
$LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
|
6
|
+
|
7
|
+
require 'talk'
|
8
|
+
require 'pp'
|
9
|
+
require 'json'
|
10
|
+
|
11
|
+
$parser = Talk::Parser.new
|
12
|
+
|
13
|
+
def process_file(file)
|
14
|
+
unless File.readable?(file) then
|
15
|
+
$stderr.write "talk: #{file}: No such file or directory\n"
|
16
|
+
return
|
17
|
+
end
|
18
|
+
|
19
|
+
if File.directory?(file) then
|
20
|
+
Dir.glob(File.join(file, "/**/*.talk")).each do |subfile|
|
21
|
+
process_file(subfile)
|
22
|
+
end
|
23
|
+
else
|
24
|
+
$parser.parse_file(file)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
begin
|
29
|
+
ARGV.each do |file|
|
30
|
+
process_file(file)
|
31
|
+
end
|
32
|
+
|
33
|
+
puts JSON.generate($parser.results)
|
34
|
+
rescue Talk::ParseError => e
|
35
|
+
puts e
|
36
|
+
exit 1
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: talk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jonas Acres
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A lightweight language for specifying protocol contracts. Compiles to
|
14
|
+
source in Java, Javascript, ObjC and Ruby.
|
15
|
+
email: jonas@becuddle.com
|
16
|
+
executables:
|
17
|
+
- talk
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- bin/talk
|
22
|
+
homepage: http://github.com/jonasacres/talk
|
23
|
+
licenses:
|
24
|
+
- GPLv2
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.0.3
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: Compile-to-source protocol contract specification language
|
46
|
+
test_files: []
|