steam-api 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9d350bed9837ca990cd5f05a491423b01c0bac68
4
- data.tar.gz: f24dcce0a76752b2eeb62fe5f3428226a4756e50
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: 126cf4dc03315490747599e176d6f314b72237e4
4
+ data.tar.gz: 712bca6def072b84cba7c953678e5b5f695ee225
5
5
  SHA512:
6
- metadata.gz: f3e780148ded110562c84ca841f9b3ebd3cbdd0faf9412290c3916ffef1e819080416290bd2de87cd71b9d960920450fa41281aa1f01ec1413cbddbf9039e257
7
- data.tar.gz: fbf62a14354948567b72b39cbcbf2a822a79775f3de79cec7fccfc79f3dd8a73c9838b128195f391a2b740ebb5fe66b4dc7e754ba6a36eaca467a685d4a306b2
6
+ metadata.gz: 48b6e6aa5c27fa05dd9ecb1e824a9781176beb99eb0f02b7d3256a9a02c6d185666f6d479f726e75225f0a082ece6981e280f75f3e48fcb518d3c20637061bb9
7
+ data.tar.gz: 0248892823f35756eb80cef56d129f4f9ec8d6a48941725c2c5a301e52565928bb0ff88c60967ff86af331f1331997cdc83b0760cdd1dcde6e278565e4d051c5
@@ -1,6 +1,26 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
3
+ - 2.1.1
4
+ - 2.1.0
5
+ - 2.0.0
6
+ - 1.9.3
7
+ - 1.9.2
8
+ - 1.8.7
9
+ - jruby-18mode
10
+ - jruby-19mode
11
+ - ruby-head
12
+ - jruby-head
13
+ - ree
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: 1.9.3
17
+ - rvm: 1.9.2
18
+ - rvm: 1.8.7
19
+ - rvm: ree
20
+ - rvm: jruby-18mode
21
+ - rvm: jruby-19mode
22
+ - rvm: jruby-head
23
+ fast_finish: true
4
24
  env:
5
25
  global:
6
26
  secure: P5IpEGYYbF0HcP9Mj9/zZAUXpUjkA2YkGLClvbVGsOD5zI9Jj1RZAlCC/fBKtfPUlfjlADp1hIN++n7qnqqmXPw4X/BC2V8Ios91NoFQeKfjQENSmjYykFTCp1CkBmCjq+lb/yE/JPQnVOoI/eEm5uaNSRc/XLjHwuSdKEFPv8M=
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- ruby '2.0.0'
3
2
 
4
3
  # Specify your gem's dependencies in simple-steam.gemspec
5
4
  gemspec
@@ -1,5 +1,4 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require 'weary'
3
2
  require 'faraday'
4
3
  require 'json'
5
4
 
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  # Versioning Info
3
3
  module Steam
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
@@ -1,92 +1,91 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Steam::Player do
4
+ before(:each) do
5
+ @playerid = 76561197993276293
6
+ end
7
+
4
8
  describe '.owned_games' do
5
9
  it 'should allow users to retrieve a list of games' do
6
- Steam::Player.owned_games(76561197993276293)
10
+ Steam::Player.owned_games(@playerid)
7
11
  .should_not be_nil
8
12
  end
9
13
 
10
14
  it 'should allow users to retrieve a list of games' do
11
- Steam::Player.owned_games(76561197993276293)
15
+ Steam::Player.owned_games(@playerid)
12
16
  .should have_key('game_count')
13
17
  end
14
18
 
15
19
  it 'should allow users to retrieve a list of games' do
16
- Steam::Player.owned_games(76561197993276293)
20
+ Steam::Player.owned_games(@playerid)
17
21
  .should have_key('games')
18
22
  end
19
23
  end
20
24
 
21
25
  describe '.recently_played_games' do
22
26
  it 'should allow users to list a players recent games' do
23
- Steam::Player.recently_played_games(76561197993276293)
27
+ Steam::Player.recently_played_games(@playerid)
24
28
  .should_not be_nil
25
29
  end
26
30
 
27
31
  it 'should allow users to list a players recent games' do
28
- Steam::Player.recently_played_games(76561197993276293)
32
+ Steam::Player.recently_played_games(@playerid)
29
33
  .should have_key 'total_count'
30
34
  end
31
-
32
- it 'should allow users to list a players recent games' do
33
- Steam::Player.recently_played_games(76561197993276293)
34
- .should have_key 'games'
35
- end
36
35
  end
37
36
 
38
37
  describe '.steam_level' do
39
38
  it 'should allow users to retrieve a users steam level' do
40
- Steam::Player.steam_level(76561197993276293)
39
+ Steam::Player.steam_level(@playerid)
41
40
  .should_not be_nil
