steam-condenser 0.11.2 → 0.11.3

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.
data/Rakefile CHANGED
@@ -11,20 +11,31 @@ require 'jeweler'
11
11
  src_files = Dir.glob(File.join("lib", "**", "*.rb"))
12
12
  test_files = Dir.glob(File.join("test", "**", "*.rb"))
13
13
 
14
- # Gem specification
15
- Jeweler::Tasks.new do |s|
16
- s.authors = ['Sebastian Staudt']
17
- s.email = 'koraktor@gmail.com'
18
- s.description = 'A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers'
19
- s.date = Time.now
20
- s.homepage = 'http://koraktor.github.com/steam-condenser'
21
- s.name = s.rubyforge_project = "steam-condenser"
22
- s.summary = 'Steam Condenser - A Steam query library'
23
-
24
- s.files = %w(README.md Rakefile LICENSE VERSION.yml) + src_files + test_files
25
- s.rdoc_options = ["--all", "--inline-source", "--line-numbers", "--charset=utf-8", "--webcvs=http://github.com/koraktor/steam-condenser/source/blob/master/ruby/%s"]
26
-
27
- s.add_dependency('bzip2-ruby', '>= 0.2')
14
+ begin
15
+ require 'jeweler'
16
+
17
+ gemspec = Gem::Specification.new do |gem|
18
+ line = File.read('lib/steam-condenser/version.rb')[/^\s*VERSION\s*=\s*.*/]
19
+ gem.version = line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
20
+ end
21
+
22
+ # Gem specification
23
+ Jeweler::Tasks.new(gemspec) do |s|
24
+ s.authors = ['Sebastian Staudt']
25
+ s.email = 'koraktor@gmail.com'
26
+ s.description = 'A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers'
27
+ s.date = Time.now
28
+ s.homepage = 'http://koraktor.github.com/steam-condenser'
29
+ s.name = s.rubyforge_project = "steam-condenser"
30
+ s.summary = 'Steam Condenser - A Steam query library'
31
+
32
+ s.files = %w(README.md Rakefile LICENSE VERSION.yml) + src_files + test_files
33
+ s.rdoc_options = ["--all", "--inline-source", "--line-numbers", "--charset=utf-8", "--webcvs=http://github.com/koraktor/steam-condenser/source/blob/master/ruby/%s"]
34
+
35
+ s.add_dependency('bzip2-ruby', '>= 0.2')
36
+ end
37
+ rescue LoadError
38
+ puts 'You need Jeweler to build the gem. Install it using `gem install jeweler`.'
28
39
  end
29
40
 
30
41
  # Create a rake task +:rdoc+ to build the documentation
@@ -1,16 +1,16 @@
1
- # This code is free software; you can redistribute it and/or modify it under the
2
- # terms of the new BSD License.
3
- #
4
- # Copyright (c) 2010, Sebastian Staudt
5
-
6
- module SteamCondenser
7
-
8
- require 'steam-condenser/version'
9
-
10
- module Community
11
-
12
- require 'steam/community/steam_id'
13
-
14
- end
15
-
16
- end
1
+ # This code is free software; you can redistribute it and/or modify it under the
2
+ # terms of the new BSD License.
3
+ #
4
+ # Copyright (c) 2010, Sebastian Staudt
5
+
6
+ module SteamCondenser
7
+
8
+ require 'steam-condenser/version'
9
+
10
+ module Community
11
+
12
+ require 'steam/community/steam_id'
13
+
14
+ end
15
+
16
+ end
@@ -1,18 +1,18 @@
1
- # This code is free software; you can redistribute it and/or modify it under the
2
- # terms of the new BSD License.
3
- #
4
- # Copyright (c) 2010, Sebastian Staudt
5
-
6
- module SteamCondenser
7
-
8
- require 'steam-condenser/version'
9
-
10
- module Servers
11
-
12
- require 'steam/servers/goldsrc_server'
13
- require 'steam/servers/master_server'
14
- require 'steam/servers/source_server'
15
-
16
- end
17
-
18
- end
1
+ # This code is free software; you can redistribute it and/or modify it under the
2
+ # terms of the new BSD License.
3
+ #
4
+ # Copyright (c) 2010, Sebastian Staudt
5
+
6
+ module SteamCondenser
7
+
8
+ require 'steam-condenser/version'
9
+
10
+ module Servers
11
+
12
+ require 'steam/servers/goldsrc_server'
13
+ require 'steam/servers/master_server'
14
+ require 'steam/servers/source_server'
15
+
16
+ end
17
+
18
+ end
@@ -1,13 +1,12 @@
1
- # This code is free software; you can redistribute it and/or modify it under the
2
- # terms of the new BSD License.
3
- #
4
- # Copyright (c) 2010, Sebastian Staudt
5
-
6
- require 'yaml'
7
-
8
- module SteamCondenser
9
-
10
- version = YAML.load_file(File.join(File.dirname(__FILE__), '..', '..', 'VERSION.yml'))
11
- VERSION = "#{version[:major]}.#{version[:minor]}.#{version[:patch]}"
12
-
13
- end
1
+ # This code is free software; you can redistribute it and/or modify it under the
2
+ # terms of the new BSD License.
3
+ #
4
+ # Copyright (c) 2010, Sebastian Staudt
5
+
6
+ require 'yaml'
7
+
8
+ module SteamCondenser
9
+
10
+ VERSION = '0.11.3'
11
+
12
+ end
File without changes
File without changes
File without changes
@@ -192,12 +192,10 @@ class SteamId
192
192
 
