sportdb-catalogs 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +1 -0
- data/Manifest.txt +9 -11
- data/README.md +3 -54
- data/Rakefile +5 -7
- data/lib/sportdb/catalogs/base.rb +154 -0
- data/lib/sportdb/catalogs/city.rb +78 -0
- data/lib/sportdb/catalogs/club.rb +104 -0
- data/lib/sportdb/catalogs/country.rb +110 -0
- data/lib/sportdb/catalogs/event_info.rb +74 -0
- data/lib/sportdb/catalogs/ground.rb +106 -0
- data/lib/sportdb/catalogs/league.rb +87 -0
- data/lib/sportdb/catalogs/national_team.rb +61 -0
- data/lib/sportdb/catalogs/player.rb +125 -0
- data/lib/sportdb/catalogs/version.rb +2 -4
- data/lib/sportdb/catalogs.rb +172 -10
- metadata +34 -46
- data/NOTES.md +0 -5
- data/lib/sportdb/catalogs/catalog.rb +0 -105
- data/lib/sportdb/catalogs/config.rb +0 -25
- data/lib/sportdb/catalogs/wiki_index.rb +0 -81
- data/test/helper.rb +0 -13
- data/test/test_clubs.rb +0 -100
- data/test/test_clubs_history.rb +0 -47
- data/test/test_countries.rb +0 -33
- data/test/test_leagues.rb +0 -38
- data/test/test_national_teams.rb +0 -38
- data/test/test_wiki_index.rb +0 -42
data/test/test_wiki_index.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
###
|
2
|
-
# to run use
|
3
|
-
# ruby -I ./lib -I ./test test/test_wiki_index.rb
|
4
|
-
|
5
|
-
|
6
|
-
require 'helper'
|
7
|
-
|
8
|
-
class TestWikiIndex < MiniTest::Test
|
9
|
-
|
10
|
-
Club = SportDb::Import::Club
|
11
|
-
|
12
|
-
COUNTRIES = SportDb::Import.catalog.countries
|
13
|
-
|
14
|
-
|
15
|
-
def test_clubs
|
16
|
-
## note: CANNOT run if no "custom" clubs_dir set
|
17
|
-
return if SportDb::Import.config.clubs_dir.nil?
|
18
|
-
|
19
|
-
wiki = SportDb::Import::WikiIndex.build( SportDb::Import.config.clubs_dir )
|
20
|
-
## pp wiki
|
21
|
-
|
22
|
-
##############################################
|
23
|
-
## test wikipedia names and links/urls
|
24
|
-
be = COUNTRIES.find( 'be' )
|
25
|
-
|
26
|
-
club = Club.new
|
27
|
-
club.name = 'Club Brugge KV'
|
28
|
-
club.country = be
|
29
|
-
|
30
|
-
rec = wiki.find_by( club: club )
|
31
|
-
assert_equal 'Club Brugge KV', rec.name
|
32
|
-
|
33
|
-
|
34
|
-
club = Club.new
|
35
|
-
club.name = 'RSC Anderlecht'
|
36
|
-
club.country = be
|
37
|
-
|
38
|
-
rec = wiki.find_by( club: club )
|
39
|
-
assert_equal 'R.S.C. Anderlecht', rec.name
|
40
|
-
end
|
41
|
-
|
42
|
-
end # class TestWikiIndex
|