steam-condenser 0.11.4 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,10 +3,8 @@
3
3
  #
4
4
  # Copyright (c) 2010, Sebastian Staudt
5
5
 
6
- require 'yaml'
7
-
8
6
  module SteamCondenser
9
7
 
10
- VERSION = '0.11.4'
8
+ VERSION = '0.12.0'
11
9
 
12
10
  end
@@ -0,0 +1,42 @@
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
+ # AlienSwarmMission holds statistical information about missions played by a
7
+ # player in Alien Swarm.
8
+ class AlienSwarmMission
9
+
10
+ attr_reader :avg_damage_taken, :avg_friendly_fire, :avg_kills,
11
+ :best_difficulty, :damage_taken, :friendly_fire,
12
+ :games_successful, :img, :kills, :map_name, :name, :time,
13
+ :total_games, :total_games_percentage
14
+
15
+ # Creates a new instance of AlienSwarmMission based on the assigned mission
16
+ # name and XML data
17
+ def initialize(mission_data)
18
+ @avg_damage_taken = mission_data.elements['damagetakenavg'].text.to_f
19
+ @avg_friendly_fire = mission_data.elements['friendlyfireavg'].text.to_f
20
+ @avg_kills = mission_data.elements['killsavg'].text.to_f
21
+ @best_difficulty = mission_data.elements['bestdifficulty'].text
22
+ @damage_taken = mission_data.elements['damagetaken'].text.to_i
23
+ @friendly_fire = mission_data.elements['friendlyfire'].text.to_i
24
+ @games_successful = mission_data.elements['gamessuccess'].text.to_i
25
+ @img = AlienSwarmStats::BASE_URL + mission_data.elements['image'].text
26
+ @kills = mission_data.elements['kills'].text.to_i
27
+ @map_name = mission_data.name
28
+ @name = mission_data.elements['name'].text
29
+ @total_games = mission_data.elements['gamestotal'].text.to_i
30
+ @total_games_percentage = mission_data.elements['gamestotalpct'].text.to_f
31
+
32
+ @time = {}
33
+ @time[:average] = mission_data.elements['avgtime'].text
34
+ @time[:brutal] = mission_data.elements['brutaltime'].text
35
+ @time[:easy] = mission_data.elements['easytime'].text
36
+ @time[:hard] = mission_data.elements['hardtime'].text
37
+ @time[:insane] = mission_data.elements['insanetime'].text
38
+ @time[:normal] = mission_data.elements['normaltime'].text
39
+ @time[:total] = mission_data.elements['totaltime'].text
40
+ end
41
+
42
+ end
@@ -0,0 +1,155 @@
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 'steam/community/alien_swarm/alien_swarm_mission'
7
+ require 'steam/community/alien_swarm/alien_swarm_weapon'
8
+
9
+ # The AlienSwarmStats class represents the game statistics for a single user in
10
+ # Alien Swarm
11
+ class AlienSwarmStats < GameStats
12
+
13
+ attr_reader :lifetime_stats
14
+
15
+ BASE_URL = 'http://steamcommunity.com/public/images/gamestats/swarm/'
16
+
17
+ WEAPONS = [ 'Autogun', 'Cannon_Sentry', 'Chainsaw', 'Flamer',
18
+ 'Grenade_Launcher', 'Hand_Grenades', 'Hornet_Barrage',
19
+ 'Incendiary_Sentry', 'Laser_Mines', 'Marskman_Rifle', 'Minigun',
20
+ 'Mining_Laser', 'PDW', 'Pistol', 'Prototype_Rifle', 'Rail_Rifle',
21
+ 'Rifle', 'Rifle_Grenade', 'Sentry_Gun', 'Shotgun',
22
+ 'Tesla_Cannon', 'Vindicator', 'Vindicator_Grenade' ]
23
+
24
+ # Creates an AlienSwarmStats object by calling the super constructor with the
25
+ # game name "alienswarm"
26
+ def initialize(steam_id)
27
+ super steam_id, 'alienswarm'
28
+
29
+ if public?
30
+ @hours_played = @xml_data.elements['stats/lifetime/timeplayed'].text
31
+
32
+ @lifetime_stats = {}
33
+ @lifetime_stats[:accuracy] = @xml_data.elements['stats/lifetime/accuracy'].text.to_f
34
+ @lifetime_stats[:aliens_burned] = @xml_data.elements['stats/lifetime/aliensburned'].text.to_i
35
+ @lifetime_stats[:aliens_killed] = @xml_data.elements['stats/lifetime/alienskilled'].text.to_i
36
+ @lifetime_stats[:campaigns] = @xml_data.elements['stats/lifetime/campaigns'].text.to_i
37
+ @lifetime_stats[:damage_taken] = @xml_data.elements['stats/lifetime/damagetaken'].text.to_i
38
+ @lifetime_stats[:experience] = @xml_data.elements['stats/lifetime/experience'].text.to_i
39
+ @lifetime_stats[:experience_required] = @xml_data.elements['stats/lifetime/xprequired'].text.to_i
40
+ @lifetime_stats[:fast_hacks] = @xml_data.elements['stats/lifetime/fasthacks'].text.to_i
41
+ @lifetime_stats[:friendly_fire] = @xml_data.elements['stats/lifetime/friendlyfire'].text.to_i
42
+ @lifetime_stats[:games_successful] = @xml_data.elements['stats/lifetime/gamessuccess'].text.to_i
43
+ @lifetime_stats[:healing] = @xml_data.elements['stats/lifetime/healing'].text.to_i
44
+ @lifetime_stats[:kills_per_hour] = @xml_data.elements['stats/lifetime/killsperhour'].text.to_f
45
+ @lifetime_stats[:level] = @xml_data.elements['stats/lifetime/level'].text.to_i
46
+ @lifetime_stats[:promotion] = @xml_data.elements['stats/lifetime/promotion'].text.to_i
47
+ @lifetime_stats[:promotion_img] = BASE_URL + @xml_data.elements['stats/lifetime/promotionpic'].text if @lifetime_stats[:promotion] > 0
48
+ @lifetime_stats[:next_unlock] = @xml_data.elements['stats/lifetime/nextunlock'].text
49
+ @lifetime_stats[:next_unlock_img] = BASE_URL + @xml_data.elements['stats/lifetime/nextunlockimg'].text
50
+ @lifetime_stats[:shots_fired] = @xml_data.elements['stats/lifetime/shotsfired'].text.to_i
51
+ @lifetime_stats[:total_games] = @xml_data.elements['stats/lifetime/totalgames'].text.to_i
52
+
53
+ @lifetime_stats[:games_successful_percentage] = (@lifetime_stats[:total_games] > 0) ? @lifetime_stats[:games_successful].to_f / @lifetime_stats[:total_games] : 0;
54
+ end
55
+ end
56
+
57
+ # Returns a Hash of favorites for this user like weapons and marine.
58
+ # If the favorites haven't been parsed already, parsing is done now.
59
+ def favorites
60
+ return unless public?
61
+
62
+ if @favorites.nil?
63
+ @favorites = {}
64
+ @favorites[:class] = @xml_data.elements['stats/favorites/class'].text
65
+ @favorites[:class_img] = @xml_data.elements['stats/favorites/classimg'].text
66
+ @favorites[:class_percentage] = @xml_data.elements['stats/favorites/classpct'].text.to_f
67
+ @favorites[:difficulty] = @xml_data.elements['stats/favorites/difficulty'].text
68
+ @favorites[:difficulty_percentage] = @xml_data.elements['stats/favorites/difficultypct'].text.to_f
69
+ @favorites[:extra] = @xml_data.elements['stats/favorites/extra'].text
70
+ @favorites[:extra_img] = @xml_data.elements['stats/favorites/extraimg'].text
71
+ @favorites[:extra_percentage] = @xml_data.elements['stats/favorites/extrapct'].text.to_f
72
+ @favorites[:marine] = @xml_data.elements['stats/favorites/marine'].text
73
+ @favorites[:marine_img] = @xml_data.elements['stats/favorites/marineimg'].text
74
+ @favorites[:marine_percentage] = @xml_data.elements['stats/favorites/marinepct'].text.to_f
75
+ @favorites[:mission] = @xml_data.elements['stats/favorites/mission'].text
76
+ @favorites[:mission_img] = @xml_data.elements['stats/favorites/missionimg'].text
77
+ @favorites[:mission_percentage] = @xml_data.elements['stats/favorites/missionpct'].text.to_f
78
+ @favorites[:primary_weapon] = @xml_data.elements['stats/favorites/primary'].text
79
+ @favorites[:primary_weapon_img] = @xml_data.elements['stats/favorites/primaryimg'].text
80
+ @favorites[:primary_weapon_percentage] = @xml_data.elements['stats/favorites/primarypct'].text.to_f
81
+ @favorites[:secondary_weapon] = @xml_data.elements['stats/favorites/secondary'].text
82
+ @favorites[:secondary_weapon_img] = @xml_data.elements['stats/favorites/secondaryimg'].text
83
+ @favorites[:secondary_weapon_percentage] = @xml_data.elements['stats/favorites/secondarypct'].text.to_f
84
+ end
85
+
86
+ @favorites
87
+ end
88
+
89
+ # Returns a Hash of item stats for this user like ammo deployed and medkits
90
+ # used. If the items haven't been parsed already, parsing is done now.
91
+ def item_stats
92
+ return unless public?
93
+
94
+ if @item_stats.nil?
95
+ @item_stats = {}
96
+ @item_stats[:ammo_deployed] = @xml_data.elements['stats/weapons/ammo_deployed'].text.to_i
97
+ @item_stats[:sentryguns_deployed] = @xml_data.elements['stats/weapons/sentryguns_deployed'].text.to_i
98
+ @item_stats[:sentry_flamers_deployed] = @xml_data.elements['stats/weapons/sentry_flamers_deployed'].text.to_i
99
+ @item_stats[:sentry_freeze_deployed] = @xml_data.elements['stats/weapons/sentry_freeze_deployed'].text.to_i
100
+ @item_stats[:sentry_cannon_deployed] = @xml_data.elements['stats/weapons/sentry_cannon_deployed'].text.to_i
101
+ @item_stats[:medkits_used] = @xml_data.elements['stats/weapons/medkits_used'].text.to_i
102
+ @item_stats[:flares_used] = @xml_data.elements['stats/weapons/flares_used'].text.to_i
103
+ @item_stats[:adrenaline_used] = @xml_data.elements['stats/weapons/adrenaline_used'].text.to_i
104
+ @item_stats[:tesla_traps_deployed] = @xml_data.elements['stats/weapons/tesla_traps_deployed'].text.to_i
105
+ @item_stats[:freeze_grenades_thrown] = @xml_data.elements['stats/weapons/freeze_grenades_thrown'].text.to_i
106
+ @item_stats[:electric_armor_used] = @xml_data.elements['stats/weapons/electric_armor_used'].text.to_i
107
+ @item_stats[:healgun_heals] = @xml_data.elements['stats/weapons/healgun_heals'].text.to_i
108
+ @item_stats[:healgun_heals_self] = @xml_data.elements['stats/weapons/healgun_heals_self'].text.to_i
109
+ @item_stats[:healbeacon_heals] = @xml_data.elements['stats/weapons/healbeacon_heals'].text.to_i
110
+ @item_stats[:healbeacon_heals_self] = @xml_data.elements['stats/weapons/healbeacon_heals_self'].text.to_i
111
+ @item_stats[:damage_amps_used] = @xml_data.elements['stats/weapons/damage_amps_used'].text.to_i
112
+ @item_stats[:healbeacons_deployed] = @xml_data.elements['stats/weapons/healbeacons_deployed'].text.to_i
113
+ @item_stats[:healbeacon_heals_pct] = @xml_data.elements['stats/weapons/healbeacon_heals_pct'].text.to_f
114
+ @item_stats[:healgun_heals_pct] = @xml_data.elements['stats/weapons/healgun_heals_pct'].text.to_f
115
+ @item_stats[:healbeacon_heals_pct_self] = @xml_data.elements['stats/weapons/healbeacon_heals_pct_self'].text.to_f
116
+ @item_stats[:healgun_heals_pct_self] = @xml_data.elements['stats/weapons/healgun_heals_pct_self'].text.to_f
117
+ end
118
+
119
+ @item_stats
120
+ end
121
+
122
+ # Returns a Hash of AlienSwarmMission for this user containing all Alien
123
+ # Swarm missions. If the missions haven't been parsed already, parsing is
124
+ # done now.
125
+ def mission_stats
126
+ return unless public?
127
+
128
+ if @mission_stats.nil?
129
+ @mission_stats = {}
130
+ @xml_data.elements.each('stats/missions/*') do |mission_data|
131
+ @mission_stats[mission_data.name] = AlienSwarmMission.new(mission_data)
132
+ end
133
+ end
134
+
135
+ @mission_stats
136
+ end
137
+
138
+ # Returns a Hash of AlienSwarmWeapon for this user containing all Alien Swarm
139
+ # weapons. If the weapons haven't been parsed already, parsing is done now.
140
+ def weapon_stats
141
+ return unless public?
142
+
143
+ if @weapon_stats.nil?
144
+ @weapon_stats = {}
145
+ WEAPONS.each do |weapon_node|
146
+ weapon_data = @xml_data.elements["stats/weapons/#{weapon_node}"]
147
+ weapon = AlienSwarmWeapon.new(weapon_data)
148
+ @weapon_stats[weapon.name] = weapon
149
+ end
150
+ end
151
+
152
+ @weapon_stats
153
+ end
154
+
155
+ end
@@ -0,0 +1,28 @@
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 'steam/community/game_weapon'
7
+
8
+ # AlienSwarmWeapon holds statistical information about weapons used by a player
9
+ # in Alien Swarm.
10
+ class AlienSwarmWeapon
11
+
12
+ include GameWeapon
13
+
14
+ attr_reader :accuracy, :damage, :friendly_fire, :name, :shots
15
+
16
+ # Creates a new instance of AlienSwarmWeapon based on the assigned weapon
17
+ # XML data
18
+ def initialize(weapon_data)
19
+ super
20
+
21
+ @accuracy = weapon_data.elements['accuracy'].text.to_f
22
+ @damage = weapon_data.elements['damage'].text.to_i
23
+ @friendly_fire = weapon_data.elements['friendlyfire'].text.to_i
24
+ @name = weapon_data.elements['name'].text
25
+ @shots = weapon_data.elements['shotsfired'].text.to_i
26
+ end
27
+
28
+ end
@@ -8,9 +8,7 @@ require 'steam/community/css/css_weapon'
8
8
 
