steam_deals_cli 1.0.0 → 1.0.1

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: 4420bd56f27f9250c8f8a736819a9f488f762ba0
4
- data.tar.gz: 7fd0c224d1fdc87787b854dd6b14c3bf67c1f30b
3
+ metadata.gz: 125f79daf149cd4c80a97f41f13673f84c1bcbde
4
+ data.tar.gz: 584d67a00c4b08781381dc377a8d69c822a40ece
5
5
  SHA512:
6
- metadata.gz: 8f3821e801cded4b51817ed54a25ca6d21ab1cadfee9249ae0a5439f288d105ad7dbfa6ded2b3950e55e84a2188993541d84e04977c4a4c3bf58a669f5ad5c88
7
- data.tar.gz: 30eb0f1e817574c5db6c027cc9e5de15db38cede223cbe769c83f19d22490a3763431a4270a3451d758d0166d84183a63489811092e0c25dd7eb17d6388d05e2
6
+ metadata.gz: 63c03aefa9c63904c3ca2f097b63edac0859b32d4937f047cd1db126c11c4ad78d03bf80f447c50c474e5a828e336fdef6596d0de7a3d72b380506302ecc14cb
7
+ data.tar.gz: 5bd6314c2011ca1348468fc5daacb91ad078b497b3f08561fbbdc0c91b26607fc37e4f28af4e216d105bf94be95e00c5dafbada7127d8a46c76703521c466b66
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- steam_deals_cli (0.1.1)
4
+ steam_deals_cli (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -25,16 +25,14 @@ Or install it yourself as:
25
25
 
26
26
  ## Usage
27
27
 
28
- Type the below and follow the on screen prompts.
29
- ```ruby
30
- CLI.new.call
31
- ```
32
-
33
- ## Development
28
+ Run the program, follow the on screen prompts and enjoy the discount prices!
34
29
 
35
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+ ##Controls:
36
31
 
37
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+ 1 => Weeklong Deals
33
+ 2 => Special Promotoions
34
+ 3 => Daily Deals
35
+ 4 => Weekend Deals
38
36
 
39
37
  ## Contributing
40
38
 
@@ -82,7 +82,7 @@ class CLI
82
82
  puts "Discounted Price: #{game.discounted_price}"
83
83
  puts "% Off: #{game.price_discount}"
84
84
  puts "Original Price: #{game.original_price}"
85
- puts "Game URL: #{game.widget}"
85
+ puts "Game URL: #{game.steam_url}"
86
86
  puts "----------------------------"
87
87
  end
88
88
  end
@@ -1,6 +1,6 @@
1
1
  class Steam_Deals
2
2
 
3
- attr_accessor :name, :price_discount , :category, :discounted_price, :url, :publisher, :developer, :widget, :id_num, :original_price
3
+ attr_accessor :name, :price_discount , :category, :discounted_price, :url, :publisher, :developer, :widget, :id_num, :original_price, :steam_url
4
4
  @@all = []
5
5
 
6
6
  def self.deals_from_page(deal)
@@ -20,7 +20,8 @@ class Steam_Deals
20
20
  @category = category
21
21
  @id_num = url
22
22
  @url = Steam_Deals.url_creation(url)
23
- @widget =Steam_Deals.widget_creation(id_num)
23
+ @steam_url = Steam_Deals.steam_creation(id_num)
24
+ @widget = Steam_Deals.widget_creation(id_num)
24
25
  @@all << self
25
26
  end
26
27
 
@@ -28,8 +29,13 @@ class Steam_Deals
28
29
  app_url = "https://steamdb.info#{url}"
29
30
  end
30
31
 
32
+ def self.steam_creation(id_num)
33
+ steam_url = "https://store.steampowered.com#{id_num}"
34
+ end
35
+
31
36
  def self.widget_creation(id_num)
32
- widget = "http://store.steampowered.com#{id_num}"
37
+ id_num.slice! "/app"
38
+ widget = "https://store.steampowered.com/widget#{id_num}"
33
39
  end
34
40
 
35
41
  def self.all
@@ -54,8 +60,8 @@ class Steam_Deals
54
60
 
55
61
  def self.additional_info(game)
56
62
  details = Nokogiri::HTML(open(game.url))
57
- game.developer = details.css("tbody tr td").children[8].text
58
- game.publisher = details .css("tbody tr td").children[11].text
63
+ game.developer = details.css("tbody tr td span").children[0].text
64
+ game.publisher = details .css("tbody tr td span").children[1].text
59
65
  widget = Nokogiri::HTML(open(game.widget))
60
66
  game.original_price = widget.css("div.discount_original_price").first.text
61
67
  end
@@ -1,3 +1,3 @@
1
1
  module SteamDealsCli
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steam_deals_cli
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
  - hmelo1
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-24 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,6 @@ files:
125
125
  - lib/steam_deals_cli/version.rb
126
126
  - planning_notes.txt
127
127
  - spec.md
128
- - steam_deals_cli-0.1.0.gem
129
128
  - steam_deals_cli.gemspec
130
129
  homepage: https://github.com/hmelo1/steam_deals_cli.git
131
130
  licenses:
Binary file