sportdb-config 0.1.0 → 0.2.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: 57dbbed1c0fa0fe8269db547f5d91a946ef31e88
4
- data.tar.gz: cac09dc10a2f4066cca23beabf3e77826a7a4109
3
+ metadata.gz: 55fee2eb8f0f1a3d97024defcabe6d749f592172
4
+ data.tar.gz: 4ceed1be167b9688f9e2f9c7b6e0fe02ab351078
5
5
  SHA512:
6
- metadata.gz: 7f15a2cdd5ed88333c6acfa9c5416ef63eeadf1c0b7e67f2239767f3d17cbe65f16870cbea1818f331e6fbaefe368b432eb4e933b7d4c107d9553ef627345d8b
7
- data.tar.gz: bbe5c4bbef53f5ec3708d2392fa6447a6be28db560c82c74a31df2ec0a65acf2eed5207823e652bfd0cf030f504eb70c9b5e9f29c18cac44a3a2a3a9a9a8bba7
6
+ metadata.gz: d495289d9ba9f1cfe4ac5a9cc19d8d916067be3a3101e07657a80640e9ec8aa21c46c5f28bad661dd3be9846d1b91548e74b94105384eded3cbdfb95093f3917
7
+ data.tar.gz: 44d015f48b75cfd062c94797405eaa064e3265c5dd155402b946aa8ab6c4a2eba13e20ea0b287ca69a6b06864fad89e91145e9e02d2bed11083dee59d2a9a1a7
data/Manifest.txt CHANGED
@@ -11,10 +11,9 @@ lib/sportdb/config.rb
11
11
  lib/sportdb/config/config.rb
12
12
  lib/sportdb/config/league.rb
13
13
  lib/sportdb/config/league_reader.rb
14
- lib/sportdb/config/structs/team.rb
14
+ lib/sportdb/config/league_utils.rb
15
+ lib/sportdb/config/season_utils.rb
15
16
  lib/sportdb/config/team_reader.rb
16
- lib/sportdb/config/utils/league_utils.rb
17
- lib/sportdb/config/utils/season_utils.rb
18
17
  lib/sportdb/config/version.rb
19
18
  test/helper.rb
20
19
  test/test_config.rb
@@ -9,6 +9,8 @@ class TeamReader
9
9
 
10
10
  ##
11
11
  # note: use our own (internal) team struct for now - why? why not?
12
+ # - check that shape/structure/fields/attributes match
13
+ # the Team struct in sportdb-text (in SportDb::Struct::Team) !!!!
12
14
  class Team
13
15
  ## todo: use just names for alt_names - why? why not?
14
16
  attr_accessor :name, :alt_names, :year, :ground, :city
@@ -60,7 +62,7 @@ def self.parse( txt )
60
62
  puts
61
63
  puts "*** !!! WARN !!! - #{count-count_uniq} duplicate alt name(s):"
62
64
  pp last_rec
63
- ## exit 1
65
+ ## exit 1
64
66
  end
65
67
  else
66
68
  values = line.split( ',' )
@@ -7,7 +7,7 @@ module Boot ## note: use a different module than Config to avoid confusion
7
7
  ## maybe rename later gem itself to sportdb-boot - why? why not?
8
8
 
9
9
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
10
- MINOR = 1
10
+ MINOR = 2
11
11
  PATCH = 0
12
12
  VERSION = [MAJOR,MINOR,PATCH].join('.')
13
13
 
@@ -27,9 +27,10 @@ module Boot ## note: use a different module than Config to avoid confusion
27
27
  "#{root}/config"
28
28
  end
29
29
 
30
- def self.test_data_dir
31
- "#{root}/test/data"
32
- end
30
+
31
+ # def self.test_data_dir
32
+ # "#{root}/test/data"
33
+ # end
33
34
 
34
35
  end # module Boot
35
- end
36
+ end # module SportDb
@@ -11,11 +11,8 @@ require 'fileutils'
11
11
  # our own code
12
12
  require 'sportdb/config/version' # let version always go first
13
13
 
14
- require 'sportdb/config/structs/team'
15
-
16
- require 'sportdb/config/utils/season_utils'
17
- require 'sportdb/config/utils/league_utils'
18
-
14
+ require 'sportdb/config/season_utils'
15
+ require 'sportdb/config/league_utils'
19
16
  require 'sportdb/config/league'
20
17
  require 'sportdb/config/league_reader'
21
18
  require 'sportdb/config/team_reader'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportdb-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
@@ -65,10 +65,9 @@ files:
65
65
  - lib/sportdb/config/config.rb
66
66
  - lib/sportdb/config/league.rb
67
67
  - lib/sportdb/config/league_reader.rb
68
- - lib/sportdb/config/structs/team.rb
68
+ - lib/sportdb/config/league_utils.rb
69
+ - lib/sportdb/config/season_utils.rb
69
70
  - lib/sportdb/config/team_reader.rb
70
- - lib/sportdb/config/utils/league_utils.rb
71
- - lib/sportdb/config/utils/season_utils.rb
72
71
  - lib/sportdb/config/version.rb
73
72
  - test/helper.rb
74
73
  - test/test_config.rb
@@ -1,45 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module SportDb
4
- module Struct
5
-
6
-
7
-
8
- class Team
9
- attr_accessor :name,
10
- :alt_names,
11
- :city,
12
- :country
13
-
14
-
15
- ## add alias/compat - why? why not
16
- def title() @name; end
17
- def names()
18
- ary = [@name]
19
- ary += @alt_names if @alt_names
20
- ary
21
- end ## all names
22
-
23
-
24
-
25
- def initialize
26
- ## do nothing for now (use from_csv to setup data)
27
- end
28
-
29
- def self.create( **kwargs )
30
- self.new.update( kwargs )
31
- end
32
-
33
- def update( **kwargs )
34
- @name = kwargs[:name]
35
- @alt_names = kwargs[:alt_names]
36
- @city = kwargs[:city] ## use city struct - why? why not?
37
- ## todo: add country too
38
-
39
- self ## note - MUST return self for chaining
40
- end
41
- end # class Team
42
-
43
-
44
- end # module Struct
45
- end # module SportDb