yankee_score 0.1.4 → 0.1.6
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/.DS_Store +0 -0
- data/lib/yankee_score/game.rb +1 -6
- data/lib/yankee_score/score_scraper.rb +11 -2
- data/lib/yankee_score/version.rb +1 -1
- metadata +4 -4
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ddc131fb4936d797f9963f8c11978e029b13460
|
4
|
+
data.tar.gz: d3283f76d3b9c8d80a7214f705df1e19597fa6de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f28944f61198a7fa0bc363c2097757d896f9fe812c0ddb1cbf42c6a63432f879b43e3124d4a321119e2854a608403ab30d6e52812c74ab7024849522f390d4f
|
7
|
+
data.tar.gz: b22aa547784c1c1da4b32a6c7a4fb98a9116d72b72ac00a7e313d4a597522ffd7d2af12f76a0cdeb68ec297cc34c27c2399eaf06c491e98ee79b767828379513
|
data/.DS_Store
ADDED
Binary file
|
data/lib/yankee_score/game.rb
CHANGED
@@ -15,7 +15,7 @@ class YankeeScore::Game
|
|
15
15
|
@away_team = away_team
|
16
16
|
end
|
17
17
|
|
18
|
-
@@all
|
18
|
+
@@all ||= []
|
19
19
|
|
20
20
|
def self.all
|
21
21
|
@@all
|
@@ -61,9 +61,4 @@ class YankeeScore::Game
|
|
61
61
|
def is_active?
|
62
62
|
self.inning.to_i >= 1 && !is_over? && !PRE_GAME_STATE.include?(status)
|
63
63
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
64
|
end
|
@@ -24,9 +24,18 @@ class YankeeScore::ScoreScraper
|
|
24
24
|
|
25
25
|
|
26
26
|
def load_games
|
27
|
-
|
28
|
-
|
27
|
+
if valid_game?
|
28
|
+
games.select do |game_hash|
|
29
|
+
YankeeScore::Game.create_from_json(game_hash)
|
30
|
+
end
|
31
|
+
else
|
32
|
+
puts "Dosn't seem to be any games today, try again tomorrow."
|
33
|
+
exit
|
29
34
|
end
|
30
35
|
end
|
31
36
|
|
37
|
+
def valid_game?
|
38
|
+
!!games
|
39
|
+
end
|
40
|
+
|
32
41
|
end
|
data/lib/yankee_score/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yankee_score
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shmuwol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,9 +80,9 @@ executables:
|
|
80
80
|
extensions: []
|
81
81
|
extra_rdoc_files: []
|
82
82
|
files:
|
83
|
+
- ".DS_Store"
|
83
84
|
- ".gitignore"
|
84
85
|
- ".rspec"
|
85
|
-
- ".travis.yml"
|
86
86
|
- CODE_OF_CONDUCT.md
|
87
87
|
- Gemfile
|
88
88
|
- LICENSE.txt
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.6.8
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: CLI Gem for the New York Yankee's Score
|
data/.travis.yml
DELETED