sportdb 1.9.3 → 1.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 75701bce9778f7729f1ea7a9e5244ba7fb471edb
4
+ data.tar.gz: e08713c56ec7e46286b7b8f2ded213d1b8db42aa
5
+ SHA512:
6
+ metadata.gz: 996b1532556e67a7b9b56db38e955f87375968ae0fb4c872ae2eb377f83730c05c9777e01f073638e76dc6e077061e92d6b988ece00c12b8073fbc9b0d1db87d
7
+ data.tar.gz: 837ba63144656e2596294e4f76e490889592456e9d77d63155fcf7b466a6640d7342a9d57f236cb702d211286d1fa04e01d8f31184254ece93c5e6425753ec4c
File without changes
@@ -4,7 +4,7 @@
4
4
 
5
5
  group: Group
6
6
 
7
- round: Round|Matchday
7
+ round: Round|Matchday|Week
8
8
 
9
9
  stage: Stage|Phase|Rounds
10
10
  # e.g.
@@ -14,6 +14,10 @@ module Matcher
14
14
  match_xxx_for_country( name, 'teams', &blk )
15
15
  end
16
16
 
17
+ def match_clubs_for_country( name, &blk )
18
+ match_xxx_for_country( name, 'clubs', &blk )
19
+ end
20
+
17
21
  def match_tracks_for_country( name, &blk )
18
22
  match_xxx_for_country( name, 'tracks', &blk )
19
23
  end
@@ -90,7 +90,7 @@ class Reader
90
90
  elsif name =~ /^skiers/ # e.g. skiers.men.txt in ski.db
91
91
  reader = PersonDb::PersonReader.new( include_path )
92
92
  reader.read( name )
93
- elsif name =~ /^teams/ # e.g. teams.txt in formula1.db
93
+ elsif name =~ /^teams/ # e.g. teams.txt in formula1.db ### fix: check if used for football ? - add clubs
94
94
  reader = TeamReader.new( include_path )
95
95
  reader.read( name )
96
96
  elsif name =~ /\/races/ # e.g. 2013/races.txt in formula1.db
@@ -124,12 +124,22 @@ class Reader
124
124
  elsif name =~ /\/squads/ || name =~ /\/rosters/ # e.g. 2013/squads.txt in formula1.db
125
125
  reader = RaceTeamReader.new( include_path )
126
126
  reader.read( name )
127
+
128
+
129
+ ## fix!!! - find a better unique pattern to generic???
130
+ ##
131
+ ## fix: use two routes/tracks/modes:
132
+ ##
133
+ ## races w/ records etc and teams/matches etc. split into two to make code easier to read/extend!!!
134
+ ##
127
135
  elsif name =~ /\/([0-9]{2})-/
128
136
  race_pos = $1.to_i
129
137
  # NB: assume @event is set from previous load
130
138
  race = Race.find_by_event_id_and_pos( @event.id, race_pos )
131
139
  reader = RecordReader.new( include_path )
132
140
  reader.read( name, race_id: race.id ) # e.g. 2013/04-gp-monaco.txt in formula1.db
141
+
142
+
133
143
  elsif name =~ /(?:^|\/)seasons/ # NB: ^seasons or also possible at-austria!/seasons
134
144
  reader = SeasonReader.new( include_path )
135
145
  reader.read( name )
@@ -156,13 +166,25 @@ class Reader
156
166
  # e.g. at/teams at/teams.2 de/teams etc.
157
167
  country = Country.find_by_key!( country_key )
158
168
  reader = TeamReader.new( include_path )
159
- reader.read( name, club: true, country_id: country.id )
169
+ reader.read( name, club: true, country_id: country.id ) ## fix: club flag - do NOT set - why? why not?
170
+ end
171
+ elsif match_clubs_for_country( name ) do |country_key| # name =~ /^([a-z]{2})\/clubs/
172
+ # auto-add country code (from folder structure) for country-specific clubs
173
+ # e.g. at/teams at/teams.2 de/teams etc.
174
+ country = Country.find_by_key!( country_key )
175
+ reader = TeamReader.new( include_path )
176
+ reader.read( name, club: true, country_id: country.id ) ## note: always sets club flag to true
160
177
  end
161
- elsif name =~ /(?:^|\/)teams/
178
+ elsif name =~ /(?:^|\/)teams/ ## fix: check if teams rule above (e.g. /^teams/ )conflicts/matches first ???
162
179
  reader = TeamReader.new( include_path )
163
- reader.read( name, club: is_club_fixture?( name ) )
164
- elsif name =~ /\/(\d{4}|\d{4}_\d{2})(--[^\/]+)?\// ||
165
- name =~ /\/(\d{4}|\d{4}_\d{2})$/
180
+ reader.read( name, club: is_club_fixture?( name ) ) ## fix: cleanup - use is_club_fixture? still needed w/ new clubs in name?
181
+ elsif name =~ /(?:^|\/)clubs/
182
+ reader = TeamReader.new( include_path )
183
+ reader.read( name, club: true ) ## note: always sets club flag to true
184
+ elsif name =~ /\/(\d{4}|\d{4}[_\-]\d{2})(--[^\/]+)?\// ||
185
+ name =~ /\/(\d{4}|\d{4}[_\-]\d{2})$/
186
+
187
+ # note: allow 2013_14 or 2013-14 (that, is dash or underscore)
166
188
 
167
189
  # note: keep a "public" reference of last event in @event - e.g. used/required by squads etc.
168
190
  eventreader = EventReader.new( include_path )
@@ -1,6 +1,6 @@
1
1
 
2
2
  module SportDb
3
- VERSION = '1.9.3'
3
+ VERSION = '1.9.4'
4
4
  end
5
5
 
6
6
 
metadata CHANGED
@@ -1,148 +1,183 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
5
- prerelease:
4
+ version: 1.9.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Gerald Bauer
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-30 00:00:00.000000000 Z
11
+ date: 2014-07-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: props
16
- requirement: &77222090 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *77222090
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: logutils
27
- requirement: &77221830 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ! '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *77221830
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: textutils
38
- requirement: &77221580 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
45
  - - ! '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *77221580
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: worlddb
49
- requirement: &77221170 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 2.0.2
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *77221170
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 2.0.2
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: tagutils
60
- requirement: &77220840 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
73
  - - ! '>='
64
74
  - !ruby/object:Gem::Version
65
75
  version: '0'
66
76
  type: :runtime
67
77
  prerelease: false
68
- version_requirements: *77220840
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: persondb
71
- requirement: &77220610 !ruby/object:Gem::Requirement
72
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
73
86
  requirements:
74
87
  - - ! '>='
75
88
  - !ruby/object:Gem::Version
76
89
  version: '0'
77
90
  type: :runtime
78
91
  prerelease: false
79
- version_requirements: *77220610
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
80
97
  - !ruby/object:Gem::Dependency
81
98
  name: activerecord-utils
82
- requirement: &77220380 !ruby/object:Gem::Requirement
83
- none: false
99
+ requirement: !ruby/object:Gem::Requirement
84
100
  requirements:
85
101
  - - ! '>='
86
102
  - !ruby/object:Gem::Version
87
103
  version: '0'
88
104
  type: :runtime
89
105
  prerelease: false
90
- version_requirements: *77220380
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
91
111
  - !ruby/object:Gem::Dependency
92
112
  name: fetcher
93
- requirement: &77220110 !ruby/object:Gem::Requirement
94
- none: false
113
+ requirement: !ruby/object:Gem::Requirement
95
114
  requirements:
96
115
  - - ! '>='
97
116
  - !ruby/object:Gem::Version
98
117
  version: '0.3'
99
118
  type: :runtime
100
119
  prerelease: false
101
- version_requirements: *77220110
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0.3'
102
125
  - !ruby/object:Gem::Dependency
103
126
  name: gli
104
- requirement: &77219890 !ruby/object:Gem::Requirement
105
- none: false
127
+ requirement: !ruby/object:Gem::Requirement
106
128
  requirements:
107
129
  - - ! '>='
108
130
  - !ruby/object:Gem::Version
109
131
  version: 2.5.6
