talk 2.3.0 → 2.3.1

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
  SHA1:
3
- metadata.gz: 17af9791fad56df5e635906a3eebd9b2a0ac668b
4
- data.tar.gz: fce31b459bb50cda0529202c6243621a1ffe1008
3
+ metadata.gz: 2867b96702e4938d5cc4b642e420ccc7bee2fb01
4
+ data.tar.gz: 57a9ed9e7ecb012ea495f4b2357b37fdcc940dd8
5
5
  SHA512:
6
- metadata.gz: fd168905d6edaae2941893cc76434f06bc38f63e08c942927b841cc10a79e28b606aca5a6cf5e95a68fc4185bba80053fe6b621ca7c1c9d049811603d309f0cd
7
- data.tar.gz: 521827ceadf656d198a33840b4d7da62b344bf684d8afd9c228648ffb3beac736799f5d8cf0a06f7795c898b51afd4b05c2034b4c0eeb846278b260d7e9bcee5
6
+ metadata.gz: 3d7c0f0296e92b774cf0151d0ca9f4f85b3985be1db4045a4e3264789b7f76f948e12f1f11fb3ce033936cb5c8dcad5dad2c57f2a528d6256a13b412bc400bd8
7
+ data.tar.gz: 0784ca710682082c0dfa13e1435e3271c3eaeb6ade3c3d1f3d815d3cbba5651bf8ece14f6b716895456fd2af2704c4ea2d58a188b96046f9343854cd240d290a
@@ -10,7 +10,7 @@ require 'trollop'
10
10
  require 'pp'
11
11
 
12
12
  $opts = Trollop::options do
13
- version "Talk 2.0 (c) 2013 Jonas Acres"
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
@@ -11,7 +11,7 @@ def make_source
11
11
  end
12
12
  @base[:protocol].each do |current|
13
13
  @current = current
14
- generate_template("com/acres4/common/protocol/#{current[:name]}.java", "TalkProtocol.java.erb")
14
+ generate_template("com/acres4/common/protocol/#{current[:name].split('/').first}/#{current[:name].split('/').last.capitalize}.java", "TalkProtocol.java.erb")
15
15
  end
16
16
  end
17
17
 
@@ -1,7 +1,7 @@
1
1
  <%= autogenerated_warning %>
2
- package com.acres4.common.protocol;
3
- public class <%= truncated_name(@current[:name]) %> {
4
- <% @current[:method].each do |method| %>
2
+ package com.acres4.common.protocol.<%= @current[:name].gsub('/', '.').split('.')[0...-1].join('.') %>;
3
+ public class <%= truncated_name(@current[:name]).split('/')[-1].capitalize %> {
4
+ <% (@current[:method].uniq { |m| m[:name] }).each do |method| %>
5
5
  /**
6
6
  <%= method[:description] %>
7
7
  */
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
+ require 'version.rb'
3
4
  require 'parser'
4
5
  require 'languages/language.rb'
5
-
@@ -0,0 +1,3 @@
1
+ module Talk
2
+ VERSION = "2.3.1"
3
+ end
@@ -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 = '2.3.0'
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.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Acres
@@ -120,6 +120,7 @@ files:
120
120
  - lib/parser.rb
121
121
  - lib/registry.rb
122
122
  - lib/talk.rb
123
+ - lib/version.rb
123
124
  - talk.gemspec
124
125
  homepage: http://github.com/jonasacres/talk
125
126
  licenses: