latest_games 0.1.1 → 1.0.0
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 +4 -4
- data/lib/latest_games/cli.rb +32 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a41fe5062395e25e531dfb8b5f5acce456bbe15
|
4
|
+
data.tar.gz: 00fb11375bd3227939a5e905f61618e5974610c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c387b3e86ce579c88db588438c38cb0dcf30c02f07d3a703cd707cd23c849269142df43b6195b54e9c75cf65217a07a0c9709713a6ef2949282248dc02b14978
|
7
|
+
data.tar.gz: f88051e1fa38e87e83320f736f396b5c0e886c76160c6b5b9f850c30aa08097078506c1679028695fc17cc8a9ef281b1715f89ea85fb9e2e3bf38704322cac6a
|
data/lib/latest_games/cli.rb
CHANGED
@@ -49,15 +49,11 @@ class LatestGames::CLI
|
|
49
49
|
start
|
50
50
|
end
|
51
51
|
end
|
52
|
-
|
53
|
-
puts "------------"
|
54
|
-
puts "Hope you found something you like!"
|
55
|
-
puts "Have a great day! :D"
|
52
|
+
end_program
|
56
53
|
end
|
57
54
|
|
58
55
|
def list_games(platform)
|
59
56
|
input = nil
|
60
|
-
until input == "exit"
|
61
57
|
puts ""
|
62
58
|
if platform.is_a? LatestGames::PS4Game
|
63
59
|
puts "*************** Latest PS4 Games ***************"
|
@@ -70,7 +66,10 @@ class LatestGames::CLI
|
|
70
66
|
puts "Select a game to get more info:"
|
71
67
|
input = gets.strip
|
72
68
|
game = LatestGames::PS4Game.find(input.to_i)
|
73
|
-
|
69
|
+
if input != "exit"
|
70
|
+
select_game(game, "PS4")
|
71
|
+
end
|
72
|
+
end_program
|
74
73
|
|
75
74
|
elsif platform.is_a? LatestGames::IOSGame
|
76
75
|
puts "*************** Latest iOS Games ***************"
|
@@ -83,7 +82,10 @@ class LatestGames::CLI
|
|
83
82
|
puts "Select a game to get more info:"
|
84
83
|
input = gets.strip
|
85
84
|
game = LatestGames::IOSGame.find(input.to_i)
|
86
|
-
|
85
|
+
if input != "exit"
|
86
|
+
select_game(game, "iOS")
|
87
|
+
end
|
88
|
+
end_program
|
87
89
|
|
88
90
|
elsif platform.is_a? LatestGames::XboneGame
|
89
91
|
puts "************* Latest Xbox One Games ************"
|
@@ -96,7 +98,10 @@ class LatestGames::CLI
|
|
96
98
|
puts "Select a game to get more info:"
|
97
99
|
input = gets.strip
|
98
100
|
game = LatestGames::XboneGame.find(input.to_i)
|
99
|
-
|
101
|
+
if input != "exit"
|
102
|
+
select_game(game, "Xbox One")
|
103
|
+
end
|
104
|
+
end_program
|
100
105
|
|
101
106
|
elsif platform.is_a? LatestGames::PCGame
|
102
107
|
puts "*************** Latest PC Games ****************"
|
@@ -109,7 +114,10 @@ class LatestGames::CLI
|
|
109
114
|
puts "Select a game to get more info:"
|
110
115
|
input = gets.strip
|
111
116
|
game = LatestGames::PCGame.find(input.to_i)
|
112
|
-
|
117
|
+
if input != "exit"
|
118
|
+
select_game(game, "PC")
|
119
|
+
end
|
120
|
+
end_program
|
113
121
|
|
114
122
|
elsif platform.is_a? LatestGames::SwitchGame
|
115
123
|
puts "************* Latest Switch Games **************"
|
@@ -122,10 +130,13 @@ class LatestGames::CLI
|
|
122
130
|
puts "Select a game to get more info:"
|
123
131
|
input = gets.strip
|
124
132
|
game = LatestGames::SwitchGame.find(input.to_i)
|
125
|
-
|
133
|
+
if input != "exit"
|
134
|
+
select_game(game, "Switch")
|
135
|
+
end
|
136
|
+
end_program
|
126
137
|
|
127
138
|
end
|
128
|
-
|
139
|
+
end_program
|
129
140
|
end
|
130
141
|
|
131
142
|
def select_game(game, platform)
|
@@ -162,6 +173,8 @@ class LatestGames::CLI
|
|
162
173
|
input = gets.strip
|
163
174
|
if input.downcase == "n" || input.downcase == "no"
|
164
175
|
self.start
|
176
|
+
elsif input.downcase == "exit"
|
177
|
+
end_program
|
165
178
|
end
|
166
179
|
end
|
167
180
|
|
@@ -175,4 +188,12 @@ class LatestGames::CLI
|
|
175
188
|
}
|
176
189
|
end
|
177
190
|
|
191
|
+
def end_program
|
192
|
+
puts ""
|
193
|
+
puts "------------"
|
194
|
+
puts "Hope you found something you like!"
|
195
|
+
puts "Have a great day! :D"
|
196
|
+
exit
|
197
|
+
end
|
198
|
+
|
178
199
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latest_games
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "'Lucas Kisabeth'"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|