summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-26 20:16:33 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-26 20:16:33 -0400
commit62219ac4e3af36cc15c9ad61701550bee9a8424c (patch)
tree9624aeb942de217455b1503838ccbcfa9cddebc1
parent421bc03d2fc909e3f41ec03d6747c3c8db8e87af (diff)
run ./generate.sh
-rw-r--r--app/controllers/games_controller.rb2
-rw-r--r--app/controllers/tournaments_controller.rb2
-rw-r--r--app/views/games/_form.html.erb4
-rw-r--r--app/views/games/index.html.erb2
-rw-r--r--app/views/games/index.json.jbuilder2
-rw-r--r--app/views/games/show.html.erb5
-rw-r--r--app/views/games/show.json.jbuilder2
-rw-r--r--app/views/tournaments/_form.html.erb4
-rw-r--r--app/views/tournaments/index.html.erb2
-rw-r--r--app/views/tournaments/index.json.jbuilder2
-rw-r--r--app/views/tournaments/show.html.erb5
-rw-r--r--app/views/tournaments/show.json.jbuilder2
-rw-r--r--db/migrate/20140426201409_create_simple_captcha_data.rb (renamed from db/migrate/20140424190540_create_simple_captcha_data.rb)0
-rw-r--r--db/migrate/20140427001406_create_mailboxer.mailboxer_engine.rb (renamed from db/migrate/20140424230536_create_mailboxer.mailboxer_engine.rb)0
-rw-r--r--db/migrate/20140427001407_add_notified_object.mailboxer_engine.rb (renamed from db/migrate/20140424230537_add_notified_object.mailboxer_engine.rb)0
-rw-r--r--db/migrate/20140427001408_add_notification_code.mailboxer_engine.rb (renamed from db/migrate/20140424230538_add_notification_code.mailboxer_engine.rb)0
-rw-r--r--db/migrate/20140427001409_add_attachments.mailboxer_engine.rb (renamed from db/migrate/20140424230539_add_attachments.mailboxer_engine.rb)0
-rw-r--r--db/migrate/20140427001410_rename_receipts_read.mailboxer_engine.rb (renamed from db/migrate/20140424230540_rename_receipts_read.mailboxer_engine.rb)0
-rw-r--r--db/migrate/20140427001411_add_global_notification_support.mailboxer_engine.rb (renamed from db/migrate/20140424230541_add_global_notification_support.mailboxer_engine.rb)0
-rw-r--r--db/migrate/20140427001413_create_delayed_jobs.rb (renamed from db/migrate/20140424230543_create_delayed_jobs.rb)0
-rw-r--r--db/migrate/20140427001416_create_servers.rb (renamed from db/migrate/20140424230547_create_servers.rb)0
-rw-r--r--db/migrate/20140427001420_create_matches.rb (renamed from db/migrate/20140424230550_create_matches.rb)0
-rw-r--r--db/migrate/20140427001424_create_teams.rb (renamed from db/migrate/20140424230554_create_teams.rb)0
-rw-r--r--db/migrate/20140427001428_create_alerts.rb (renamed from db/migrate/20140424230558_create_alerts.rb)0
-rw-r--r--db/migrate/20140427001431_create_pms.rb (renamed from db/migrate/20140424230602_create_pms.rb)0
-rw-r--r--db/migrate/20140427001435_create_tournaments.rb (renamed from db/migrate/20140424230605_create_tournaments.rb)1
-rw-r--r--db/migrate/20140427001439_create_games.rb (renamed from db/migrate/20140424230609_create_games.rb)1
-rw-r--r--db/migrate/20140427001443_create_users.rb (renamed from db/migrate/20140424230613_create_users.rb)0
-rw-r--r--db/migrate/20140427001446_create_sessions.rb (renamed from db/migrate/20140424230617_create_sessions.rb)0
-rw-r--r--db/migrate/20140427001450_create_brackets.rb (renamed from db/migrate/20140424230620_create_brackets.rb)0
-rw-r--r--db/migrate/20140427001454_create_game_settings.rb (renamed from db/migrate/20140424230624_create_game_settings.rb)0
-rw-r--r--db/migrate/20140427001458_create_tournament_settings.rb (renamed from db/migrate/20140424230628_create_tournament_settings.rb)0
-rw-r--r--db/migrate/20140427001502_create_tournament_stages.rb (renamed from db/migrate/20140424230632_create_tournament_stages.rb)3
-rw-r--r--db/migrate/20140427001505_create_statistics.rb (renamed from db/migrate/20140424230635_create_statistics.rb)0
-rw-r--r--db/migrate/20140427001509_create_remote_usernames.rb (renamed from db/migrate/20140424230639_create_remote_usernames.rb)0
-rw-r--r--db/migrate/20140427001513_create_bracket_matches.rb (renamed from db/migrate/20140424230643_create_bracket_matches.rb)0
-rw-r--r--db/migrate/20140427001516_create_api_requests.rb (renamed from db/migrate/20140424230646_create_api_requests.rb)0
-rw-r--r--db/migrate/20140427001520_create_tournament_players_join_table.rb (renamed from db/migrate/20140424230650_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140427001523_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140424230654_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140427001527_create_team_user_join_table.rb (renamed from db/migrate/20140424230657_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140427001531_create_match_team_join_table.rb (renamed from db/migrate/20140424230701_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140427001542_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140424230712_add_hidden_attrs_to_user.rb)0
-rw-r--r--db/schema.rb7
-rw-r--r--test/controllers/games_controller_test.rb4
-rw-r--r--test/controllers/tournaments_controller_test.rb4
-rw-r--r--test/fixtures/games.yml2
-rw-r--r--test/fixtures/tournament_stages.yml6
-rw-r--r--test/fixtures/tournaments.yml2
48 files changed, 49 insertions, 15 deletions
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
index 8546efb..76a6296 100644
--- a/app/controllers/games_controller.rb
+++ b/app/controllers/games_controller.rb
@@ -69,6 +69,6 @@ class GamesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def game_params
- params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method)
+ params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method)
end
end
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 6bf79fd..64ab155 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -69,6 +69,6 @@ class TournamentsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def tournament_params
- params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method)
+ params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method)
end
end
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb
index 20cb214..b1db0b3 100644
--- a/app/views/games/_form.html.erb
+++ b/app/views/games/_form.html.erb
@@ -47,6 +47,10 @@
<%= f.label :sampling_method %><br>
<%= f.text_field :sampling_method %>
</div>
+ <div class="field">
+ <%= f.label :scoring_method %><br>
+ <%= f.text_field :scoring_method %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb
index b4c3950..207a0ba 100644
--- a/app/views/games/index.html.erb
+++ b/app/views/games/index.html.erb
@@ -12,6 +12,7 @@
<th>Set rounds</th>
<th>Randomized teams</th>
<th>Sampling method</th>
+ <th>Scoring method</th>
<th></th>
<th></th>
<th></th>
@@ -30,6 +31,7 @@
<td><%= game.set_rounds %></td>
<td><%= game.randomized_teams %></td>
<td><%= game.sampling_method %></td>
+ <td><%= game.scoring_method %></td>
<td><%= link_to 'Show', game %></td>
<td><%= link_to 'Edit', edit_game_path(game) %></td>
<td><%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder
index 6b20f60..7964f2c 100644
--- a/app/views/games/index.json.jbuilder
+++ b/app/views/games/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@games) do |game|
- json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method
+ json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method
json.url game_url(game, format: :json)
end
diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb
index 38c8ccb..6bca111 100644
--- a/app/views/games/show.html.erb
+++ b/app/views/games/show.html.erb
@@ -45,5 +45,10 @@
<%= @game.sampling_method %>
</p>
+<p>
+ <strong>Scoring method:</strong>
+ <%= @game.scoring_method %>
+</p>
+
<%= link_to 'Edit', edit_game_path(@game) %> |
<%= link_to 'Back', games_path %>
diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder
index 087a156..c5fb4ed 100644
--- a/app/views/games/show.json.jbuilder
+++ b/app/views/games/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at
+json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method, :created_at, :updated_at
diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb
index 9b9681c..7127d38 100644
--- a/app/views/tournaments/_form.html.erb
+++ b/app/views/tournaments/_form.html.erb
@@ -51,6 +51,10 @@
<%= f.label :sampling_method %><br>
<%= f.text_field :sampling_method %>
</div>
+ <div class="field">
+ <%= f.label :scoring_method %><br>
+ <%= f.text_field :scoring_method %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
index 49a83ec..c2b5a2b 100644
--- a/app/views/tournaments/index.html.erb
+++ b/app/views/tournaments/index.html.erb
@@ -13,6 +13,7 @@
<th>Set rounds</th>
<th>Randomized teams</th>
<th>Sampling method</th>
+ <th>Scoring method</th>
<th></th>
<th></th>
<th></th>
@@ -32,6 +33,7 @@
<td><%= tournament.set_rounds %></td>
<td><%= tournament.randomized_teams %></td>
<td><%= tournament.sampling_method %></td>
+ <td><%= tournament.scoring_method %></td>
<td><%= link_to 'Show', tournament %></td>
<td><%= link_to 'Edit', edit_tournament_path(tournament) %></td>
<td><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/tournaments/index.json.jbuilder b/app/views/tournaments/index.json.jbuilder
index 7118ecc..bd86e04 100644
--- a/app/views/tournaments/index.json.jbuilder
+++ b/app/views/tournaments/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@tournaments) do |tournament|
- json.extract! tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method
+ json.extract! tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method
json.url tournament_url(tournament, format: :json)
end
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
index d97e504..f91e11e 100644
--- a/app/views/tournaments/show.html.erb
+++ b/app/views/tournaments/show.html.erb
@@ -50,5 +50,10 @@
<%= @tournament.sampling_method %>
</p>
+<p>
+ <strong>Scoring method:</strong>
+ <%= @tournament.scoring_method %>
+</p>
+
<%= link_to 'Edit', edit_tournament_path(@tournament) %> |
<%= link_to 'Back', tournaments_path %>
diff --git a/app/views/tournaments/show.json.jbuilder b/app/views/tournaments/show.json.jbuilder
index 4542e52..ff82412 100644
--- a/app/views/tournaments/show.json.jbuilder
+++ b/app/views/tournaments/show.json.jbuilder
@@ -1 +1 @@
-json.extract! @tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :created_at, :updated_at
+json.extract! @tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method, :created_at, :updated_at
diff --git a/db/migrate/20140424190540_create_simple_captcha_data.rb b/db/migrate/20140426201409_create_simple_captcha_data.rb
index 4573b20..4573b20 100644
--- a/db/migrate/20140424190540_create_simple_captcha_data.rb
+++ b/db/migrate/20140426201409_create_simple_captcha_data.rb
diff --git a/db/migrate/20140424230536_create_mailboxer.mailboxer_engine.rb b/db/migrate/20140427001406_create_mailboxer.mailboxer_engine.rb
index 690cec2..690cec2 100644
--- a/db/migrate/20140424230536_create_mailboxer.mailboxer_engine.rb
+++ b/db/migrate/20140427001406_create_mailboxer.mailboxer_engine.rb
diff --git a/db/migrate/20140424230537_add_notified_object.mailboxer_engine.rb b/db/migrate/20140427001407_add_notified_object.mailboxer_engine.rb
index 7f41ac6..7f41ac6 100644
--- a/db/migrate/20140424230537_add_notified_object.mailboxer_engine.rb
+++ b/db/migrate/20140427001407_add_notified_object.mailboxer_engine.rb
diff --git a/db/migrate/20140424230538_add_notification_code.mailboxer_engine.rb b/db/migrate/20140427001408_add_notification_code.mailboxer_engine.rb
index 04c12ef..04c12ef 100644
--- a/db/migrate/20140424230538_add_notification_code.mailboxer_engine.rb
+++ b/db/migrate/20140427001408_add_notification_code.mailboxer_engine.rb
diff --git a/db/migrate/20140424230539_add_attachments.mailboxer_engine.rb b/db/migrate/20140427001409_add_attachments.mailboxer_engine.rb
index b8d6588..b8d6588 100644
--- a/db/migrate/20140424230539_add_attachments.mailboxer_engine.rb
+++ b/db/migrate/20140427001409_add_attachments.mailboxer_engine.rb
diff --git a/db/migrate/20140424230540_rename_receipts_read.mailboxer_engine.rb b/db/migrate/20140427001410_rename_receipts_read.mailboxer_engine.rb
index 9ce904f..9ce904f 100644
--- a/db/migrate/20140424230540_rename_receipts_read.mailboxer_engine.rb
+++ b/db/migrate/20140427001410_rename_receipts_read.mailboxer_engine.rb
diff --git a/db/migrate/20140424230541_add_global_notification_support.mailboxer_engine.rb b/db/migrate/20140427001411_add_global_notification_support.mailboxer_engine.rb
index 60f67ab..60f67ab 100644
--- a/db/migrate/20140424230541_add_global_notification_support.mailboxer_engine.rb
+++ b/db/migrate/20140427001411_add_global_notification_support.mailboxer_engine.rb
diff --git a/db/migrate/20140424230543_create_delayed_jobs.rb b/db/migrate/20140427001413_create_delayed_jobs.rb
index ec0dd93..ec0dd93 100644
--- a/db/migrate/20140424230543_create_delayed_jobs.rb
+++ b/db/migrate/20140427001413_create_delayed_jobs.rb
diff --git a/db/migrate/20140424230547_create_servers.rb b/db/migrate/20140427001416_create_servers.rb
index fbe1b02..fbe1b02 100644
--- a/db/migrate/20140424230547_create_servers.rb
+++ b/db/migrate/20140427001416_create_servers.rb
diff --git a/db/migrate/20140424230550_create_matches.rb b/db/migrate/20140427001420_create_matches.rb
index bac92d1..bac92d1 100644
--- a/db/migrate/20140424230550_create_matches.rb
+++ b/db/migrate/20140427001420_create_matches.rb
diff --git a/db/migrate/20140424230554_create_teams.rb b/db/migrate/20140427001424_create_teams.rb
index dd8397d..dd8397d 100644
--- a/db/migrate/20140424230554_create_teams.rb
+++ b/db/migrate/20140427001424_create_teams.rb
diff --git a/db/migrate/20140424230558_create_alerts.rb b/db/migrate/20140427001428_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140424230558_create_alerts.rb
+++ b/db/migrate/20140427001428_create_alerts.rb
diff --git a/db/migrate/20140424230602_create_pms.rb b/db/migrate/20140427001431_create_pms.rb
index eb9f443..eb9f443 100644
--- a/db/migrate/20140424230602_create_pms.rb
+++ b/db/migrate/20140427001431_create_pms.rb
diff --git a/db/migrate/20140424230605_create_tournaments.rb b/db/migrate/20140427001435_create_tournaments.rb
index 716871f..03b42b2 100644
--- a/db/migrate/20140424230605_create_tournaments.rb
+++ b/db/migrate/20140427001435_create_tournaments.rb
@@ -11,6 +11,7 @@ class CreateTournaments < ActiveRecord::Migration
t.integer :set_rounds
t.boolean :randomized_teams
t.string :sampling_method
+ t.string :scoring_method
t.timestamps
end
diff --git a/db/migrate/20140424230609_create_games.rb b/db/migrate/20140427001439_create_games.rb
index 23edf0b..fe2e596 100644
--- a/db/migrate/20140424230609_create_games.rb
+++ b/db/migrate/20140427001439_create_games.rb
@@ -10,6 +10,7 @@ class CreateGames < ActiveRecord::Migration
t.integer :set_rounds
t.boolean :randomized_teams
t.string :sampling_method
+ t.string :scoring_method
t.timestamps
end
diff --git a/db/migrate/20140424230613_create_users.rb b/db/migrate/20140427001443_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140424230613_create_users.rb
+++ b/db/migrate/20140427001443_create_users.rb
diff --git a/db/migrate/20140424230617_create_sessions.rb b/db/migrate/20140427001446_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140424230617_create_sessions.rb
+++ b/db/migrate/20140427001446_create_sessions.rb
diff --git a/db/migrate/20140424230620_create_brackets.rb b/db/migrate/20140427001450_create_brackets.rb
index 8813bf2..8813bf2 100644
--- a/db/migrate/20140424230620_create_brackets.rb
+++ b/db/migrate/20140427001450_create_brackets.rb
diff --git a/db/migrate/20140424230624_create_game_settings.rb b/db/migrate/20140427001454_create_game_settings.rb
index 06fb72e..06fb72e 100644
--- a/db/migrate/20140424230624_create_game_settings.rb
+++ b/db/migrate/20140427001454_create_game_settings.rb
diff --git a/db/migrate/20140424230628_create_tournament_settings.rb b/db/migrate/20140427001458_create_tournament_settings.rb
index e56697f..e56697f 100644
--- a/db/migrate/20140424230628_create_tournament_settings.rb
+++ b/db/migrate/20140427001458_create_tournament_settings.rb
diff --git a/db/migrate/20140424230632_create_tournament_stages.rb b/db/migrate/20140427001502_create_tournament_stages.rb
index e3668cb..6e52bf0 100644
--- a/db/migrate/20140424230632_create_tournament_stages.rb
+++ b/db/migrate/20140427001502_create_tournament_stages.rb
@@ -2,8 +2,9 @@ class CreateTournamentStages < ActiveRecord::Migration
def change
create_table :tournament_stages do |t|
t.references :tournament, index: true
- t.string :scheduling
t.text :structure
+ t.string :scheduling_method
+ t.string :seeding_method
t.timestamps
end
diff --git a/db/migrate/20140424230635_create_statistics.rb b/db/migrate/20140427001505_create_statistics.rb
index cc2e97d..cc2e97d 100644
--- a/db/migrate/20140424230635_create_statistics.rb
+++ b/db/migrate/20140427001505_create_statistics.rb
diff --git a/db/migrate/20140424230639_create_remote_usernames.rb b/db/migrate/20140427001509_create_remote_usernames.rb
index e265985..e265985 100644
--- a/db/migrate/20140424230639_create_remote_usernames.rb
+++ b/db/migrate/20140427001509_create_remote_usernames.rb
diff --git a/db/migrate/20140424230643_create_bracket_matches.rb b/db/migrate/20140427001513_create_bracket_matches.rb
index 3323e31..3323e31 100644
--- a/db/migrate/20140424230643_create_bracket_matches.rb
+++ b/db/migrate/20140427001513_create_bracket_matches.rb
diff --git a/db/migrate/20140424230646_create_api_requests.rb b/db/migrate/20140427001516_create_api_requests.rb
index 544c330..544c330 100644
--- a/db/migrate/20140424230646_create_api_requests.rb
+++ b/db/migrate/20140427001516_create_api_requests.rb
diff --git a/db/migrate/20140424230650_create_tournament_players_join_table.rb b/db/migrate/20140427001520_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140424230650_create_tournament_players_join_table.rb
+++ b/db/migrate/20140427001520_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140424230654_create_tournament_hosts_join_table.rb b/db/migrate/20140427001523_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140424230654_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140427001523_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140424230657_create_team_user_join_table.rb b/db/migrate/20140427001527_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140424230657_create_team_user_join_table.rb
+++ b/db/migrate/20140427001527_create_team_user_join_table.rb
diff --git a/db/migrate/20140424230701_create_match_team_join_table.rb b/db/migrate/20140427001531_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140424230701_create_match_team_join_table.rb
+++ b/db/migrate/20140427001531_create_match_team_join_table.rb
diff --git a/db/migrate/20140424230712_add_hidden_attrs_to_user.rb b/db/migrate/20140427001542_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140424230712_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140427001542_add_hidden_attrs_to_user.rb
diff --git a/db/schema.rb b/db/schema.rb
index d7e4efd..0616ef2 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140424230712) do
+ActiveRecord::Schema.define(version: 20140427001542) do
create_table "alerts", force: true do |t|
t.integer "author_id"
@@ -97,6 +97,7 @@ ActiveRecord::Schema.define(version: 20140424230712) do
t.integer "set_rounds"
t.boolean "randomized_teams"
t.string "sampling_method"
+ t.string "scoring_method"
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -254,8 +255,9 @@ ActiveRecord::Schema.define(version: 20140424230712) do
create_table "tournament_stages", force: true do |t|
t.integer "tournament_id"
- t.string "scheduling"
t.text "structure"
+ t.string "scheduling_method"
+ t.string "seeding_method"
t.datetime "created_at"
t.datetime "updated_at"
end
@@ -273,6 +275,7 @@ ActiveRecord::Schema.define(version: 20140424230712) do
t.integer "set_rounds"
t.boolean "randomized_teams"
t.string "sampling_method"
+ t.string "scoring_method"
t.datetime "created_at"
t.datetime "updated_at"
end
diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb
index be97aa0..567ecb9 100644
--- a/test/controllers/games_controller_test.rb
+++ b/test/controllers/games_controller_test.rb
@@ -18,7 +18,7 @@ class GamesControllerTest < ActionController::TestCase
test "should create game" do
assert_difference('Game.count') do
- post :create, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, set_rounds: @game.set_rounds }
+ post :create, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, scoring_method: @game.scoring_method, set_rounds: @game.set_rounds }
end
assert_redirected_to game_path(assigns(:game))
@@ -35,7 +35,7 @@ class GamesControllerTest < ActionController::TestCase
end
test "should update game" do
- patch :update, id: @game, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, set_rounds: @game.set_rounds }
+ patch :update, id: @game, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, scoring_method: @game.scoring_method, set_rounds: @game.set_rounds }
assert_redirected_to game_path(assigns(:game))
end
diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb
index 0e5673c..0ee875a 100644
--- a/test/controllers/tournaments_controller_test.rb
+++ b/test/controllers/tournaments_controller_test.rb
@@ -18,7 +18,7 @@ class TournamentsControllerTest < ActionController::TestCase
test "should create tournament" do
assert_difference('Tournament.count') do
- post :create, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, set_rounds: @tournament.set_rounds, status: @tournament.status }
+ post :create, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, scoring_method: @tournament.scoring_method, set_rounds: @tournament.set_rounds, status: @tournament.status }
end
assert_redirected_to tournament_path(assigns(:tournament))
@@ -35,7 +35,7 @@ class TournamentsControllerTest < ActionController::TestCase
end
test "should update tournament" do
- patch :update, id: @tournament, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, set_rounds: @tournament.set_rounds, status: @tournament.status }
+ patch :update, id: @tournament, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, scoring_method: @tournament.scoring_method, set_rounds: @tournament.set_rounds, status: @tournament.status }
assert_redirected_to tournament_path(assigns(:tournament))
end
diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml
index b811dec..ac5bad8 100644
--- a/test/fixtures/games.yml
+++ b/test/fixtures/games.yml
@@ -10,6 +10,7 @@ one:
set_rounds: 1
randomized_teams: false
sampling_method: MyString
+ scoring_method: MyString
two:
parent_id:
@@ -21,3 +22,4 @@ two:
set_rounds: 1
randomized_teams: false
sampling_method: MyString
+ scoring_method: MyString
diff --git a/test/fixtures/tournament_stages.yml b/test/fixtures/tournament_stages.yml
index fdb263c..32eaba3 100644
--- a/test/fixtures/tournament_stages.yml
+++ b/test/fixtures/tournament_stages.yml
@@ -2,10 +2,12 @@
one:
tournament_id:
- scheduling: MyString
structure: MyText
+ scheduling_method: MyString
+ seeding_method: MyString
two:
tournament_id:
- scheduling: MyString
structure: MyText
+ scheduling_method: MyString
+ seeding_method: MyString
diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml
index 714a963..dd9b56d 100644
--- a/test/fixtures/tournaments.yml
+++ b/test/fixtures/tournaments.yml
@@ -11,6 +11,7 @@ one:
set_rounds: 1
randomized_teams: false
sampling_method: MyString
+ scoring_method: MyString
two:
game_id:
@@ -23,3 +24,4 @@ two:
set_rounds: 1
randomized_teams: false
sampling_method: MyString
+ scoring_method: MyString