sportdb-admin 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Manifest.txt +37 -0
- data/README.md +1 -1
- data/app/assets/javascripts/sport_db_admin/application.js +15 -0
- data/app/assets/stylesheets/sport_db_admin/application.css.scss +141 -0
- data/app/controllers/sport_db_admin/application_controller.rb +6 -0
- data/app/controllers/sport_db_admin/countries_controller.rb +25 -0
- data/app/controllers/sport_db_admin/events_controller.rb +25 -0
- data/app/controllers/sport_db_admin/games_controller.rb +36 -0
- data/app/controllers/sport_db_admin/pages_controller.rb +13 -0
- data/app/controllers/sport_db_admin/regions_controller.rb +16 -0
- data/app/controllers/sport_db_admin/rounds_controller.rb +15 -0
- data/app/controllers/sport_db_admin/teams_controller.rb +49 -0
- data/app/helpers/sport_db_admin/application_helper.rb +50 -0
- data/app/helpers/sport_db_admin/part_helper.rb +47 -0
- data/app/helpers/sport_db_admin/routes_helper.rb +23 -0
- data/app/views/layouts/sport_db_admin/application.html.erb +36 -0
- data/app/views/sport_db_admin/countries/index.html.erb +49 -0
- data/app/views/sport_db_admin/countries/show.html.erb +107 -0
- data/app/views/sport_db_admin/events/index.html.erb +32 -0
- data/app/views/sport_db_admin/events/show.html.erb +116 -0
- data/app/views/sport_db_admin/games/_games.html.erb +47 -0
- data/app/views/sport_db_admin/games/index.html.erb +22 -0
- data/app/views/sport_db_admin/pages/about.html.erb +51 -0
- data/app/views/sport_db_admin/pages/index.html.erb +2 -0
- data/app/views/sport_db_admin/regions/index.html.erb +54 -0
- data/app/views/sport_db_admin/rounds/index.html.erb +50 -0
- data/app/views/sport_db_admin/shared/_td_game_date.html.erb +4 -0
- data/app/views/sport_db_admin/shared/_td_game_debug.html.erb +7 -0
- data/app/views/sport_db_admin/shared/_td_game_flags.html.erb +13 -0
- data/app/views/sport_db_admin/shared/_td_game_round.html.erb +9 -0
- data/app/views/sport_db_admin/shared/_td_game_score.html.erb +3 -0
- data/app/views/sport_db_admin/shared/_td_game_team1.html.erb +21 -0
- data/app/views/sport_db_admin/shared/_td_game_team2.html.erb +19 -0
- data/app/views/sport_db_admin/shared/_team_world_tree.html.erb +16 -0
- data/app/views/sport_db_admin/teams/index.html.erb +7 -0
- data/app/views/sport_db_admin/teams/index_clubs.html.erb +49 -0
- data/app/views/sport_db_admin/teams/index_national_teams.html.erb +45 -0
- data/app/views/sport_db_admin/teams/show.html.erb +50 -0
- data/config/routes.rb +68 -0
- data/lib/sportdb/admin.rb +12 -1
- data/lib/sportdb/admin/version.rb +1 -1
- metadata +58 -15
data/config/routes.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
|
2
|
+
puts "[boot] routes.rb - before SportDbAdmin::Engine.routes.draw"
|
3
|
+
|
4
|
+
SportDbAdmin::Engine.routes.draw do
|
5
|
+
|
6
|
+
puts "[boot] routes.rb - enter SportDbAdmin::Engine.routes.draw"
|
7
|
+
|
8
|
+
match 'about', :to => 'pages#about'
|
9
|
+
|
10
|
+
|
11
|
+
match 'clubs', :to => 'teams#index_clubs', :as => 'clubs'
|
12
|
+
match 'national_teams', :to => 'teams#index_national_teams', :as => 'national_teams'
|
13
|
+
|
14
|
+
resources :countries
|
15
|
+
resources :regions
|
16
|
+
resources :rounds
|
17
|
+
resources :events
|
18
|
+
resources :teams
|
19
|
+
resources :games do
|
20
|
+
get 'past', :on => :collection
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
#######################
|
25
|
+
# add shortcut routing (friendly urls)
|
26
|
+
#
|
27
|
+
# two letters (e.g. at,mx,us) assume country (fix!! az for Alkmaar in nl)
|
28
|
+
# - do NOT allow two letter keys
|
29
|
+
#
|
30
|
+
#
|
31
|
+
# short-cut [a-z]+[0-9.\]+ for event
|
32
|
+
# - NOT team keys can NOT contain numbers
|
33
|
+
#
|
34
|
+
# more than three letters for now assume
|
35
|
+
# team page
|
36
|
+
|
37
|
+
|
38
|
+
###################
|
39
|
+
# - nb: event key must contain dots
|
40
|
+
# todo/todo:
|
41
|
+
#
|
42
|
+
# todo: allow multiple shortcuts for years e.g. de1 -> bundesliga current/last season
|
43
|
+
# euro2012 or euro12 12->2012 de12 -> bundesliga 11/12
|
44
|
+
#
|
45
|
+
# shortcut -- 3+ letters (w/ digits w/ dots) - assume shortcut for event
|
46
|
+
#
|
47
|
+
# NB: for now -> must end with .2012 or .2012_13 etc.
|
48
|
+
match '/:key', :to => 'events#shortcut', :as => :short_event_worker, :key => /.+\.[0-9_]+/
|
49
|
+
|
50
|
+
####
|
51
|
+
# shortcut -- 3+ lower case letters (w/o digits) - assume shortcut for team
|
52
|
+
# nb: do NOT use team keys like az with only two lower case letters; always use at least three minimum
|
53
|
+
match '/:key', :to => 'teams#shortcut', :as => :short_team_worker, :key => /[a-z]{3,}/
|
54
|
+
|
55
|
+
|
56
|
+
####
|
57
|
+
# shortcut -- 2 lower case letters - assume shortcut for country
|
58
|
+
match '/:key', :to => 'countries#shortcut', :as => :short_country_worker, :key => /[a-z]{2}/
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
root :to => 'games#index'
|
63
|
+
|
64
|
+
puts "[boot] routes.rb - leave SportDbAdmin::Engine.routes.draw"
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
puts "[boot] routes.rb - after SportDbAdmin::Engine.routes.draw"
|
data/lib/sportdb/admin.rb
CHANGED
@@ -4,6 +4,17 @@ require 'sportdb/admin/engine'
|
|
4
4
|
|
5
5
|
module SportDbAdmin
|
6
6
|
|
7
|
-
|
7
|
+
def self.banner
|
8
|
+
"sportdb-admin #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
9
|
+
end
|
10
|
+
|
11
|
+
## cut off folders lib(#1)/sportdb(#2) to get to root
|
12
|
+
def self.root
|
13
|
+
"#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
|
14
|
+
end
|
8
15
|
|
9
16
|
end
|
17
|
+
|
18
|
+
|
19
|
+
# say hello
|
20
|
+
puts SportDbAdmin.banner
|
metadata
CHANGED
@@ -1,55 +1,100 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Gerald Bauer
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-17 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rdoc
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '4.0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: hoe
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: '3.
|
33
|
+
version: '3.6'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.6'
|
36
41
|
description: sportdb admin addon - rails engine
|
37
42
|
email: opensport@googlegroups.com
|
38
43
|
executables: []
|
39
44
|
extensions: []
|
40
45
|
extra_rdoc_files:
|
46
|
+
- History.md
|
41
47
|
- Manifest.txt
|
48
|
+
- README.md
|
42
49
|
files:
|
43
50
|
- History.md
|
44
51
|
- Manifest.txt
|
45
52
|
- README.md
|
46
53
|
- Rakefile
|
54
|
+
- app/assets/javascripts/sport_db_admin/application.js
|
55
|
+
- app/assets/stylesheets/sport_db_admin/application.css.scss
|
56
|
+
- app/controllers/sport_db_admin/application_controller.rb
|
57
|
+
- app/controllers/sport_db_admin/countries_controller.rb
|
58
|
+
- app/controllers/sport_db_admin/events_controller.rb
|
59
|
+
- app/controllers/sport_db_admin/games_controller.rb
|
60
|
+
- app/controllers/sport_db_admin/pages_controller.rb
|
61
|
+
- app/controllers/sport_db_admin/regions_controller.rb
|
62
|
+
- app/controllers/sport_db_admin/rounds_controller.rb
|
63
|
+
- app/controllers/sport_db_admin/teams_controller.rb
|
64
|
+
- app/helpers/sport_db_admin/application_helper.rb
|
65
|
+
- app/helpers/sport_db_admin/part_helper.rb
|
66
|
+
- app/helpers/sport_db_admin/routes_helper.rb
|
67
|
+
- app/views/layouts/sport_db_admin/application.html.erb
|
68
|
+
- app/views/sport_db_admin/countries/index.html.erb
|
69
|
+
- app/views/sport_db_admin/countries/show.html.erb
|
70
|
+
- app/views/sport_db_admin/events/index.html.erb
|
71
|
+
- app/views/sport_db_admin/events/show.html.erb
|
72
|
+
- app/views/sport_db_admin/games/_games.html.erb
|
73
|
+
- app/views/sport_db_admin/games/index.html.erb
|
74
|
+
- app/views/sport_db_admin/pages/about.html.erb
|
75
|
+
- app/views/sport_db_admin/pages/index.html.erb
|
76
|
+
- app/views/sport_db_admin/regions/index.html.erb
|
77
|
+
- app/views/sport_db_admin/rounds/index.html.erb
|
78
|
+
- app/views/sport_db_admin/shared/_td_game_date.html.erb
|
79
|
+
- app/views/sport_db_admin/shared/_td_game_debug.html.erb
|
80
|
+
- app/views/sport_db_admin/shared/_td_game_flags.html.erb
|
81
|
+
- app/views/sport_db_admin/shared/_td_game_round.html.erb
|
82
|
+
- app/views/sport_db_admin/shared/_td_game_score.html.erb
|
83
|
+
- app/views/sport_db_admin/shared/_td_game_team1.html.erb
|
84
|
+
- app/views/sport_db_admin/shared/_td_game_team2.html.erb
|
85
|
+
- app/views/sport_db_admin/shared/_team_world_tree.html.erb
|
86
|
+
- app/views/sport_db_admin/teams/index.html.erb
|
87
|
+
- app/views/sport_db_admin/teams/index_clubs.html.erb
|
88
|
+
- app/views/sport_db_admin/teams/index_national_teams.html.erb
|
89
|
+
- app/views/sport_db_admin/teams/show.html.erb
|
90
|
+
- config/routes.rb
|
47
91
|
- lib/sportdb/admin.rb
|
48
92
|
- lib/sportdb/admin/engine.rb
|
49
93
|
- lib/sportdb/admin/version.rb
|
50
94
|
homepage: https://github.com/geraldb/sport.db.admin
|
51
95
|
licenses:
|
52
96
|
- Public Domain
|
97
|
+
metadata: {}
|
53
98
|
post_install_message:
|
54
99
|
rdoc_options:
|
55
100
|
- --main
|
@@ -57,21 +102,19 @@ rdoc_options:
|
|
57
102
|
require_paths:
|
58
103
|
- lib
|
59
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
105
|
requirements:
|
62
106
|
- - ! '>='
|
63
107
|
- !ruby/object:Gem::Version
|
64
108
|
version: 1.9.2
|
65
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
110
|
requirements:
|
68
111
|
- - ! '>='
|
69
112
|
- !ruby/object:Gem::Version
|
70
113
|
version: '0'
|
71
114
|
requirements: []
|
72
115
|
rubyforge_project: sportdb-admin
|
73
|
-
rubygems_version:
|
116
|
+
rubygems_version: 2.0.6
|
74
117
|
signing_key:
|
75
|
-
specification_version:
|
118
|
+
specification_version: 4
|
76
119
|
summary: sportdb admin addon - rails engine
|
77
120
|
test_files: []
|