110
132
  type: :runtime
111
133
  prerelease: false
112
- version_requirements: *77219890
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: 2.5.6
113
139
  - !ruby/object:Gem::Dependency
114
140
  name: activerecord
115
- requirement: &77219700 !ruby/object:Gem::Requirement
116
- none: false
141
+ requirement: !ruby/object:Gem::Requirement
117
142
  requirements:
118
143
  - - ! '>='
119
144
  - !ruby/object:Gem::Version
120
145
  version: '0'
121
146
  type: :runtime
122
147
  prerelease: false
123
- version_requirements: *77219700
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
124
153
  - !ruby/object:Gem::Dependency
125
154
  name: rdoc
126
- requirement: &77219450 !ruby/object:Gem::Requirement
127
- none: false
155
+ requirement: !ruby/object:Gem::Requirement
128
156
  requirements:
129
157
  - - ~>
130
158
  - !ruby/object:Gem::Version
131
159
  version: '4.0'
132
160
  type: :development
133
161
  prerelease: false
134
- version_requirements: *77219450
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ~>
165
+ - !ruby/object:Gem::Version
166
+ version: '4.0'
135
167
  - !ruby/object:Gem::Dependency
136
168
  name: hoe
137
- requirement: &77219100 !ruby/object:Gem::Requirement
138
- none: false
169
+ requirement: !ruby/object:Gem::Requirement
139
170
  requirements:
140
171
  - - ~>
141
172
  - !ruby/object:Gem::Version
142
- version: '3.11'
173
+ version: '3.10'
143
174
  type: :development
144
175
  prerelease: false
145
- version_requirements: *77219100
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: '3.10'
146
181
  description: sportdb - sport.db command line tool
147
182
  email: opensport@googlegroups.com
148
183
  executables:
@@ -318,6 +353,7 @@ files:
318
353
  homepage: https://github.com/sportdb/sport.db.ruby
319
354
  licenses:
320
355
  - Public Domain
356
+ metadata: {}
321
357
  post_install_message: ! '******************************************************************************
322
358
 
323
359
 
@@ -335,38 +371,36 @@ rdoc_options:
335
371
  require_paths:
336
372
  - lib
337
373
  required_ruby_version: !ruby/object:Gem::Requirement
338
- none: false
339
374
  requirements:
340
375
  - - ! '>='
341
376
  - !ruby/object:Gem::Version
342
377
  version: 1.9.2
343
378
  required_rubygems_version: !ruby/object:Gem::Requirement
344
- none: false
345
379
  requirements:
346
380
  - - ! '>='
347
381
  - !ruby/object:Gem::Version
348
382
  version: '0'
349
383
  requirements: []
350
384
  rubyforge_project:
351
- rubygems_version: 1.8.17
385
+ rubygems_version: 2.1.10
352
386
  signing_key:
353
- specification_version: 3
387
+ specification_version: 4
354
388
  summary: sportdb - sport.db command line tool
355
389
  test_files:
390
+ - test/test_assoc_reader.rb
391
+ - test/test_changes.rb
392
+ - test/test_cursor.rb
356
393
  - test/test_date.rb
394
+ - test/test_goals.rb
357
395
  - test/test_lang.rb
358
396
  - test/test_load.rb
359
- - test/test_cursor.rb
360
- - test/test_standings.rb
361
- - test/test_scores.rb
362
- - test/test_winner.rb
363
- - test/test_round_def.rb
364
- - test/test_utils.rb
365
- - test/test_squad_reader.rb
397
+ - test/test_reader.rb
366
398
  - test/test_reader_from_string.rb
367
- - test/test_round_header.rb
368
399
  - test/test_round_auto.rb
369
- - test/test_goals.rb
370
- - test/test_reader.rb
371
- - test/test_assoc_reader.rb
372
- - test/test_changes.rb
400
+ - test/test_round_def.rb
401
+ - test/test_round_header.rb
402
+ - test/test_scores.rb
403
+ - test/test_squad_reader.rb
404
+ - test/test_standings.rb
405
+ - test/test_utils.rb
406
+ - test/test_winner.rb