opensprints-core 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/opensprints-core/racer.rb +1 -1
- data/lib/opensprints-core/tournament_participation.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
@@ -6,7 +6,7 @@ class Racer < Sequel::Model
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def best_time
|
9
|
-
best =
|
9
|
+
best = self.db[:race_participations].filter(:racer_id => self.pk).order(:finish_time).select(:finish_time).first
|
10
10
|
best[:finish_time] if best
|
11
11
|
end
|
12
12
|
end
|
@@ -3,7 +3,7 @@ class TournamentParticipation < Sequel::Model
|
|
3
3
|
many_to_one :tournament
|
4
4
|
|
5
5
|
def best_time
|
6
|
-
best =
|
6
|
+
best = self.db[:race_participations].filter(:racer_id => racer.id).exclude(:finish_time => nil).join(:races, :tournament_id => tournament.id).filter(:raced => true).order(:finish_time).select(:finish_time).first
|
7
7
|
|
8
8
|
best[:finish_time] if best
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opensprints-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Farrar
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-16 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|