193
193
  # Returns a GameStats object for the given game for the owner of this SteamID
194
194
  def game_stats(game_name)
195
- game_name.downcase!
196
-
197
195
  if games.has_value? game_name
198
196
  friendly_name = game_name
199
- elsif games.has_key? game_name
200
- friendly_name = games[game_name]
197
+ elsif games.has_key? game_name.downcase
198
+ friendly_name = games[game_name.downcase]
201
199
  else
202
200
  raise ArgumentError.new("Stats for game #{game_name} do not exist.")
203
201
  end
File without changes
File without changes
@@ -1,46 +1,46 @@
1
- # This code is free software; you can redistribute it and/or modify it under the
2
- # terms of the new BSD License.
3
- #
4
- # Copyright (c) 2010, Sebastian Staudt
5
-
6
- require 'stringio'
7
-
8
- class StringIO
9
-
10
- def self.allocate(size)
11
- new "\0" * size
12
- end
13
-
14
- def byte
15
- read(1)[0]
16
- end
17
-
18
- def float
19
- read(4).unpack('e')[0]
20
- end
21
-
22
- def get
23
- read remaining
24
- end
25
-
26
- def long
27
- read(4).unpack('V')[0]
28
- end
29
-
30
- def remaining
31
- size - pos
32
- end
33
-
34
- def short
35
- read(2).unpack('v')[0]
36
- end
37
-
38
- def signed_long
39
- read(4).unpack('l')[0]
40
- end
41
-
42
- def cstring
43
- gets("\0")[0..-2]
44
- end
45
-
46
- end
1
+ # This code is free software; you can redistribute it and/or modify it under the
2
+ # terms of the new BSD License.
3
+ #
4
+ # Copyright (c) 2010, Sebastian Staudt
5
+
6
+ require 'stringio'
7
+
8
+ class StringIO
9
+
10
+ def self.allocate(size)
11
+ new "\0" * size
12
+ end
13
+
14
+ def byte
15
+ read(1)[0]
16
+ end
17
+
18
+ def float
19
+ read(4).unpack('e')[0]
20
+ end
21
+
22
+ def get
23
+ read remaining
24
+ end
25
+
26
+ def long
27
+ read(4).unpack('V')[0]
28
+ end
29
+
30
+ def remaining
31
+ size - pos
32
+ end
33
+
34
+ def short
35
+ read(2).unpack('v')[0]
36
+ end
37
+
38
+ def signed_long
39
+ read(4).unpack('l')[0]
40
+ end
41
+
42
+ def cstring
43
+ gets("\0")[0..-2]
44
+ end
45
+
46
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam-condenser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 11
9
- - 2
10
- version: 0.11.2
9
+ - 3
10
+ version: 0.11.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sebastian Staudt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-08 00:00:00 +02:00
18
+ date: 2010-10-08 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -45,7 +45,6 @@ files:
45
45
  - LICENSE
46
46
  - README.md
47
47
  - Rakefile
48
- - VERSION.yml
49
48
  - lib/abstract_class.rb
50
49
  - lib/datagram_channel.rb
51
50
  - lib/exceptions/packet_format_exception.rb
data/VERSION.yml DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- :major: 0
3
- :minor: 11
4
- :patch: 2