tournament 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +15 -0
- data/Manifest.txt +241 -2
- data/README.txt +152 -12
- data/Rakefile +9 -6
- data/bin/benchmark_pool +0 -0
- data/bin/gui.rb +3 -1
- data/bin/picker +0 -0
- data/bin/pool +139 -15
- data/lib/tournament/bracket.rb +33 -50
- data/lib/tournament/entry.rb +3 -0
- data/lib/tournament/pool.rb +144 -93
- data/lib/tournament/scoring_strategy.rb +69 -0
- data/lib/tournament/webgui_installer.rb +109 -0
- data/tasks/ann.rake +19 -14
- data/tasks/bones.rake +6 -25
- data/tasks/gem.rake +46 -36
- data/tasks/git.rake +41 -0
- data/tasks/jamis.rb +589 -0
- data/tasks/notes.rake +28 -0
- data/tasks/post_load.rake +18 -11
- data/tasks/{doc.rake → rdoc.rake} +12 -9
- data/tasks/rubyforge.rake +12 -12
- data/tasks/setup.rb +121 -80
- data/tasks/spec.rake +12 -13
- data/tasks/svn.rake +15 -11
- data/tasks/test.rake +6 -6
- data/test/test_tournament.rb +8 -0
- data/test/test_webgui_installer.rb +64 -0
- data/webgui/README +256 -0
- data/webgui/Rakefile +10 -0
- data/webgui/app/controllers/admin_controller.rb +61 -0
- data/webgui/app/controllers/application.rb +25 -0
- data/webgui/app/controllers/entry_controller.rb +97 -0
- data/webgui/app/controllers/pool_controller.rb +4 -0
- data/webgui/app/controllers/reports_controller.rb +7 -0
- data/webgui/app/controllers/sessions_controller.rb +43 -0
- data/webgui/app/controllers/teams_controller.rb +75 -0
- data/webgui/app/controllers/users_controller.rb +57 -0
- data/webgui/app/helpers/admin_helper.rb +2 -0
- data/webgui/app/helpers/application_helper.rb +3 -0
- data/webgui/app/helpers/entry_helper.rb +2 -0
- data/webgui/app/helpers/pool_helper.rb +2 -0
- data/webgui/app/helpers/reports_helper.rb +2 -0
- data/webgui/app/helpers/sessions_helper.rb +2 -0
- data/webgui/app/helpers/teams_helper.rb +2 -0
- data/webgui/app/helpers/users_helper.rb +93 -0
- data/webgui/app/models/entry.rb +42 -0
- data/webgui/app/models/pool.rb +141 -0
- data/webgui/app/models/region.rb +3 -0
- data/webgui/app/models/role.rb +4 -0
- data/webgui/app/models/seeding.rb +4 -0
- data/webgui/app/models/team.rb +6 -0
- data/webgui/app/models/user.rb +98 -0
- data/webgui/app/models/user_mailer.rb +25 -0
- data/webgui/app/views/admin/bracket.html.erb +3 -0
- data/webgui/app/views/admin/entries.html.erb +25 -0
- data/webgui/app/views/admin/index.html.erb +17 -0
- data/webgui/app/views/admin/pool.html.erb +53 -0
- data/webgui/app/views/entry/index.html.erb +16 -0
- data/webgui/app/views/entry/print.erb +1 -0
- data/webgui/app/views/entry/print.html.erb +1 -0
- data/webgui/app/views/entry/show.html.erb +1 -0
- data/webgui/app/views/layouts/bracket.html.erb +37 -0
- data/webgui/app/views/layouts/default.html.erb +62 -0
- data/webgui/app/views/layouts/print.html.erb +12 -0
- data/webgui/app/views/layouts/report.html.erb +38 -0
- data/webgui/app/views/pool/index.html.erb +36 -0
- data/webgui/app/views/reports/_report.html.erb +11 -0
- data/webgui/app/views/reports/show.html.erb +12 -0
- data/webgui/app/views/sessions/new.html.erb +21 -0
- data/webgui/app/views/shared/_admins.html.erb +8 -0
- data/webgui/app/views/shared/_bracket.html.erb +1296 -0
- data/webgui/app/views/teams/choose.html.erb +57 -0
- data/webgui/app/views/user_mailer/activation.erb +3 -0
- data/webgui/app/views/user_mailer/signup_notification.erb +8 -0
- data/webgui/app/views/users/_user_bar.html.erb +8 -0
- data/webgui/app/views/users/new.html.erb +19 -0
- data/webgui/config/boot.rb +109 -0
- data/webgui/config/database.yml +22 -0
- data/webgui/config/environment.rb +78 -0
- data/webgui/config/environments/development.rb +29 -0
- data/webgui/config/environments/production.rb +24 -0
- data/webgui/config/environments/test.rb +22 -0
- data/webgui/config/initializers/inflections.rb +10 -0
- data/webgui/config/initializers/mime_types.rb +5 -0
- data/webgui/config/initializers/new_rails_defaults.rb +17 -0
- data/webgui/config/initializers/pool.rb +33 -0
- data/webgui/config/initializers/site_keys.rb +38 -0
- data/webgui/config/locales/en.yml +5 -0
- data/webgui/config/routes.rb +56 -0
- data/webgui/db/development.sqlite3 +0 -0
- data/webgui/db/migrate/20090216015836_create_entries.rb +13 -0
- data/webgui/db/migrate/20090217001611_add_tie_break_to_entry.rb +9 -0
- data/webgui/db/migrate/20090217004039_create_users.rb +23 -0
- data/webgui/db/migrate/20090217014940_relate_entry_and_user.rb +10 -0
- data/webgui/db/migrate/20090218024350_create_roles.rb +17 -0
- data/webgui/db/migrate/20090218024657_add_postition_to_roles.rb +9 -0
- data/webgui/db/migrate/20090218025240_add_admin_role.rb +10 -0
- data/webgui/db/migrate/20090225022928_create_pools.rb +16 -0
- data/webgui/db/migrate/20090225030346_associate_pool_and_entry.rb +9 -0
- data/webgui/db/migrate/20090225072358_change_pool_data_column.rb +9 -0
- data/webgui/db/migrate/20090225072849_add_completed_to_entries.rb +9 -0
- data/webgui/db/migrate/20090225074149_add_pool_id_index_to_entries.rb +9 -0
- data/webgui/db/migrate/20090225084414_add_user_id_to_pool.rb +9 -0
- data/webgui/db/migrate/20090226021913_add_active_to_pools.rb +9 -0
- data/webgui/db/migrate/20090226142240_rename_bracket_column_to_data.rb +9 -0
- data/webgui/db/migrate/20090301014710_create_teams.rb +84 -0
- data/webgui/db/migrate/20090301025902_add_more_teams.rb +16 -0
- data/webgui/db/migrate/20090301041526_create_seedings.rb +16 -0
- data/webgui/db/migrate/20090301090511_create_regions.rb +14 -0
- data/webgui/db/migrate/teams.txt +347 -0
- data/webgui/db/pool.yml +408 -0
- data/webgui/db/schema.rb +91 -0
- data/webgui/db/test.sqlite3 +0 -0
- data/webgui/doc/README_FOR_APP +5 -0
- data/webgui/lib/authenticated_system.rb +189 -0
- data/webgui/lib/authenticated_test_helper.rb +11 -0
- data/webgui/lib/form_object.rb +70 -0
- data/webgui/lib/pdf_helper.rb +47 -0
- data/webgui/lib/prince.rb +74 -0
- data/webgui/lib/saves_picks.rb +23 -0
- data/webgui/lib/tasks/admin.rake +10 -0
- data/webgui/public/404.html +30 -0
- data/webgui/public/422.html +30 -0
- data/webgui/public/500.html +33 -0
- data/webgui/public/dispatch.cgi +10 -0
- data/webgui/public/dispatch.fcgi +24 -0
- data/webgui/public/dispatch.rb +10 -0
- data/webgui/public/favicon.ico +0 -0
- data/webgui/public/images/2009FinalFour.png +0 -0
- data/webgui/public/images/rails.png +0 -0
- data/webgui/public/javascripts/application.js +2 -0
- data/webgui/public/javascripts/bracket.js +73 -0
- data/webgui/public/javascripts/controls.js +963 -0
- data/webgui/public/javascripts/dragdrop.js +973 -0
- data/webgui/public/javascripts/effects.js +1128 -0
- data/webgui/public/javascripts/prototype.js +4320 -0
- data/webgui/public/robots.txt +5 -0
- data/webgui/public/stylesheets/bracket-print.css +39 -0
- data/webgui/public/stylesheets/bracket.css +125 -0
- data/webgui/public/stylesheets/main.css +144 -0
- data/webgui/public/stylesheets/prince.css +6 -0
- data/webgui/public/stylesheets/prince_landscape.css +1 -0
- data/webgui/script/about +4 -0
- data/webgui/script/console +3 -0
- data/webgui/script/dbconsole +3 -0
- data/webgui/script/destroy +3 -0
- data/webgui/script/generate +3 -0
- data/webgui/script/performance/benchmarker +3 -0
- data/webgui/script/performance/profiler +3 -0
- data/webgui/script/performance/request +3 -0
- data/webgui/script/plugin +3 -0
- data/webgui/script/process/inspector +3 -0
- data/webgui/script/process/reaper +3 -0
- data/webgui/script/process/spawner +3 -0
- data/webgui/script/runner +3 -0
- data/webgui/script/server +3 -0
- data/webgui/test/fixtures/entries.yml +10 -0
- data/webgui/test/fixtures/pools.yml +14 -0
- data/webgui/test/fixtures/regions.yml +11 -0
- data/webgui/test/fixtures/roles.yml +11 -0
- data/webgui/test/fixtures/roles_users.yml +3 -0
- data/webgui/test/fixtures/seedings.yml +12 -0
- data/webgui/test/fixtures/teams.yml +3051 -0
- data/webgui/test/fixtures/users.yml +44 -0
- data/webgui/test/functional/admin_controller_test.rb +8 -0
- data/webgui/test/functional/entry_controller_test.rb +27 -0
- data/webgui/test/functional/pool_controller_test.rb +8 -0
- data/webgui/test/functional/reports_controller_test.rb +8 -0
- data/webgui/test/functional/sessions_controller_test.rb +82 -0
- data/webgui/test/functional/teams_controller_test.rb +216 -0
- data/webgui/test/functional/users_controller_test.rb +88 -0
- data/webgui/test/performance/browsing_test.rb +9 -0
- data/webgui/test/test_helper.rb +38 -0
- data/webgui/test/unit/entry_test.rb +8 -0
- data/webgui/test/unit/pool_test.rb +8 -0
- data/webgui/test/unit/region_test.rb +8 -0
- data/webgui/test/unit/role_test.rb +8 -0
- data/webgui/test/unit/seeding_test.rb +8 -0
- data/webgui/test/unit/team_test.rb +10 -0
- data/webgui/test/unit/user_mailer_test.rb +31 -0
- data/webgui/test/unit/user_test.rb +109 -0
- data/webgui/vendor/plugins/auto_complete/README +23 -0
- data/webgui/vendor/plugins/auto_complete/Rakefile +22 -0
- data/webgui/vendor/plugins/auto_complete/init.rb +2 -0
- data/webgui/vendor/plugins/auto_complete/lib/auto_complete.rb +47 -0
- data/webgui/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +143 -0
- data/webgui/vendor/plugins/auto_complete/test/auto_complete_test.rb +67 -0
- data/webgui/vendor/plugins/enumerations_mixin/ATTENTION +15 -0
- data/webgui/vendor/plugins/enumerations_mixin/LICENSE +20 -0
- data/webgui/vendor/plugins/enumerations_mixin/README_ENUMERATIONS +163 -0
- data/webgui/vendor/plugins/enumerations_mixin/init.rb +21 -0
- data/webgui/vendor/plugins/enumerations_mixin/lib/active_record/acts/enumerated.rb +177 -0
- data/webgui/vendor/plugins/enumerations_mixin/lib/active_record/aggregations/has_enumerated.rb +60 -0
- data/webgui/vendor/plugins/enumerations_mixin/lib/active_record/virtual_enumerations.rb +68 -0
- data/webgui/vendor/plugins/enumerations_mixin/virtual_enumerations_sample.rb +76 -0
- data/webgui/vendor/plugins/restful_authentication/.gitignore +21 -0
- data/webgui/vendor/plugins/restful_authentication/CHANGELOG +68 -0
- data/webgui/vendor/plugins/restful_authentication/README.textile +224 -0
- data/webgui/vendor/plugins/restful_authentication/Rakefile +32 -0
- data/webgui/vendor/plugins/restful_authentication/TODO +15 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/USAGE +1 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/authenticated_generator.rb +478 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/lib/insert_routes.rb +54 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/_model_partial.html.erb +8 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/activation.erb +3 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/authenticated_system.rb +189 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/authenticated_test_helper.rb +22 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/controller.rb +43 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/helper.rb +2 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/login.html.erb +16 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/mailer.rb +25 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/migration.rb +26 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/model.rb +83 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/model_controller.rb +85 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/model_helper.rb +93 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/model_helper_spec.rb +158 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/observer.rb +11 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/signup.html.erb +19 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/signup_notification.erb +8 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/site_keys.rb +38 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/controllers/access_control_spec.rb +90 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/controllers/authenticated_system_spec.rb +102 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/controllers/sessions_controller_spec.rb +139 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/controllers/users_controller_spec.rb +198 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/fixtures/users.yml +60 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/helpers/users_helper_spec.rb +141 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/spec/models/user_spec.rb +290 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/rest_auth_stories.rb +22 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/rest_auth_stories_helper.rb +81 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/steps/ra_navigation_steps.rb +49 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/steps/ra_resource_steps.rb +179 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/steps/ra_response_steps.rb +171 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/steps/user_steps.rb +153 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/users/accounts.story +186 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/stories/users/sessions.story +134 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/test/functional_test.rb +82 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/test/mailer_test.rb +31 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/test/model_functional_test.rb +93 -0
- data/webgui/vendor/plugins/restful_authentication/generators/authenticated/templates/test/unit_test.rb +164 -0
- data/webgui/vendor/plugins/restful_authentication/init.rb +1 -0
- data/webgui/vendor/plugins/restful_authentication/install.rb +1 -0
- data/webgui/vendor/plugins/restful_authentication/lib/authentication/by_cookie_token.rb +82 -0
- data/webgui/vendor/plugins/restful_authentication/lib/authentication/by_password.rb +64 -0
- data/webgui/vendor/plugins/restful_authentication/lib/authentication.rb +40 -0
- data/webgui/vendor/plugins/restful_authentication/lib/authorization/aasm_roles.rb +63 -0
- data/webgui/vendor/plugins/restful_authentication/lib/authorization/stateful_roles.rb +62 -0
- data/webgui/vendor/plugins/restful_authentication/lib/authorization.rb +14 -0
- data/webgui/vendor/plugins/restful_authentication/lib/trustification/email_validation.rb +20 -0
- data/webgui/vendor/plugins/restful_authentication/lib/trustification.rb +14 -0
- data/webgui/vendor/plugins/restful_authentication/notes/AccessControl.txt +2 -0
- data/webgui/vendor/plugins/restful_authentication/notes/Authentication.txt +5 -0
- data/webgui/vendor/plugins/restful_authentication/notes/Authorization.txt +154 -0
- data/webgui/vendor/plugins/restful_authentication/notes/RailsPlugins.txt +78 -0
- data/webgui/vendor/plugins/restful_authentication/notes/SecurityFramework.graffle +0 -0
- data/webgui/vendor/plugins/restful_authentication/notes/SecurityFramework.png +0 -0
- data/webgui/vendor/plugins/restful_authentication/notes/SecurityPatterns.txt +163 -0
- data/webgui/vendor/plugins/restful_authentication/notes/Tradeoffs.txt +126 -0
- data/webgui/vendor/plugins/restful_authentication/notes/Trustification.txt +49 -0
- data/webgui/vendor/plugins/restful_authentication/rails/init.rb +3 -0
- data/webgui/vendor/plugins/restful_authentication/restful-authentication.gemspec +33 -0
- data/webgui/vendor/plugins/restful_authentication/tasks/auth.rake +33 -0
- metadata +288 -8
- data/tasks/annotations.rake +0 -22
data/tasks/jamis.rb
ADDED
@@ -0,0 +1,589 @@
|
|
1
|
+
module RDoc
|
2
|
+
module Page
|
3
|
+
|
4
|
+
FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
|
5
|
+
|
6
|
+
STYLE = <<CSS
|
7
|
+
a {
|
8
|
+
color: #00F;
|
9
|
+
text-decoration: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
a:hover {
|
13
|
+
color: #77F;
|
14
|
+
text-decoration: underline;
|
15
|
+
}
|
16
|
+
|
17
|
+
body, td, p {
|
18
|
+
font-family: %fonts%;
|
19
|
+
background: #FFF;
|
20
|
+
color: #000;
|
21
|
+
margin: 0px;
|
22
|
+
font-size: small;
|
23
|
+
}
|
24
|
+
|
25
|
+
#content {
|
26
|
+
margin: 2em;
|
27
|
+
}
|
28
|
+
|
29
|
+
#description p {
|
30
|
+
margin-bottom: 0.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
.sectiontitle {
|
34
|
+
margin-top: 1em;
|
35
|
+
margin-bottom: 1em;
|
36
|
+
padding: 0.5em;
|
37
|
+
padding-left: 2em;
|
38
|
+
background: #005;
|
39
|
+
color: #FFF;
|
40
|
+
font-weight: bold;
|
41
|
+
border: 1px dotted black;
|
42
|
+
}
|
43
|
+
|
44
|
+
.attr-rw {
|
45
|
+
padding-left: 1em;
|
46
|
+
padding-right: 1em;
|
47
|
+
text-align: center;
|
48
|
+
color: #055;
|
49
|
+
}
|
50
|
+
|
51
|
+
.attr-name {
|
52
|
+
font-weight: bold;
|
53
|
+
}
|
54
|
+
|
55
|
+
.attr-desc {
|
56
|
+
}
|
57
|
+
|
58
|
+
.attr-value {
|
59
|
+
font-family: monospace;
|
60
|
+
}
|
61
|
+
|
62
|
+
.file-title-prefix {
|
63
|
+
font-size: large;
|
64
|
+
}
|
65
|
+
|
66
|
+
.file-title {
|
67
|
+
font-size: large;
|
68
|
+
font-weight: bold;
|
69
|
+
background: #005;
|
70
|
+
color: #FFF;
|
71
|
+
}
|
72
|
+
|
73
|
+
.banner {
|
74
|
+
background: #005;
|
75
|
+
color: #FFF;
|
76
|
+
border: 1px solid black;
|
77
|
+
padding: 1em;
|
78
|
+
}
|
79
|
+
|
80
|
+
.banner td {
|
81
|
+
background: transparent;
|
82
|
+
color: #FFF;
|
83
|
+
}
|
84
|
+
|
85
|
+
h1 a, h2 a, .sectiontitle a, .banner a {
|
86
|
+
color: #FF0;
|
87
|
+
}
|
88
|
+
|
89
|
+
h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
|
90
|
+
color: #FF7;
|
91
|
+
}
|
92
|
+
|
93
|
+
.dyn-source {
|
94
|
+
display: none;
|
95
|
+
background: #FFE;
|
96
|
+
color: #000;
|
97
|
+
border: 1px dotted black;
|
98
|
+
margin: 0.5em 2em 0.5em 2em;
|
99
|
+
padding: 0.5em;
|
100
|
+
}
|
101
|
+
|
102
|
+
.dyn-source .cmt {
|
103
|
+
color: #00F;
|
104
|
+
font-style: italic;
|
105
|
+
}
|
106
|
+
|
107
|
+
.dyn-source .kw {
|
108
|
+
color: #070;
|
109
|
+
font-weight: bold;
|
110
|
+
}
|
111
|
+
|
112
|
+
.method {
|
113
|
+
margin-left: 1em;
|
114
|
+
margin-right: 1em;
|
115
|
+
margin-bottom: 1em;
|
116
|
+
}
|
117
|
+
|
118
|
+
.description pre {
|
119
|
+
padding: 0.5em;
|
120
|
+
border: 1px dotted black;
|
121
|
+
background: #FFE;
|
122
|
+
}
|
123
|
+
|
124
|
+
.method .title {
|
125
|
+
font-family: monospace;
|
126
|
+
font-size: large;
|
127
|
+
border-bottom: 1px dashed black;
|
128
|
+
margin-bottom: 0.3em;
|
129
|
+
padding-bottom: 0.1em;
|
130
|
+
}
|
131
|
+
|
132
|
+
.method .description, .method .sourcecode {
|
133
|
+
margin-left: 1em;
|
134
|
+
}
|
135
|
+
|
136
|
+
.description p, .sourcecode p {
|
137
|
+
margin-bottom: 0.5em;
|
138
|
+
}
|
139
|
+
|
140
|
+
.method .sourcecode p.source-link {
|
141
|
+
text-indent: 0em;
|
142
|
+
margin-top: 0.5em;
|
143
|
+
}
|
144
|
+
|
145
|
+
.method .aka {
|
146
|
+
margin-top: 0.3em;
|
147
|
+
margin-left: 1em;
|
148
|
+
font-style: italic;
|
149
|
+
text-indent: 2em;
|
150
|
+
}
|
151
|
+
|
152
|
+
h1 {
|
153
|
+
padding: 1em;
|
154
|
+
border: 1px solid black;
|
155
|
+
font-size: x-large;
|
156
|
+
font-weight: bold;
|
157
|
+
color: #FFF;
|
158
|
+
background: #007;
|
159
|
+
}
|
160
|
+
|
161
|
+
h2 {
|
162
|
+
padding: 0.5em 1em 0.5em 1em;
|
163
|
+
border: 1px solid black;
|
164
|
+
font-size: large;
|
165
|
+
font-weight: bold;
|
166
|
+
color: #FFF;
|
167
|
+
background: #009;
|
168
|
+
}
|
169
|
+
|
170
|
+
h3, h4, h5, h6 {
|
171
|
+
padding: 0.2em 1em 0.2em 1em;
|
172
|
+
border: 1px dashed black;
|
173
|
+
color: #000;
|
174
|
+
background: #AAF;
|
175
|
+
}
|
176
|
+
|
177
|
+
.sourcecode > pre {
|
178
|
+
padding: 0.5em;
|
179
|
+
border: 1px dotted black;
|
180
|
+
background: #FFE;
|
181
|
+
}
|
182
|
+
|
183
|
+
CSS
|
184
|
+
|
185
|
+
XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
|
186
|
+
<!DOCTYPE html
|
187
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
188
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
189
|
+
}
|
190
|
+
|
191
|
+
XHTML_FRAMESET_PREAMBLE = %{
|
192
|
+
<!DOCTYPE html
|
193
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
194
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
195
|
+
}
|
196
|
+
|
197
|
+
HEADER = XHTML_PREAMBLE + <<ENDHEADER
|
198
|
+
<html>
|
199
|
+
<head>
|
200
|
+
<title>%title%</title>
|
201
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
202
|
+
<link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
|
203
|
+
|
204
|
+
<script language="JavaScript" type="text/javascript">
|
205
|
+
// <![CDATA[
|
206
|
+
|
207
|
+
function toggleSource( id )
|
208
|
+
{
|
209
|
+
var elem
|
210
|
+
var link
|
211
|
+
|
212
|
+
if( document.getElementById )
|
213
|
+
{
|
214
|
+
elem = document.getElementById( id )
|
215
|
+
link = document.getElementById( "l_" + id )
|
216
|
+
}
|
217
|
+
else if ( document.all )
|
218
|
+
{
|
219
|
+
elem = eval( "document.all." + id )
|
220
|
+
link = eval( "document.all.l_" + id )
|
221
|
+
}
|
222
|
+
else
|
223
|
+
return false;
|
224
|
+
|
225
|
+
if( elem.style.display == "block" )
|
226
|
+
{
|
227
|
+
elem.style.display = "none"
|
228
|
+
link.innerHTML = "show source"
|
229
|
+
}
|
230
|
+
else
|
231
|
+
{
|
232
|
+
elem.style.display = "block"
|
233
|
+
link.innerHTML = "hide source"
|
234
|
+
}
|
235
|
+
}
|
236
|
+
|
237
|
+
function openCode( url )
|
238
|
+
{
|
239
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
240
|
+
}
|
241
|
+
// ]]>
|
242
|
+
</script>
|
243
|
+
</head>
|
244
|
+
|
245
|
+
<body>
|
246
|
+
ENDHEADER
|
247
|
+
|
248
|
+
FILE_PAGE = <<HTML
|
249
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
250
|
+
<tr><td>
|
251
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
252
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
|
253
|
+
<td align="right">
|
254
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
255
|
+
<tr>
|
256
|
+
<td>Path:</td>
|
257
|
+
<td>%full_path%
|
258
|
+
IF:cvsurl
|
259
|
+
(<a href="%cvsurl%">CVS</a>)
|
260
|
+
ENDIF:cvsurl
|
261
|
+
</td>
|
262
|
+
</tr>
|
263
|
+
<tr>
|
264
|
+
<td>Modified:</td>
|
265
|
+
<td>%dtm_modified%</td>
|
266
|
+
</tr>
|
267
|
+
</table>
|
268
|
+
</td></tr>
|
269
|
+
</table>
|
270
|
+
</td></tr>
|
271
|
+
</table><br />
|
272
|
+
HTML
|
273
|
+
|
274
|
+
###################################################################
|
275
|
+
|
276
|
+
CLASS_PAGE = <<HTML
|
277
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
278
|
+
<td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
|
279
|
+
<td align="right">
|
280
|
+
<table cellspacing="0" cellpadding="2">
|
281
|
+
<tr valign="top">
|
282
|
+
<td>In:</td>
|
283
|
+
<td>
|
284
|
+
START:infiles
|
285
|
+
HREF:full_path_url:full_path:
|
286
|
+
IF:cvsurl
|
287
|
+
(<a href="%cvsurl%">CVS</a>)
|
288
|
+
ENDIF:cvsurl
|
289
|
+
END:infiles
|
290
|
+
</td>
|
291
|
+
</tr>
|
292
|
+
IF:parent
|
293
|
+
<tr>
|
294
|
+
<td>Parent:</td>
|
295
|
+
<td>
|
296
|
+
IF:par_url
|
297
|
+
<a href="%par_url%">
|
298
|
+
ENDIF:par_url
|
299
|
+
%parent%
|
300
|
+
IF:par_url
|
301
|
+
</a>
|
302
|
+
ENDIF:par_url
|
303
|
+
</td>
|
304
|
+
</tr>
|
305
|
+
ENDIF:parent
|
306
|
+
</table>
|
307
|
+
</td>
|
308
|
+
</tr>
|
309
|
+
</table>
|
310
|
+
HTML
|
311
|
+
|
312
|
+
###################################################################
|
313
|
+
|
314
|
+
METHOD_LIST = <<HTML
|
315
|
+
<div id="content">
|
316
|
+
IF:diagram
|
317
|
+
<table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
|
318
|
+
%diagram%
|
319
|
+
</td></tr></table>
|
320
|
+
ENDIF:diagram
|
321
|
+
|
322
|
+
IF:description
|
323
|
+
<div class="description">%description%</div>
|
324
|
+
ENDIF:description
|
325
|
+
|
326
|
+
IF:requires
|
327
|
+
<div class="sectiontitle">Required Files</div>
|
328
|
+
<ul>
|
329
|
+
START:requires
|
330
|
+
<li>HREF:aref:name:</li>
|
331
|
+
END:requires
|
332
|
+
</ul>
|
333
|
+
ENDIF:requires
|
334
|
+
|
335
|
+
IF:toc
|
336
|
+
<div class="sectiontitle">Contents</div>
|
337
|
+
<ul>
|
338
|
+
START:toc
|
339
|
+
<li><a href="#%href%">%secname%</a></li>
|
340
|
+
END:toc
|
341
|
+
</ul>
|
342
|
+
ENDIF:toc
|
343
|
+
|
344
|
+
IF:methods
|
345
|
+
<div class="sectiontitle">Methods</div>
|
346
|
+
<ul>
|
347
|
+
START:methods
|
348
|
+
<li>HREF:aref:name:</li>
|
349
|
+
END:methods
|
350
|
+
</ul>
|
351
|
+
ENDIF:methods
|
352
|
+
|
353
|
+
IF:includes
|
354
|
+
<div class="sectiontitle">Included Modules</div>
|
355
|
+
<ul>
|
356
|
+
START:includes
|
357
|
+
<li>HREF:aref:name:</li>
|
358
|
+
END:includes
|
359
|
+
</ul>
|
360
|
+
ENDIF:includes
|
361
|
+
|
362
|
+
START:sections
|
363
|
+
IF:sectitle
|
364
|
+
<div class="sectiontitle"><a name="%secsequence%">%sectitle%</a></div>
|
365
|
+
IF:seccomment
|
366
|
+
<div class="description">
|
367
|
+
%seccomment%
|
368
|
+
</div>
|
369
|
+
ENDIF:seccomment
|
370
|
+
ENDIF:sectitle
|
371
|
+
|
372
|
+
IF:classlist
|
373
|
+
<div class="sectiontitle">Classes and Modules</div>
|
374
|
+
%classlist%
|
375
|
+
ENDIF:classlist
|
376
|
+
|
377
|
+
IF:constants
|
378
|
+
<div class="sectiontitle">Constants</div>
|
379
|
+
<table border='0' cellpadding='5'>
|
380
|
+
START:constants
|
381
|
+
<tr valign='top'>
|
382
|
+
<td class="attr-name">%name%</td>
|
383
|
+
<td>=</td>
|
384
|
+
<td class="attr-value">%value%</td>
|
385
|
+
</tr>
|
386
|
+
IF:desc
|
387
|
+
<tr valign='top'>
|
388
|
+
<td> </td>
|
389
|
+
<td colspan="2" class="attr-desc">%desc%</td>
|
390
|
+
</tr>
|
391
|
+
ENDIF:desc
|
392
|
+
END:constants
|
393
|
+
</table>
|
394
|
+
ENDIF:constants
|
395
|
+
|
396
|
+
IF:attributes
|
397
|
+
<div class="sectiontitle">Attributes</div>
|
398
|
+
<table border='0' cellpadding='5'>
|
399
|
+
START:attributes
|
400
|
+
<tr valign='top'>
|
401
|
+
<td class='attr-rw'>
|
402
|
+
IF:rw
|
403
|
+
[%rw%]
|
404
|
+
ENDIF:rw
|
405
|
+
</td>
|
406
|
+
<td class='attr-name'>%name%</td>
|
407
|
+
<td class='attr-desc'>%a_desc%</td>
|
408
|
+
</tr>
|
409
|
+
END:attributes
|
410
|
+
</table>
|
411
|
+
ENDIF:attributes
|
412
|
+
|
413
|
+
IF:method_list
|
414
|
+
START:method_list
|
415
|
+
IF:methods
|
416
|
+
<div class="sectiontitle">%type% %category% methods</div>
|
417
|
+
START:methods
|
418
|
+
<div class="method">
|
419
|
+
<div class="title">
|
420
|
+
IF:callseq
|
421
|
+
<a name="%aref%"></a><b>%callseq%</b>
|
422
|
+
ENDIF:callseq
|
423
|
+
IFNOT:callseq
|
424
|
+
<a name="%aref%"></a><b>%name%</b>%params%
|
425
|
+
ENDIF:callseq
|
426
|
+
IF:codeurl
|
427
|
+
[ <a href="%codeurl%" target="SOURCE_CODE" onclick="javascript:openCode('%codeurl%'); return false;">source</a> ]
|
428
|
+
ENDIF:codeurl
|
429
|
+
</div>
|
430
|
+
IF:m_desc
|
431
|
+
<div class="description">
|
432
|
+
%m_desc%
|
433
|
+
</div>
|
434
|
+
ENDIF:m_desc
|
435
|
+
IF:aka
|
436
|
+
<div class="aka">
|
437
|
+
This method is also aliased as
|
438
|
+
START:aka
|
439
|
+
<a href="%aref%">%name%</a>
|
440
|
+
END:aka
|
441
|
+
</div>
|
442
|
+
ENDIF:aka
|
443
|
+
IF:sourcecode
|
444
|
+
<div class="sourcecode">
|
445
|
+
<p class="source-link">[ <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a> ]</p>
|
446
|
+
<div id="%aref%_source" class="dyn-source">
|
447
|
+
<pre>
|
448
|
+
%sourcecode%
|
449
|
+
</pre>
|
450
|
+
</div>
|
451
|
+
</div>
|
452
|
+
ENDIF:sourcecode
|
453
|
+
</div>
|
454
|
+
END:methods
|
455
|
+
ENDIF:methods
|
456
|
+
END:method_list
|
457
|
+
ENDIF:method_list
|
458
|
+
END:sections
|
459
|
+
</div>
|
460
|
+
HTML
|
461
|
+
|
462
|
+
FOOTER = <<ENDFOOTER
|
463
|
+
</body>
|
464
|
+
</html>
|
465
|
+
ENDFOOTER
|
466
|
+
|
467
|
+
BODY = HEADER + <<ENDBODY
|
468
|
+
!INCLUDE! <!-- banner header -->
|
469
|
+
|
470
|
+
<div id="bodyContent">
|
471
|
+
#{METHOD_LIST}
|
472
|
+
</div>
|
473
|
+
|
474
|
+
#{FOOTER}
|
475
|
+
ENDBODY
|
476
|
+
|
477
|
+
########################## Source code ##########################
|
478
|
+
|
479
|
+
SRC_PAGE = XHTML_PREAMBLE + <<HTML
|
480
|
+
<html>
|
481
|
+
<head><title>%title%</title>
|
482
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
483
|
+
<style type="text/css">
|
484
|
+
.ruby-comment { color: green; font-style: italic }
|
485
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
486
|
+
.ruby-identifier { color: #222222; }
|
487
|
+
.ruby-ivar { color: #2233dd; }
|
488
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
489
|
+
.ruby-node { color: #777777; }
|
490
|
+
.ruby-operator { color: #111111; }
|
491
|
+
.ruby-regexp { color: #662222; }
|
492
|
+
.ruby-value { color: #662222; font-style: italic }
|
493
|
+
.kw { color: #3333FF; font-weight: bold }
|
494
|
+
.cmt { color: green; font-style: italic }
|
495
|
+
.str { color: #662222; font-style: italic }
|
496
|
+
.re { color: #662222; }
|
497
|
+
</style>
|
498
|
+
</head>
|
499
|
+
<body bgcolor="white">
|
500
|
+
<pre>%code%</pre>
|
501
|
+
</body>
|
502
|
+
</html>
|
503
|
+
HTML
|
504
|
+
|
505
|
+
########################## Index ################################
|
506
|
+
|
507
|
+
FR_INDEX_BODY = <<HTML
|
508
|
+
!INCLUDE!
|
509
|
+
HTML
|
510
|
+
|
511
|
+
FILE_INDEX = XHTML_PREAMBLE + <<HTML
|
512
|
+
<html>
|
513
|
+
<head>
|
514
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
515
|
+
<title>Index</title>
|
516
|
+
<style type="text/css">
|
517
|
+
<!--
|
518
|
+
body {
|
519
|
+
background-color: #EEE;
|
520
|
+
font-family: #{FONTS};
|
521
|
+
color: #000;
|
522
|
+
margin: 0px;
|
523
|
+
}
|
524
|
+
.banner {
|
525
|
+
background: #005;
|
526
|
+
color: #FFF;
|
527
|
+
padding: 0.2em;
|
528
|
+
font-size: small;
|
529
|
+
font-weight: bold;
|
530
|
+
text-align: center;
|
531
|
+
}
|
532
|
+
.entries {
|
533
|
+
margin: 0.25em 1em 0 1em;
|
534
|
+
font-size: x-small;
|
535
|
+
}
|
536
|
+
a {
|
537
|
+
color: #00F;
|
538
|
+
text-decoration: none;
|
539
|
+
white-space: nowrap;
|
540
|
+
}
|
541
|
+
a:hover {
|
542
|
+
color: #77F;
|
543
|
+
text-decoration: underline;
|
544
|
+
}
|
545
|
+
-->
|
546
|
+
</style>
|
547
|
+
<base target="docwin" />
|
548
|
+
</head>
|
549
|
+
<body>
|
550
|
+
<div class="banner">%list_title%</div>
|
551
|
+
<div class="entries">
|
552
|
+
START:entries
|
553
|
+
<a href="%href%">%name%</a><br />
|
554
|
+
END:entries
|
555
|
+
</div>
|
556
|
+
</body></html>
|
557
|
+
HTML
|
558
|
+
|
559
|
+
CLASS_INDEX = FILE_INDEX
|
560
|
+
METHOD_INDEX = FILE_INDEX
|
561
|
+
|
562
|
+
INDEX = XHTML_FRAMESET_PREAMBLE + <<HTML
|
563
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
564
|
+
<head>
|
565
|
+
<title>%title%</title>
|
566
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
567
|
+
</head>
|
568
|
+
|
569
|
+
<frameset cols="20%,*">
|
570
|
+
<frameset rows="15%,35%,50%">
|
571
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
572
|
+
<frame src="fr_class_index.html" name="Classes" />
|
573
|
+
<frame src="fr_method_index.html" name="Methods" />
|
574
|
+
</frameset>
|
575
|
+
<frame src="%initial_page%" name="docwin" />
|
576
|
+
<noframes>
|
577
|
+
<body bgcolor="white">
|
578
|
+
Click <a href="html/index.html">here</a> for a non-frames
|
579
|
+
version of this page.
|
580
|
+
</body>
|
581
|
+
</noframes>
|
582
|
+
</frameset>
|
583
|
+
|
584
|
+
</html>
|
585
|
+
HTML
|
586
|
+
|
587
|
+
end
|
588
|
+
end
|
589
|
+
|
data/tasks/notes.rake
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# $Id$
|
2
|
+
|
3
|
+
if HAVE_BONES
|
4
|
+
|
5
|
+
desc "Enumerate all annotations"
|
6
|
+
task :notes do |t|
|
7
|
+
id = if t.application.top_level_tasks.length > 1
|
8
|
+
t.application.top_level_tasks.slice!(1..-1).join(' ')
|
9
|
+
end
|
10
|
+
Bones::AnnotationExtractor.enumerate(
|
11
|
+
PROJ, PROJ.notes.tags.join('|'), id, :tag => true)
|
12
|
+
end
|
13
|
+
|
14
|
+
namespace :notes do
|
15
|
+
PROJ.notes.tags.each do |tag|
|
16
|
+
desc "Enumerate all #{tag} annotations"
|
17
|
+
task tag.downcase.to_sym do |t|
|
18
|
+
id = if t.application.top_level_tasks.length > 1
|
19
|
+
t.application.top_level_tasks.slice!(1..-1).join(' ')
|
20
|
+
end
|
21
|
+
Bones::AnnotationExtractor.enumerate(PROJ, tag, id)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end # if HAVE_BONES
|
27
|
+
|
28
|
+
# EOF
|
data/tasks/post_load.rake
CHANGED
@@ -3,14 +3,21 @@
|
|
3
3
|
# This file does not define any rake tasks. It is used to load some project
|
4
4
|
# settings if they are not defined by the user.
|
5
5
|
|
6
|
-
PROJ.
|
7
|
-
PROJ.exclude << "^#{Regexp.escape(PROJ.
|
8
|
-
|
9
|
-
PROJ.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
PROJ.rdoc.exclude << "^#{Regexp.escape(PROJ.manifest_file)}$"
|
7
|
+
PROJ.exclude << ["^#{Regexp.escape(PROJ.ann.file)}$",
|
8
|
+
"^#{Regexp.escape(PROJ.rdoc.dir)}/",
|
9
|
+
"^#{Regexp.escape(PROJ.rcov.dir)}/"]
|
10
|
+
|
11
|
+
flatten_arrays = lambda do |this,os|
|
12
|
+
os.instance_variable_get(:@table).each do |key,val|
|
13
|
+
next if key == :dependencies
|
14
|
+
case val
|
15
|
+
when Array; val.flatten!
|
16
|
+
when OpenStruct; this.call(this,val)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
flatten_arrays.call(flatten_arrays,PROJ)
|
14
21
|
|
15
22
|
PROJ.changes ||= paragraphs_of(PROJ.history_file, 0..1).join("\n\n")
|
16
23
|
|
@@ -18,15 +25,15 @@ PROJ.description ||= paragraphs_of(PROJ.readme_file, 'description').join("\n\n")
|
|
18
25
|
|
19
26
|
PROJ.summary ||= PROJ.description.split('.').first
|
20
27
|
|
21
|
-
PROJ.files ||=
|
28
|
+
PROJ.gem.files ||=
|
22
29
|
if test(?f, PROJ.manifest_file)
|
23
30
|
files = File.readlines(PROJ.manifest_file).map {|fn| fn.chomp.strip}
|
24
31
|
files.delete ''
|
25
32
|
files
|
26
33
|
else [] end
|
27
34
|
|
28
|
-
PROJ.executables ||= PROJ.files.find_all {|fn| fn =~ %r/^bin/}
|
35
|
+
PROJ.gem.executables ||= PROJ.gem.files.find_all {|fn| fn =~ %r/^bin/}
|
29
36
|
|
30
|
-
PROJ.
|
37
|
+
PROJ.rdoc.main ||= PROJ.readme_file
|
31
38
|
|
32
39
|
# EOF
|
@@ -6,13 +6,14 @@ namespace :doc do
|
|
6
6
|
|
7
7
|
desc 'Generate RDoc documentation'
|
8
8
|
Rake::RDocTask.new do |rd|
|
9
|
-
|
10
|
-
rd.
|
11
|
-
rd.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
rdoc = PROJ.rdoc
|
10
|
+
rd.main = rdoc.main
|
11
|
+
rd.rdoc_dir = rdoc.dir
|
12
|
+
rd.template = rdoc.template
|
13
|
+
|
14
|
+
incl = Regexp.new(rdoc.include.join('|'))
|
15
|
+
excl = Regexp.new(rdoc.exclude.join('|'))
|
16
|
+
files = PROJ.gem.files.find_all do |fn|
|
16
17
|
case fn
|
17
18
|
when excl; false
|
18
19
|
when incl; true
|
@@ -21,10 +22,12 @@ namespace :doc do
|
|
21
22
|
rd.rdoc_files.push(*files)
|
22
23
|
|
23
24
|
title = "#{PROJ.name}-#{PROJ.version} Documentation"
|
24
|
-
|
25
|
+
|
26
|
+
rf_name = PROJ.rubyforge.name
|
27
|
+
title = "#{rf_name}'s " + title if rf_name.valid? and rf_name != title
|
25
28
|
|
26
29
|
rd.options << "-t #{title}"
|
27
|
-
rd.options.concat(
|
30
|
+
rd.options.concat(rdoc.opts)
|
28
31
|
end
|
29
32
|
|
30
33
|
desc 'Generate ri locally for testing'
|