9
9
  # The CSSStats class represents the game statistics for a single user in
10
10
  # Counter-Strike: Source
11
- class CSSStats
12
-
13
- include GameStats
11
+ class CSSStats < GameStats
14
12
 
15
13
  MAPS = [ 'cs_assault', 'cs_compound', 'cs_havana', 'cs_italy', 'cs_militia',
16
14
  'cs_office', 'de_aztec', 'de_cbble', 'de_chateau', 'de_dust',
@@ -73,9 +71,9 @@ class CSSStats
73
71
  @total_stats[:windows_broken] = @xml_data.elements['stats/lifetime/winbroken'].text.to_i
74
72
  @total_stats[:zoomed_sniper_kills] = @xml_data.elements['stats/lifetime/zsniperkills'].text.to_i
75
73
 
76
- @last_match_stats[:kdratio] = @last_match_stats[:kills].to_f / @last_match_stats[:deaths]
77
- @total_stats[:accuracy] = @total_stats[:hits].to_f / @total_stats[:shots]
78
- @total_stats[:kdratio] = @total_stats[:kills].to_f / @total_stats[:deaths]
74
+ @last_match_stats[:kdratio] = (@total_stats[:deaths] > 0) ? @last_match_stats[:kills].to_f / @last_match_stats[:deaths] : 0
75
+ @total_stats[:accuracy] = (@total_stats[:shots] > 0) ? @total_stats[:hits].to_f / @total_stats[:shots] : 0
76
+ @total_stats[:kdratio] = (@total_stats[:deaths] > 0) ? @total_stats[:kills].to_f / @total_stats[:deaths] : 0
79
77
  @total_stats[:rounds_lost] = @total_stats[:rounds_played] - @total_stats[:rounds_won]
80
78
  end
81
79
  end
@@ -7,9 +7,7 @@ require 'steam/community/game_stats'
7
7
 
8
8
  # The DefenseGridStats class represents the game statistics for a single user in
9
9
  # Defense Grid: The Awakening
10
- class DefenseGridStats
11
-
12
- include GameStats
10
+ class DefenseGridStats < GameStats
13
11
 
14
12
  attr_reader :bronze_medals, :damage_done, :damage_campaign, :damage_challenge,
15
13
  :encountered, :gold_medals, :heat_damage, :interest, :killed,
@@ -6,9 +6,7 @@
6
6
  require 'steam/community/dods/dods_weapon'
7
7
  require 'steam/community/game_stats'
8
8
 
9
- class DoDSStats
10
-
11
- include GameStats
9
+ class DoDSStats < GameStats
12
10
 
13
11
  # Creates a DoDSStats object by calling the super constructor with the game
14
12
  # name "DoD:S"
@@ -10,7 +10,7 @@ require 'steam/community/game_achievement'
10
10
 
11
11
  # The GameStats class represents the game statistics for a single user and a
12
12
  # specific game
13
- module GameStats
13
+ class GameStats
14
14
 
15
15
  attr_reader :app_id, :custom_url, :game_friendly_name, :game_name,
16
16
  :hours_played, :privacy_state, :steam_id64
@@ -19,6 +19,9 @@ module GameStats
19
19
  # depending on the game selected
20
20
  def self.create_game_stats(steam_id, game_name)
21
21
  case game_name
22
+ when 'alienswarm'
23
+ require 'steam/community/alien_swarm/alien_swarm_stats'
24
+ AlienSwarmStats.new(steam_id)
22
25
  when 'cs:s'
23
26
  require 'steam/community/css/css_stats'
24
27
  CSSStats.new(steam_id)
@@ -52,7 +55,7 @@ module GameStats
52
55
  end
53
56
  @game_friendly_name = game_name
54
57
 
55
- url = base_url + '?xml=1'
58
+ url = base_url + '?xml=all'
56
59
  @xml_data = REXML::Document.new(open(url, {:proxy => true}).read).root
57
60
 
58
61
  @privacy_state = @xml_data.elements['privacyState'].text
@@ -60,7 +63,7 @@ module GameStats
60
63
  @app_id = @xml_data.elements['game/gameLink'].text.match(/http:\/\/store.steampowered.com\/app\/([1-9][0-9]+)/)[1]
61
64
  @custom_url = @xml_data.elements['player/customURL'].text if @custom_url.nil?
62
65
  @game_name = @xml_data.elements['game/gameName'].text
63
- @hours_played = @xml_data.elements['stats/hoursPlayed'].text
66
+ @hours_played = @xml_data.elements['stats/hoursPlayed'].text unless @xml_data.elements['stats/hoursPlayed'].nil?
64
67
  @steam_id64 = @xml_data.elements['player/steamID64'].text.to_i if @steam_id64.nil?
65
68
  end
66
69
  end
@@ -10,8 +10,6 @@ require 'steam/community/game_stats'
10
10
  # the Steam Community the code for both is pretty much the same.
11
11
  module AbstractL4DStats
12
12
 
13
- include GameStats
14
-
15
13
  SPECIAL_INFECTED = %w(boomer hunter smoker tank)
16
14
 
17
15
  def initialize(steam_id, game_name)
@@ -7,7 +7,7 @@ require 'steam/community/l4d/abstract_l4d_stats'
7
7
  require 'steam/community/l4d/l4d2_map'
8
8
  require 'steam/community/l4d/l4d2_weapon'
9
9
 
10
- class L4D2Stats
10
+ class L4D2Stats < GameStats
11
11
 
12
12
  include AbstractL4DStats
13
13
 
@@ -8,7 +8,7 @@ require 'steam/community/l4d/l4d_explosive'
8
8
  require 'steam/community/l4d/l4d_map'
9
9
  require 'steam/community/l4d/l4d_weapon'
10
10
 
11
- class L4DStats
11
+ class L4DStats < GameStats
12
12
 
13
13
  include AbstractL4DStats
14
14
 
@@ -8,9 +8,7 @@ require 'steam/community/tf2/tf2_class_factory'
8
8
 
9
9
  # The TF2Stats class represents the game statistics for a single user in Team
10
10
  # Fortress 2
11
- class TF2Stats
12
-
13
- include GameStats
11
+ class TF2Stats < GameStats
14
12
 
15
13
  attr_reader :accumulated_points
16
14
 
@@ -12,6 +12,21 @@ require 'exceptions/timeout_exception'
12
12
  # servers.
13
13
  module SteamSocket
14
14
 
15
+ @@timeout = 1000
16
+
17
+ # Sets the timeout for socket operations. This usually only affects timeouts,
18
+ # i.e. when a server does not respond in time.
19
+ #
20
+ # Due to the server-side implementation of the RCON protocol, each RCON
21
+ # request will also wait this amount of time after execution. So if you need
22
+ # RCON requests to execute fast, you should set this to a adequatly low
23
+ # value.
24
+ #
25
+ # +timeout+ The amount of milliseconds before a request times out
26
+ def self.timeout=(timeout)
27
+ @@timeout = timeout
28
+ end
29
+
15
30
  def initialize(*args)
16
31
  @channel = DatagramChannel.open
17
32
  @channel.connect(*args)
@@ -26,7 +41,7 @@ module SteamSocket
26
41
  end
27
42
 
28
43
  def receive_packet(buffer_length = 0)
29
- raise TimeoutException if select([@channel.socket], nil, nil, 1).nil?
44
+ raise TimeoutException if select([@channel.socket], nil, nil, @@timeout / 1000).nil?
30
45
 
31
46
  if buffer_length == 0
32
47
  @buffer.rewind
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: 59
4
+ hash: 47
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 11
9
- - 4
10
- version: 0.11.4
8
+ - 12
9
+ - 0
10
+ version: 0.12.0
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-11-07 00:00:00 +01:00
18
+ date: 2010-12-29 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -24,27 +24,42 @@ dependencies:
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ">="
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 15
29
+ hash: 25
30
30
  segments:
31
31
  - 0
32
32
  - 2
33
- version: "0.2"
33
+ - 7
34
+ version: 0.2.7
34
35
  type: :runtime
35
36
  version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: ore-tasks
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 19
46
+ segments:
47
+ - 0
48
+ - 3
49
+ - 0
50
+ version: 0.3.0
51
+ type: :development
52
+ version_requirements: *id002
36
53
  description: A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers
37
54
  email: koraktor@gmail.com
38
55
  executables: []
39
56
 
40
57
  extensions: []
41
58
 
42
- extra_rdoc_files: []
43
-
44
- files:
59
+ extra_rdoc_files:
45
60
  - LICENSE
46
61
  - README.md
47
- - Rakefile
62
+ files:
48
63
  - lib/datagram_channel.rb
49
64
  - lib/exceptions/packet_format_exception.rb
50
65
  - lib/exceptions/rcon_ban_exception.rb
@@ -52,10 +67,9 @@ files:
52
67
  - lib/exceptions/steam_condenser_exception.rb
53
68
  - lib/exceptions/timeout_exception.rb
54
69
  - lib/socket_channel.rb
55
- - lib/steam-condenser.rb
56
- - lib/steam-condenser/community.rb
57
- - lib/steam-condenser/servers.rb
58
- - lib/steam-condenser/version.rb
70
+ - lib/steam/community/alien_swarm/alien_swarm_mission.rb
71
+ - lib/steam/community/alien_swarm/alien_swarm_stats.rb
72
+ - lib/steam/community/alien_swarm/alien_swarm_weapon.rb
59
73
  - lib/steam/community/cacheable.rb
60
74
  - lib/steam/community/css/css_map.rb
61
75
  - lib/steam/community/css/css_stats.rb
@@ -121,27 +135,28 @@ files:
121
135
  - lib/steam/sockets/source_socket.rb
122
136
  - lib/steam/sockets/steam_socket.rb
123
137
  - lib/steam/steam_player.rb
138
+ - lib/steam-condenser/community.rb
139
+ - lib/steam-condenser/servers.rb
140
+ - lib/steam-condenser/version.rb
141
+ - lib/steam-condenser.rb
124
142
  - lib/stringio_additions.rb
143
+ - LICENSE
144
+ - README.md
125
145
  - test/datagram_channel_tests.rb
126
146
  - test/query_tests.rb
127
147
  - test/rcon_tests.rb
128
148
  - test/socket_channel_tests.rb
129
- - test/steam/communtiy/steam_community_test_suite.rb
130
149
  - test/steam/communtiy/steam_group_tests.rb
131
150
  - test/steam/communtiy/steam_id_tests.rb
132
151
  - test/steam_community_tests.rb
133
152
  - test/stringio_additions_tests.rb
134
153
  has_rdoc: true
135
154
  homepage: http://koraktor.github.com/steam-condenser
136
- licenses: []
137
-
155
+ licenses:
156
+ - BSD
138
157
  post_install_message:
139
- rdoc_options:
140
- - --all
141
- - --inline-source
142
- - --line-numbers
143
- - --charset=utf-8
144
- - --webcvs=http://github.com/koraktor/steam-condenser/source/blob/master/ruby/%s
158
+ rdoc_options: []
159
+
145
160
  require_paths:
146
161
  - lib
147
162
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -169,5 +184,12 @@ rubygems_version: 1.3.7
169
184
  signing_key:
170
185
  specification_version: 3
171
186
  summary: Steam Condenser - A Steam query library
172
- test_files: []
173
-
187
+ test_files:
188
+ - test/datagram_channel_tests.rb
189
+ - test/query_tests.rb
190
+ - test/rcon_tests.rb
191
+ - test/socket_channel_tests.rb
192
+ - test/steam/communtiy/steam_group_tests.rb
193
+ - test/steam/communtiy/steam_id_tests.rb
194
+ - test/steam_community_tests.rb
195
+ - test/stringio_additions_tests.rb
data/Rakefile DELETED
@@ -1,55 +0,0 @@
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) 2008-2010, Sebastian Staudt
5
-
6
- require 'rake/rdoctask'
7
- require 'rake/gempackagetask'
8
- require 'rubygems'
9
-
10
- src_files = Dir.glob(File.join("lib", "**", "*.rb"))
11
- test_files = Dir.glob(File.join("test", "**", "*.rb"))
12
-
13
- begin
14
- require 'jeweler'
15
-
16
- gemspec = Gem::Specification.new do |gem|
17
- line = File.read('lib/steam-condenser/version.rb')[/^\s*VERSION\s*=\s*.*/]
18
- gem.version = line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
19
- end
20
-
21
- # Gem specification
22
- Jeweler::Tasks.new(gemspec) do |s|
23
- s.authors = ['Sebastian Staudt']
24
- s.email = 'koraktor@gmail.com'
25
- s.description = 'A multi-language library for querying the Steam Community, Source, GoldSrc servers and Steam master servers'
26
- s.date = Time.now
27
- s.homepage = 'http://koraktor.github.com/steam-condenser'
28
- s.name = s.rubyforge_project = "steam-condenser"
29
- s.summary = 'Steam Condenser - A Steam query library'
30
-
31
- s.files = %w(README.md Rakefile LICENSE VERSION.yml) + src_files + test_files
32
- s.rdoc_options = ["--all", "--inline-source", "--line-numbers", "--charset=utf-8", "--webcvs=http://github.com/koraktor/steam-condenser/source/blob/master/ruby/%s"]
33
-
34
- s.add_dependency('bzip2-ruby', '>= 0.2')
35
- end
36
- rescue LoadError
37
- puts 'You need Jeweler to build the gem. Install it using `gem install jeweler`.'
38
- end
39
-
40
- # Create a rake task +:rdoc+ to build the documentation
41
- desc "Building docs"
42
- Rake::RDocTask.new do |rdoc|
43
- rdoc.title = "Steam Condenser documentation"
44
- rdoc.rdoc_files.include ["lib/**/*.rb", "LICENSE", "README.md"]
45
- rdoc.main = "README.md"
46
- rdoc.rdoc_dir = "rdoc"
47
- rdoc.options = ["--all", "--inline-source", "--line-numbers", "--charset=utf-8", "--webcvs=http://github.com/koraktor/steam-condenser/blob/master/ruby/%s"]
48
- end
49
-
50
- # Task for cleaning documentation and package directories
51
- desc "Clean documentation and package directories"
52
- task :clean do
53
- FileUtils.rm_rf "doc"
54
- FileUtils.rm_rf "pkg"
55
- end
@@ -1,12 +0,0 @@
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) 2009-2010, Sebastian Staudt
5
-
6
- require 'test/unit'
7
-
8
- suite_dir = File.dirname(__FILE__)
9
- $LOAD_PATH.unshift(suite_dir) unless $LOAD_PATH.include?(suite_dir)
10
-
11
- require 'steam_group_tests'
12
- require 'steam_id_tests'