Skip to content

Commit

Permalink
add code from sport.db; welcome
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Dec 2, 2012
1 parent cd6dd00 commit feb02e5
Show file tree
Hide file tree
Showing 33 changed files with 2,437 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Expand Up @@ -16,3 +16,15 @@ tmp
.yardoc
_yardoc
doc/


#############
# ignore komodo project files

*.kpf

###########
# ignore linked data folder (from world.db) do NOT duplicate/checkin

data
data/
21 changes: 21 additions & 0 deletions History.md
@@ -0,0 +1,21 @@
### 0.4.0 / 2012-10-16

* Add plain text fixture reader/loader
* Add --generate/g option for generating fixtures from the DB using templates

### 0.3.1 / 2012-10-14

* Move models into its own namespace, that is, SportDB::Models
* Add ActiveRecord logging for --verbose option

### 0.3.0 / 2012-10-07

* Add --delete option to delete all records

### 0.2.0 / 2012-10-06

* Add --load option for builtin fixtures

### 0.1.0 / 2012-10-06

* Everything is new. First release
82 changes: 82 additions & 0 deletions Manifest.txt
@@ -0,0 +1,82 @@
History.md
Manifest.txt
README.md
Rakefile
bin/sportdb
data/america/2011.rb
data/america/2011.txt
data/america/2011.yml
data/america/teams.txt
data/at/2011_12/bl.rb
data/at/2011_12/bl.txt
data/at/2011_12/cup.rb
data/at/2012_13/bl.rb
data/at/2012_13/bl.txt
data/at/2012_13/cup.rb
data/at/2012_13/cup.txt
data/at/badges.rb
data/at/teams.txt
data/cl/2011_12/cl.rb
data/cl/2011_12/el.rb
data/cl/2012_13/cl.rb
data/cl/badges.rb
data/cl/teams.txt
data/copa/sud_2012_13.rb
data/copa/sud_2012_13.txt
data/copa/teams.txt
data/de/2012_13/bl.rb
data/de/2012_13/bl.txt
data/de/teams.txt
data/en/2012_13/pl.rb
data/en/2012_13/pl.txt
data/en/teams.txt
data/es/teams.txt
data/euro/2008.rb
data/euro/2008.txt
data/euro/2012.rb
data/euro/2012.txt
data/euro/teams.txt
data/leagues.rb
data/mx/apertura_2012.rb
data/mx/apertura_2012.txt
data/mx/teams.txt
data/nfl/teams.rb
data/nhl/teams.txt
data/ro/l1_2012_13.rb
data/ro/teams.txt
data/seasons.rb
data/world/2010.rb
data/world/2010.txt
data/world/quali_2012_13_america.rb
data/world/quali_2012_13_america.txt
data/world/quali_2012_13_europe.rb
data/world/quali_2012_13_europe_c.txt
data/world/quali_2012_13_europe_i.txt
data/world/teams.txt
lib/sportdb.rb
lib/sportdb/cli/opts.rb
lib/sportdb/cli/runner.rb
lib/sportdb/console.rb
lib/sportdb/keys.rb
lib/sportdb/loader.rb
lib/sportdb/models/badge.rb
lib/sportdb/models/city.rb
lib/sportdb/models/country.rb
lib/sportdb/models/event.rb
lib/sportdb/models/event_team.rb
lib/sportdb/models/forward.rb
lib/sportdb/models/game.rb
lib/sportdb/models/group.rb
lib/sportdb/models/group_team.rb
lib/sportdb/models/league.rb
lib/sportdb/models/prop.rb
lib/sportdb/models/region.rb
lib/sportdb/models/round.rb
lib/sportdb/models/season.rb
lib/sportdb/models/team.rb
lib/sportdb/reader.rb
lib/sportdb/schema.rb
lib/sportdb/templater.rb
lib/sportdb/utils.rb
lib/sportdb/version.rb
templates/fixtures.rb.erb
25 changes: 22 additions & 3 deletions README.md
@@ -1,4 +1,23 @@
sport.db.ruby
=============
# sportdb

sportdb gem - Open Sports Database Schema & Command Line Tool in Ruby
sport.db Command Line Tool in Ruby

* [geraldb.github.com/sport.db](http://geraldb.github.com/sport.db)


## Usage

TBD


## Install

Just install the gem:

$ gem install sportdb


## License

The `sportdb` scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
45 changes: 45 additions & 0 deletions Rakefile
@@ -0,0 +1,45 @@
require 'hoe'
require './lib/sportdb/version.rb'

## NB: plugin (hoe-manifest) not required; just used for future testing/development
Hoe::plugin :manifest # more options for manifests (in the future; not yet)

Hoe.spec 'sportdb' do

self.version = SportDB::VERSION

self.summary = 'sportdb - sport.db command line tool'
self.description = summary

self.urls = ['https://github.com/geraldb/sport.db.ruby']

self.author = 'Gerald Bauer'
self.email = 'opensport@googlegroups.com'

# switch extension to .markdown for gihub formatting
# -- NB: auto-changed when included in manifest
# self.readme_file = 'README.md'
# self.history_file = 'History.md'

self.extra_deps = [
['activerecord', '~> 3.2'], # NB: will include activesupport,etc.
['worlddb', '~> 0.6.8']
### ['sqlite3', '~> 1.3'] # NB: install on your own; remove dependency
]

self.licenses = ['Public Domain']

self.spec_extras = {
:required_ruby_version => '>= 1.9.2'
}

self.post_install_message =<<EOS
******************************************************************************
Questions? Comments? Send them along to the mailing list.
https://groups.google.com/group/opensport
******************************************************************************
EOS

end
5 changes: 5 additions & 0 deletions bin/sportdb
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby

require 'sportdb'

SportDB.main

0 comments on commit feb02e5

Please sign in to comment.