hof_stats 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.
- checksums.yaml +4 -4
- data/hof_stats-0.1.2.gem +0 -0
- data/lib/hof_stats/cli.rb +6 -0
- data/lib/hof_stats/version.rb +1 -1
- data/spec.md +7 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d2acae9e87552baaa1fc1f84be8e74afc04f41b
|
|
4
|
+
data.tar.gz: cd8f71c68ee51f66cbe4cde328af291d779962dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca72eaab3ed62b3b248f7fa181e1b271a913d2c0df55a0943356dc67ed88db673d321f81ae77c06b27a9959b606faa4a3def57d77ddfc4c2ce63f89177dcab39
|
|
7
|
+
data.tar.gz: 394f63ef69d2f4a77043bf0dc5625d500bea9003d52ba852c549b88262396b7c57c030bb91e708b63a611b733b2061ddb72537f4328bacba6f27578847bce6fc
|
data/hof_stats-0.1.2.gem
ADDED
|
Binary file
|
data/lib/hof_stats/cli.rb
CHANGED
|
@@ -11,6 +11,12 @@ class HofStats::CLI
|
|
|
11
11
|
puts "MLB Hall of Famers"
|
|
12
12
|
@players = HofStats::Player.all
|
|
13
13
|
@players.each_with_index do |player, i|
|
|
14
|
+
if player.votes == ""
|
|
15
|
+
player.votes = "N/A"
|
|
16
|
+
end
|
|
17
|
+
if player.percent == ""
|
|
18
|
+
player.percent = "N/A"
|
|
19
|
+
end
|
|
14
20
|
puts "#{i+1}. #{player.name} - #{player.year} - #{player.votes} votes - #{player.percent}%"
|
|
15
21
|
end
|
|
16
22
|
end
|
data/lib/hof_stats/version.rb
CHANGED
data/spec.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Specs:
|
|
4
4
|
- [x] Have a CLI for interfacing with the application
|
|
5
|
-
-
|
|
6
|
-
|
|
5
|
+
- I created a CLI that first displays a list of all of the members of the MLB hall of fame along with the year they were voted in, how many votes they received, etc. Then, users are allowed to select a player by line number to view career statistics about each player.
|
|
6
|
+
|
|
7
|
+
- [x] Pull data from an external source
|
|
8
|
+
- I am scraping data from the website www.baseball-reference.com.
|
|
9
|
+
|
|
10
|
+
- [x] Implement both list and detail views
|
|
11
|
+
- The list view shows a list of all players in the hall of fame upon running the app. Then, a user can view the detail view for any player by typing their line number. The detail view shows statistics such as career hits, home runs, and batting average for position players, and pitching statistics for pitchers.
|
|
7
12
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hof_stats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tony Mastrorio
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-08-
|
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -99,6 +99,7 @@ files:
|
|
|
99
99
|
- bin/hof_stats
|
|
100
100
|
- bin/setup
|
|
101
101
|
- hof_stats-0.1.1.gem
|
|
102
|
+
- hof_stats-0.1.2.gem
|
|
102
103
|
- hof_stats.gemspec
|
|
103
104
|
- lib/hof_stats.rb
|
|
104
105
|
- lib/hof_stats/cli.rb
|