steamdeals-cli-gem 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f7917c0f28de2d5c153061a3c03bb8e74d48d47
4
- data.tar.gz: d60c0894e0533a82772ced0fece2cd0b2358ecd5
3
+ metadata.gz: fd3e3f4c03fbf30840b1e64a362565bf24c61d2a
4
+ data.tar.gz: 066318670b29d4ed31e950e716d8be9cdc87bb4f
5
5
  SHA512:
6
- metadata.gz: 4cd5c418a119469e0124216f5e08c76da58fc1e8b063acc38ffa4d78d0112e6c02c111ddaeb0ae62797b03ca8193739a6ac4e264350dbe95233cc9a55a9dce84
7
- data.tar.gz: aaccc37ecbae4de3d2d9685ba2da9f04200c060b3c57940085ba3ac5ea3b0e24d2409a4e144a209b3b318d1093af21a25ae4420d7639956d0088e4591a745ec1
6
+ metadata.gz: be7a579d1ceadab55eb3832c9c5384e20e484274f2322756636ca5d79600241ce82ecfb8bf35c7f38dcc1fc8faeb4968378ea169cafaf4d695613fc97e013db0
7
+ data.tar.gz: 9adfa5bc61688a6611bfc9fd123341277d4cfd9d857f964ba5add6e9f5090bf8d6567d3116d2427aa4b281cc9b8576ac15fdf0ff205c74f1dbe6d2c22503d562
@@ -1,3 +1,4 @@
1
+ require 'pry'
1
2
  class SteamDeals::CLI
2
3
 
3
4
  def start
@@ -19,11 +19,12 @@ class SteamDeals::Deal
19
19
  def self.scrape_deals_list #only scrapes daily deal for now
20
20
  @@all.clear
21
21
  doc = Nokogiri::HTML(open("https://steamdb.info/sales/"))
22
- app_list = doc.css("#sales-section-dailydeal .table-sales .appimg")
22
+ app_list = doc.css("#sales-section-daily-deal .table-sales .appimg")
23
23
  app_list.each do |app|
24
24
  app_name = app.css("a.b")[0].text
25
25
  app_url ="https://steamdb.info/#{app.css("a.b")[0]["href"]}"
26
26
  discount = app.css(".price-discount i").text
27
+ discount = app.css(".price-discount-minor i").text if discount.empty?
27
28
  price = "#{app.css("td")[4].text}"
28
29
  game = SteamDeals::Deal.new(app_name,app_url,discount,price)
29
30
  @@all << game
@@ -1,3 +1,3 @@
1
1
  module SteamDeals
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steamdeals-cli-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Thomas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-07 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,8 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- description: Scrape steamdb.info for daily steam deals
97
+ description: Scrape steamdb.info for daily steam deals, provides name, sale price,
98
+ sale discount, and minor descriptions
98
99
  email:
99
100
  - jvthomas0209@gmail.com
100
101
  executables:
@@ -108,7 +109,8 @@ files:
108
109
  - lib/steam_deals/deal.rb
109
110
  - lib/steam_deals/version.rb
110
111
  homepage:
111
- licenses: []
112
+ licenses:
113
+ - MIT
112
114
  metadata: {}
113
115
  post_install_message:
114
116
  rdoc_options: []
@@ -130,5 +132,6 @@ rubyforge_project:
130
132
  rubygems_version: 2.4.5.1
131
133
  signing_key:
132
134
  specification_version: 4
133
- summary: Scrape steamdb.info for daily steam deals
135
+ summary: Scrape steamdb.info for daily steam deals, provides name, sale price, sale
136
+ discount, and minor descriptions
134
137
  test_files: []