nfl_live_update 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -1
- data/.semver +5 -0
- data/Gemfile.lock +12 -7
- data/lib/nfl/live_update.rb +3 -2
- data/lib/nfl/live_update/game_center.rb +5 -5
- data/lib/nfl/live_update/game_center/game.rb +34 -15
- data/lib/nfl/live_update/game_center/team.rb +0 -4
- data/lib/nfl/live_update/score_strip.rb +14 -2
- data/lib/nfl/live_update/score_strip/games.rb +19 -3
- data/lib/nfl/live_update/version.rb +1 -1
- data/nfl_live_update.gemspec +2 -0
- data/test/fixtures/vcr_cassettes/{game_center_game.yml → game_center.yml} +2 -2
- data/test/fixtures/vcr_cassettes/{score_strip_regular_season.yml → score_strip.yml} +2 -2
- data/test/fixtures/vcr_cassettes/score_strip_ajax.yml +3 -3
- data/test/test_helper.rb +16 -0
- data/test/unit/game_center/game_test.rb +1 -6
- data/test/unit/game_center/player_stat_test.rb +26 -0
- data/test/unit/game_center/team_score_test.rb +28 -0
- data/test/unit/game_center/team_stat_test.rb +34 -0
- data/test/unit/game_center/team_test.rb +55 -0
- data/test/unit/score_strip/game_test.rb +1 -4
- data/test/unit/score_strip/games_test.rb +1 -3
- metadata +120 -31
- data/test/fixtures/vcr_cassettes/score_strip_game.yml +0 -70
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm --create 1.9.3@nfl
|
1
|
+
rvm --create ruby-1.9.3-p125@nfl
|
data/.semver
ADDED
data/Gemfile.lock
CHANGED
@@ -1,28 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nfl_live_update (0.0.
|
4
|
+
nfl_live_update (0.0.4)
|
5
|
+
activesupport (= 3.1.3)
|
5
6
|
httparty
|
7
|
+
i18n
|
6
8
|
nokogiri
|
7
9
|
|
8
10
|
GEM
|
9
11
|
remote: http://rubygems.org/
|
10
12
|
specs:
|
13
|
+
activesupport (3.1.3)
|
14
|
+
multi_json (~> 1.0)
|
11
15
|
addressable (2.2.6)
|
12
16
|
ansi (1.4.1)
|
13
17
|
coderay (0.9.8)
|
14
18
|
crack (0.3.1)
|
15
|
-
httparty (0.8.
|
16
|
-
multi_json
|
19
|
+
httparty (0.8.3)
|
20
|
+
multi_json (~> 1.0)
|
17
21
|
multi_xml
|
22
|
+
i18n (0.6.0)
|
18
23
|
metaclass (0.0.1)
|
19
24
|
method_source (0.6.7)
|
20
25
|
ruby_parser (>= 2.3.1)
|
21
|
-
mocha (0.10.
|
26
|
+
mocha (0.10.2)
|
22
27
|
metaclass (~> 0.0.1)
|
23
|
-
multi_json (1.
|
24
|
-
multi_xml (0.
|
25
|
-
nokogiri (1.5.
|
28
|
+
multi_json (1.3.6)
|
29
|
+
multi_xml (0.5.1)
|
30
|
+
nokogiri (1.5.3)
|
26
31
|
pry (0.9.7.4)
|
27
32
|
coderay (~> 0.9.8)
|
28
33
|
method_source (~> 0.6.7)
|
data/lib/nfl/live_update.rb
CHANGED
@@ -2,9 +2,10 @@ require 'json'
|
|
2
2
|
require 'nokogiri'
|
3
3
|
require 'open-uri'
|
4
4
|
require 'httparty'
|
5
|
+
require 'active_support/core_ext'
|
5
6
|
|
6
|
-
require '
|
7
|
-
require '
|
7
|
+
require 'nfl/live_update/score_strip'
|
8
|
+
require 'nfl/live_update/game_center'
|
8
9
|
|
9
10
|
module NFL
|
10
11
|
module LiveUpdate
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
1
|
+
require 'nfl/live_update/game_center/game'
|
2
|
+
require 'nfl/live_update/game_center/team'
|
3
|
+
require 'nfl/live_update/game_center/team_score'
|
4
|
+
require 'nfl/live_update/game_center/player_stat'
|
5
|
+
require 'nfl/live_update/game_center/team_stat'
|
@@ -11,19 +11,38 @@ module NFL
|
|
11
11
|
base_uri "http://www.nfl.com/liveupdate/game-center"
|
12
12
|
parser NFL::LiveUpdate::GameCenter::GameParser
|
13
13
|
|
14
|
-
attr_accessor :home, :away, :json
|
15
|
-
|
16
|
-
|
17
|
-
def initialize(
|
18
|
-
@
|
19
|
-
@
|
20
|
-
|
21
|
-
@
|
22
|
-
@
|
23
|
-
|
24
|
-
@
|
25
|
-
@
|
26
|
-
|
14
|
+
attr_accessor :home, :away, :next_update, :id, :json
|
15
|
+
attr_reader :raw_json, :raw_hash
|
16
|
+
|
17
|
+
def initialize(h)
|
18
|
+
@raw_json = h.to_json
|
19
|
+
@raw_hash = JSON.parse(@raw_json)
|
20
|
+
|
21
|
+
@next_update = h.delete("nextupdate")
|
22
|
+
@id = h.keys.first
|
23
|
+
h = h[@id.to_s]
|
24
|
+
@home = Team.new(h["home"])
|
25
|
+
@away = Team.new(h["away"])
|
26
|
+
|
27
|
+
# new stuff found on saints 49 game live
|
28
|
+
@clock = h["clock"]
|
29
|
+
@down = h["down"]
|
30
|
+
@drives = h["drives"]
|
31
|
+
# id -> drive, crntdrv -> (id of current drive)
|
32
|
+
@note = h["note"]
|
33
|
+
@posteam = h["posteam"] # abbr for possessing team
|
34
|
+
@quarter = h["qtr"]
|
35
|
+
@redzone = h["redzone"] # bool
|
36
|
+
@to_go = h["togo"] # 4th and 10 (the 10)
|
37
|
+
@yard_line = h["yl"]
|
38
|
+
# end of new
|
39
|
+
#
|
40
|
+
# new stuff found on an old game
|
41
|
+
@media = h["media"]
|
42
|
+
@scoring_summary = h["scrsummary"] # need more info
|
43
|
+
@stadium = h["stadium"]
|
44
|
+
@weather = h["weather"]
|
45
|
+
# end of another new
|
27
46
|
end
|
28
47
|
|
29
48
|
class << self
|
@@ -33,8 +52,8 @@ module NFL
|
|
33
52
|
end
|
34
53
|
|
35
54
|
private
|
36
|
-
def relative_url(id)
|
37
|
-
"/#{id}/#{id}
|
55
|
+
def relative_url(id, update="gtd")
|
56
|
+
"/#{id}/#{id}_#{update}.json"
|
38
57
|
end
|
39
58
|
|
40
59
|
end
|
@@ -1,2 +1,14 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
1
|
+
require 'nfl/live_update/score_strip/games'
|
2
|
+
require 'nfl/live_update/score_strip/game'
|
3
|
+
|
4
|
+
module NFL
|
5
|
+
module LiveUpdate
|
6
|
+
module ScoreStrip
|
7
|
+
|
8
|
+
def self.where(params)
|
9
|
+
Games.where(params)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -18,6 +18,8 @@ module NFL
|
|
18
18
|
attr_reader :week, :year, :type, :gd, :bph, :games
|
19
19
|
|
20
20
|
def initialize(xml)
|
21
|
+
@xml = xml.dup
|
22
|
+
|
21
23
|
gms = xml.xpath("//ss//gms").first
|
22
24
|
|
23
25
|
attributes = gms.attributes
|
@@ -47,6 +49,18 @@ module NFL
|
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
52
|
+
def raw_xml
|
53
|
+
@xml
|
54
|
+
end
|
55
|
+
|
56
|
+
def raw_xml_to_hash
|
57
|
+
Hash.from_xml(@xml)
|
58
|
+
end
|
59
|
+
|
60
|
+
def raw_xml_to_json
|
61
|
+
raw_xml_to_hash.to_json
|
62
|
+
end
|
63
|
+
|
50
64
|
class << self
|
51
65
|
|
52
66
|
def regular_season
|
@@ -65,9 +79,11 @@ module NFL
|
|
65
79
|
end
|
66
80
|
|
67
81
|
def where(params)
|
68
|
-
|
69
|
-
|
70
|
-
|
82
|
+
new(where_xml(params))
|
83
|
+
end
|
84
|
+
|
85
|
+
def where_xml(params)
|
86
|
+
get(url(params))
|
71
87
|
end
|
72
88
|
|
73
89
|
end
|
data/nfl_live_update.gemspec
CHANGED
@@ -15,6 +15,8 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_runtime_dependency "httparty"
|
17
17
|
s.add_runtime_dependency "nokogiri"
|
18
|
+
s.add_runtime_dependency "i18n"
|
19
|
+
s.add_runtime_dependency "activesupport", "3.1.3"
|
18
20
|
|
19
21
|
s.add_development_dependency "rake"
|
20
22
|
s.add_development_dependency "pry"
|
@@ -15,11 +15,11 @@
|
|
15
15
|
content-language:
|
16
16
|
- en-US
|
17
17
|
cache-control:
|
18
|
-
- max-age=
|
18
|
+
- max-age=217
|
19
19
|
expires:
|
20
|
-
-
|
20
|
+
- Sat, 14 Jan 2012 20:05:10 GMT
|
21
21
|
date:
|
22
|
-
-
|
22
|
+
- Sat, 14 Jan 2012 20:01:33 GMT
|
23
23
|
content-length:
|
24
24
|
- '2434'
|
25
25
|
connection:
|
data/test/test_helper.rb
CHANGED
@@ -13,3 +13,19 @@ VCR.config do |c|
|
|
13
13
|
c.allow_http_connections_when_no_cassette = false
|
14
14
|
c.default_cassette_options = {:record => :once}
|
15
15
|
end
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
|
19
|
+
def score_strip
|
20
|
+
VCR.use_cassette("score_strip") do
|
21
|
+
NFL::LiveUpdate.score_strip
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def game_center
|
26
|
+
VCR.use_cassette("game_center") do
|
27
|
+
score_strip.games.first.game_center
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -24,12 +24,7 @@ module NFL
|
|
24
24
|
|
25
25
|
context "A Game" do
|
26
26
|
subject do
|
27
|
-
|
28
|
-
NFL::LiveUpdate.score_strip
|
29
|
-
end
|
30
|
-
VCR.use_cassette("game_center_game") do
|
31
|
-
score_strip.games.first.game_center
|
32
|
-
end
|
27
|
+
game_center
|
33
28
|
end
|
34
29
|
|
35
30
|
should "respond to getter methods" do
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module NFL
|
4
|
+
module LiveUpdate
|
5
|
+
module GameCenter
|
6
|
+
|
7
|
+
class PlayerStatTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
context "A player stat" do
|
10
|
+
subject do
|
11
|
+
game_center.home.passing_stats.first
|
12
|
+
end
|
13
|
+
|
14
|
+
should "respond to getter methods" do
|
15
|
+
assert_respond_to subject, :player_id
|
16
|
+
assert_respond_to subject, :player_name
|
17
|
+
assert_respond_to subject, :stats
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module NFL
|
4
|
+
module LiveUpdate
|
5
|
+
module GameCenter
|
6
|
+
|
7
|
+
class TeamScoreTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
context "A team score" do
|
10
|
+
subject do
|
11
|
+
game_center.home.score
|
12
|
+
end
|
13
|
+
|
14
|
+
should "respond to getter methods" do
|
15
|
+
assert_respond_to subject, :first_quarter
|
16
|
+
assert_respond_to subject, :second_quarter
|
17
|
+
assert_respond_to subject, :third_quarter
|
18
|
+
assert_respond_to subject, :forth_quarter
|
19
|
+
assert_respond_to subject, :overtime
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module NFL
|
4
|
+
module LiveUpdate
|
5
|
+
module GameCenter
|
6
|
+
|
7
|
+
class TeamStatTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
context "A team stat" do
|
10
|
+
subject do
|
11
|
+
game_center.home.team_stats
|
12
|
+
end
|
13
|
+
|
14
|
+
should "respond to getter methods" do
|
15
|
+
assert_respond_to subject, :first_downs
|
16
|
+
assert_respond_to subject, :total_yards
|
17
|
+
assert_respond_to subject, :passing_yards
|
18
|
+
assert_respond_to subject, :rushing_yards
|
19
|
+
assert_respond_to subject, :penalties
|
20
|
+
assert_respond_to subject, :penalty_yards
|
21
|
+
assert_respond_to subject, :turnovers
|
22
|
+
assert_respond_to subject, :punts
|
23
|
+
assert_respond_to subject, :punting_yards
|
24
|
+
assert_respond_to subject, :punting_average
|
25
|
+
assert_respond_to subject, :time_of_possession
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module NFL
|
4
|
+
module LiveUpdate
|
5
|
+
module GameCenter
|
6
|
+
|
7
|
+
class TeamTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
subject do
|
10
|
+
game_center.home
|
11
|
+
end
|
12
|
+
|
13
|
+
context "A Team" do
|
14
|
+
|
15
|
+
should "respond to getter methods" do
|
16
|
+
assert_respond_to subject, :abbr
|
17
|
+
assert_respond_to subject, :time_outs
|
18
|
+
assert_respond_to subject, :players
|
19
|
+
assert_respond_to subject, :score
|
20
|
+
assert_respond_to subject, :stats
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
context "Team stats" do
|
26
|
+
|
27
|
+
should "be a hash" do
|
28
|
+
assert_instance_of Hash, subject.stats
|
29
|
+
end
|
30
|
+
|
31
|
+
should "be organized appropriately" do
|
32
|
+
subject.stats.each do |k,v|
|
33
|
+
if k == "team"
|
34
|
+
assert_instance_of TeamStat, v
|
35
|
+
else
|
36
|
+
assert_instance_of Array, v
|
37
|
+
assert_instance_of PlayerStat, v.first
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
should "have dynamic stat methods" do
|
43
|
+
stat_keys = subject.stats.keys
|
44
|
+
stat_keys.each do |k|
|
45
|
+
assert_respond_to subject, "#{k}_stats"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -8,10 +8,7 @@ module NFL
|
|
8
8
|
|
9
9
|
context "A Game instance" do
|
10
10
|
subject do
|
11
|
-
|
12
|
-
games = NFL::LiveUpdate::ScoreStrip::Games.regular_season.games
|
13
|
-
games.last
|
14
|
-
end
|
11
|
+
score_strip.games.last
|
15
12
|
end
|
16
13
|
|
17
14
|
should "respond to getter methods" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nfl_live_update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,31 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: nokogiri
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: i18n
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
28
49
|
none: false
|
29
50
|
requirements:
|
30
51
|
- - ! '>='
|
@@ -32,10 +53,31 @@ dependencies:
|
|
32
53
|
version: '0'
|
33
54
|
type: :runtime
|
34
55
|
prerelease: false
|
35
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: activesupport
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - '='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 3.1.3
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - '='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 3.1.3
|
36
78
|
- !ruby/object:Gem::Dependency
|
37
79
|
name: rake
|
38
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
39
81
|
none: false
|
40
82
|
requirements:
|
41
83
|
- - ! '>='
|
@@ -43,10 +85,15 @@ dependencies:
|
|
43
85
|
version: '0'
|
44
86
|
type: :development
|
45
87
|
prerelease: false
|
46
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
47
94
|
- !ruby/object:Gem::Dependency
|
48
95
|
name: pry
|
49
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
50
97
|
none: false
|
51
98
|
requirements:
|
52
99
|
- - ! '>='
|
@@ -54,10 +101,15 @@ dependencies:
|
|
54
101
|
version: '0'
|
55
102
|
type: :development
|
56
103
|
prerelease: false
|
57
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
58
110
|
- !ruby/object:Gem::Dependency
|
59
111
|
name: bundler
|
60
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
61
113
|
none: false
|
62
114
|
requirements:
|
63
115
|
- - ! '>='
|
@@ -65,10 +117,15 @@ dependencies:
|
|
65
117
|
version: '0'
|
66
118
|
type: :development
|
67
119
|
prerelease: false
|
68
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
69
126
|
- !ruby/object:Gem::Dependency
|
70
127
|
name: shoulda
|
71
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
72
129
|
none: false
|
73
130
|
requirements:
|
74
131
|
- - ! '>='
|
@@ -76,10 +133,15 @@ dependencies:
|
|
76
133
|
version: '0'
|
77
134
|
type: :development
|
78
135
|
prerelease: false
|
79
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
80
142
|
- !ruby/object:Gem::Dependency
|
81
143
|
name: mocha
|
82
|
-
requirement:
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
83
145
|
none: false
|
84
146
|
requirements:
|
85
147
|
- - ! '>='
|
@@ -87,10 +149,15 @@ dependencies:
|
|
87
149
|
version: '0'
|
88
150
|
type: :development
|
89
151
|
prerelease: false
|
90
|
-
version_requirements:
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
91
158
|
- !ruby/object:Gem::Dependency
|
92
159
|
name: turn
|
93
|
-
requirement:
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
94
161
|
none: false
|
95
162
|
requirements:
|
96
163
|
- - ! '>='
|
@@ -98,10 +165,15 @@ dependencies:
|
|
98
165
|
version: '0'
|
99
166
|
type: :development
|
100
167
|
prerelease: false
|
101
|
-
version_requirements:
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
102
174
|
- !ruby/object:Gem::Dependency
|
103
175
|
name: vcr
|
104
|
-
requirement:
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
105
177
|
none: false
|
106
178
|
requirements:
|
107
179
|
- - ! '>='
|
@@ -109,10 +181,15 @@ dependencies:
|
|
109
181
|
version: '0'
|
110
182
|
type: :development
|
111
183
|
prerelease: false
|
112
|
-
version_requirements:
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
113
190
|
- !ruby/object:Gem::Dependency
|
114
191
|
name: webmock
|
115
|
-
requirement:
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
116
193
|
none: false
|
117
194
|
requirements:
|
118
195
|
- - ! '>='
|
@@ -120,7 +197,12 @@ dependencies:
|
|
120
197
|
version: '0'
|
121
198
|
type: :development
|
122
199
|
prerelease: false
|
123
|
-
version_requirements:
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ! '>='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
124
206
|
description: A Ruby framework for rapid API development with great conventions.
|
125
207
|
email:
|
126
208
|
- ipg49vv2@gmail.com
|
@@ -130,6 +212,7 @@ extra_rdoc_files: []
|
|
130
212
|
files:
|
131
213
|
- .gitignore
|
132
214
|
- .rvmrc
|
215
|
+
- .semver
|
133
216
|
- Gemfile
|
134
217
|
- Gemfile.lock
|
135
218
|
- Rakefile
|
@@ -145,12 +228,15 @@ files:
|
|
145
228
|
- lib/nfl/live_update/score_strip/games.rb
|
146
229
|
- lib/nfl/live_update/version.rb
|
147
230
|
- nfl_live_update.gemspec
|
148
|
-
- test/fixtures/vcr_cassettes/
|
231
|
+
- test/fixtures/vcr_cassettes/game_center.yml
|
232
|
+
- test/fixtures/vcr_cassettes/score_strip.yml
|
149
233
|
- test/fixtures/vcr_cassettes/score_strip_ajax.yml
|
150
|
-
- test/fixtures/vcr_cassettes/score_strip_game.yml
|
151
|
-
- test/fixtures/vcr_cassettes/score_strip_regular_season.yml
|
152
234
|
- test/test_helper.rb
|
153
235
|
- test/unit/game_center/game_test.rb
|
236
|
+
- test/unit/game_center/player_stat_test.rb
|
237
|
+
- test/unit/game_center/team_score_test.rb
|
238
|
+
- test/unit/game_center/team_stat_test.rb
|
239
|
+
- test/unit/game_center/team_test.rb
|
154
240
|
- test/unit/score_strip/game_test.rb
|
155
241
|
- test/unit/score_strip/games_test.rb
|
156
242
|
homepage: https://github.com/jonkarna/nfl_live_update
|
@@ -167,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
253
|
version: '0'
|
168
254
|
segments:
|
169
255
|
- 0
|
170
|
-
hash: -
|
256
|
+
hash: -2336880477710322054
|
171
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
258
|
none: false
|
173
259
|
requirements:
|
@@ -176,19 +262,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
262
|
version: '0'
|
177
263
|
segments:
|
178
264
|
- 0
|
179
|
-
hash: -
|
265
|
+
hash: -2336880477710322054
|
180
266
|
requirements: []
|
181
267
|
rubyforge_project: nfl_live_update
|
182
|
-
rubygems_version: 1.8.
|
268
|
+
rubygems_version: 1.8.24
|
183
269
|
signing_key:
|
184
270
|
specification_version: 3
|
185
271
|
summary: A simple Ruby framework for building REST-like APIs.
|
186
272
|
test_files:
|
187
|
-
- test/fixtures/vcr_cassettes/
|
273
|
+
- test/fixtures/vcr_cassettes/game_center.yml
|
274
|
+
- test/fixtures/vcr_cassettes/score_strip.yml
|
188
275
|
- test/fixtures/vcr_cassettes/score_strip_ajax.yml
|
189
|
-
- test/fixtures/vcr_cassettes/score_strip_game.yml
|
190
|
-
- test/fixtures/vcr_cassettes/score_strip_regular_season.yml
|
191
276
|
- test/test_helper.rb
|
192
277
|
- test/unit/game_center/game_test.rb
|
278
|
+
- test/unit/game_center/player_stat_test.rb
|
279
|
+
- test/unit/game_center/team_score_test.rb
|
280
|
+
- test/unit/game_center/team_stat_test.rb
|
281
|
+
- test/unit/game_center/team_test.rb
|
193
282
|
- test/unit/score_strip/game_test.rb
|
194
283
|
- test/unit/score_strip/games_test.rb
|
@@ -1,70 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- !ruby/struct:VCR::HTTPInteraction
|
3
|
-
request: !ruby/struct:VCR::Request
|
4
|
-
method: :get
|
5
|
-
uri: http://www.nfl.com:80/liveupdate/scorestrip/ss.xml
|
6
|
-
body:
|
7
|
-
headers:
|
8
|
-
response: !ruby/struct:VCR::Response
|
9
|
-
status: !ruby/struct:VCR::ResponseStatus
|
10
|
-
code: 200
|
11
|
-
message: OK
|
12
|
-
headers:
|
13
|
-
server:
|
14
|
-
- Apache
|
15
|
-
last-modified:
|
16
|
-
- Mon, 02 Jan 2012 05:26:30 GMT
|
17
|
-
etag:
|
18
|
-
- ! '"841a6-956-d32b8d80"'
|
19
|
-
accept-ranges:
|
20
|
-
- bytes
|
21
|
-
content-type:
|
22
|
-
- application/xml
|
23
|
-
content-length:
|
24
|
-
- '2390'
|
25
|
-
cache-control:
|
26
|
-
- max-age=10
|
27
|
-
expires:
|
28
|
-
- Mon, 09 Jan 2012 01:30:06 GMT
|
29
|
-
date:
|
30
|
-
- Mon, 09 Jan 2012 01:29:56 GMT
|
31
|
-
connection:
|
32
|
-
- keep-alive
|
33
|
-
x-akamai-edgescape:
|
34
|
-
- country_code=US
|
35
|
-
body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<ss>\n <gms w=\"17\" y=\"2011\"
|
36
|
-
t=\"R\" gd=\"1\" bph=\"320\">\n <g eid=\"2012010108\" gsis=\"55407\" d=\"Sun\"
|
37
|
-
t=\"1:00\" q=\"F\" h=\"GB\" hnn=\"packers\" hs=\"45\" v=\"DET\" vnn=\"lions\"
|
38
|
-
vs=\"41\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010104\" gsis=\"55408\"
|
39
|
-
d=\"Sun\" t=\"1:00\" q=\"F\" h=\"HOU\" hnn=\"texans\" hs=\"22\" v=\"TEN\" vnn=\"titans\"
|
40
|
-
vs=\"23\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010105\" gsis=\"55409\"
|
41
|
-
d=\"Sun\" t=\"1:00\" q=\"F\" h=\"JAC\" hnn=\"jaguars\" hs=\"19\" v=\"IND\" vnn=\"colts\"
|
42
|
-
vs=\"13\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010100\" gsis=\"55410\"
|
43
|
-
d=\"Sun\" t=\"1:00\" q=\"F\" h=\"MIA\" hnn=\"dolphins\" hs=\"19\" v=\"NYJ\"
|
44
|
-
vnn=\"jets\" vs=\"17\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010109\"
|
45
|
-
gsis=\"55411\" d=\"Sun\" t=\"1:00\" q=\"F\" h=\"MIN\" hnn=\"vikings\" hs=\"13\"
|
46
|
-
v=\"CHI\" vnn=\"bears\" vs=\"17\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010101\"
|
47
|
-
gsis=\"55412\" d=\"Sun\" t=\"1:00\" q=\"F\" h=\"NE\" hnn=\"patriots\" hs=\"49\"
|
48
|
-
v=\"BUF\" vnn=\"bills\" vs=\"21\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010111\"
|
49
|
-
gsis=\"55413\" d=\"Sun\" t=\"1:00\" q=\"F\" h=\"NO\" hnn=\"saints\" hs=\"45\"
|
50
|
-
v=\"CAR\" vnn=\"panthers\" vs=\"17\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010107\"
|
51
|
-
gsis=\"55415\" d=\"Sun\" t=\"1:00\" q=\"F\" h=\"PHI\" hnn=\"eagles\" hs=\"34\"
|
52
|
-
v=\"WAS\" vnn=\"redskins\" vs=\"10\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010112\"
|
53
|
-
gsis=\"55416\" d=\"Sun\" t=\"1:00\" q=\"F\" h=\"STL\" hnn=\"rams\" hs=\"27\"
|
54
|
-
v=\"SF\" vnn=\"49ers\" vs=\"34\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010115\"
|
55
|
-
gsis=\"55417\" d=\"Sun\" t=\"4:15\" q=\"FO\" h=\"ARI\" hnn=\"cardinals\" hs=\"23\"
|
56
|
-
v=\"SEA\" vnn=\"seahawks\" vs=\"20\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010110\"
|
57
|
-
gsis=\"55404\" d=\"Sun\" t=\"4:15\" q=\"F\" h=\"ATL\" hnn=\"falcons\" hs=\"45\"
|
58
|
-
v=\"TB\" vnn=\"buccaneers\" vs=\"24\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g
|
59
|
-
eid=\"2012010102\" gsis=\"55405\" d=\"Sun\" t=\"4:15\" q=\"F\" h=\"CIN\" hnn=\"bengals\"
|
60
|
-
hs=\"16\" v=\"BAL\" vnn=\"ravens\" vs=\"24\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n
|
61
|
-
\ <g eid=\"2012010103\" gsis=\"55406\" d=\"Sun\" t=\"4:15\" q=\"F\" h=\"CLE\"
|
62
|
-
hnn=\"browns\" hs=\"9\" v=\"PIT\" vnn=\"steelers\" vs=\"13\" rz=\"0\" ga=\"\"
|
63
|
-
gt=\"REG\"/>\n <g eid=\"2012010113\" gsis=\"55418\" d=\"Sun\" t=\"4:15\"
|
64
|
-
q=\"F\" h=\"DEN\" hnn=\"broncos\" hs=\"3\" v=\"KC\" vnn=\"chiefs\" vs=\"7\"
|
65
|
-
rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010114\" gsis=\"55419\" d=\"Sun\"
|
66
|
-
t=\"4:15\" q=\"F\" h=\"OAK\" hnn=\"raiders\" hs=\"26\" v=\"SD\" vnn=\"chargers\"
|
67
|
-
vs=\"38\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n <g eid=\"2012010106\" gsis=\"55414\"
|
68
|
-
d=\"Sun\" t=\"8:20\" q=\"F\" h=\"NYG\" hnn=\"giants\" hs=\"31\" v=\"DAL\" vnn=\"cowboys\"
|
69
|
-
vs=\"14\" rz=\"0\" ga=\"\" gt=\"REG\"/>\n </gms>\n</ss>\n"
|
70
|
-
http_version: '1.1'
|