sportdb 1.9.11 → 1.9.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sportdb/cli/main.rb +34 -1
- data/lib/sportdb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671dd55d2764b48c749a0d00de696a89a3e9562f
|
4
|
+
data.tar.gz: cb79be8747abc47ef356a84936aa37065101fc65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 981bba71413fff29315186316faf673e6298931129745ab3a0b15f3929ec77e90da33ba68c4bf2e644bba19c5e1a9147f3ebdd5a0b7441003c05a6aefde50ba5
|
7
|
+
data.tar.gz: 2a8afb1afc8ac40383574e109b60411dabf3353fbaf6ad413966dc30afb2b53c3f5f5805d1a80d89a26a68fd139ecef1e21310bdce1474aec2c5fda748b4aa8e
|
data/lib/sportdb/cli/main.rb
CHANGED
@@ -128,12 +128,45 @@ command [:build,:b] do |c|
|
|
128
128
|
SportDb.read_builtin # e.g. seasons.txt etc
|
129
129
|
|
130
130
|
builder.read # builder step 2 - read all datasets
|
131
|
-
|
131
|
+
|
132
132
|
puts 'Done.'
|
133
133
|
end # action
|
134
134
|
end # command setup
|
135
135
|
|
136
136
|
|
137
|
+
desc "Build DB w/ quick starter Datafile templates"
|
138
|
+
arg_name 'NAME' # optional setup profile name
|
139
|
+
command [:new,:n] do |c|
|
140
|
+
|
141
|
+
c.action do |g,o,args|
|
142
|
+
|
143
|
+
## todo: required template name (defaults to worldcup2014)
|
144
|
+
setup = args[0] || 'worldcup2014'
|
145
|
+
|
146
|
+
worker = Fetcher::Worker.new
|
147
|
+
worker.copy( "https://github.com/openfootball/datafile/raw/master/#{setup}.rb", './Datafile' )
|
148
|
+
|
149
|
+
## step 2: same as command build (todo - reuse code)
|
150
|
+
builder = SportDb::Builder.load_file( './Datafile' )
|
151
|
+
builder.download # builder step 1 - download all datasets/zips
|
152
|
+
|
153
|
+
connect_to_db( opts )
|
154
|
+
|
155
|
+
LogDb.create
|
156
|
+
ConfDb.create
|
157
|
+
TagDb.create
|
158
|
+
WorldDb.create
|
159
|
+
PersonDb.create
|
160
|
+
SportDb.create
|
161
|
+
|
162
|
+
SportDb.read_builtin # e.g. seasons.txt etc
|
163
|
+
|
164
|
+
builder.read # builder step 2 - read all datasets
|
165
|
+
|
166
|
+
puts 'Done.'
|
167
|
+
end # action
|
168
|
+
end # command setup
|
169
|
+
|
137
170
|
|
138
171
|
|
139
172
|
desc "Create DB schema 'n' load all world and sports data"
|
data/lib/sportdb/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: 1.9.
|
4
|
+
version: 1.9.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|