effigy_wire 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile +2 -0
  4. data/Gemfile.lock +13 -6
  5. data/bin/bundler +17 -0
  6. data/bin/import +47 -0
  7. data/bin/protoc-gen-ruby +17 -0
  8. data/bin/rake +17 -0
  9. data/bin/repath +6 -0
  10. data/bin/rpc_server +17 -0
  11. data/bin/support/00-nuke_everything +35 -0
  12. data/bin/support/10-clarity_protobuf_copy +68 -0
  13. data/bin/support/20-clean_clarity_protobuf +46 -0
  14. data/bin/{effigy/package → support/30-package_proto} +10 -8
  15. data/bin/support/40-tweak_proto +24 -0
  16. data/bin/support/50-compile_proto +100 -0
  17. data/bin/support/60-tweak_rb +23 -0
  18. data/bin/{effigy/mk-require-turds → support/70-make_require_turds} +10 -6
  19. data/bin/support/80-delete_stragglers +7 -0
  20. data/bin/thor +17 -0
  21. data/effigy_wire.gemspec +1 -2
  22. data/lib/effigy/wire.rb +0 -6
  23. data/lib/effigy/wire/demo.pb.rb +22 -21
  24. data/lib/effigy/wire/dota_commonmessages.pb.rb +87 -86
  25. data/lib/effigy/wire/dota_modifiers.pb.rb +2 -1
  26. data/lib/effigy/wire/dota_usermessages.pb.rb +50 -49
  27. data/lib/effigy/wire/netmessages.pb.rb +2 -1
  28. data/lib/effigy/wire/networkbasetypes.pb.rb +15 -14
  29. data/lib/effigy/wire/s1/s1_dota_usermessages.pb.rb +81 -80
  30. data/lib/effigy/wire/s1/s1_netmessages.pb.rb +29 -28
  31. data/lib/effigy/wire/s1/s1_usermessages.pb.rb +33 -32
  32. data/lib/effigy/wire/s2/s2_base_gcmessages.pb.rb +2 -1
  33. data/lib/effigy/wire/s2/s2_dota_gcmessages_common.pb.rb +3 -2
  34. data/lib/effigy/wire/s2/s2_dota_match_metadata.pb.rb +3 -2
  35. data/lib/effigy/wire/s2/s2_dota_usermessages.pb.rb +96 -95
  36. data/lib/effigy/wire/s2/s2_gameevents.pb.rb +15 -14
  37. data/lib/effigy/wire/s2/s2_netmessages.pb.rb +26 -25
  38. data/lib/effigy/wire/s2/s2_te.pb.rb +29 -28
  39. data/lib/effigy/wire/s2/s2_usermessages.pb.rb +48 -47
  40. data/proto/dota_commonmessages.proto +91 -91
  41. data/proto/dota_usermessages.proto +48 -48
  42. data/proto/networkbasetypes.proto +14 -14
  43. data/proto/s1/s1_netmessages.proto +27 -27
  44. data/proto/s2/s2_dota_gcmessages_common.proto +1 -1
  45. data/proto/s2/s2_dota_match_metadata.proto +1 -1
  46. data/proto/s2/s2_netmessages.proto +24 -24
  47. metadata +19 -10
  48. data/BIN_README.txt +0 -18
  49. data/bin/clarity-protobuf/clean +0 -36
  50. data/bin/clarity-protobuf/copy +0 -75
  51. data/bin/effigy/compile-proto +0 -81
  52. data/bin/effigy/tweak-proto +0 -30
  53. data/bin/effigy/tweak-rb +0 -20
@@ -33,7 +33,7 @@ message CDOTAMatchMetadata {
33
33
  repeated CDOTAMatchMetadata.Team.Player players = 2;
34
34
  repeated float graph_experience = 3;
35
35
  repeated float graph_gold_earned = 4;
36
- repeated float graph_NET_worth = 5;
36
+ repeated float graph_net_worth = 5;
37
37
  optional bool cm_first_pick = 6;
38
38
  optional uint32 cm_captain_player_id = 7;
39
39
  repeated uint32 cm_bans = 8;
@@ -8,30 +8,30 @@ import "netmessages.proto";
8
8
  option cc_generic_services = false;
9
9
 
10
10
  enum SVC_Messages {
11
- SVC_ServerInfo = 40;
12
- SVC_FlattenedSerializer = 41;
13
- SVC_ClassInfo = 42;
14
- SVC_SetPause = 43;
15
- SVC_CreateStringTable = 44;
16
- SVC_UpdateStringTable = 45;
17
- SVC_VoiceInit = 46;
18
- SVC_VoiceData = 47;
19
- SVC_Print = 48;
20
- SVC_Sounds = 49;
21
- SVC_SetView = 50;
22
- SVC_ClearAllStringTables = 51;
23
- SVC_CmdKeyValues = 52;
24
- SVC_BSPDecal = 53;
25
- SVC_SplitScreen = 54;
26
- SVC_PacketEntities = 55;
27
- SVC_Prefetch = 56;
28
- SVC_Menu = 57;
29
- SVC_GetCvarValue = 58;
30
- SVC_StopSound = 59;
31
- SVC_PeerList = 60;
32
- SVC_PacketReliable = 61;
33
- SVC_HLTVStatus = 62;
34
- SVC_FullFrameSplit = 70;
11
+ svc_ServerInfo = 40;
12
+ svc_FlattenedSerializer = 41;
13
+ svc_ClassInfo = 42;
14
+ svc_SetPause = 43;
15
+ svc_CreateStringTable = 44;
16
+ svc_UpdateStringTable = 45;
17
+ svc_VoiceInit = 46;
18
+ svc_VoiceData = 47;
19
+ svc_Print = 48;
20
+ svc_Sounds = 49;
21
+ svc_SetView = 50;
22
+ svc_ClearAllStringTables = 51;
23
+ svc_CmdKeyValues = 52;
24
+ svc_BSPDecal = 53;
25
+ svc_SplitScreen = 54;
26
+ svc_PacketEntities = 55;
27
+ svc_Prefetch = 56;
28
+ svc_Menu = 57;
29
+ svc_GetCvarValue = 58;
30
+ svc_StopSound = 59;
31
+ svc_PeerList = 60;
32
+ svc_PacketReliable = 61;
33
+ svc_HLTVStatus = 62;
34
+ svc_FullFrameSplit = 70;
35
35
  }
36
36
 
37
37
  message CSVCMsg_CreateStringTable {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effigy_wire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Morris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protobuf
@@ -66,20 +66,28 @@ extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
68
  - ".gitignore"
69
- - BIN_README.txt
70
69
  - CODE_OF_CONDUCT.md
71
70
  - Gemfile
72
71
  - Gemfile.lock
73
72
  - LICENSE.txt
74
73
  - README.md
75
74
  - Rakefile
76
- - bin/clarity-protobuf/clean
77
- - bin/clarity-protobuf/copy
78
- - bin/effigy/compile-proto
79
- - bin/effigy/mk-require-turds
80
- - bin/effigy/package
81
- - bin/effigy/tweak-proto
82
- - bin/effigy/tweak-rb
75
+ - bin/bundler
76
+ - bin/import
77
+ - bin/protoc-gen-ruby
78
+ - bin/rake
79
+ - bin/repath
80
+ - bin/rpc_server
81
+ - bin/support/00-nuke_everything
82
+ - bin/support/10-clarity_protobuf_copy
83
+ - bin/support/20-clean_clarity_protobuf
84
+ - bin/support/30-package_proto
85
+ - bin/support/40-tweak_proto
86
+ - bin/support/50-compile_proto
87
+ - bin/support/60-tweak_rb
88
+ - bin/support/70-make_require_turds
89
+ - bin/support/80-delete_stragglers
90
+ - bin/thor
83
91
  - effigy_wire.gemspec
84
92
  - lib/effigy.rb
85
93
  - lib/effigy/wire.rb
@@ -146,3 +154,4 @@ signing_key:
146
154
  specification_version: 4
147
155
  summary: Protocol buffer definitions for Effigy.
148
156
  test_files: []
157
+ has_rdoc:
@@ -1,18 +0,0 @@
1
- $ cd Code
2
- $ git clone https://github.com/skadistats/clarity-protobuf
3
- $ git clone https://github.com/onethirtyfive/effigy-wire
4
- $ cd effigy-wire
5
- $ bin/clarity-protobuf/copy
6
- $ bin/clarity-protobuf/clean
7
- $ bin/effigy/package
8
- $ bin/effigy/tweak-proto
9
- $ bin/effigy/compile-proto
10
- $ bin/effigy/mk-require-turds
11
- $ bin/effigy/tweak-rb
12
-
13
- ... manual editing on the require_relatives, durr...
14
-
15
- to test:
16
-
17
- bundle exec irb -Ilib
18
- > require 'effigy'
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'fileutils'
4
-
5
- PROTO_ROOT =
6
- begin
7
- ENV.fetch('PROTO_ROOT')
8
- rescue KeyError
9
- File.join(Dir.pwd, 'proto')
10
- end
11
-
12
- print "Remove non-proto files in #{PROTO_ROOT}? [yN] > "
13
- answer = gets.strip
14
-
15
- unless answer == 'y'
16
- puts 'OK, aborting.'
17
- exit(0)
18
- end
19
-
20
-
21
- begin
22
- bindir_path = File.join(PROTO_ROOT, 'bin')
23
- puts "> Removing #{bindir_path}"
24
- FileUtils.rm_rf(bindir_path)
25
- rescue Errno::ENOENT
26
- end
27
-
28
- proto_paths = Dir.glob("#{PROTO_ROOT}/**/*")
29
-
30
- proto_paths.each do |proto_path|
31
- next if File.directory?(proto_path)
32
- next if File.extname(proto_path) == '.proto' # keep these
33
-
34
- puts "> Removing #{proto_path}"
35
- File.delete(proto_path)
36
- end
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'fileutils'
4
- require 'logger'
5
-
6
- err_log = Logger.new(STDERR)
7
-
8
- CLARITY_PROTO_ROOT =
9
- begin
10
- ENV.fetch('CLARITY_PROTO_ROOT')
11
- rescue KeyError
12
- File.join(
13
- Dir.pwd,
14
- '..',
15
- 'clarity-protobuf',
16
- 'src', 'main', 'proto'
17
- )
18
- end
19
-
20
- CLARITY_PROTO_BIN_ROOT =
21
- begin
22
- ENV.fetch('CLARITY_PROTO_BIN_ROOT')
23
- rescue KeyError
24
- File.join(CLARITY_PROTO_ROOT, 'bin')
25
- end
26
-
27
- CLARITY_PROTO_COMMON_ROOT =
28
- begin
29
- ENV.fetch('CLARITY_PROTO_COMMON_ROOT')
30
- rescue KeyError
31
- File.join(CLARITY_PROTO_ROOT, 'common')
32
- end
33
-
34
- PROTO_ROOT =
35
- begin
36
- ENV.fetch('PROTO_ROOT')
37
- rescue KeyError
38
- File.join(Dir.pwd, 'proto')
39
- end
40
-
41
- src_package_paths = Dir.glob("#{CLARITY_PROTO_ROOT}/*").select do |package_path|
42
- next(false) if package_path.include?(CLARITY_PROTO_BIN_ROOT)
43
- next(false) if package_path.include?(CLARITY_PROTO_COMMON_ROOT)
44
- true
45
- end
46
-
47
- if src_package_paths.empty?
48
- raise <<-EOV
49
-
50
-
51
- Provided clarity-protobuf proto root is apparently empty. Exiting
52
-
53
- EOV
54
- end
55
-
56
- src_package_paths.each do |src_package_path|
57
- begin
58
- puts "> Copying '#{File.basename(src_package_path)}'"
59
- FileUtils.cp_r(src_package_path, PROTO_ROOT)
60
- rescue Exception => e
61
- err_log.fatal(e.to_s)
62
- exit(-1)
63
- end
64
- end
65
-
66
- begin
67
- puts "> Copying '#{File.basename(CLARITY_PROTO_COMMON_ROOT)}' files to destination root"
68
- FileUtils.cp(
69
- Dir.glob(File.join(CLARITY_PROTO_COMMON_ROOT, '*.proto')),
70
- PROTO_ROOT
71
- )
72
- rescue Exception => e
73
- err_log.fatal(e.to_s)
74
- exit(-1)
75
- end
@@ -1,81 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'fileutils'
4
- require 'logger'
5
-
6
- err_log = Logger.new(STDERR)
7
-
8
- PROTO_ROOT =
9
- begin
10
- ENV.fetch('PROTO_ROOT')
11
- rescue KeyError
12
- File.join(Dir.pwd, 'proto')
13
- end
14
-
15
- RUBY_OUT_ROOT =
16
- begin
17
- ENV.fetch('RUBY_OUT_ROOT')
18
- rescue KeyError
19
- File.join(Dir.pwd, 'lib', 'effigy', 'wire')
20
- end
21
-
22
- EFFIGY_FORCE_COMPILE =
23
- begin
24
- !!ENV.fetch('EFFIGY_FORCE_COMPILE')
25
- rescue KeyError
26
- false
27
- end
28
-
29
- unless EFFIGY_FORCE_COMPILE
30
- print "Have you cleaned, packaged, and tweak-proto'ed? [yN] > "
31
- answer = gets.strip
32
-
33
- unless answer == 'y'
34
- print 'OK, go take care of that.'
35
- exit(0)
36
- end
37
- end
38
-
39
- puts "> Ensuring output directory exists."
40
- FileUtils.mkdir_p(RUBY_OUT_ROOT)
41
-
42
- package_paths = []
43
- proto_paths = []
44
-
45
- Dir.glob("#{PROTO_ROOT}/*").select do |path|
46
- if File.directory?(path)
47
- package_paths << path
48
- else
49
- proto_paths << path
50
- end
51
- end
52
-
53
- proto_paths.each do |proto_path|
54
- puts "> Compiling '#{File.basename(proto_path)}'"
55
- cmd = <<-EOV
56
- protoc \
57
- --proto_path=#{File.join(PROTO_ROOT)} \
58
- --ruby_out=#{RUBY_OUT_ROOT} \
59
- #{proto_path}
60
- EOV
61
- puts cmd
62
- system(cmd)
63
- end
64
-
65
- package_paths.each do |package_path|
66
- puts "> Package '#{File.basename(package_path)}'"
67
-
68
- Dir.glob(File.join(package_path, '*.proto')).each do |proto_path|
69
- puts " > #{File.basename(proto_path)}"
70
- cmd = <<-EOV
71
- protoc \
72
- --proto_path=#{File.join(PROTO_ROOT)} \
73
- --proto_path=#{package_path} \
74
- --ruby_out=#{RUBY_OUT_ROOT} \
75
- #{proto_path}
76
- EOV
77
- puts cmd
78
- system(cmd)
79
- end
80
- end
81
-
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- PROTO_ROOT =
4
- begin
5
- ENV.fetch('PROTO_ROOT')
6
- rescue KeyError
7
- File.join(Dir.pwd, 'proto')
8
- end
9
-
10
- Dir.glob(File.join(PROTO_ROOT, '**/*')).each do |proto_path|
11
- next if File.directory?(proto_path)
12
-
13
- puts "> Tweaking #{File.basename(proto_path)}"
14
- cmd = <<-EOV
15
- sed -i \
16
- -e '/optional/ s/optional \\./optional /' \
17
- -e '/repeated/ s/repeated \\./repeated /' \
18
- -e '/k_EHero/ s/k_EHero/K_EHero/' \
19
- -e '/kPVLS/ s/kPVLS/KPVLS/' \
20
- -e '/k_EDOTA/ s/k_EDOTA/K_EDOTA/' \
21
- -e '/k_eResult/ s/k_eResult/K_eResult/' \
22
- -e '/ePE_/ s/ePE_/EPE_/' \
23
- -e '/net_/ s/net_/NET_/' \
24
- -e '/svc_/ s/svc_/SVC_/' \
25
- -e '/require\s+''.*..pb''/ s/require/require_relative/' \
26
- #{proto_path}
27
- EOV
28
- system(cmd)
29
- end
30
-
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- LIB_ROOT =
4
- begin
5
- ENV.fetch('LIB_ROOT')
6
- rescue KeyError
7
- File.join(Dir.pwd, 'lib')
8
- end
9
-
10
- Dir.glob(File.join(LIB_ROOT, '**/*')).each do |rb_path|
11
- next if File.directory?(rb_path)
12
-
13
- puts "> Tweaking #{File.basename(rb_path)}"
14
- cmd = <<-EOV
15
- sed -i \
16
- -e '/require ''.*..pb''/ s/require/require_relative/' \
17
- #{rb_path}
18
- EOV
19
- system(cmd)
20
- end