steam-client 0.0.5 → 0.0.6

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.
@@ -13,16 +13,10 @@ describe SteamClient::Profile do
13
13
  profile.avatarMedium.should match "http://media.steampowered.com/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4_medium.jpg"
14
14
  profile.avatarFull.should match "http://media.steampowered.com/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4_full.jpg"
15
15
  profile.customURL.should match "robinwalker"
16
- profile.hoursPlayed2Wk.should eq(77.7)
17
- profile.location.should match "Bellevue, Washington, United States"
16
+ profile.hoursPlayed2Wk.should eq(0.0)
17
+ profile.location.should match "3961 WA US"
18
18
  profile.realname.should match "Robin Walker"
19
- profile.onlineState.should be SteamClient::OnlineState::OFFLINE
19
+ profile.onlineState.should be SteamClient::OnlineState::UNKNOWN
20
20
  end
21
21
  end
22
-
23
- it "should throw an error on an invalid ID" do
24
- VCR.use_cassette('steam_invalid_ID') do
25
- lambda {@client.find_profile_by_id("1")}.should raise_error SteamClient::Error::ProfileNotFound
26
- end
27
- end
28
22
  end
@@ -11,7 +11,11 @@ end
11
11
  RSpec.configure do |config|
12
12
  config.before(:all) do
13
13
  VCR.use_cassette('steam_profile_id') do
14
- @client = SteamClient::Client.new("XXXXXXXXX")
14
+ api_key = ENV['STEAM_CLIENT_API_KEY']
15
+ if api_key.nil? or api_key.empty?
16
+ api_key = "XXXXXXXXX"
17
+ end
18
+ @client = SteamClient::Client.new(api_key)
15
19
  @profile = @client.find_profile_by_id("76561197960435530")
16
20
  end
17
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2012-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -65,8 +65,10 @@ files:
65
65
  - spec/fixtures/vcr_cassettes/steam_invalid_ID.yml
66
66
  - spec/fixtures/vcr_cassettes/steam_profile.yml
67
67
  - spec/fixtures/vcr_cassettes/steam_profile_friends.yml
68
+ - spec/fixtures/vcr_cassettes/steam_profile_friends_without_api_key.yml
68
69
  - spec/fixtures/vcr_cassettes/steam_profile_game_list.yml
69
70
  - spec/fixtures/vcr_cassettes/steam_profile_id.yml
71
+ - spec/fixtures/vcr_cassettes/steam_profile_without_api_key.yml
70
72
  - spec/profile_spec.rb
71
73
  - spec/spec_helper.rb
72
74
  - steam-client.gemspec
@@ -84,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
86
  version: '0'
85
87
  segments:
86
88
  - 0
87
- hash: -2188731397205423602
89
+ hash: -3592025032976197842
88
90
  required_rubygems_version: !ruby/object:Gem::Requirement
89
91
  none: false
90
92
  requirements:
@@ -102,7 +104,9 @@ test_files:
102
104
  - spec/fixtures/vcr_cassettes/steam_invalid_ID.yml
103
105
  - spec/fixtures/vcr_cassettes/steam_profile.yml
104
106
  - spec/fixtures/vcr_cassettes/steam_profile_friends.yml
107
+ - spec/fixtures/vcr_cassettes/steam_profile_friends_without_api_key.yml
105
108
  - spec/fixtures/vcr_cassettes/steam_profile_game_list.yml
106
109
  - spec/fixtures/vcr_cassettes/steam_profile_id.yml
110
+ - spec/fixtures/vcr_cassettes/steam_profile_without_api_key.yml
107
111
  - spec/profile_spec.rb
108
112
  - spec/spec_helper.rb