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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e7920e5c728d3b9c37822b772e3638927c319f5
4
- data.tar.gz: 4addc7e1ddcfe87a2bcd27e25cd28f630e61619d
3
+ metadata.gz: e4cb4efce7802850d0209d923e5bc6ba0cb13801
4
+ data.tar.gz: ddc94b69b37a2a2b0068304cdf4ef559fb8e2439
5
5
  SHA512:
6
- metadata.gz: 6b0c09ba9fbb714353f54a727f589f6a69bc550035453bb86ba3e82bda674b4a9b9881125d037c0992c0228b7b2e39ebaacd4bae042d7f3f6b3a97beae25d37a
7
- data.tar.gz: 4037775d041090335319b976389625d4dece72574b4175c0d90f4e64ce9371267ad98367818c76542fedf010d89fce31c202aafa14e51bf0a14e8afd8346e0f3
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,
@@ -56,7 +56,7 @@ module Stattleship
56
56
  elsif blank?(sport_prefix)
57
57
  return
58
58
  else
59
- if value.start_with?("#{sport_prefix}_")
59
+ if value.start_with?("#{sport_prefix}") || value.start_with?("#{sport_prefix}_")
60
60
  return
61
61
  end
62
62
  end
@@ -1,5 +1,5 @@
1
1
  module Stattleship
2
2
  module Ruby
3
- VERSION = '0.1.27'.freeze
3
+ VERSION = '0.1.30'.freeze
4
4
  end
5
5
  end
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.27
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-03-26 00:00:00.000000000 Z
12
+ date: 2017-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable