steam-prices 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/lib/steam_prices/steam_updater.rb +0 -0
- data/lib/steam_prices/version.rb +1 -1
- data/spec/steam_updater_spec.rb +9 -3
- metadata +7 -5
data/README.md
CHANGED
Binary file
|
data/lib/steam_prices/version.rb
CHANGED
data/spec/steam_updater_spec.rb
CHANGED
@@ -14,7 +14,7 @@ describe SteamPrices::Updater do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "should be able to scrape steam and give a bunch of prices for a pack" do
|
17
|
-
games = SteamPrices::Game.update_all_packs('usd',
|
17
|
+
games = SteamPrices::Game.update_all_packs('usd', false)
|
18
18
|
games.size.should == 25
|
19
19
|
games[6433]['usd'][:game].price.should == 39.99
|
20
20
|
end
|
@@ -44,7 +44,7 @@ describe SteamPrices::Updater do
|
|
44
44
|
before(:each) do
|
45
45
|
# it says there are 5 pages
|
46
46
|
URI.should_receive(:encode).exactly(5).times.and_return(File.dirname(__FILE__) + '/support/us.html')
|
47
|
-
@games = SteamPrices::Game.update_all_games('usd',
|
47
|
+
@games = SteamPrices::Game.update_all_games('usd', false)
|
48
48
|
end
|
49
49
|
|
50
50
|
it "should be able to scrape steam and give a bunch of prices" do
|
@@ -83,7 +83,7 @@ describe SteamPrices::Updater do
|
|
83
83
|
|
84
84
|
|
85
85
|
|
86
|
-
context "a single price" do
|
86
|
+
context "a single price", :single => true do
|
87
87
|
before(:each) do
|
88
88
|
URI.should_receive(:encode).and_return(File.dirname(__FILE__) + '/support/us.html')
|
89
89
|
end
|
@@ -97,6 +97,12 @@ describe SteamPrices::Updater do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
|
100
|
+
it "should be able to deal with a game like retribution where it redirects to an id", :ret => true do
|
101
|
+
g = SteamPrices::Game.new('Warhammer® 40,000®: Dawn of War® II – Retribution™', 56400)
|
102
|
+
p = g.update('usd')['usd']
|
103
|
+
p[:price].should == 29.99
|
104
|
+
end
|
105
|
+
|
100
106
|
it "should be able to return not found if it wasn't ok" do
|
101
107
|
g = SteamPrices::Game.new('Warhammer 40,000: Space Marine', 55150)
|
102
108
|
p = g.update('usd')['usd']
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steam-prices
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- scott tesoriere
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-25 00:00:00
|
18
|
+
date: 2011-05-25 00:00:00 -04:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: rspec
|
@@ -97,6 +98,7 @@ files:
|
|
97
98
|
- spec/steam_country_spec.rb
|
98
99
|
- spec/steam_game_spec.rb
|
99
100
|
- spec/steam_updater_spec.rb
|
101
|
+
has_rdoc: true
|
100
102
|
homepage: http://github.com/scottkf/steam_prices
|
101
103
|
licenses: []
|
102
104
|
|
@@ -126,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
128
|
requirements: []
|
127
129
|
|
128
130
|
rubyforge_project:
|
129
|
-
rubygems_version: 1.
|
131
|
+
rubygems_version: 1.6.2
|
130
132
|
signing_key:
|
131
133
|
specification_version: 3
|
132
134
|
summary: Prices for steam.
|