steam-prices 0.1.2 → 0.1.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/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## changelog
2
2
 
3
+ **v0.1.3**
4
+
5
+ - fixed problem when dealing with sale prices
6
+
3
7
  **v0.1.2**
4
8
 
5
9
  - floating point error
@@ -63,14 +63,16 @@ module SteamPrices
63
63
  games << nil
64
64
  else
65
65
  link, app_id = url.captures
66
+ #remove retail price and put sale price
67
+ game.search('.search_price').search('span').remove
66
68
  price = game.search('.search_price').text.gsub(/[\W_]/, '').to_f
67
69
  date = game.search('.search_released').text
68
70
  name = game.search('h4').text
69
71
  logo = game.search('.search_capsule img').attr('src').value
70
72
 
71
- print "|% 8s |" % app_id + "% 8.2f |" % (price / 100) + "% 14s |" % date if display
73
+ print "|% 8s |" % app_id + "% 8.2f |" % (price.to_f / 100) + "% 14s |" % date if display
72
74
  printf " %s%" + (43 - name[0,43].length).to_s + "s\n", name[0,42], " " if display
73
- games << SteamPrices::Game.new(name, app_id, link, logo, date, Money.new(price, curr))
75
+ games << SteamPrices::Game.new(name, app_id, link, logo, date, Money.new(price.to_f, curr))
74
76
  end
75
77
  end
76
78
 
@@ -1,3 +1,3 @@
1
1
  module SteamPrices
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - scott tesoriere