stattleship-ruby 0.1.27 → 0.1.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stattleship/models/game.rb +20 -0
- data/lib/stattleship/validators/base_validator.rb +1 -1
- data/lib/stattleship/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4cb4efce7802850d0209d923e5bc6ba0cb13801
|
4
|
+
data.tar.gz: ddc94b69b37a2a2b0068304cdf4ef559fb8e2439
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d3cbad8e4bfca103133518f141609e953b5913c935e2f6c0c9d243b3b1256997c8235e9bf6b269b92ce8568498ae0dfca540cf91225a221c22fd1c9c576644e
|
7
|
+
data.tar.gz: 2b302db63ca6f7d582d8936f074b108d5287a1615c3b0334058e531def8cbb2794415e800f7714fef34e67944ffce2b3e0383cd09a0b19f5f2dc1e8806758475
|
@@ -232,6 +232,22 @@ module Stattleship
|
|
232
232
|
end
|
233
233
|
end
|
234
234
|
|
235
|
+
def top_or_bottom
|
236
|
+
if clock == ':30'
|
237
|
+
'Bottom'
|
238
|
+
else
|
239
|
+
'Top'
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
def game_clock
|
244
|
+
if sport == 'baseball'
|
245
|
+
"#{top_or_bottom} #{period.ordinalize} #{period_label}"
|
246
|
+
else
|
247
|
+
"#{clock} #{period.ordinalize} #{period_label}"
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
235
251
|
def to_sentence
|
236
252
|
"#{winning_team_name} won #{winning_score} on #{short_date}"
|
237
253
|
end
|
@@ -303,6 +319,7 @@ module Stattleship
|
|
303
319
|
:id,
|
304
320
|
:at_neutral_site,
|
305
321
|
:away_team_outcome,
|
322
|
+
:clock,
|
306
323
|
:daytime,
|
307
324
|
:home_team_outcome,
|
308
325
|
:interval,
|
@@ -310,6 +327,7 @@ module Stattleship
|
|
310
327
|
:label,
|
311
328
|
:name,
|
312
329
|
:on,
|
330
|
+
:period_label,
|
313
331
|
:score,
|
314
332
|
:scoreline,
|
315
333
|
:slug,
|
@@ -328,8 +346,10 @@ module Stattleship
|
|
328
346
|
:attendance,
|
329
347
|
:away_team_score,
|
330
348
|
:home_team_score,
|
349
|
+
:clock_secs,
|
331
350
|
:duration,
|
332
351
|
:interval_number,
|
352
|
+
:period,
|
333
353
|
:score_differential,
|
334
354
|
:temperature,
|
335
355
|
:timestamp,
|
data/lib/stattleship/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stattleship-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stattleship
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|