42
41
  end
43
42
 
44
43
  it 'should allow users to retrieve a users steam level' do
45
- Steam::Player.steam_level(76561197993276293)
44
+ Steam::Player.steam_level(@playerid)
46
45
  .should be_a(Fixnum)
47
46
  end
48
47
  end
49
48
 
50
49
  describe '.badges' do
51
50
  it 'should allow a user to retrieve badges for a player' do
52
- Steam::Player.badges(76561197993276293)
51
+ Steam::Player.badges(@playerid)
53
52
  .should_not be_nil
54
53
  end
55
54
 
56
55
  it 'should allow a user to retrieve badges for a player' do
57
- Steam::Player.badges(76561197993276293)
56
+ Steam::Player.badges(@playerid)
58
57
  .should have_key 'badges'
59
58
  end
60
59
 
61
60
  it 'should allow a user to retrieve badges for a player' do
62
- Steam::Player.badges(76561197993276293)
61
+ Steam::Player.badges(@playerid)
63
62
  .should have_key 'player_level'
64
63
  end
65
64
 
66
65
  it 'should allow a user to retrieve badges for a player' do
67
- Steam::Player.badges(76561197993276293)
66
+ Steam::Player.badges(@playerid)
68
67
  .should have_key 'player_xp'
69
68
  end
70
69
 
71
70
  it 'should allow a user to retrieve badges for a player' do
72
- Steam::Player.badges(76561197993276293)
71
+ Steam::Player.badges(@playerid)
73
72
  .should have_key 'player_xp_needed_current_level'
74
73
  end
75
74
 
76
75
  it 'should allow a user to retrieve badges for a player' do
77
- Steam::Player.badges(76561197993276293)
76
+ Steam::Player.badges(@playerid)
78
77
  .should have_key 'player_xp_needed_to_level_up'
79
78
  end
80
79
  end
81
80
 
82
81
  describe '.community_badge_progress' do
83
82
  it 'should allow a user to retrieve community badge info for a player' do
84
- Steam::Player.community_badge_progress(76561197993276293)
83
+ Steam::Player.community_badge_progress(@playerid)
85
84
  .should_not be_nil
86
85
  end
87
86
 
88
87
  it 'should allow a user to retrieve community badge info for a player' do
89
- quest = Steam::Player.community_badge_progress(76561197993276293).first
88
+ quest = Steam::Player.community_badge_progress(@playerid).first
90
89
  quest.should have_key 'questid'
91
90
  quest.should have_key 'completed'
92
91
  end
@@ -1,17 +1,21 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Steam::User do
4
+ before(:each) do
5
+ @playerid = 76561197993276293
6
+ @playerid2 = 76561197969622382
7
+ end
4
8
 
5
9
  describe '.friends' do
6
10
  it 'should allow users to check a friends for a user' do
7
- response = Steam::User.friends(76561197993276293)
11
+ response = Steam::User.friends(@playerid)
8
12
  response.should_not be_nil
9
13
  end
10
14
 
11
15
  it 'should allow users to check a friends for a user' do
12
- Steam::User.friends(76561197993276293)
13
- .map {|f| f.first.last }
14
- .should include('76561197969622382')
16
+ Steam::User.friends(@playerid)
17
+ .map { |friend| friend.first.last }
18
+ .should include(@playerid2.to_s)
15
19
  end
16
20
 
17
21
  it 'should return an error on a bad friend id' do
@@ -20,19 +24,19 @@ describe Steam::User do
20
24
  end
21
25
 
22
26
  it 'should return the same content for :friends and :all' do
23
- Steam::User.friends('76561197969622382', relationship: :friend)
24
- .should == Steam::User.friends('76561197969622382', relationship: :all)
27
+ Steam::User.friends(@playerid2, relationship: :friend)
28
+ .should == Steam::User.friends(@playerid2, relationship: :all)
25
29
  end
26
30
 
27
31
  it 'should return an error on a bad friend id' do
28
- lambda { Steam::User.friends('76561197969622382', relationship: :sadsad) }
32
+ lambda { Steam::User.friends(@playerid2, relationship: :sadsad) }
29
33
  .should raise_error(Steam::JSONError)
30
34
  end
31
35
  end
32
36
 
33
37
  describe '.bans' do
34
38
  it 'should allow users to check bans for a user' do
35
- Steam::User.bans(76561197993276293)
39
+ Steam::User.bans(@playerid)
36
40
  .should_not be_nil
37
41
  end
38
42
 
@@ -42,19 +46,19 @@ describe Steam::User do
42
46
  end
43
47
 
44
48
  it 'should allow users to check a bans for multiple steamids' do
