soda_xml_team 1.0.8 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -1
- data/lib/soda_xml_team/news.rb +39 -0
- data/lib/soda_xml_team/version.rb +1 -1
- data/lib/soda_xml_team.rb +1 -0
- data/spec/fixtures/get_document_news.xml +107 -0
- data/spec/fixtures/{get_document.xml → get_document_schedule.xml} +0 -0
- data/spec/fixtures/{get_listing.xml → get_listing_schedule.xml} +0 -0
- data/spec/soda_xml_team_news_spec.rb +25 -0
- data/spec/soda_xml_team_schedule_spec.rb +43 -0
- data/spec/soda_xml_team_spec.rb +1 -42
- data/spec/spec_helper.rb +7 -3
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59e933de90893e917e4dc69d70ea99a625793090
|
4
|
+
data.tar.gz: 74fbdefaeb6b928ee5ccabfd25b126d87a2244a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 577752e5a107204aefd85eef76878ac9ccc0645b255033f5aee1ff7a91ffd8427f949788951e5aa37536c12f1349d12dc3abd0beeb18457981965127a9b6d6a4
|
7
|
+
data.tar.gz: 51e3a14feee7816a14261fb07f00219d920200d47e0a3ef6a086a54e560c81151f7ca563b9e2a2f8346bf6e49c6abbb0577de76f27bfe64b3a2573bf08c7bfff
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/seatshare/soda_xml_team.png)](https://travis-ci.org/seatshare/soda_xml_team)
|
4
4
|
|
5
|
-
This [gem]() serves as an interface to the [SODA (Sports On Demand API) from XML Team](http://www.xmlteam.com/soda/). It uses [HTTParty](http://johnnunemaker.com/httparty/) and [Nokogiri](http://nokogiri.org/) to retrieve and parse the data.
|
5
|
+
This [gem](http://rubygems.org/gems/soda_xml_team) serves as an interface to the [SODA (Sports On Demand API) from XML Team](http://www.xmlteam.com/soda/). It uses [HTTParty](http://johnnunemaker.com/httparty/) and [Nokogiri](http://nokogiri.org/) to retrieve and parse the data.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -76,6 +76,21 @@ schedule = SodaXmlTeam::Schedule.parse_schedule(schedule_document)
|
|
76
76
|
puts schedule.inspect
|
77
77
|
```
|
78
78
|
|
79
|
+
### News Parser
|
80
|
+
|
81
|
+
```
|
82
|
+
soda = SodaXmlTeam::Client.new('your_username', 'your_password')
|
83
|
+
news_document = soda.get_document({
|
84
|
+
sandbox: true,
|
85
|
+
document_id: 'xt.3329967-NAS-2005-OUTLOOK'
|
86
|
+
})
|
87
|
+
article = SodaXmlTeam::Schedule.parse_news(news_document)
|
88
|
+
|
89
|
+
# This is now available as an array of values
|
90
|
+
puts article.inspect
|
91
|
+
```
|
92
|
+
|
93
|
+
|
79
94
|
## Contributing
|
80
95
|
|
81
96
|
1. Fork it ( https://github.com/seatshare/soda_xml_team/fork )
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module SodaXmlTeam
|
2
|
+
|
3
|
+
require 'nokogiri'
|
4
|
+
|
5
|
+
class News
|
6
|
+
|
7
|
+
def self.parse_news(document={})
|
8
|
+
|
9
|
+
output = []
|
10
|
+
|
11
|
+
unless document.is_a? Nokogiri::XML::Document
|
12
|
+
raise "Invalid XML news."
|
13
|
+
end
|
14
|
+
|
15
|
+
output = {}
|
16
|
+
|
17
|
+
# Article meta data
|
18
|
+
document.css('sports-content').each do |metadata|
|
19
|
+
output[:title] = metadata.css('sports-title').first.content
|
20
|
+
if !metadata.css('byline person').empty?
|
21
|
+
output[:author] = metadata.css('byline person').first.content
|
22
|
+
end
|
23
|
+
output[:author_title] = metadata.css('byline byttl').first.content
|
24
|
+
output[:headline] = metadata.css('article hedline hl1').first.content
|
25
|
+
output[:abstract] = metadata.css('article abstract').first.content.gsub(/\n/, "").strip
|
26
|
+
end
|
27
|
+
|
28
|
+
# Article content
|
29
|
+
document.xpath('/xts:sports-content-set/sports-content/article/nitf/body/body.content').each do |article_body|
|
30
|
+
output[:body] = article_body.css('*').to_s.gsub(/\n/, "").strip
|
31
|
+
end
|
32
|
+
|
33
|
+
return output
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
data/lib/soda_xml_team.rb
CHANGED
@@ -0,0 +1,107 @@
|
|
1
|
+
<?xml version="1.0" encoding="windows-1252"?>
|
2
|
+
<xts:sports-content-set xmlns:xts="http://www.xmlteam.com" query-date-time="20140920T232309-0400" query-string="https://soda.xmlteam.com/api-trial/getDocuments?doc-ids=xt.3329967-NAS-2005-OUTLOOK" hostname="soda.xmlteam.com" result-count="1" error-count="0" elapsed-time="2.8ms"><sports-content xmlns:str="java.lang.String" path-id="ice-hockey/l.nhl.com/news/xt.3329967-NAS-2005-OUTLOOK" xts:systemid="newsxml" xts:tsnid="3329967">
|
3
|
+
<sports-metadata xmlns:fs="java.io.File" date-time="20050926T150900-0400" doc-id="xt.3329967-NAS-2005-OUTLOOK" xts:tsnslug="ADN;NAS-2005-OUTLOOK" language="en-US" revision-id="xt.3329967-NAS-2005-OUTLOOK" fixture-key="general-news" document-class="news" fixture-name="General News">
|
4
|
+
<sports-title>2005-06 Nashville Predators Preview</sports-title>
|
5
|
+
<sports-content-codes>
|
6
|
+
<sports-content-code code-name="The Sports Network" code-key="sportsnetwork.com" code-type="publisher"/>
|
7
|
+
<sports-content-code code-name="XML Team Solutions, Inc." code-key="xmlteam.com" code-type="distributor"/>
|
8
|
+
<sports-content-code code-type="sport" code-key="15031000" code-name="Ice Hockey"/>
|
9
|
+
<sports-content-code code-type="league" code-key="l.nhl.com" code-name="National Hockey League"/>
|
10
|
+
<sports-content-code code-type="priority" code-key="normal"/>
|
11
|
+
<sports-content-code code-type="conference" code-key="c.western" code-name="Western"/>
|
12
|
+
<sports-content-code code-type="team" code-key="l.nhl.com-t.19" code-name="Nashville Predators"/>
|
13
|
+
</sports-content-codes>
|
14
|
+
</sports-metadata>
|
15
|
+
<article format="nitf">
|
16
|
+
<nitf>
|
17
|
+
<head>
|
18
|
+
<docdata/>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<body.head>
|
22
|
+
<hedline>
|
23
|
+
<hl1>2005-06 Nashville Predators Preview</hl1>
|
24
|
+
</hedline>
|
25
|
+
<byline>
|
26
|
+
By
|
27
|
+
<person>Matt Canamucio</person>
|
28
|
+
<byttl>Sports Network</byttl>
|
29
|
+
</byline>
|
30
|
+
<abstract>
|
31
|
+
<p>The Nashville Predators were the surprise playoff club in
|
32
|
+
2003-04, and now the team hopes to get back to the postseason and take things
|
33
|
+
a step further.</p>
|
34
|
+
</abstract>
|
35
|
+
</body.head>
|
36
|
+
<body.content>
|
37
|
+
<p>(Sports Network) - The Nashville Predators were the surprise playoff club in
|
38
|
+
2003-04, and now the team hopes to get back to the postseason and take things
|
39
|
+
a step further.</p>
|
40
|
+
<p>During the offseason the club's big splash was the signing of Paul Kariya, who
|
41
|
+
hopes to return to a superstar level after a down year with the Colorado
|
42
|
+
Avalanche.</p>
|
43
|
+
<p>The team also bolstered its defense with the acquisition of Danny Markov from
|
44
|
+
Philadelphia, and re-signed many of its key cogs.</p>
|
45
|
+
<p>Head coach Barry Trotz is the only bench boss the team has had since its
|
46
|
+
inception in 1998, and in 03-04 he finally put things together on the ice. The
|
47
|
+
Preds were a gritty bunch that wasn't intimidated by the upper echelon clubs.
|
48
|
+
This was evident by its rivalry with Detroit during the regular season, and a
|
49
|
+
valiant effort in the first round.</p>
|
50
|
+
<p>That grit and gumption now has a bona fide star to lead its effort, spurring
|
51
|
+
hope for a second straight postseason berth.</p>
|
52
|
+
<p>FORWARDS - Kariya and Teemu Selanne went to Colorado as a package deal before
|
53
|
+
the last NHL season, and the whole thing was a bust. Kariya battled injury
|
54
|
+
during the campaign, tallying only 11 goals and 25 assists in 51 games. The
|
55
|
+
seven-time All-Star posted 25 goals and 56 assists in a full season for
|
56
|
+
Anaheim in 02-03, eventually leading the Ducks to the Stanley Cup Finals.</p>
|
57
|
+
<p>Kariya is a terrific lead horse for a stable of young forwards who have really
|
58
|
+
been without a leader. David Legwand is a prime talent who had been an enigma
|
59
|
+
for his first few seasons. In 03-04 he tallied 18 goals and 28 assists,
|
60
|
+
including five game-winning goals.</p>
|
61
|
+
<p>Scott Walker is a guy who has been injury-prone throughout his career, but
|
62
|
+
came through with a career effort last time out (25g, 42a). Walker is only
|
63
|
+
5-10, 196 pounds but plays tougher than his size. Greg Johnson returns to
|
64
|
+
supply leadership and stability, while former first-rounder Scott Hartnell
|
65
|
+
hopes to escape the obscurity of fourth-line duty.</p>
|
66
|
+
<p>Veteran speedster Steve Sullivan hopes to get back on track after being
|
67
|
+
injured for most of the last two seasons. He was a 25-35-goal scorers a few
|
68
|
+
years back with Chicago, and the Preds could sure use that spark. You have to
|
69
|
+
wonder if all those years as an undersized NHL forward are finally taking a
|
70
|
+
toll.</p>
|
71
|
+
<p>The Predators have a nice amount of toughness up front as well, with Darcy
|
72
|
+
Hordichuk, Scott Nichol and the wild Jordin Tootoo in the fold.</p>
|
73
|
+
<p>DEFENSE - Markov became available when the Philadelphia Flyers needed to clear
|
74
|
+
some cap space. He combined for six goals and 13 assists in 78 games for the
|
75
|
+
Flyers and Hurricanes last time out, and is a guy who can log quality minutes
|
76
|
+
in every situation. Markov is a tough guy to play against, as he is quick on
|
77
|
+
his skates and plays physically.</p>
|
78
|
+
<p>Kimmo Timonen is the team's puck mover and power-play QB, having tallied 12
|
79
|
+
goals and 32 assists in 77 games back in 03-04. Timonen has bagged at least
|
80
|
+
12 scores on three occasions during his six-season career.</p>
|
81
|
+
<p>Marek Zdlicky is another offensive blueliner, netting 14 goals with 39 assists
|
82
|
+
in 82 games as a rookie in 03-04. Acquired in the Mike Dunham trade with New
|
83
|
+
York a few years back, Zdlicky especially lifted the Preds' power-play unit,
|
84
|
+
accounting for nine goals and 26 assists with the man advantage.</p>
|
85
|
+
<p>Former first-round pick Dan Hamhius stepped in and made an impact in 03-04,
|
86
|
+
and the club hopes for the same from Ryan Suter. Suter, who has a family
|
87
|
+
pedigree, was the club's top choice in 2003. He played collegiately at
|
88
|
+
Wisconsin and went pro last season, posting seven goals, 16 assists and 70
|
89
|
+
penalty minutes in 63 games for the Milwaukee Admirals of the AHL.</p>
|
90
|
+
<p>GOALTENDING - Tomas Vokoun has emerged as a viable workhorse goaltender for
|
91
|
+
the Preds, as he started 73 games in 03-04. The Czech went 34-29-10 with a
|
92
|
+
2.53 goals-against average and .909 save percentage. Vokoun played well in the
|
93
|
+
first-round series against Detroit too, holding the Red Wings to 12 goals in
|
94
|
+
six games.</p>
|
95
|
+
<p>Chris Mason will likely serve as Vokoun's backup, after appearing in 17 games
|
96
|
+
(nine starts) during 03-04. He went 4-4-1 with a 2.18 GAA and .926 SP.</p>
|
97
|
+
<p>WHEN ALL IS SAID AND DONE - The Predators caught teams by surprise in 03-04
|
98
|
+
with their hard-nosed, no-fear play. Teams will expect it this time around, so
|
99
|
+
the onus will be on the skill players to raise their games. This begins with
|
100
|
+
Kariya, who hopes to have a rebound season for a club that has many of its key
|
101
|
+
parts returning. The Nashville brass has been patient with its young players,
|
102
|
+
and it has paid off to this point.</p>
|
103
|
+
</body.content>
|
104
|
+
</body>
|
105
|
+
</nitf>
|
106
|
+
</article>
|
107
|
+
</sports-content></xts:sports-content-set>
|
File without changes
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "SodaXmlTeamNews" do
|
4
|
+
|
5
|
+
subject { SodaXmlTeam::News }
|
6
|
+
|
7
|
+
describe '.parse_news' do
|
8
|
+
|
9
|
+
let(:input) {
|
10
|
+
SodaXmlTeam::Client.new(ENV['SODA_USERNAME'], ENV['SODA_PASSWORD']).get_document({
|
11
|
+
sandbox: true,
|
12
|
+
document_id: 'xt.3329967-NAS-2005-OUTLOOK'
|
13
|
+
})
|
14
|
+
}
|
15
|
+
let(:output) { subject.parse_news(input) }
|
16
|
+
|
17
|
+
it 'has a article that matches' do
|
18
|
+
expect(output[:title]).to eq '2005-06 Nashville Predators Preview'
|
19
|
+
expect(output[:headline]).to eq '2005-06 Nashville Predators Preview'
|
20
|
+
expect(output[:abstract]).to eq 'The Nashville Predators were the surprise playoff club in 2003-04, and now the team hopes to get back to the postseason and take things a step further.'
|
21
|
+
expect(output[:body]).to eq %q{<p>(Sports Network) - The Nashville Predators were the surprise playoff club in 2003-04, and now the team hopes to get back to the postseason and take things a step further.</p><p>During the offseason the club's big splash was the signing of Paul Kariya, who hopes to return to a superstar level after a down year with the Colorado Avalanche.</p><p>The team also bolstered its defense with the acquisition of Danny Markov from Philadelphia, and re-signed many of its key cogs.</p><p>Head coach Barry Trotz is the only bench boss the team has had since its inception in 1998, and in 03-04 he finally put things together on the ice. The Preds were a gritty bunch that wasn't intimidated by the upper echelon clubs. This was evident by its rivalry with Detroit during the regular season, and a valiant effort in the first round.</p><p>That grit and gumption now has a bona fide star to lead its effort, spurring hope for a second straight postseason berth.</p><p>FORWARDS - Kariya and Teemu Selanne went to Colorado as a package deal before the last NHL season, and the whole thing was a bust. Kariya battled injury during the campaign, tallying only 11 goals and 25 assists in 51 games. The seven-time All-Star posted 25 goals and 56 assists in a full season for Anaheim in 02-03, eventually leading the Ducks to the Stanley Cup Finals.</p><p>Kariya is a terrific lead horse for a stable of young forwards who have really been without a leader. David Legwand is a prime talent who had been an enigma for his first few seasons. In 03-04 he tallied 18 goals and 28 assists, including five game-winning goals.</p><p>Scott Walker is a guy who has been injury-prone throughout his career, but came through with a career effort last time out (25g, 42a). Walker is only 5-10, 196 pounds but plays tougher than his size. Greg Johnson returns to supply leadership and stability, while former first-rounder Scott Hartnell hopes to escape the obscurity of fourth-line duty.</p><p>Veteran speedster Steve Sullivan hopes to get back on track after being injured for most of the last two seasons. He was a 25-35-goal scorers a few years back with Chicago, and the Preds could sure use that spark. You have to wonder if all those years as an undersized NHL forward are finally taking a toll.</p><p>The Predators have a nice amount of toughness up front as well, with Darcy Hordichuk, Scott Nichol and the wild Jordin Tootoo in the fold.</p><p>DEFENSE - Markov became available when the Philadelphia Flyers needed to clear some cap space. He combined for six goals and 13 assists in 78 games for the Flyers and Hurricanes last time out, and is a guy who can log quality minutes in every situation. Markov is a tough guy to play against, as he is quick on his skates and plays physically.</p><p>Kimmo Timonen is the team's puck mover and power-play QB, having tallied 12 goals and 32 assists in 77 games back in 03-04. Timonen has bagged at least 12 scores on three occasions during his six-season career.</p><p>Marek Zdlicky is another offensive blueliner, netting 14 goals with 39 assists in 82 games as a rookie in 03-04. Acquired in the Mike Dunham trade with New York a few years back, Zdlicky especially lifted the Preds' power-play unit, accounting for nine goals and 26 assists with the man advantage.</p><p>Former first-round pick Dan Hamhius stepped in and made an impact in 03-04, and the club hopes for the same from Ryan Suter. Suter, who has a family pedigree, was the club's top choice in 2003. He played collegiately at Wisconsin and went pro last season, posting seven goals, 16 assists and 70 penalty minutes in 63 games for the Milwaukee Admirals of the AHL.</p><p>GOALTENDING - Tomas Vokoun has emerged as a viable workhorse goaltender for the Preds, as he started 73 games in 03-04. The Czech went 34-29-10 with a 2.53 goals-against average and .909 save percentage. Vokoun played well in the first-round series against Detroit too, holding the Red Wings to 12 goals in six games.</p><p>Chris Mason will likely serve as Vokoun's backup, after appearing in 17 games (nine starts) during 03-04. He went 4-4-1 with a 2.18 GAA and .926 SP.</p><p>WHEN ALL IS SAID AND DONE - The Predators caught teams by surprise in 03-04 with their hard-nosed, no-fear play. Teams will expect it this time around, so the onus will be on the skill players to raise their games. This begins with Kariya, who hopes to have a rebound season for a club that has many of its key parts returning. The Nashville brass has been patient with its young players, and it has paid off to this point.</p>}
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SodaXmlTeam do
|
4
|
+
|
5
|
+
subject { SodaXmlTeam::Schedule }
|
6
|
+
|
7
|
+
describe '.parse_schedule' do
|
8
|
+
|
9
|
+
let(:input) {
|
10
|
+
SodaXmlTeam::Client.new(ENV['SODA_USERNAME'], ENV['SODA_PASSWORD']).get_document({
|
11
|
+
sandbox: true,
|
12
|
+
document_id: 'xt.10875359-nas-sked'
|
13
|
+
})
|
14
|
+
}
|
15
|
+
let(:output) { subject.parse_schedule(input) }
|
16
|
+
|
17
|
+
it 'has 82 games in a season' do
|
18
|
+
expect(output.length).to eq 82
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'has expected home team' do
|
22
|
+
expect(output[1][:home_team]).to eq 'Nashville Predators'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'has expected away team' do
|
26
|
+
expect(output[1][:away_team]).to eq 'Colorado Avalanche'
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'has expected start date/time' do
|
30
|
+
expect(output[1][:start_date_time]).to eq DateTime.parse('October 8, 2009 7:00 PM CDT')
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'has expected site' do
|
34
|
+
expect(output[1][:site]).to eq 'Sommet Center'
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'has expected time certainty' do
|
38
|
+
expect(output[1][:time_certainty]).to eq 'certain'
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
data/spec/soda_xml_team_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe SodaXmlTeam do
|
3
|
+
describe "SodaXmlTeam" do
|
4
4
|
|
5
5
|
subject { SodaXmlTeam::Client.new(ENV['SODA_USERNAME'], ENV['SODA_PASSWORD']) }
|
6
6
|
|
@@ -48,45 +48,4 @@ describe SodaXmlTeam do
|
|
48
48
|
|
49
49
|
end
|
50
50
|
|
51
|
-
end
|
52
|
-
|
53
|
-
describe SodaXmlTeam do
|
54
|
-
|
55
|
-
subject { SodaXmlTeam::Schedule }
|
56
|
-
|
57
|
-
describe '.parse_schedule' do
|
58
|
-
|
59
|
-
let(:input) {
|
60
|
-
SodaXmlTeam::Client.new(ENV['SODA_USERNAME'], ENV['SODA_PASSWORD']).get_document({
|
61
|
-
sandbox: true,
|
62
|
-
document_id: 'xt.10875359-nas-sked'
|
63
|
-
})
|
64
|
-
}
|
65
|
-
let(:output) { subject.parse_schedule(input) }
|
66
|
-
|
67
|
-
it 'has 82 games in a season' do
|
68
|
-
expect(output.length).to eq 82
|
69
|
-
end
|
70
|
-
|
71
|
-
it 'has expected home team' do
|
72
|
-
expect(output[1][:home_team]).to eq 'Nashville Predators'
|
73
|
-
end
|
74
|
-
|
75
|
-
it 'has expected away team' do
|
76
|
-
expect(output[1][:away_team]).to eq 'Colorado Avalanche'
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'has expected start date/time' do
|
80
|
-
expect(output[1][:start_date_time]).to eq DateTime.parse('October 8, 2009 7:00 PM CDT')
|
81
|
-
end
|
82
|
-
|
83
|
-
it 'has expected site' do
|
84
|
-
expect(output[1][:site]).to eq 'Sommet Center'
|
85
|
-
end
|
86
|
-
|
87
|
-
it 'has expected time certainty' do
|
88
|
-
expect(output[1][:time_certainty]).to eq 'certain'
|
89
|
-
end
|
90
|
-
|
91
|
-
end
|
92
51
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -5,14 +5,18 @@ RSpec.configure do |config|
|
|
5
5
|
config.before(:each) do
|
6
6
|
|
7
7
|
if ENV['SODA_USERNAME'].nil? || ENV['SODA_PASSWORD'].nil?
|
8
|
-
|
8
|
+
ENV['SODA_USERNAME'] = 'testuser'
|
9
|
+
ENV['SODA_PASSWORD'] = 'testpassword'
|
9
10
|
end
|
10
11
|
|
11
12
|
stub_request(:get, "https://#{ENV['SODA_USERNAME']}:#{ENV['SODA_PASSWORD']}@soda.xmlteam.com/api-trial/getListings?earliest-date-time=20100101T000000-0500&fixture-keys=schedule-single-team&latest-date-time=20110101T000000-0500&league-keys=l.nhl.com&max-result-count=10&revision-control=latest-only&stylesheet=sportsml2rss-1.0-s&team-keys=l.nhl.com-t.19").
|
12
|
-
to_return(:status => 200, :body => File.new("spec/fixtures/
|
13
|
+
to_return(:status => 200, :body => File.new("spec/fixtures/get_listing_schedule.xml").read, :headers => {})
|
13
14
|
|
14
15
|
stub_request(:get, "https://#{ENV['SODA_USERNAME']}:#{ENV['SODA_PASSWORD']}@soda.xmlteam.com/api-trial/getDocuments?doc-ids=xt.10875359-nas-sked").
|
15
|
-
to_return(:status => 200, :body => File.new("spec/fixtures/
|
16
|
+
to_return(:status => 200, :body => File.new("spec/fixtures/get_document_schedule.xml").read, :headers => {})
|
17
|
+
|
18
|
+
stub_request(:get, "https://testuser:testpassword@soda.xmlteam.com/api-trial/getDocuments?doc-ids=xt.3329967-NAS-2005-OUTLOOK").
|
19
|
+
to_return(:status => 200, :body => File.new("spec/fixtures/get_document_news.xml").read, :headers => {})
|
16
20
|
|
17
21
|
end
|
18
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soda_xml_team
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Yeargin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -112,11 +112,15 @@ files:
|
|
112
112
|
- lib/soda_xml_team/address.rb
|
113
113
|
- lib/soda_xml_team/base.rb
|
114
114
|
- lib/soda_xml_team/client.rb
|
115
|
+
- lib/soda_xml_team/news.rb
|
115
116
|
- lib/soda_xml_team/schedule.rb
|
116
117
|
- lib/soda_xml_team/version.rb
|
117
118
|
- soda_xml_team.gemspec
|
118
|
-
- spec/fixtures/
|
119
|
-
- spec/fixtures/
|
119
|
+
- spec/fixtures/get_document_news.xml
|
120
|
+
- spec/fixtures/get_document_schedule.xml
|
121
|
+
- spec/fixtures/get_listing_schedule.xml
|
122
|
+
- spec/soda_xml_team_news_spec.rb
|
123
|
+
- spec/soda_xml_team_schedule_spec.rb
|
120
124
|
- spec/soda_xml_team_spec.rb
|
121
125
|
- spec/spec_helper.rb
|
122
126
|
- tasks/rspec.rake
|
@@ -140,12 +144,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
144
|
version: '0'
|
141
145
|
requirements: []
|
142
146
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.2.
|
147
|
+
rubygems_version: 2.2.0
|
144
148
|
signing_key:
|
145
149
|
specification_version: 4
|
146
150
|
summary: XML Team Sports On Demand API
|
147
151
|
test_files:
|
148
|
-
- spec/fixtures/
|
149
|
-
- spec/fixtures/
|
152
|
+
- spec/fixtures/get_document_news.xml
|
153
|
+
- spec/fixtures/get_document_schedule.xml
|
154
|
+
- spec/fixtures/get_listing_schedule.xml
|
155
|
+
- spec/soda_xml_team_news_spec.rb
|
156
|
+
- spec/soda_xml_team_schedule_spec.rb
|
150
157
|
- spec/soda_xml_team_spec.rb
|
151
158
|
- spec/spec_helper.rb
|