diff options
-rw-r--r-- | app/models/api_requests.rb | 2 | ||||
-rw-r--r-- | app/models/tournament_preference.rb | 3 | ||||
-rw-r--r-- | app/models/tournament_setting.rb | 3 | ||||
-rw-r--r-- | db/migrate/20140421095649_create_simple_captcha_data.rb (renamed from db/migrate/20140410173725_create_simple_captcha_data.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135652_create_delayed_jobs.rb (renamed from db/migrate/20140410213731_create_delayed_jobs.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135654_create_servers.rb (renamed from db/migrate/20140410213738_create_servers.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135657_create_matches.rb (renamed from db/migrate/20140410213745_create_matches.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135700_create_teams.rb (renamed from db/migrate/20140410213752_create_teams.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135703_create_alerts.rb (renamed from db/migrate/20140410213758_create_alerts.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135706_create_pms.rb (renamed from db/migrate/20140410213805_create_pms.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135709_create_tournaments.rb (renamed from db/migrate/20140410213811_create_tournaments.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135712_create_games.rb (renamed from db/migrate/20140410213818_create_games.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135715_create_users.rb (renamed from db/migrate/20140410213824_create_users.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135718_create_sessions.rb (renamed from db/migrate/20140410213831_create_sessions.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135721_create_brackets.rb (renamed from db/migrate/20140410213838_create_brackets.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135723_create_server_settings.rb (renamed from db/migrate/20140410213844_create_server_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135726_create_game_settings.rb (renamed from db/migrate/20140410213851_create_game_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135729_create_tournament_settings.rb (renamed from db/migrate/20140410213857_create_tournament_preferences.rb) | 4 | ||||
-rw-r--r-- | db/migrate/20140421135732_create_scores.rb (renamed from db/migrate/20140410213903_create_scores.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135735_create_remote_usernames.rb (renamed from db/migrate/20140410213909_create_remote_usernames.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135738_create_bracket_matches.rb (renamed from db/migrate/20140410213916_create_bracket_matches.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135741_create_api_requests.rb | 9 | ||||
-rw-r--r-- | db/migrate/20140421135744_create_tournament_players_join_table.rb (renamed from db/migrate/20140410213922_create_tournament_players_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135747_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140410213928_create_tournament_hosts_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135749_create_team_user_join_table.rb (renamed from db/migrate/20140410213935_create_team_user_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135752_create_match_team_join_table.rb (renamed from db/migrate/20140410213941_create_match_team_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140421135803_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140410214006_add_hidden_attrs_to_user.rb) | 0 | ||||
-rw-r--r-- | db/schema.rb | 12 | ||||
-rw-r--r-- | test/fixtures/api_requests.yml | 7 | ||||
-rw-r--r-- | test/fixtures/tournament_settings.yml (renamed from test/fixtures/tournament_preferences.yml) | 0 | ||||
-rw-r--r-- | test/models/api_requests_test.rb (renamed from test/models/tournament_preference_test.rb) | 2 | ||||
-rw-r--r-- | test/models/tournament_setting_test.rb | 7 |
32 files changed, 40 insertions, 9 deletions
diff --git a/app/models/api_requests.rb b/app/models/api_requests.rb new file mode 100644 index 0000000..19c76e2 --- /dev/null +++ b/app/models/api_requests.rb @@ -0,0 +1,2 @@ +class ApiRequests < ActiveRecord::Base +end diff --git a/app/models/tournament_preference.rb b/app/models/tournament_preference.rb deleted file mode 100644 index 3d15061..0000000 --- a/app/models/tournament_preference.rb +++ /dev/null @@ -1,3 +0,0 @@ -class TournamentPreference < ActiveRecord::Base - belongs_to :tournament -end diff --git a/app/models/tournament_setting.rb b/app/models/tournament_setting.rb new file mode 100644 index 0000000..b3e6ace --- /dev/null +++ b/app/models/tournament_setting.rb @@ -0,0 +1,3 @@ +class TournamentSetting < ActiveRecord::Base + belongs_to :tournament +end diff --git a/db/migrate/20140410173725_create_simple_captcha_data.rb b/db/migrate/20140421095649_create_simple_captcha_data.rb index 4573b20..4573b20 100644 --- a/db/migrate/20140410173725_create_simple_captcha_data.rb +++ b/db/migrate/20140421095649_create_simple_captcha_data.rb diff --git a/db/migrate/20140410213731_create_delayed_jobs.rb b/db/migrate/20140421135652_create_delayed_jobs.rb index ec0dd93..ec0dd93 100644 --- a/db/migrate/20140410213731_create_delayed_jobs.rb +++ b/db/migrate/20140421135652_create_delayed_jobs.rb diff --git a/db/migrate/20140410213738_create_servers.rb b/db/migrate/20140421135654_create_servers.rb index fbe1b02..fbe1b02 100644 --- a/db/migrate/20140410213738_create_servers.rb +++ b/db/migrate/20140421135654_create_servers.rb diff --git a/db/migrate/20140410213745_create_matches.rb b/db/migrate/20140421135657_create_matches.rb index bdeb1cd..bdeb1cd 100644 --- a/db/migrate/20140410213745_create_matches.rb +++ b/db/migrate/20140421135657_create_matches.rb diff --git a/db/migrate/20140410213752_create_teams.rb b/db/migrate/20140421135700_create_teams.rb index fdf9a68..fdf9a68 100644 --- a/db/migrate/20140410213752_create_teams.rb +++ b/db/migrate/20140421135700_create_teams.rb diff --git a/db/migrate/20140410213758_create_alerts.rb b/db/migrate/20140421135703_create_alerts.rb index 68a8e10..68a8e10 100644 --- a/db/migrate/20140410213758_create_alerts.rb +++ b/db/migrate/20140421135703_create_alerts.rb diff --git a/db/migrate/20140410213805_create_pms.rb b/db/migrate/20140421135706_create_pms.rb index 93bb5c6..93bb5c6 100644 --- a/db/migrate/20140410213805_create_pms.rb +++ b/db/migrate/20140421135706_create_pms.rb diff --git a/db/migrate/20140410213811_create_tournaments.rb b/db/migrate/20140421135709_create_tournaments.rb index c0d8929..c0d8929 100644 --- a/db/migrate/20140410213811_create_tournaments.rb +++ b/db/migrate/20140421135709_create_tournaments.rb diff --git a/db/migrate/20140410213818_create_games.rb b/db/migrate/20140421135712_create_games.rb index 5e4f56f..5e4f56f 100644 --- a/db/migrate/20140410213818_create_games.rb +++ b/db/migrate/20140421135712_create_games.rb diff --git a/db/migrate/20140410213824_create_users.rb b/db/migrate/20140421135715_create_users.rb index 8032870..8032870 100644 --- a/db/migrate/20140410213824_create_users.rb +++ b/db/migrate/20140421135715_create_users.rb diff --git a/db/migrate/20140410213831_create_sessions.rb b/db/migrate/20140421135718_create_sessions.rb index f667f1e..f667f1e 100644 --- a/db/migrate/20140410213831_create_sessions.rb +++ b/db/migrate/20140421135718_create_sessions.rb diff --git a/db/migrate/20140410213838_create_brackets.rb b/db/migrate/20140421135721_create_brackets.rb index 8813bf2..8813bf2 100644 --- a/db/migrate/20140410213838_create_brackets.rb +++ b/db/migrate/20140421135721_create_brackets.rb diff --git a/db/migrate/20140410213844_create_server_settings.rb b/db/migrate/20140421135723_create_server_settings.rb index dfdd91b..dfdd91b 100644 --- a/db/migrate/20140410213844_create_server_settings.rb +++ b/db/migrate/20140421135723_create_server_settings.rb diff --git a/db/migrate/20140410213851_create_game_settings.rb b/db/migrate/20140421135726_create_game_settings.rb index b1caf5d..b1caf5d 100644 --- a/db/migrate/20140410213851_create_game_settings.rb +++ b/db/migrate/20140421135726_create_game_settings.rb diff --git a/db/migrate/20140410213857_create_tournament_preferences.rb b/db/migrate/20140421135729_create_tournament_settings.rb index 991d659..a2e8e66 100644 --- a/db/migrate/20140410213857_create_tournament_preferences.rb +++ b/db/migrate/20140421135729_create_tournament_settings.rb @@ -1,6 +1,6 @@ -class CreateTournamentPreferences < ActiveRecord::Migration +class CreateTournamentSettings < ActiveRecord::Migration def change - create_table :tournament_preferences do |t| + create_table :tournament_settings do |t| t.references :tournament, index: true t.integer :vartype t.string :name diff --git a/db/migrate/20140410213903_create_scores.rb b/db/migrate/20140421135732_create_scores.rb index 4ca0b0b..4ca0b0b 100644 --- a/db/migrate/20140410213903_create_scores.rb +++ b/db/migrate/20140421135732_create_scores.rb diff --git a/db/migrate/20140410213909_create_remote_usernames.rb b/db/migrate/20140421135735_create_remote_usernames.rb index e265985..e265985 100644 --- a/db/migrate/20140410213909_create_remote_usernames.rb +++ b/db/migrate/20140421135735_create_remote_usernames.rb diff --git a/db/migrate/20140410213916_create_bracket_matches.rb b/db/migrate/20140421135738_create_bracket_matches.rb index 3323e31..3323e31 100644 --- a/db/migrate/20140410213916_create_bracket_matches.rb +++ b/db/migrate/20140421135738_create_bracket_matches.rb diff --git a/db/migrate/20140421135741_create_api_requests.rb b/db/migrate/20140421135741_create_api_requests.rb new file mode 100644 index 0000000..544c330 --- /dev/null +++ b/db/migrate/20140421135741_create_api_requests.rb @@ -0,0 +1,9 @@ +class CreateApiRequests < ActiveRecord::Migration + def change + create_table :api_requests do |t| + t.string :api_name + + t.timestamps + end + end +end diff --git a/db/migrate/20140410213922_create_tournament_players_join_table.rb b/db/migrate/20140421135744_create_tournament_players_join_table.rb index be240e8..be240e8 100644 --- a/db/migrate/20140410213922_create_tournament_players_join_table.rb +++ b/db/migrate/20140421135744_create_tournament_players_join_table.rb diff --git a/db/migrate/20140410213928_create_tournament_hosts_join_table.rb b/db/migrate/20140421135747_create_tournament_hosts_join_table.rb index 7521d89..7521d89 100644 --- a/db/migrate/20140410213928_create_tournament_hosts_join_table.rb +++ b/db/migrate/20140421135747_create_tournament_hosts_join_table.rb diff --git a/db/migrate/20140410213935_create_team_user_join_table.rb b/db/migrate/20140421135749_create_team_user_join_table.rb index f3b57fc..f3b57fc 100644 --- a/db/migrate/20140410213935_create_team_user_join_table.rb +++ b/db/migrate/20140421135749_create_team_user_join_table.rb diff --git a/db/migrate/20140410213941_create_match_team_join_table.rb b/db/migrate/20140421135752_create_match_team_join_table.rb index c2ed1b7..c2ed1b7 100644 --- a/db/migrate/20140410213941_create_match_team_join_table.rb +++ b/db/migrate/20140421135752_create_match_team_join_table.rb diff --git a/db/migrate/20140410214006_add_hidden_attrs_to_user.rb b/db/migrate/20140421135803_add_hidden_attrs_to_user.rb index 9b5c505..9b5c505 100644 --- a/db/migrate/20140410214006_add_hidden_attrs_to_user.rb +++ b/db/migrate/20140421135803_add_hidden_attrs_to_user.rb diff --git a/db/schema.rb b/db/schema.rb index e6ad821..82ba3d5 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: 20140410214006) do +ActiveRecord::Schema.define(version: 20140421135803) do create_table "alerts", force: true do |t| t.integer "author_id" @@ -22,6 +22,12 @@ ActiveRecord::Schema.define(version: 20140410214006) do add_index "alerts", ["author_id"], name: "index_alerts_on_author_id" + create_table "api_requests", force: true do |t| + t.string "api_name" + t.datetime "created_at" + t.datetime "updated_at" + end + create_table "bracket_matches", force: true do |t| t.integer "bracket_id" t.integer "match_id" @@ -192,7 +198,7 @@ ActiveRecord::Schema.define(version: 20140410214006) do t.integer "user_id", null: false end - create_table "tournament_preferences", force: true do |t| + create_table "tournament_settings", force: true do |t| t.integer "tournament_id" t.integer "vartype" t.string "name" @@ -201,7 +207,7 @@ ActiveRecord::Schema.define(version: 20140410214006) do t.datetime "updated_at" end - add_index "tournament_preferences", ["tournament_id"], name: "index_tournament_preferences_on_tournament_id" + add_index "tournament_settings", ["tournament_id"], name: "index_tournament_settings_on_tournament_id" create_table "tournaments", force: true do |t| t.string "name" diff --git a/test/fixtures/api_requests.yml b/test/fixtures/api_requests.yml new file mode 100644 index 0000000..8739914 --- /dev/null +++ b/test/fixtures/api_requests.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + api_name: MyString + +two: + api_name: MyString diff --git a/test/fixtures/tournament_preferences.yml b/test/fixtures/tournament_settings.yml index aa5eaef..aa5eaef 100644 --- a/test/fixtures/tournament_preferences.yml +++ b/test/fixtures/tournament_settings.yml diff --git a/test/models/tournament_preference_test.rb b/test/models/api_requests_test.rb index e200b8e..18763a7 100644 --- a/test/models/tournament_preference_test.rb +++ b/test/models/api_requests_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class TournamentPreferenceTest < ActiveSupport::TestCase +class ApiRequestsTest < ActiveSupport::TestCase # test "the truth" do # assert true # end diff --git a/test/models/tournament_setting_test.rb b/test/models/tournament_setting_test.rb new file mode 100644 index 0000000..644df85 --- /dev/null +++ b/test/models/tournament_setting_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TournamentSettingTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end |