sportdb-langs 0.0.1 → 0.1.0

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: af6c5e308db1fd11a1d44df5e98a9c51a88c7d6d
4
- data.tar.gz: 6787554eeb07756da698cda8ac3d462967ea05d2
3
+ metadata.gz: dc468d78eb485c9290e234bab4d4feb388150d0b
4
+ data.tar.gz: ad8c172046d9a201f4ce89fb5db3fc0e7a5ecaee
5
5
  SHA512:
6
- metadata.gz: 05de60f164fe56f7263a0e421958a8adc6267a27ed008d3d90091cb4d887df9b3856d27f383ca5ed833bc84411b8e508c25d7fc0d9af1c6d885226376c4116a1
7
- data.tar.gz: 0fc01d52b6a37762b1a8fe00b53776302f4dd28b4598c76acd503822698ee1e93633bbcbcd7917899f13083d7891062a1477ab5fc38e5d9c21f04d23c2db119d
6
+ metadata.gz: 694eacc5beab88c50e3d9e3d5233e5d05ab8f09ff0ed1a5cfa1a5b5b0f021e2d329c24aa0061b73ac3d68965aef497775f1da6ca3162ce3ccde9f5f9845e923f
7
+ data.tar.gz: 38d98282d7f1412e57d6a7fe604702c2661c4bc0bcaaeaee2c65fc524645841e75d62ad80c5e9ddd7ab75baf11242bb19caf41686e11fa374be2b0b9c95e7b79
@@ -7,6 +7,7 @@ class Lang
7
7
  include LogUtils::Logging
8
8
 
9
9
  attr_reader :lang
10
+ attr_reader :words ## note: allow access to builtin data / word lists
10
11
 
11
12
  def initialize
12
13
  # fix/todo: load on demand; only if no fixtures loaded/configured use builtin
@@ -81,7 +82,7 @@ class Lang
81
82
 
82
83
  def build_group
83
84
  h = @words[ @lang ]
84
- values = "" # Note: always construct a new string (do NOT use a reference to hash value)
85
+ values = String.new # note: always construct a new string (do NOT use a reference to hash value)
85
86
  values << h['group']
86
87
  values
87
88
  end
@@ -93,7 +94,7 @@ class Lang
93
94
  ## sort by length first - to allow best match e.g.
94
95
  ## 3rd place play-off instead of Play-off ?? etc. - why? why not?
95
96
  h = @words[ @lang ]
96
- values = "" # NB: always construct a new string (do NOT use a reference to hash value)
97
+ values = String.new # note: always construct a new string (do NOT use a reference to hash value)
97
98
  values << h['round']
98
99
 
99
100
  ### add knockout rounds values too
@@ -110,21 +111,21 @@ class Lang
110
111
 
111
112
  def build_leg1
112
113
  h = @words[ @lang ]
113
- values = "" # NB: always construct a new string (do NOT use a reference to hash value)
114
+ values = String.new # note: always construct a new string (do NOT use a reference to hash value)
114
115
  values << h['leg1']
115
116
  values
116
117
  end
117
118
 
118
119
  def build_leg2
119
120
  h = @words[ @lang ]
120
- values = "" # NB: always construct a new string (do NOT use a reference to hash value)
121
+ values = String.new # note: always construct a new string (do NOT use a reference to hash value)
121
122
  values << h['leg2']
122
123
  values
123
124
  end
124
125
 
125
126
  def build_knockout_round
126
127
  h = @words[ @lang ]
127
- values = "" # NB: always construct a new string (do NOT use a reference to hash value)
128
+ values = String.new # note: always construct a new string (do NOT use a reference to hash value)
128
129
  values << h['round32']
129
130
  values << "|" << h['round16']
130
131
  values << "|" << h['quarterfinals']
@@ -5,8 +5,8 @@ module SportDb
5
5
  module Langs ## note: we use Langs with s (plular)
6
6
 
7
7
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
8
- MINOR = 0
9
- PATCH = 1
8
+ MINOR = 1
9
+ PATCH = 0
10
10
  VERSION = [MAJOR,MINOR,PATCH].join('.')
11
11
 
12
12
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportdb-langs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2020-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logutils