sportdb-models 1.18.6 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +0 -106
  3. data/Rakefile +0 -1
  4. data/lib/sportdb/deleter.rb +1 -1
  5. data/lib/sportdb/models.rb +3 -88
  6. data/lib/sportdb/version.rb +2 -2
  7. data/test/helper.rb +0 -108
  8. metadata +2 -122
  9. data/lib/sportdb/indexers/team.rb +0 -87
  10. data/lib/sportdb/matcher.rb +0 -31
  11. data/lib/sportdb/pretty_printer.rb +0 -175
  12. data/lib/sportdb/reader.rb +0 -132
  13. data/lib/sportdb/reader_file.rb +0 -131
  14. data/lib/sportdb/reader_zip.rb +0 -172
  15. data/lib/sportdb/readers/assoc.rb +0 -54
  16. data/lib/sportdb/readers/event.rb +0 -253
  17. data/lib/sportdb/readers/event_meta.rb +0 -133
  18. data/lib/sportdb/readers/event_table.rb +0 -196
  19. data/lib/sportdb/readers/game.rb +0 -912
  20. data/lib/sportdb/readers/ground.rb +0 -53
  21. data/lib/sportdb/readers/league.rb +0 -54
  22. data/lib/sportdb/readers/season.rb +0 -83
  23. data/lib/sportdb/readers/squad_club.rb +0 -201
  24. data/lib/sportdb/readers/squad_national_team.rb +0 -173
  25. data/lib/sportdb/readers/team.rb +0 -53
  26. data/lib/sportdb/rsssf_reader.rb +0 -367
  27. data/lib/sportdb/utils.rb +0 -89
  28. data/lib/sportdb/utils_date.rb +0 -26
  29. data/lib/sportdb/utils_goals.rb +0 -20
  30. data/lib/sportdb/utils_group.rb +0 -63
  31. data/lib/sportdb/utils_map.rb +0 -44
  32. data/lib/sportdb/utils_round.rb +0 -165
  33. data/lib/sportdb/utils_scores.rb +0 -17
  34. data/lib/sportdb/utils_teams.rb +0 -48
  35. data/test/data/at-austria/2013_14/bl.txt +0 -227
  36. data/test/data/at-austria/2013_14/bl.yml +0 -30
  37. data/test/data/at-austria/2013_14/bl_ii.txt +0 -154
  38. data/test/data/at-austria/2013_14/el.txt +0 -4
  39. data/test/data/at-austria/2013_14/el.yml +0 -25
  40. data/test/data/at-austria/2013_14/squads/austria.txt +0 -40
  41. data/test/data/at-austria/2013_14/squads/salzburg.txt +0 -35
  42. data/test/data/at-austria/2014_15/1-bundesliga-ii.txt +0 -158
  43. data/test/data/at-austria/2014_15/1-bundesliga.yml +0 -18
  44. data/test/data/at-austria/2015_16/1-bundesliga-v2.conf.txt +0 -20
  45. data/test/data/at-austria/2015_16/1-bundesliga-v2.yml +0 -20
  46. data/test/data/at-austria/2015_16/1-bundesliga.conf.txt +0 -20
  47. data/test/data/at-austria/2015_16/1-bundesliga.yml +0 -24
  48. data/test/data/at-austria/2015_16/cup.yml +0 -77
  49. data/test/data/at-austria/leagues.txt +0 -11
  50. data/test/data/at-austria/teams.txt +0 -68
  51. data/test/data/at-austria/teams_2.txt +0 -21
  52. data/test/data/csv/de-2013-14--1-bundesliga.txt +0 -307
  53. data/test/data/de-deutschland/2013-14/1-bundesliga.yml +0 -26
  54. data/test/data/de-deutschland/leagues.txt +0 -4
  55. data/test/data/de-deutschland/teams.txt +0 -53
  56. data/test/data/eng-england/2015-16/1-premierleague-v2.yml +0 -2
  57. data/test/data/eng-england/2015-16/1-premierleague.yml +0 -5
  58. data/test/data/national-teams/assocs.txt +0 -231
  59. data/test/data/national-teams/europe/assocs.txt +0 -13
  60. data/test/data/national-teams/europe/teams.txt +0 -13
  61. data/test/data/national-teams/north-america/assocs.txt +0 -10
  62. data/test/data/national-teams/north-america/teams.txt +0 -7
  63. data/test/data/national-teams/teams.txt +0 -19
  64. data/test/data/players/europe/at-austria/players.txt +0 -45
  65. data/test/data/players/europe/de-deutschland/players.txt +0 -41
  66. data/test/data/players/south-america/br-brazil/players.txt +0 -51
  67. data/test/data/rsssf/at-2014-15--1-bundesliga.txt +0 -339
  68. data/test/data/rsssf/at-2015-16--1-bundesliga.txt +0 -18
  69. data/test/data/world-cup/1930/cup.txt +0 -71
  70. data/test/data/world-cup/1930/cup.yml +0 -23
  71. data/test/data/world-cup/1930/cup_goals.txt +0 -47
  72. data/test/data/world-cup/1930/cup_goals.yml +0 -23
  73. data/test/data/world-cup/1954/cup.txt +0 -90
  74. data/test/data/world-cup/1954/cup.yml +0 -30
  75. data/test/data/world-cup/1962/cup.txt +0 -86
  76. data/test/data/world-cup/1962/cup.yml +0 -32
  77. data/test/data/world-cup/1974/cup.yml +0 -35
  78. data/test/data/world-cup/1974/cup_finals.txt +0 -14
  79. data/test/data/world-cup/1974/cup_i.txt +0 -55
  80. data/test/data/world-cup/1974/cup_ii.txt +0 -34
  81. data/test/data/world-cup/2014/cup.txt +0 -5
  82. data/test/data/world-cup/2014/cup.yml +0 -54
  83. data/test/data/world-cup/2014/squads/br-brazil.txt +0 -46
  84. data/test/data/world-cup/2014/squads/de-deutschland.txt +0 -8
  85. data/test/data/world-cup/2014/squads/jp-japan.txt +0 -30
  86. data/test/data/world-cup/2014/squads/uy-uruguay.txt +0 -32
  87. data/test/data/world-cup/leagues.txt +0 -5
  88. data/test/data/world-cup/seasons_1930.txt +0 -4
  89. data/test/data/world-cup/seasons_1954.txt +0 -4
  90. data/test/data/world-cup/seasons_1962.txt +0 -4
  91. data/test/data/world-cup/seasons_1974.txt +0 -5
  92. data/test/data/world-cup/teams_1930.txt +0 -26
  93. data/test/data/world-cup/teams_1954.txt +0 -30
  94. data/test/data/world-cup/teams_1962.txt +0 -29
  95. data/test/data/world-cup/teams_1974.txt +0 -29
  96. data/test/test_assoc_reader.rb +0 -199
  97. data/test/test_event_meta_reader.rb +0 -47
  98. data/test/test_event_reader.rb +0 -64
  99. data/test/test_event_table_reader.rb +0 -57
  100. data/test/test_goals.rb +0 -107
  101. data/test/test_indexer_team.rb +0 -34
  102. data/test/test_load.rb +0 -61
  103. data/test/test_pp.rb +0 -35
  104. data/test/test_reader.rb +0 -88
  105. data/test/test_reader_from_string.rb +0 -63
  106. data/test/test_round_auto.rb +0 -370
  107. data/test/test_round_def.rb +0 -109
  108. data/test/test_round_header.rb +0 -183
  109. data/test/test_rsssf_reader.rb +0 -76
  110. data/test/test_squad_club_reader.rb +0 -76
  111. data/test/test_squad_national_team_reader.rb +0 -116
  112. data/test/test_standings.rb +0 -279
  113. data/test/test_standings_ii.rb +0 -46
  114. data/test/test_utils.rb +0 -124
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dd5f98f71987e9c250fc7330f8c58b5b73dc59c
4
- data.tar.gz: f31178e06e8b4f9a5f08b06c5506252233eb1e1f
3
+ metadata.gz: b1524cb3a76b16ce80f8b2d484b11f8ab11002f6
4
+ data.tar.gz: 209a229871e299fab7ac5ca8b90765052fc7da5f
5
5
  SHA512:
6
- metadata.gz: 30fc84ff5953bd2f390f152f6f912bb18f97a76e7692afcd99b221c3bb86dcd5ad9897ec637e9d1cbc968e2da591796c1446952f6495638f25099af37b1725ce
7
- data.tar.gz: f3146353a838f07e34a5b901a5ac9858b8aad3b33467e9cd042dfb43df0e9569de2ffcaa02dcf9ffe333753f667e2a12d3dc8e03d15133be723e0ba5a3c56d1a
6
+ metadata.gz: a9c48d1be59422f7fb7726e6121e909aceb9dc3a2306caea036ea19a5a64ebd5f4f7ff828009bf23810f48884d26b970b0f63718fa46ff37e7649e78b3b20f98
7
+ data.tar.gz: 3e77eb48eafbf666afc8a92e5f6ea7d9403e157745b8abb508367292910dc3a355324cacc8a236b434cc7936d90876ff3bff95f177686378c33c0a025cf058fe
@@ -4,8 +4,6 @@ README.md
4
4
  Rakefile
5
5
  lib/sportdb/calc.rb
6
6
  lib/sportdb/deleter.rb
7
- lib/sportdb/indexers/team.rb
8
- lib/sportdb/matcher.rb
9
7
  lib/sportdb/models.rb
10
8
  lib/sportdb/models/assoc.rb
11
9
  lib/sportdb/models/assoc_assoc.rb
@@ -40,115 +38,11 @@ lib/sportdb/models/world/continent.rb
40
38
  lib/sportdb/models/world/country.rb
41
39
  lib/sportdb/models/world/state.rb
42
40
  lib/sportdb/patterns.rb
43
- lib/sportdb/pretty_printer.rb
44
- lib/sportdb/reader.rb
45
- lib/sportdb/reader_file.rb
46
- lib/sportdb/reader_zip.rb
47
- lib/sportdb/readers/assoc.rb
48
- lib/sportdb/readers/event.rb
49
- lib/sportdb/readers/event_meta.rb
50
- lib/sportdb/readers/event_table.rb
51
- lib/sportdb/readers/game.rb
52
- lib/sportdb/readers/ground.rb
53
- lib/sportdb/readers/league.rb
54
- lib/sportdb/readers/season.rb
55
- lib/sportdb/readers/squad_club.rb
56
- lib/sportdb/readers/squad_national_team.rb
57
- lib/sportdb/readers/team.rb
58
- lib/sportdb/rsssf_reader.rb
59
41
  lib/sportdb/schema.rb
60
42
  lib/sportdb/standings.rb
61
43
  lib/sportdb/stats.rb
62
- lib/sportdb/utils.rb
63
- lib/sportdb/utils_date.rb
64
- lib/sportdb/utils_goals.rb
65
- lib/sportdb/utils_group.rb
66
- lib/sportdb/utils_map.rb
67
- lib/sportdb/utils_round.rb
68
- lib/sportdb/utils_scores.rb
69
- lib/sportdb/utils_teams.rb
70
44
  lib/sportdb/version.rb
71
- test/data/at-austria/2013_14/bl.txt
72
- test/data/at-austria/2013_14/bl.yml
73
- test/data/at-austria/2013_14/bl_ii.txt
74
- test/data/at-austria/2013_14/el.txt
75
- test/data/at-austria/2013_14/el.yml
76
- test/data/at-austria/2013_14/squads/austria.txt
77
- test/data/at-austria/2013_14/squads/salzburg.txt
78
- test/data/at-austria/2014_15/1-bundesliga-ii.txt
79
- test/data/at-austria/2014_15/1-bundesliga.yml
80
- test/data/at-austria/2015_16/1-bundesliga-v2.conf.txt
81
- test/data/at-austria/2015_16/1-bundesliga-v2.yml
82
- test/data/at-austria/2015_16/1-bundesliga.conf.txt
83
- test/data/at-austria/2015_16/1-bundesliga.yml
84
- test/data/at-austria/2015_16/cup.yml
85
- test/data/at-austria/leagues.txt
86
- test/data/at-austria/teams.txt
87
- test/data/at-austria/teams_2.txt
88
- test/data/csv/de-2013-14--1-bundesliga.txt
89
- test/data/de-deutschland/2013-14/1-bundesliga.yml
90
- test/data/de-deutschland/leagues.txt
91
- test/data/de-deutschland/teams.txt
92
- test/data/eng-england/2015-16/1-premierleague-v2.yml
93
- test/data/eng-england/2015-16/1-premierleague.yml
94
- test/data/national-teams/assocs.txt
95
- test/data/national-teams/europe/assocs.txt
96
- test/data/national-teams/europe/teams.txt
97
- test/data/national-teams/north-america/assocs.txt
98
- test/data/national-teams/north-america/teams.txt
99
- test/data/national-teams/teams.txt
100
- test/data/players/europe/at-austria/players.txt
101
- test/data/players/europe/de-deutschland/players.txt
102
- test/data/players/south-america/br-brazil/players.txt
103
- test/data/rsssf/at-2014-15--1-bundesliga.txt
104
- test/data/rsssf/at-2015-16--1-bundesliga.txt
105
- test/data/world-cup/1930/cup.txt
106
- test/data/world-cup/1930/cup.yml
107
- test/data/world-cup/1930/cup_goals.txt
108
- test/data/world-cup/1930/cup_goals.yml
109
- test/data/world-cup/1954/cup.txt
110
- test/data/world-cup/1954/cup.yml
111
- test/data/world-cup/1962/cup.txt
112
- test/data/world-cup/1962/cup.yml
113
- test/data/world-cup/1974/cup.yml
114
- test/data/world-cup/1974/cup_finals.txt
115
- test/data/world-cup/1974/cup_i.txt
116
- test/data/world-cup/1974/cup_ii.txt
117
- test/data/world-cup/2014/cup.txt
118
- test/data/world-cup/2014/cup.yml
119
- test/data/world-cup/2014/squads/br-brazil.txt
120
- test/data/world-cup/2014/squads/de-deutschland.txt
121
- test/data/world-cup/2014/squads/jp-japan.txt
122
- test/data/world-cup/2014/squads/uy-uruguay.txt
123
- test/data/world-cup/leagues.txt
124
- test/data/world-cup/seasons_1930.txt
125
- test/data/world-cup/seasons_1954.txt
126
- test/data/world-cup/seasons_1962.txt
127
- test/data/world-cup/seasons_1974.txt
128
- test/data/world-cup/teams_1930.txt
129
- test/data/world-cup/teams_1954.txt
130
- test/data/world-cup/teams_1962.txt
131
- test/data/world-cup/teams_1974.txt
132
45
  test/helper.rb
133
- test/test_assoc_reader.rb
134
46
  test/test_changes.rb
135
47
  test/test_cursor.rb
136
- test/test_event_meta_reader.rb
137
- test/test_event_reader.rb
138
- test/test_event_table_reader.rb
139
- test/test_goals.rb
140
- test/test_indexer_team.rb
141
- test/test_load.rb
142
- test/test_pp.rb
143
- test/test_reader.rb
144
- test/test_reader_from_string.rb
145
- test/test_round_auto.rb
146
- test/test_round_def.rb
147
- test/test_round_header.rb
148
- test/test_rsssf_reader.rb
149
- test/test_squad_club_reader.rb
150
- test/test_squad_national_team_reader.rb
151
- test/test_standings.rb
152
- test/test_standings_ii.rb
153
- test/test_utils.rb
154
48
  test/test_winner.rb
data/Rakefile CHANGED
@@ -22,7 +22,6 @@ Hoe.spec 'sportdb-models' do
22
22
  self.extra_deps = [
23
23
  ['worlddb-models', '>= 2.4.0'], # Note: pull in all (extra) dependencies va worlddb-models
24
24
  ['persondb-models', '>= 0.5.0'], # persons (people) table
25
- ['sportdb-match-formats', '>= 0.1.0'],
26
25
  ]
27
26
 
28
27
  self.licenses = ['Public Domain']
@@ -3,7 +3,7 @@ module SportDb
3
3
 
4
4
  class Deleter
5
5
  ######
6
- # NB: make models available in sportdb module by default with namespace
6
+ # note: make models available in sportdb module by default with namespace
7
7
  # e.g. lets you use Team instead of Model::Team
8
8
  include SportDb::Models
9
9
 
@@ -6,9 +6,6 @@ require 'worlddb/models' # NOTE: include worlddb-models gem (not cli tools g
6
6
  require 'persondb/models'
7
7
 
8
8
 
9
- require 'sportdb/match/formats' ## todo/fix: move all readers out-of-models AND than (finally) remove sportdb/formats dependency
10
-
11
-
12
9
  # our own code
13
10
 
14
11
  require 'sportdb/version' # let version always go first
@@ -54,54 +51,15 @@ require 'sportdb/models/utils' # e.g. GameCursor
54
51
  require 'sportdb/schema' # NB: requires sportdb/models (include SportDB::Models)
55
52
 
56
53
 
57
- require 'sportdb/utils'
58
- require 'sportdb/utils_date'
59
- require 'sportdb/utils_group'
60
- require 'sportdb/utils_map'
61
- require 'sportdb/utils_round'
62
- require 'sportdb/utils_scores'
63
- require 'sportdb/utils_teams'
64
- require 'sportdb/utils_goals'
65
- require 'sportdb/matcher'
66
54
  require 'sportdb/calc' # fix/todo: obsolete - replace w/ standings
67
55
  require 'sportdb/standings'
68
56
 
69
-
70
- require 'sportdb/readers/assoc'
71
- require 'sportdb/readers/event' ## old event reader (remove later??)
72
- require 'sportdb/readers/event_table' ## new "standard" event reader
73
- require 'sportdb/readers/event_meta' ## new "standard" event reader for meta data
74
- require 'sportdb/readers/game'
75
- require 'sportdb/readers/ground'
76
- require 'sportdb/readers/league'
77
- require 'sportdb/readers/season'
78
- require 'sportdb/readers/squad_club' # roster
79
- require 'sportdb/readers/squad_national_team'
80
- require 'sportdb/readers/team'
81
- require 'sportdb/reader'
82
- require 'sportdb/reader_file'
83
- require 'sportdb/reader_zip'
84
-
85
- require 'sportdb/indexers/team'
86
-
87
-
88
57
  require 'sportdb/deleter'
89
58
  require 'sportdb/stats'
90
59
 
91
- require 'sportdb/pretty_printer'
92
-
93
- ## "simplified" match reader for rsssf-formated/style leagues
94
- require 'sportdb/rsssf_reader'
95
-
96
60
 
97
61
  module SportDb
98
62
 
99
- def self.test_data_path
100
- "#{root}/test/data"
101
- end
102
-
103
-
104
-
105
63
  def self.create
106
64
  CreateDb.new.up
107
65
  ConfDb::Model::Prop.create!( key: 'db.schema.sport.version', value: VERSION )
@@ -117,52 +75,12 @@ module SportDb
117
75
  SportDb.create
118
76
  end
119
77
 
120
-
121
- def self.read_setup( setup, include_path )
122
- reader = Reader.new( include_path )
123
- reader.load_setup( setup )
124
- end
125
-
126
- def self.read_setup_from_zip( zip_name, setup, include_path, opts={} ) ## todo/check - use a better (shorter) name ??
127
- reader = ZipReader.new( zip_name, include_path, opts )
128
- reader.load_setup( setup )
129
- reader.close
130
- end
131
-
132
- def self.read_all( include_path ) # convenience helper
133
- read_setup( 'setups/all', include_path )
134
- end
135
-
136
- def self.read_builtin
137
- puts "!! WARN - deprecated SportDb.read_builtin call - remove!! no longer in use; will get removed soon"
138
- end
139
-
140
-
141
- # load built-in (that is, bundled within the gem) named plain text seeds
142
- # - pass in an array of pairs of event/seed names e.g.
143
- # [['at.2012/13', 'at/2012_13/bl'],
144
- # ['cl.2012/13', 'cl/2012_13/cl']] etc.
145
-
146
- def self.read( ary, include_path )
147
- reader = Reader.new( include_path )
148
- ## todo: check kind_of?( Array ) or kind_of?(String) to support array or string
149
- ary.each do |name|
150
- reader.load( name )
151
- end
152
- end
153
-
154
-
155
78
  # delete ALL records (use with care!)
156
79
  def self.delete!
157
80
  puts '*** deleting sport table records/data...'
158
81
  Deleter.new.run
159
82
  end # method delete!
160
83
 
161
- def self.update!
162
- puts '*** update event fixtures...'
163
- Updater.new.run
164
- end
165
-
166
84
 
167
85
  def self.tables
168
86
  Stats.new.tables
@@ -226,14 +144,11 @@ module SportDb
226
144
  ActiveRecord::Base.logger = Logger.new( STDOUT )
227
145
  ## ActiveRecord::Base.colorize_logging = false - no longer exists - check new api/config setting?
228
146
 
229
- self.connect( adapter: 'sqlite3',
230
- database: ':memory:' )
147
+ connect( adapter: 'sqlite3',
148
+ database: ':memory:' )
231
149
 
232
150
  ## build schema
233
- SportDb.create_all
234
-
235
- ## read builtins - why? why not?
236
- SportDb.read_builtin
151
+ create_all
237
152
  end # setup_in_memory_db (using SQLite :memory:)
238
153
 
239
154
 
@@ -3,8 +3,8 @@
3
3
  module SportDb
4
4
 
5
5
  MAJOR = 1 ## todo: namespace inside version or something - why? why not??
6
- MINOR = 18
7
- PATCH = 6
6
+ MINOR = 19
7
+ PATCH = 0
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
@@ -1,13 +1,8 @@
1
-
2
- ## $:.unshift(File.dirname(__FILE__))
3
-
4
1
  ## minitest setup
5
-
6
2
  require 'minitest/autorun'
7
3
 
8
4
 
9
5
  ## our own code
10
-
11
6
  require 'sportdb/models'
12
7
 
13
8
 
@@ -41,109 +36,6 @@ AlltimeStanding = SportDb::Model::AlltimeStanding
41
36
  AlltimeStandingEntry = SportDb::Model::AlltimeStandingEntry
42
37
 
43
38
 
44
-
45
- ####################
46
- # Reader shortcuts
47
-
48
- Reader = SportDb::Reader
49
- TeamReader = SportDb::TeamReader
50
- TeamIndexer = SportDb::TeamIndexer
51
- AssocReader = SportDb::AssocReader
52
- SeasonReader = SportDb::SeasonReader
53
- LeagueReader = SportDb::LeagueReader
54
- EventReader = SportDb::EventReader
55
- EventMetaReader = SportDb::EventMetaReader
56
- EventTableReader = SportDb::EventTableReader
57
- GameReader = SportDb::GameReader
58
- NationalTeamSquadReader = SportDb::NationalTeamSquadReader
59
- ClubSquadReader = SportDb::ClubSquadReader
60
-
61
- ## moved to racing.db - remove/delete!!
62
- ## RaceTeamReader = SportDb::RaceTeamReader
63
-
64
- PersonReader = PersonDb::PersonReader
65
-
66
- ######
67
- # New Reader ShortCuts
68
-
69
- module TestPrettyPrinter
70
- def self.from_file( name, opts={} )
71
- SportDb::PrettyPrinter.from_file( "#{SportDb.test_data_path}/#{name}.txt", opts )
72
- end
73
- end
74
-
75
-
76
- module TestTeamReader
77
- def self.from_file( name, more_attribs={} )
78
- TeamReader.from_file( "#{SportDb.test_data_path}/#{name}.txt", more_attribs )
79
- end
80
- end
81
-
82
- module TestTeamIndexer
83
- def self.from_file( name, more_attribs={} )
84
- TeamIndexer.from_file( "#{SportDb.test_data_path}/#{name}.txt", more_attribs )
85
- end
86
- end
87
-
88
-
89
- module TestClubSquadReader
90
- def self.from_file( name, more_attribs={} )
91
- ClubSquadReader.from_file( "#{SportDb.test_data_path}/#{name}.txt", more_attribs )
92
- end
93
- end
94
-
95
- module TestNationalTeamSquadReader
96
- def self.from_file( name, more_attribs={} )
97
- NationalTeamSquadReader.from_file( "#{SportDb.test_data_path}/#{name}.txt", more_attribs )
98
- end
99
- end
100
-
101
- module TestLeagueReader
102
- def self.from_file( name, more_attribs={} )
103
- LeagueReader.from_file( "#{SportDb.test_data_path}/#{name}.txt", more_attribs )
104
- end
105
- end
106
-
107
- module TestSeasonReader
108
- def self.from_file( name )
109
- SeasonReader.from_file( "#{SportDb.test_data_path}/#{name}.txt" )
110
- end
111
- end
112
-
113
- module TestEventReader
114
- def self.from_file( name )
115
- EventReader.from_file( "#{SportDb.test_data_path}/#{name}.yml" )
116
- end
117
- end
118
-
119
- module TestEventMetaReader
120
- def self.from_file( name )
121
- EventMetaReader.from_file( "#{SportDb.test_data_path}/#{name}.yml" )
122
- end
123
- end
124
-
125
- module TestEventTableReader
126
- def self.from_file( name )
127
- EventTableReader.from_file( "#{SportDb.test_data_path}/#{name}.txt" )
128
- end
129
- end
130
-
131
-
132
- module TestGameReader
133
- ## NOTE: pass in .yml as path (that is, event config!!!!)
134
- def self.from_file( name, more_attribs={} )
135
- GameReader.from_file( "#{SportDb.test_data_path}/#{name}.yml", more_attribs )
136
- end
137
- end
138
-
139
- module TestAssocReader
140
- def self.from_file( name )
141
- AssocReader.from_file( "#{SportDb.test_data_path}/#{name}.txt" )
142
- end
143
- end
144
-
145
-
146
-
147
39
  #################################
