sportdb 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/sportdb/cli/main.rb +23 -0
- data/lib/sportdb/cli/opts.rb +10 -0
- data/lib/sportdb/cli/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0abc35fb1d3dbb732804349eeec3c26a6dc63d99
|
4
|
+
data.tar.gz: 6e7338d3c6d9b8765e42dcbbac64b418d1761d6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 458d9011e99e6abbe78ae1d9448f9175c2057a4cf7869ce66f50aeb8572157ff64721f21d318ddcee64d6917bf5dfeac4ec045b50d4e5ec95fb0abe74aebcefb
|
7
|
+
data.tar.gz: edfbbb41911d7ad3687381a8d5471ce3c7f289cdf03ed95ea7098519253b3c3ee0b493c920874165a601df272d60f9ae3ff57dc89dce8bf5cbb5474ed64b3c56
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ Hoe.spec 'sportdb' do
|
|
20
20
|
self.history_file = 'CHANGELOG.md'
|
21
21
|
|
22
22
|
self.extra_deps = [
|
23
|
-
['sportdb-readers', '>= 1.
|
23
|
+
['sportdb-readers', '>= 1.1.2'],
|
24
24
|
|
25
25
|
['fetcher', '>= 0.4.5'], ## check if included already in datafil ??
|
26
26
|
['datafile', '>= 0.3.1'],
|
data/lib/sportdb/cli/main.rb
CHANGED
@@ -65,6 +65,17 @@ arg_name 'FILE'
|
|
65
65
|
default_value opts.datafile
|
66
66
|
flag [:f, :datafile]
|
67
67
|
|
68
|
+
desc 'Leagues dir'
|
69
|
+
arg_name 'PATH'
|
70
|
+
default_value nil
|
71
|
+
flag [:'leagues-dir', :leaguesdir]
|
72
|
+
|
73
|
+
desc 'Clubs dir'
|
74
|
+
arg_name 'PATH'
|
75
|
+
default_value nil
|
76
|
+
flag [:'clubs-dir', :clubsdir]
|
77
|
+
|
78
|
+
|
68
79
|
|
69
80
|
desc '(Debug) Show debug messages'
|
70
81
|
switch [:verbose], negatable: false ## todo: use -w for short form? check ruby interpreter if in use too?
|
@@ -304,6 +315,18 @@ pre do |g,c,o,args|
|
|
304
315
|
LogUtils::Logger.root.level = :debug
|
305
316
|
end
|
306
317
|
|
318
|
+
|
319
|
+
if opts.clubs_dir?
|
320
|
+
puts " setting clubs_dir to >#{opts.clubs_dir}<"
|
321
|
+
SportDb::Import.config.clubs_dir = opts.clubs_dir
|
322
|
+
end
|
323
|
+
|
324
|
+
if opts.leagues_dir?
|
325
|
+
puts " setting leagues_dir to >#{opts.leagues_dir}<"
|
326
|
+
SportDb::Import.config.leagues_dir = opts.leagues_dir
|
327
|
+
end
|
328
|
+
|
329
|
+
|
307
330
|
logger.debug "Executing #{c.name}"
|
308
331
|
true
|
309
332
|
end
|
data/lib/sportdb/cli/opts.rb
CHANGED
@@ -10,6 +10,9 @@ class Opts
|
|
10
10
|
@datafile = options[:datafile] if options[:datafile].present?
|
11
11
|
|
12
12
|
@verbose = true if options[:verbose] == true
|
13
|
+
|
14
|
+
@leagues_dir = options[:'leagues-dir'] if options[:'leagues-dir'].present?
|
15
|
+
@clubs_dir = options[:'clubs-dir'] if options[:'clubs-dir'].present?
|
13
16
|
end
|
14
17
|
|
15
18
|
|
@@ -28,6 +31,13 @@ class Opts
|
|
28
31
|
|
29
32
|
def datafile() @datafile || './Datafile'; end
|
30
33
|
def datafile?() @datafile; end ## note: let's you check if datafile is set (or "untouched")
|
34
|
+
|
35
|
+
|
36
|
+
def clubs_dir() @clubs_dir; end
|
37
|
+
def clubs_dir?() @clubs_dir.nil? == false; end ## note: let's you check if clubs_dir set (by default it's NOT set)
|
38
|
+
|
39
|
+
def leagues_dir() @leagues_dir; end
|
40
|
+
def leagues_dir?() @leagues_dir.nil? == false; end
|
31
41
|
end # class Opts
|
32
42
|
|
33
43
|
end # module SportDb
|
data/lib/sportdb/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.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-
|
11
|
+
date: 2020-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sportdb-readers
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.1.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: fetcher
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|