steam-proto 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ module Steam
2
+ module Proto
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ require 'pry'
3
+
4
+ # rubocop:disable LineLength
5
+ namespace :proto do
6
+ desc 'Generate the Ruby code'
7
+ task :install do
8
+ proto_version = '2.5.0'
9
+ pwd = File.expand_path(Dir.pwd)
10
+
11
+ FileUtils.mkdir_p("#{pwd}/lib/proto/proto")
12
+
13
+ base_url = 'https://raw.githubusercontent.com/SteamRE/'\
14
+ 'SteamKit/master/Resources/Protobufs/'
15
+
16
+ protos = {
17
+ csgo: %w(
18
+ steammessages
19
+ engine_gcmessages
20
+ cstrike15_gcmessages
21
+ cstrike15_usermessages
22
+ netmessages
23
+ gcsdk_gcmessages
24
+ gcsystemmsgs
25
+ ),
26
+ steamclient: %w(
27
+ steammessages_base
28
+ steammessages_clientserver
29
+ encrypted_app_ticket
30
+ steammessages_clientserver_2
31
+ ),
32
+ gc: [
33
+ 'gc'
34
+ ]
35
+ }
36
+
37
+ Dir.chdir("#{pwd}/lib/proto/proto") do
38
+ protos.each_pair do |game, files|
39
+ files.each { |file| `curl -O #{base_url}/#{game}/#{file}.proto` }
40
+ end
41
+
42
+ curl_cmd = 'curl -L https://github.com/google/protobuf/archive/'\
43
+ "v#{proto_version}.tar.gz -o protobuf.tar.gz"
44
+ `#{curl_cmd}`
45
+ `rm -f protobuf.tar`
46
+ `gunzip protobuf.tar.gz`
47
+ `tar -xvzf protobuf.tar`
48
+
49
+ protos.each_pair do |game, files|
50
+ FileUtils.mkdir_p("#{pwd}/lib/steam/proto/#{game}")
51
+
52
+ ns = game.capitalize
53
+ files.each do |file|
54
+ `BEEFCAKE_NAMESPACE=#{ns} protoc --beefcake_out #{pwd}/lib/steam/proto/#{game} -I . -I protobuf-#{proto_version}/src #{file}.proto`
55
+ end
56
+ end
57
+ end
58
+
59
+ `rm -rf #{pwd}/lib/proto/proto/`
60
+ end
61
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ namespace :spec do
3
+ desc 'Run all the tests'
4
+ task :all do
5
+ exec('rspec .')
6
+ end
7
+
8
+ desc 'Run only the fast tests'
9
+ task :fast do
10
+ exec('rspec . --tag ~slow')
11
+ end
12
+ end
@@ -0,0 +1,33 @@
1
+ # coding: utf-8
2
+ # frozen_string_literal: true
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'steam/proto/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'steam-proto'
9
+ spec.version = Steam::Proto::VERSION
10
+ spec.authors = ['Taylor Finnell']
11
+ spec.email = ['tmfinnell@gmail.com']
12
+
13
+ spec.summary = 'Ruby access to Steam\'s Protobufs.'
14
+ spec.description = 'Load Steam\'s Protobuf objects from the Steam Client, CSGO, etc.'
15
+ spec.homepage = 'http://github.com/fastpeek/steam-proto.com'
16
+ spec.licenses = ['MIT']
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
+ f.match(%r{^(test|spec|features)/})
20
+ end
21
+
22
+ spec.bindir = 'bin'
23
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.required_ruby_version = '>= 2.3.1'
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.13'
29
+ spec.add_development_dependency 'rake', '~> 10.0'
30
+ spec.add_development_dependency 'rspec', '~> 3.0'
31
+ spec.add_development_dependency 'rubocop', '~> 0.45.0'
32
+ spec.add_development_dependency 'pry', '~> 0.10'
33
+ end
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: steam-proto
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Taylor Finnell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.45.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.45.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.10'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.10'
83
+ description: Load Steam's Protobuf objects from the Steam Client, CSGO, etc.
84
+ email:
85
+ - tmfinnell@gmail.com
86
+ executables:
87
+ - console
88
+ - setup
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - ".gitignore"
93
+ - ".rspec"
94
+ - ".rubocop.yml"
95
+ - ".travis.yml"
96
+ - Gemfile
97
+ - LICENSE
98
+ - README.md
99
+ - Rakefile
100
+ - bin/console
101
+ - bin/setup
102
+ - lib/steam/proto.rb
103
+ - lib/steam/proto/csgo.rb
104
+ - lib/steam/proto/csgo/cstrike15_gcmessages.pb.rb
105
+ - lib/steam/proto/csgo/cstrike15_usermessages.pb.rb
106
+ - lib/steam/proto/csgo/descriptor.pb.rb
107
+ - lib/steam/proto/csgo/engine_gcmessages.pb.rb
108
+ - lib/steam/proto/csgo/gcsdk_gcmessages.pb.rb
109
+ - lib/steam/proto/csgo/gcsystemmsgs.pb.rb
110
+ - lib/steam/proto/csgo/netmessages.pb.rb
111
+ - lib/steam/proto/csgo/steammessages.pb.rb
112
+ - lib/steam/proto/gc.rb
113
+ - lib/steam/proto/gc/gc.pb.rb
114
+ - lib/steam/proto/steamclient.rb
115
+ - lib/steam/proto/steamclient/descriptor.pb.rb
116
+ - lib/steam/proto/steamclient/encrypted_app_ticket.pb.rb
117
+ - lib/steam/proto/steamclient/steammessages_base.pb.rb
118
+ - lib/steam/proto/steamclient/steammessages_clientserver.pb.rb
119
+ - lib/steam/proto/steamclient/steammessages_clientserver_2.pb.rb
120
+ - lib/steam/proto/version.rb
121
+ - lib/tasks/proto.rake
122
+ - lib/tasks/spec.rake
123
+ - steam-proto.gemspec
124
+ homepage: http://github.com/fastpeek/steam-proto.com
125
+ licenses:
126
+ - MIT
127
+ metadata: {}
128
+ post_install_message:
129
+ rdoc_options: []
130
+ require_paths:
131
+ - lib
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: 2.3.1
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ requirements: []
143
+ rubyforge_project:
144
+ rubygems_version: 2.5.1
145
+ signing_key:
146
+ specification_version: 4
147
+ summary: Ruby access to Steam's Protobufs.
148
+ test_files: []