score-formats 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fde9c3127903e7a2bcd4d631a1a286ef1b3faf5a
4
- data.tar.gz: ec30d9beb6fd14b726dbe80f549b6371e8411426
3
+ metadata.gz: 1ef82109923fdb693e95df7d2f82848e40ffde8e
4
+ data.tar.gz: 6858a51bb836ee2cfae92bd7af3a5770738f473a
5
5
  SHA512:
6
- metadata.gz: e3de1af6dd9d46f17861c31ed8a415a546f904d47a3aae525fb6ef15f169303d9edf574fe154340ee1e9cf1dfe58650e38a95e274dddc0e0ce272315a9353bde
7
- data.tar.gz: 5b760ecbaf5b5163a620a729353142af71446641535254fe0a8dd7bc4491dc4b0c7970b9a0103bb97c6a06e699f2b565623a614e5e1c68d13b905543869559a8
6
+ metadata.gz: d9d95d3ad959df4c5c1cf38592a4dad641869296bdfd1e6ebc853bf845165fa56f2f419e6dc7f4062fcdcd9f23c2b72ac2cf4261b2fe4f025f940290faff5833
7
+ data.tar.gz: 7550934439640f17f55e6e6151941f69061082bd96c90a8ce1343a90f4c7603832c2e1cfca3b139efcaa2febd56ad9f32366cbeb1c018050c92b90a9d974a3b8
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ Hoe.spec 'score-formats' do
8
8
  self.summary = "score-formats - read / parse and print sports match scores (incl. half time, full time, extra time, penalties and more)"
9
9
  self.description = summary
10
10
 
11
- self.urls = ['https://github.com/sportdb/sport.db']
11
+ self.urls = { home: 'https://github.com/sportdb/sport.db' }
12
12
 
13
13
  self.author = 'Gerald Bauer'
14
14
  self.email = 'opensport@googlegroups.com'
@@ -53,6 +53,11 @@ class Score
53
53
  def p() [@score1p, @score2p]; end ## e.g. note - starts "fresh" score from 0-0
54
54
  alias_method :pen, :p ## add alias - why? why not?
55
55
 
56
+ alias_method :full_time, :ft
57
+ alias_method :half_time, :ht
58
+ alias_method :extra_time, :et
59
+ alias_method :penalties, :p ## penalties - use a different word(ing)? why? why not?
60
+
56
61
  ## todo/check: allow one part missing why? why not?
57
62
  ## e.g. 1-nil or nil-1 - why? why not?
58
63
  def ft?() @score1 && @score2; end
@@ -61,7 +66,11 @@ class Score
61
66
  def p?() @score1p && @score2p; end
62
67
  alias_method :pen?, :p?
63
68
 
64
-
69
+ alias_method :full_time?, :ft?
70
+ alias_method :half_time?, :ht?
71
+ alias_method :extra_time?, :et?
72
+ alias_method :penalties?, :p?
73
+
65
74
 
66
75
  def initialize( *values )
67
76
  ## note: for now always assumes integers
@@ -2,7 +2,7 @@
2
2
  module ScoreFormats
3
3
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
  VERSION = [MAJOR,MINOR,PATCH].join('.')
7
7
 
8
8
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: score-formats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-24 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc