steam_deals_cli 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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -8
- data/lib/steam_deals_cli/cli.rb +1 -1
- data/lib/steam_deals_cli/steam_deals.rb +11 -5
- data/lib/steam_deals_cli/version.rb +1 -1
- metadata +2 -3
- data/steam_deals_cli-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 125f79daf149cd4c80a97f41f13673f84c1bcbde
|
4
|
+
data.tar.gz: 584d67a00c4b08781381dc377a8d69c822a40ece
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63c03aefa9c63904c3ca2f097b63edac0859b32d4937f047cd1db126c11c4ad78d03bf80f447c50c474e5a828e336fdef6596d0de7a3d72b380506302ecc14cb
|
7
|
+
data.tar.gz: 5bd6314c2011ca1348468fc5daacb91ad078b497b3f08561fbbdc0c91b26607fc37e4f28af4e216d105bf94be95e00c5dafbada7127d8a46c76703521c466b66
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -25,16 +25,14 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
## Usage
|
27
27
|
|
28
|
-
|
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
|
-
|
30
|
+
##Controls:
|
36
31
|
|
37
|
-
|
32
|
+
1 => Weeklong Deals
|
33
|
+
2 => Special Promotoions
|
34
|
+
3 => Daily Deals
|
35
|
+
4 => Weekend Deals
|
38
36
|
|
39
37
|
## Contributing
|
40
38
|
|
data/lib/steam_deals_cli/cli.rb
CHANGED
@@ -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.
|
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
|
-
@
|
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
|
-
|
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[
|
58
|
-
game.publisher = details .css("tbody tr td").children[
|
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
|
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.
|
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-
|
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:
|
data/steam_deals_cli-0.1.0.gem
DELETED
Binary file
|