sportdb 1.9.11 → 1.9.12

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: 68f64d57578e9dffc8a1f676e0d7771fb486e7ef
4
- data.tar.gz: 02d84695cdcb3b1fea7269db822292f9003e7305
3
+ metadata.gz: 671dd55d2764b48c749a0d00de696a89a3e9562f
4
+ data.tar.gz: cb79be8747abc47ef356a84936aa37065101fc65
5
5
  SHA512:
6
- metadata.gz: 1c1da39819f4b5921ea03598f0bce3b129e0219fdd2016ebad21626f9667ed50b0655302f8c251eda3a0c30b1c3dfbce7d113735f7db0bf9b0ae463c47a17ede
7
- data.tar.gz: d3eedae5177bb1708a60bc03267f8672e5c290707d98ceb1338b509f144d2a4a1ba51c626ae2f72b536a9eb891f95aa953123599cfb508a29585891835f38645
6
+ metadata.gz: 981bba71413fff29315186316faf673e6298931129745ab3a0b15f3929ec77e90da33ba68c4bf2e644bba19c5e1a9147f3ebdd5a0b7441003c05a6aefde50ba5
7
+ data.tar.gz: 2a8afb1afc8ac40383574e109b60411dabf3353fbaf6ad413966dc30afb2b53c3f5f5805d1a80d89a26a68fd139ecef1e21310bdce1474aec2c5fda748b4aa8e
@@ -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"
@@ -3,7 +3,7 @@ module SportDb
3
3
 
4
4
  MAJOR = 1 ## todo: namespace inside version or something - why? why not??
5
5
  MINOR = 9
6
- PATCH = 11
6
+ PATCH = 12
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
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.11
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-25 00:00:00.000000000 Z
11
+ date: 2014-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: props