45
- Steam::User.bans([76561197993276293, 76561197966796383])
49
+ Steam::User.bans([@player, @player2])
46
50
  .should_not be_nil
47
51
  end
48
52
  end
49
53
 
50
54
  describe '.summary' do
51
55
  it 'should allow users to get a summary for a user' do
52
- Steam::User.summary(76561197993276293)
56
+ Steam::User.summary(@playerid)
53
57
  .should_not be_nil
54
58
  end
55
59
 
56
60
  it 'should allow users to check summaries for multiple accounts' do
57
- Steam::User.summaries([76561197993276293, 76561197966796383])
61
+ Steam::User.summaries([@player, @player2])
58
62
  .should_not be_nil
59
63
  end
60
64
  end
@@ -67,18 +71,18 @@ describe Steam::User do
67
71
 
68
72
  it 'should return the correct id when users look up vanity urls' do
69
73
  Steam::User.vanity_to_steamid('asmeroth')
70
- .should == '76561197993276293'
74
+ .should == @playerid.to_s
71
75
  end
72
76
  end
73
77
 
74
78
  describe '.groups' do
75
79
  it 'should allow users to look groups a player is a member of' do
76
- Steam::User.groups(76561197993276293)
80
+ Steam::User.groups(@playerid)
77
81
  .should_not be_nil
78
82
  end
79
83
 
80
84
  it 'should return an accurate list of groups a player is a member of' do
81
- response = Steam::User.groups(76561197993276293)
85
+ response = Steam::User.groups(@playerid)
82
86
  response.map { |g| g.values.first }
83
87
  .should include '3640974'
84
88
  end
@@ -25,9 +25,4 @@ describe Steam do
25
25
  Steam.apikey.should_not == old
26
26
  Steam.apikey.should == 'blah'
27
27
  end
28
-
29
- it 'should update the ENV variable if set' do
30
- Steam.apikey = 'test'
31
- ENV['STEAM_API_KEY'].should == 'test'
32
- end
33
28
  end
@@ -17,14 +17,11 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ['lib']
19
19
 
20
- gem.required_ruby_version = '>= 2.0.0'
21
-
22
20
  gem.add_development_dependency 'rake'
23
21
  gem.add_development_dependency 'rspec'
24
22
  gem.add_development_dependency 'coveralls'
25
23
 
26
- gem.add_dependency 'weary', '1.1.3'
27
- gem.add_dependency 'faraday'
28
- gem.add_dependency 'multi_json', '1.7.7'
29
- gem.add_dependency 'json', '~> 1.7.7'
24
+ gem.add_dependency 'faraday', '0.9.0'
25
+ gem.add_dependency 'multi_json', '>= 1.7.7'
26
+ gem.add_dependency 'json', '>= 1.7.7'
30
27
  end
metadata CHANGED
@@ -1,111 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Haberer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-27 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: weary
56
+ name: faraday
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.1.3
61
+ version: 0.9.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.1.3
69
- - !ruby/object:Gem::Dependency
70
- name: faraday
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: 0.9.0
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: multi_json
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - '='
73
+ - - ! '>='
88
74
  - !ruby/object:Gem::Version
89
75
  version: 1.7.7
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - '='
80
+ - - ! '>='
95
81
  - !ruby/object:Gem::Version
96
82
  version: 1.7.7
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: json
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - ~>
87
+ - - ! '>='
102
88
  - !ruby/object:Gem::Version
103
89
  version: 1.7.7
104
90
  type: :runtime
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - ~>
94
+ - - ! '>='
109
95
  - !ruby/object:Gem::Version
110
96
  version: 1.7.7
111
97
  description: Simple Steam Gem
@@ -155,17 +141,17 @@ require_paths:
155
141
  - lib
156
142
  required_ruby_version: !ruby/object:Gem::Requirement
157
143
  requirements:
158
- - - '>='
144
+ - - ! '>='
159
145
  - !ruby/object:Gem::Version
160
- version: 2.0.0
146
+ version: '0'
161
147
  required_rubygems_version: !ruby/object:Gem::Requirement
162
148
  requirements:
163
- - - '>='
149
+ - - ! '>='
164
150
  - !ruby/object:Gem::Version
165
151
  version: '0'
166
152
  requirements: []
167
153
  rubyforge_project:
168
- rubygems_version: 2.0.3
154
+ rubygems_version: 2.2.2
169
155
  signing_key:
170
156
  specification_version: 4
171
157
  summary: Simple Gem to interact witht the Steam Web API
@@ -179,4 +165,3 @@ test_files:
179
165
  - spec/steam/users-stats_spec.rb
180
166
  - spec/steam/users_spec.rb
181
167
  - spec/steam_spec.rb
182
- has_rdoc: