live_soccer 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "httparty", "~> 0.8.3"
4
+ gem "nokogiri", "~> 1.5.2"
5
+ gem "thor", "~> 0.15.2"
6
+
7
+ group :development do
8
+ gem "rspec", "~> 2.10.0"
9
+ gem "rdoc", "~> 3.12"
10
+ gem "bundler", "~> 1.1.0"
11
+ gem "jeweler", "~> 1.8.3"
12
+ gem "simplecov", "~> 0.6.4"
13
+ gem "fakeweb", "~>1.3.0"
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,48 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.3)
5
+ fakeweb (1.3.0)
6
+ git (1.2.5)
7
+ httparty (0.8.3)
8
+ multi_json (~> 1.0)
9
+ multi_xml
10
+ jeweler (1.8.3)
11
+ bundler (~> 1.0)
12
+ git (>= 1.2.5)
13
+ rake
14
+ rdoc
15
+ json (1.7.3)
16
+ multi_json (1.3.5)
17
+ multi_xml (0.4.4)
18
+ nokogiri (1.5.2)
19
+ rake (0.9.2.2)
20
+ rdoc (3.12)
21
+ json (~> 1.4)
22
+ rspec (2.10.0)
23
+ rspec-core (~> 2.10.0)
24
+ rspec-expectations (~> 2.10.0)
25
+ rspec-mocks (~> 2.10.0)
26
+ rspec-core (2.10.0)
27
+ rspec-expectations (2.10.0)
28
+ diff-lcs (~> 1.1.3)
29
+ rspec-mocks (2.10.1)
30
+ simplecov (0.6.4)
31
+ multi_json (~> 1.0)
32
+ simplecov-html (~> 0.5.3)
33
+ simplecov-html (0.5.3)
34
+ thor (0.15.2)
35
+
36
+ PLATFORMS
37
+ ruby
38
+
39
+ DEPENDENCIES
40
+ bundler (~> 1.1.0)
41
+ fakeweb (~> 1.3.0)
42
+ httparty (~> 0.8.3)
43
+ jeweler (~> 1.8.3)
44
+ nokogiri (~> 1.5.2)
45
+ rdoc (~> 3.12)
46
+ rspec (~> 2.10.0)
47
+ simplecov (~> 0.6.4)
48
+ thor (~> 0.15.2)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Matias H. Leidemer
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # live_soccer #
2
+
3
+ Find out how your soccer team is going right now!
4
+
5
+ # Contributing to live_soccer #
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ # Copyright #
16
+
17
+ Copyright (c) 2012 Matias H. Leidemer. See LICENSE.txt for
18
+ further details.
data/Rakefile ADDED
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "live_soccer"
18
+ gem.homepage = "http://github.com/matiasleidemer/live_soccer"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Find out how your soccer team is going right now!}
21
+ gem.description = %Q{Find out how your soccer team is going right now!}
22
+ gem.email = "matiasleidemer@gmail.com"
23
+ gem.authors = ["Matias H. Leidemer"]
24
+ gem.executables = ["live_soccer"]
25
+ # dependencies defined in Gemfile
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rspec/core'
30
+ require 'rspec/core/rake_task'
31
+ RSpec::Core::RakeTask.new(:spec) do |spec|
32
+ spec.pattern = FileList['spec/**/*_spec.rb']
33
+ end
34
+
35
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
36
+ spec.pattern = 'spec/**/*_spec.rb'
37
+ spec.rcov = true
38
+ end
39
+
40
+ task :default => :spec
41
+
42
+ require 'rdoc/task'
43
+ Rake::RDocTask.new do |rdoc|
44
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
45
+
46
+ rdoc.rdoc_dir = 'rdoc'
47
+ rdoc.title = "live_soccer #{version}"
48
+ rdoc.rdoc_files.include('README*')
49
+ rdoc.rdoc_files.include('lib/**/*.rb')
50
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/bin/live_soccer ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- mode: ruby -*-
3
+
4
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
5
+ require 'live_soccer'
6
+ require 'thor'
7
+
8
+ class Command < Thor
9
+ default_task :show
10
+
11
+ desc "show", "shows the current matches(if any) and the results"
12
+ def show
13
+ collection = LiveSoccer::MatchCollection.new(LiveSoccer::Checker.parse_matches)
14
+ puts collection.to_s
15
+ end
16
+ end
17
+
18
+ Command.start
@@ -0,0 +1,34 @@
1
+ require 'httparty'
2
+ require 'nokogiri'
3
+
4
+ module LiveSoccer
5
+
6
+ class Checker
7
+ MATCHES_URL = "http://espn.estadao.com.br/temporeal/acoes.listaPartidasAjax.tiles.logic?"
8
+
9
+ def self.fetch_matches
10
+ @fetch_matches ||= HTTParty.get(MATCHES_URL).parsed_response
11
+ end
12
+
13
+ def self.parse_matches
14
+ [].tap do |matches|
15
+ self.each_match do |match|
16
+ matches << { date: DateTime.parse(match.css('li.noticia_hora').first.content),
17
+ home: match.css('div.jogo td.time1').first.content.strip,
18
+ visitor: match.css('div.jogo td.time2').first.content.strip,
19
+ score: match.css('div.jogo td.placar').last.content.strip,
20
+ id: match.css('div.jogo td.placar a').first && match.css('div.jogo td.placar a').first.attributes["href"].value.split("id=").last }
21
+ end
22
+ end
23
+ end
24
+
25
+ private
26
+ def self.each_match
27
+ Nokogiri::HTML.parse(self.fetch_matches).css('div.bloco_jogos').each do |link|
28
+ yield link
29
+ end
30
+ end
31
+
32
+ end
33
+
34
+ end
@@ -0,0 +1,19 @@
1
+ # encoding: UTF-8
2
+ module LiveSoccer
3
+ class Match
4
+ attr_accessor :id, :date, :home, :visitor, :score
5
+
6
+ def initialize(attrs)
7
+ self.id = attrs.fetch :id
8
+ self.date = attrs.fetch :date
9
+ self.home = attrs.fetch :home
10
+ self.visitor = attrs.fetch :visitor
11
+ self.score = attrs.fetch :score
12
+ end
13
+
14
+ def to_s
15
+ "#{date.strftime("%d%b %H:%M")} - #{self.home} #{self.score} #{self.visitor}"
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ module LiveSoccer
2
+
3
+ class MatchCollection
4
+ attr_accessor :matches
5
+
6
+ def initialize(attrs)
7
+ self.matches = []
8
+ attrs.each do |match_attrs|
9
+ self.matches << Match.new(match_attrs)
10
+ end
11
+ end
12
+
13
+ def to_s
14
+ self.matches.map(&:to_s).join "\n"
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ module LiveSoccer
2
+ autoload :Checker, 'live_soccer/checker'
3
+ autoload :Match, 'live_soccer/match'
4
+ autoload :MatchCollection, 'live_soccer/match_collection'
5
+ end
@@ -0,0 +1,84 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "live_soccer"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Matias H. Leidemer"]
12
+ s.date = "2012-05-21"
13
+ s.description = "Find out how your soccer team is going right now!"
14
+ s.email = "matiasleidemer@gmail.com"
15
+ s.executables = ["live_soccer"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.md"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".rspec",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.md",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bin/live_soccer",
30
+ "lib/live_soccer.rb",
31
+ "lib/live_soccer/checker.rb",
32
+ "lib/live_soccer/match.rb",
33
+ "lib/live_soccer/match_collection.rb",
34
+ "live_soccer.gemspec",
35
+ "spec/checker_spec.rb",
36
+ "spec/live_soccer_spec.rb",
37
+ "spec/match_collection_spec.rb",
38
+ "spec/match_spec.rb",
39
+ "spec/spec_helper.rb",
40
+ "spec/support/all_matches.html"
41
+ ]
42
+ s.homepage = "http://github.com/matiasleidemer/live_soccer"
43
+ s.licenses = ["MIT"]
44
+ s.require_paths = ["lib"]
45
+ s.rubygems_version = "1.8.10"
46
+ s.summary = "Find out how your soccer team is going right now!"
47
+
48
+ if s.respond_to? :specification_version then
49
+ s.specification_version = 3
50
+
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<httparty>, ["~> 0.8.3"])
53
+ s.add_runtime_dependency(%q<nokogiri>, ["~> 1.5.2"])
54
+ s.add_runtime_dependency(%q<thor>, ["~> 0.15.2"])
55
+ s.add_development_dependency(%q<rspec>, ["~> 2.10.0"])
56
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
57
+ s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
58
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
59
+ s.add_development_dependency(%q<simplecov>, ["~> 0.6.4"])
60
+ s.add_development_dependency(%q<fakeweb>, ["~> 1.3.0"])
61
+ else
62
+ s.add_dependency(%q<httparty>, ["~> 0.8.3"])
63
+ s.add_dependency(%q<nokogiri>, ["~> 1.5.2"])
64
+ s.add_dependency(%q<thor>, ["~> 0.15.2"])
65
+ s.add_dependency(%q<rspec>, ["~> 2.10.0"])
66
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
67
+ s.add_dependency(%q<bundler>, ["~> 1.1.0"])
68
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
69
+ s.add_dependency(%q<simplecov>, ["~> 0.6.4"])
70
+ s.add_dependency(%q<fakeweb>, ["~> 1.3.0"])
71
+ end
72
+ else
73
+ s.add_dependency(%q<httparty>, ["~> 0.8.3"])
74
+ s.add_dependency(%q<nokogiri>, ["~> 1.5.2"])
75
+ s.add_dependency(%q<thor>, ["~> 0.15.2"])
76
+ s.add_dependency(%q<rspec>, ["~> 2.10.0"])
77
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
78
+ s.add_dependency(%q<bundler>, ["~> 1.1.0"])
79
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
80
+ s.add_dependency(%q<simplecov>, ["~> 0.6.4"])
81
+ s.add_dependency(%q<fakeweb>, ["~> 1.3.0"])
82
+ end
83
+ end
84
+
@@ -0,0 +1,27 @@
1
+ # encoding: UTF-8
2
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
+
4
+ describe "Checker" do
5
+ let(:matches_url) { LiveSoccer::Checker::MATCHES_URL }
6
+
7
+ before :each do
8
+ FakeWeb.register_uri(:get, matches_url, :body => File.open(File.expand_path(File.dirname(__FILE__) + '/support/all_matches.html')).read)
9
+ end
10
+
11
+ describe ".fetch_matches" do
12
+ it "fetches data from the matches URL" do
13
+ LiveSoccer::Checker.fetch_matches.should_not be_nil
14
+ end
15
+ end
16
+
17
+ describe ".parse_matches" do
18
+ let(:match) { { date: DateTime.parse("20May 18h30"), home: "Vasco", visitor: "Grêmio", score: "1 x 2", id: "40075" } }
19
+
20
+ it "parses the matches" do
21
+ LiveSoccer::Checker.parse_matches.first.should == match
22
+ end
23
+
24
+ end
25
+
26
+
27
+ end
@@ -0,0 +1,5 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "LiveSoccer" do
4
+
5
+ end
@@ -0,0 +1,28 @@
1
+ # encoding: UTF-8
2
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
+
4
+ describe "MatchCollection" do
5
+
6
+ let(:params) {
7
+ [{ date: DateTime.parse("20May 18h30"), home: "Vasco", visitor: "Grêmio", score: "1 x 2", id: "40075" },
8
+ { date: DateTime.parse("20May 18h30"), home: "Cruzeiro", visitor: "Atlético-GO", score: "0 x 0", id: "40085" }]
9
+ }
10
+ let(:match_collection) { LiveSoccer::MatchCollection.new params }
11
+
12
+ describe ".new" do
13
+ it "initializes a new MatchCollection class" do
14
+ LiveSoccer::MatchCollection.new(params).should be_a LiveSoccer::MatchCollection
15
+ end
16
+
17
+ it "initializes a Match object for each param" do
18
+ match_collection.matches.first.should be_a LiveSoccer::Match
19
+ end
20
+ end
21
+
22
+ describe "#to_s" do
23
+ it "prints each Match" do
24
+ match_collection.to_s.should == "20May 18:30 - Vasco 1 x 2 Grêmio\n20May 18:30 - Cruzeiro 0 x 0 Atlético-GO"
25
+ end
26
+ end
27
+
28
+ end
@@ -0,0 +1,21 @@
1
+ # encoding: UTF-8
2
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
+
4
+ describe "Match" do
5
+
6
+ let(:params) { { date: DateTime.parse("20May 18h30"), home: "Vasco", visitor: "Grêmio", score: "1 x 2", id: "40075" } }
7
+
8
+ describe ".new" do
9
+ it "initializes a new Match class" do
10
+ LiveSoccer::Match.new(params).should be_a LiveSoccer::Match
11
+ end
12
+ end
13
+
14
+ describe "#to_s" do
15
+ it "returns the match as a string" do
16
+ match = LiveSoccer::Match.new params
17
+ match.to_s.should == "20May 18:30 - Vasco 1 x 2 Grêmio"
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,13 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'live_soccer'
5
+ require 'fakeweb'
6
+
7
+ # Requires supporting files with custom matchers and macros, etc,
8
+ # in ./support/ and its subdirectories.
9
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
10
+
11
+ RSpec.configure do |config|
12
+
13
+ end
@@ -0,0 +1,650 @@
1
+ <!-- Request URL:http://espn.estadao.com.br/temporeal/acoes.listaPartidasAjax.tiles.logic?idChampion=198 -->
2
+
3
+
4
+ <h1 class="proxPartida">Confira as próximas partidas</h1>
5
+
6
+ <p>Clique abaixo para ver os jogos somente dos campeonatos relacionados:</p>
7
+
8
+ <ul id="tr_agenda" class="clearfix">
9
+
10
+ <li >
11
+ <a href="#" rel="151" title="/Francês 2011/2012">Francês 2011/2012</a>
12
+ </li>
13
+
14
+ <li class="now">
15
+ <a href="#" rel="198" title="/Brasileiro Série A 2012">Brasileiro Série A 2012</a>
16
+ </li>
17
+
18
+ </ul>
19
+
20
+
21
+
22
+ <!-- JOGOS EM ANDAMENTO -->
23
+
24
+ <h2>Jogos em andamento</h2>
25
+
26
+
27
+ <div class="bloco_jogos">
28
+ <div class="img_noticias">
29
+ <ul class="agora">
30
+ <li class="noticia_hora">18h30</li>
31
+ <li class="noticia_dia">
32
+
33
+
34
+ Agora
35
+
36
+
37
+
38
+
39
+ </li>
40
+ </ul>
41
+ </div>
42
+
43
+
44
+ <div class="jogo ">
45
+ <table cellpadding="0" cellspacing="0" border="0">
46
+ <colgroup>
47
+ <col width="60" />
48
+ <col width="90" />
49
+ <col width="64" />
50
+ <col width="25" />
51
+ <col width="80" />
52
+ <col width="25" />
53
+ <col width="64" />
54
+ <col width="90" />
55
+ <col width="40" />
56
+ </colgroup>
57
+ <tbody>
58
+ <tr>
59
+ <td class="placar">
60
+
61
+ </td>
62
+ <td class="time1">
63
+
64
+
65
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40075" title="Vasco">
66
+ Vasco
67
+ </a>
68
+
69
+
70
+
71
+
72
+ </td>
73
+ <td class="time">
74
+
75
+
76
+
77
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40075" title="Vasco">
78
+ <img src="http://contenti1.espn.com.br/time/cc8c2869-226f-3522-8c3b-e71b8a8c19ad.gif" />
79
+ </a>
80
+
81
+
82
+
83
+
84
+
85
+ </td>
86
+
87
+
88
+ <td class="placar_penalt man">
89
+
90
+ </td>
91
+
92
+ <td class="placar">
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40075" title="1 x 2">
100
+ 1 x 2
101
+ </a>
102
+
103
+
104
+
105
+ </td>
106
+
107
+ <td class="placar_penalt vis">
108
+
109
+ </td>
110
+
111
+ <td class="time">
112
+
113
+
114
+
115
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40075" title="Grêmio">
116
+ <img src="http://contenti1.espn.com.br/time/fe9a6e35-61ad-3362-92dc-431be84f8d37.gif" />
117
+ </a>
118
+
119
+
120
+
121
+
122
+ </td>
123
+ <td class="time2">
124
+
125
+
126
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40075" title="Grêmio">
127
+ Grêmio
128
+ </a>
129
+
130
+
131
+
132
+ </td>
133
+ <td>
134
+
135
+
136
+
137
+
138
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40075"
139
+ title="Jogos transmitidos com narração da partida e todas as estatísticas" class="data_full">
140
+ Lance a Lance</a>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ </td>
149
+ </tr>
150
+ </tbody>
151
+ </table>
152
+ </div>
153
+ </div>
154
+
155
+ <div class="bloco_jogos">
156
+ <div class="img_noticias">
157
+ <ul >
158
+ <li class="noticia_hora">16h00</li>
159
+ <li class="noticia_dia">
160
+
161
+
162
+
163
+ 20May
164
+
165
+
166
+
167
+ </li>
168
+ </ul>
169
+ </div>
170
+
171
+
172
+ <div class="jogo ">
173
+ <table cellpadding="0" cellspacing="0" border="0">
174
+ <colgroup>
175
+ <col width="60" />
176
+ <col width="90" />
177
+ <col width="55" />
178
+ <col width="25" />
179
+ <col width="80" />
180
+ <col width="25" />
181
+ <col width="55" />
182
+ <col width="90" />
183
+ <col width="50" />
184
+ </colgroup>
185
+ <tbody>
186
+ <tr>
187
+ <td class="placar">
188
+ </td>
189
+ <td class="time1">
190
+
191
+
192
+
193
+ Rennes
194
+
195
+
196
+ </td>
197
+ <td class="time">
198
+
199
+
200
+
201
+
202
+ <img src="http://contenti1.espn.com.br/time/07415332-64a9-3407-86f5-45b0a37bb7b7.png" />
203
+
204
+
205
+
206
+ </td>
207
+ <td class="placar_penalt man">
208
+
209
+ </td>
210
+ <td class="placar">
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ 5 x 0
219
+
220
+
221
+ </td>
222
+ <td class="placar_penalt vis">
223
+
224
+ </td>
225
+ <td class="time">
226
+
227
+
228
+
229
+
230
+ <img src="http://contenti1.espn.com.br/time/3554362f-20ca-32f4-b434-4f8afc02cf23.png" />
231
+
232
+
233
+
234
+ </td>
235
+ <td class="time2">
236
+
237
+
238
+
239
+ Dijon
240
+
241
+
242
+ </td>
243
+ <td>
244
+
245
+
246
+
247
+
248
+ <!-- <a title="Placar" class="">Jogos transmitidos com Placar</a> -->
249
+
250
+
251
+ </td>
252
+ </tr>
253
+ </tbody>
254
+ </table>
255
+ </div>
256
+ </div>
257
+
258
+ <div class="bloco_jogos">
259
+ <div class="img_noticias">
260
+ <ul class="agora">
261
+ <li class="noticia_hora">18h30</li>
262
+ <li class="noticia_dia">
263
+
264
+
265
+ Agora
266
+
267
+
268
+
269
+
270
+ </li>
271
+ </ul>
272
+ </div>
273
+
274
+
275
+
276
+
277
+ <div class="jogo odd">
278
+ <table cellpadding="0" cellspacing="0" border="0">
279
+ <colgroup>
280
+ <col width="60" />
281
+ <col width="90" />
282
+ <col width="64" />
283
+ <col width="25" />
284
+ <col width="80" />
285
+ <col width="25" />
286
+ <col width="64" />
287
+ <col width="90" />
288
+ <col width="40" />
289
+ </colgroup>
290
+ <tbody>
291
+ <tr>
292
+ <td class="placar">
293
+
294
+ </td>
295
+ <td class="time1">
296
+
297
+
298
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40085" title="Cruzeiro">
299
+ Cruzeiro
300
+ </a>
301
+
302
+
303
+
304
+
305
+ </td>
306
+ <td class="time">
307
+
308
+
309
+
310
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40085" title="Cruzeiro">
311
+ <img src="http://contenti1.espn.com.br/time/fd7795de-1c57-3dcd-a37c-4374ec61d26f.gif" />
312
+ </a>
313
+
314
+
315
+
316
+
317
+
318
+ </td>
319
+
320
+
321
+ <td class="placar_penalt man">
322
+
323
+ </td>
324
+
325
+ <td class="placar">
326
+
327
+
328
+
329
+
330
+
331
+
332
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40085" title="0 x 0">
333
+ 0 x 0
334
+ </a>
335
+
336
+
337
+
338
+ </td>
339
+
340
+ <td class="placar_penalt vis">
341
+
342
+ </td>
343
+
344
+ <td class="time">
345
+
346
+
347
+
348
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40085" title="Atlético-GO">
349
+ <img src="http://contenti1.espn.com.br/time/a67d8582-6eba-3110-bc95-52e40c999a78.gif" />
350
+ </a>
351
+
352
+
353
+
354
+
355
+ </td>
356
+ <td class="time2">
357
+
358
+
359
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40085" title="Atlético-GO">
360
+ Atlético-GO
361
+ </a>
362
+
363
+
364
+
365
+ </td>
366
+ <td>
367
+
368
+
369
+
370
+
371
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40085"
372
+ title="Jogos transmitidos com narração da partida e todas as estatísticas" class="data_full">
373
+ Lance a Lance</a>
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+ </td>
382
+ </tr>
383
+ </tbody>
384
+ </table>
385
+ </div>
386
+ </div>
387
+
388
+ <div class="bloco_jogos">
389
+ <div class="img_noticias">
390
+ <ul class="agora">
391
+ <li class="noticia_hora">18h30</li>
392
+ <li class="noticia_dia">
393
+
394
+
395
+ Agora
396
+
397
+
398
+
399
+
400
+ </li>
401
+ </ul>
402
+ </div>
403
+
404
+
405
+ <div class="jogo ">
406
+ <table cellpadding="0" cellspacing="0" border="0">
407
+ <colgroup>
408
+ <col width="60" />
409
+ <col width="90" />
410
+ <col width="64" />
411
+ <col width="25" />
412
+ <col width="80" />
413
+ <col width="25" />
414
+ <col width="64" />
415
+ <col width="90" />
416
+ <col width="40" />
417
+ </colgroup>
418
+ <tbody>
419
+ <tr>
420
+ <td class="placar">
421
+
422
+ </td>
423
+ <td class="time1">
424
+
425
+
426
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40093" title="Bahia">
427
+ Bahia
428
+ </a>
429
+
430
+
431
+
432
+
433
+ </td>
434
+ <td class="time">
435
+
436
+
437
+
438
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40093" title="Bahia">
439
+ <img src="http://contenti1.espn.com.br/time/afdfb939-ff85-30fc-aa1e-9224ef6c145e.png" />
440
+ </a>
441
+
442
+
443
+
444
+
445
+
446
+ </td>
447
+
448
+
449
+ <td class="placar_penalt man">
450
+
451
+ </td>
452
+
453
+ <td class="placar">
454
+
455
+
456
+
457
+
458
+
459
+
460
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40093" title="0 x 0">
461
+ 0 x 0
462
+ </a>
463
+
464
+
465
+
466
+ </td>
467
+
468
+ <td class="placar_penalt vis">
469
+
470
+ </td>
471
+
472
+ <td class="time">
473
+
474
+
475
+
476
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40093" title="Santos">
477
+ <img src="http://contenti1.espn.com.br/time/8c38a98c-3fc9-3875-94af-233f4f8b4c4b.gif" />
478
+ </a>
479
+
480
+
481
+
482
+
483
+ </td>
484
+ <td class="time2">
485
+
486
+
487
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40093" title="Santos">
488
+ Santos
489
+ </a>
490
+
491
+
492
+
493
+ </td>
494
+ <td>
495
+
496
+
497
+
498
+
499
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40093"
500
+ title="Jogos transmitidos com narração da partida e todas as estatísticas" class="data_full">
501
+ Lance a Lance</a>
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+ </td>
510
+ </tr>
511
+ </tbody>
512
+ </table>
513
+ </div>
514
+ </div>
515
+
516
+ <!-- FIM JOGOS EM ANDAMENTO -->
517
+
518
+
519
+ <!-- JOGOS MARCADOS PARA HOJE -->
520
+
521
+
522
+ <!-- FIM JOGOS MARCADOS PARA HOJE -->
523
+
524
+
525
+ <!-- JOGOS ENCERRRADOS -->
526
+
527
+ <h2>Jogos encerrrados</h2>
528
+
529
+
530
+ <div class="bloco_jogos">
531
+ <div class="img_noticias">
532
+ <ul >
533
+ <li class="noticia_hora">16h00</li>
534
+ <li class="noticia_dia">
535
+
536
+
537
+
538
+ 20May
539
+
540
+
541
+
542
+ </li>
543
+ </ul>
544
+ </div>
545
+
546
+
547
+ <div class="jogo ">
548
+ <table cellpadding="0" cellspacing="0" border="0">
549
+ <colgroup>
550
+ <col width="60" />
551
+ <col width="90" />
552
+ <col width="55" />
553
+ <col width="25" />
554
+ <col width="80" />
555
+ <col width="25" />
556
+ <col width="55" />
557
+ <col width="90" />
558
+ <col width="50" />
559
+ </colgroup>
560
+ <tbody>
561
+ <tr>
562
+ <td class="placar">
563
+ </td>
564
+ <td class="time1">
565
+
566
+
567
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40087" title="Ponte Preta">
568
+ Ponte Preta
569
+ </a>
570
+
571
+
572
+
573
+ </td>
574
+ <td class="time">
575
+
576
+
577
+
578
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40087" title="Ponte Preta">
579
+ <img src="http://contenti1.espn.com.br/time/d0e3f767-a816-37dc-8305-c55c5591fc4f.gif" />
580
+ </a>
581
+
582
+
583
+
584
+
585
+ </td>
586
+ <td class="placar_penalt man">
587
+
588
+ </td>
589
+ <td class="placar">
590
+
591
+
592
+
593
+
594
+
595
+
596
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40087" title="0 x 1">
597
+ 0 x 1
598
+ </a>
599
+
600
+
601
+
602
+ </td>
603
+ <td class="placar_penalt vis">
604
+
605
+ </td>
606
+ <td class="time">
607
+
608
+
609
+
610
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40087" title="Atlético-MG">
611
+ <img src="http://contenti1.espn.com.br/time/be421723-4d87-3e44-88f3-66cf8052d88b.gif" />
612
+ </a>
613
+
614
+
615
+
616
+
617
+ </td>
618
+ <td class="time2">
619
+
620
+
621
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40087" title="Atlético-MG">
622
+ Atlético-MG
623
+ </a>
624
+
625
+
626
+
627
+ </td>
628
+ <td>
629
+
630
+
631
+
632
+
633
+ <a href="/temporeal/acoes.partida.logic?realTimeMatch.id=40087"
634
+ title="Jogos transmitidos com narração da partida e todas as estatísticas" class="data_full">
635
+ Lance a Lance</a>
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+ </td>
644
+ </tr>
645
+ </tbody>
646
+ </table>
647
+ </div>
648
+ </div>
649
+
650
+ <!-- FIM JOGOS ENCERRRADOS -->
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: live_soccer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matias H. Leidemer
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-05-21 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: httparty
16
+ requirement: &70202340893720 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.8.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70202340893720
25
+ - !ruby/object:Gem::Dependency
26
+ name: nokogiri
27
+ requirement: &70202340893040 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 1.5.2
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70202340893040
36
+ - !ruby/object:Gem::Dependency
37
+ name: thor
38
+ requirement: &70202340892200 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.15.2
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70202340892200
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec
49
+ requirement: &70202340891240 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 2.10.0
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70202340891240
58
+ - !ruby/object:Gem::Dependency
59
+ name: rdoc
60
+ requirement: &70202340890280 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: '3.12'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70202340890280
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: &70202340889480 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 1.1.0
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70202340889480
80
+ - !ruby/object:Gem::Dependency
81
+ name: jeweler
82
+ requirement: &70202340888600 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ~>
86
+ - !ruby/object:Gem::Version
87
+ version: 1.8.3
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70202340888600
91
+ - !ruby/object:Gem::Dependency
92
+ name: simplecov
93
+ requirement: &70202340824220 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ version: 0.6.4
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70202340824220
102
+ - !ruby/object:Gem::Dependency
103
+ name: fakeweb
104
+ requirement: &70202340823340 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.3.0
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *70202340823340
113
+ description: Find out how your soccer team is going right now!
114
+ email: matiasleidemer@gmail.com
115
+ executables:
116
+ - live_soccer
117
+ extensions: []
118
+ extra_rdoc_files:
119
+ - LICENSE.txt
120
+ - README.md
121
+ files:
122
+ - .document
123
+ - .rspec
124
+ - Gemfile
125
+ - Gemfile.lock
126
+ - LICENSE.txt
127
+ - README.md
128
+ - Rakefile
129
+ - VERSION
130
+ - bin/live_soccer
131
+ - lib/live_soccer.rb
132
+ - lib/live_soccer/checker.rb
133
+ - lib/live_soccer/match.rb
134
+ - lib/live_soccer/match_collection.rb
135
+ - live_soccer.gemspec
136
+ - spec/checker_spec.rb
137
+ - spec/live_soccer_spec.rb
138
+ - spec/match_collection_spec.rb
139
+ - spec/match_spec.rb
140
+ - spec/spec_helper.rb
141
+ - spec/support/all_matches.html
142
+ homepage: http://github.com/matiasleidemer/live_soccer
143
+ licenses:
144
+ - MIT
145
+ post_install_message:
146
+ rdoc_options: []
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ segments:
156
+ - 0
157
+ hash: 4314211782101427104
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ! '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ requirements: []
165
+ rubyforge_project:
166
+ rubygems_version: 1.8.10
167
+ signing_key:
168
+ specification_version: 3
169
+ summary: Find out how your soccer team is going right now!
170
+ test_files: []