148
40
  # setup db -> schema / tables
149
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportdb-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.6
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-29 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: worlddb-models
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.5.0
41
- - !ruby/object:Gem::Dependency
42
- name: sportdb-match-formats
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 0.1.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.1.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rdoc
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -95,8 +81,6 @@ files:
95
81
  - Rakefile
96
82
  - lib/sportdb/calc.rb
97
83
  - lib/sportdb/deleter.rb
98
- - lib/sportdb/indexers/team.rb
99
- - lib/sportdb/matcher.rb
100
84
  - lib/sportdb/models.rb
101
85
  - lib/sportdb/models/assoc.rb
102
86
  - lib/sportdb/models/assoc_assoc.rb
@@ -131,117 +115,13 @@ files:
131
115
  - lib/sportdb/models/world/country.rb
132
116
  - lib/sportdb/models/world/state.rb
133
117
  - lib/sportdb/patterns.rb
134
- - lib/sportdb/pretty_printer.rb
135
- - lib/sportdb/reader.rb
136
- - lib/sportdb/reader_file.rb
137
- - lib/sportdb/reader_zip.rb
138
- - lib/sportdb/readers/assoc.rb
139
- - lib/sportdb/readers/event.rb
140
- - lib/sportdb/readers/event_meta.rb
141
- - lib/sportdb/readers/event_table.rb
142
- - lib/sportdb/readers/game.rb
143
- - lib/sportdb/readers/ground.rb
144
- - lib/sportdb/readers/league.rb
145
- - lib/sportdb/readers/season.rb
146
- - lib/sportdb/readers/squad_club.rb
147
- - lib/sportdb/readers/squad_national_team.rb
148
- - lib/sportdb/readers/team.rb
149
- - lib/sportdb/rsssf_reader.rb
150
118
  - lib/sportdb/schema.rb
151
119
  - lib/sportdb/standings.rb
152
120
  - lib/sportdb/stats.rb
153
- - lib/sportdb/utils.rb
154
- - lib/sportdb/utils_date.rb
155
- - lib/sportdb/utils_goals.rb
156
- - lib/sportdb/utils_group.rb
157
- - lib/sportdb/utils_map.rb
158
- - lib/sportdb/utils_round.rb
159
- - lib/sportdb/utils_scores.rb
160
- - lib/sportdb/utils_teams.rb
161
121
  - lib/sportdb/version.rb
162
- - test/data/at-austria/2013_14/bl.txt
163
- - test/data/at-austria/2013_14/bl.yml
164
- - test/data/at-austria/2013_14/bl_ii.txt
165
- - test/data/at-austria/2013_14/el.txt
166
- - test/data/at-austria/2013_14/el.yml
167
- - test/data/at-austria/2013_14/squads/austria.txt
168
- - test/data/at-austria/2013_14/squads/salzburg.txt
169
- - test/data/at-austria/2014_15/1-bundesliga-ii.txt
170
- - test/data/at-austria/2014_15/1-bundesliga.yml
171
- - test/data/at-austria/2015_16/1-bundesliga-v2.conf.txt
172
- - test/data/at-austria/2015_16/1-bundesliga-v2.yml
173
- - test/data/at-austria/2015_16/1-bundesliga.conf.txt
174
- - test/data/at-austria/2015_16/1-bundesliga.yml
175
- - test/data/at-austria/2015_16/cup.yml
176
- - test/data/at-austria/leagues.txt
177
- - test/data/at-austria/teams.txt
178
- - test/data/at-austria/teams_2.txt
179
- - test/data/csv/de-2013-14--1-bundesliga.txt
180
- - test/data/de-deutschland/2013-14/1-bundesliga.yml
181
- - test/data/de-deutschland/leagues.txt
182
- - test/data/de-deutschland/teams.txt
183
- - test/data/eng-england/2015-16/1-premierleague-v2.yml
184
- - test/data/eng-england/2015-16/1-premierleague.yml
185
- - test/data/national-teams/assocs.txt
186
- - test/data/national-teams/europe/assocs.txt
187
- - test/data/national-teams/europe/teams.txt
188
- - test/data/national-teams/north-america/assocs.txt
189
- - test/data/national-teams/north-america/teams.txt
190
- - test/data/national-teams/teams.txt
191
- - test/data/players/europe/at-austria/players.txt
192
- - test/data/players/europe/de-deutschland/players.txt
193
- - test/data/players/south-america/br-brazil/players.txt
194
- - test/data/rsssf/at-2014-15--1-bundesliga.txt
195
- - test/data/rsssf/at-2015-16--1-bundesliga.txt
196
- - test/data/world-cup/1930/cup.txt
197
- - test/data/world-cup/1930/cup.yml
198
- - test/data/world-cup/1930/cup_goals.txt
199
- - test/data/world-cup/1930/cup_goals.yml
200
- - test/data/world-cup/1954/cup.txt
201
- - test/data/world-cup/1954/cup.yml
202
- - test/data/world-cup/1962/cup.txt
203
- - test/data/world-cup/1962/cup.yml
204
- - test/data/world-cup/1974/cup.yml
205
- - test/data/world-cup/1974/cup_finals.txt
206
- - test/data/world-cup/1974/cup_i.txt
207
- - test/data/world-cup/1974/cup_ii.txt
208
- - test/data/world-cup/2014/cup.txt
209
- - test/data/world-cup/2014/cup.yml
210
- - test/data/world-cup/2014/squads/br-brazil.txt
211
- - test/data/world-cup/2014/squads/de-deutschland.txt
212
- - test/data/world-cup/2014/squads/jp-japan.txt
213
- - test/data/world-cup/2014/squads/uy-uruguay.txt
214
- - test/data/world-cup/leagues.txt
215
- - test/data/world-cup/seasons_1930.txt
216
- - test/data/world-cup/seasons_1954.txt
217
- - test/data/world-cup/seasons_1962.txt
218
- - test/data/world-cup/seasons_1974.txt
219
- - test/data/world-cup/teams_1930.txt
220
- - test/data/world-cup/teams_1954.txt
221
- - test/data/world-cup/teams_1962.txt
222
- - test/data/world-cup/teams_1974.txt
223
122
  - test/helper.rb
224
- - test/test_assoc_reader.rb
225
123
  - test/test_changes.rb
226
124
  - test/test_cursor.rb
227
- - test/test_event_meta_reader.rb
228
- - test/test_event_reader.rb
229
- - test/test_event_table_reader.rb
230
- - test/test_goals.rb
231
- - test/test_indexer_team.rb
232
- - test/test_load.rb
233
- - test/test_pp.rb
234
- - test/test_reader.rb
235
- - test/test_reader_from_string.rb
236
- - test/test_round_auto.rb
237
- - test/test_round_def.rb
238
- - test/test_round_header.rb
239
- - test/test_rsssf_reader.rb
240
- - test/test_squad_club_reader.rb
241
- - test/test_squad_national_team_reader.rb
242
- - test/test_standings.rb
243
- - test/test_standings_ii.rb
244
- - test/test_utils.rb
245
125
  - test/test_winner.rb
246
126
  homepage: https://github.com/sportdb/sport.db
247
127
  licenses: