summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Gemfile21
-rw-r--r--Gemfile.lock36
-rw-r--r--app/assets/javascripts/ajax.js2
-rw-r--r--app/assets/javascripts/alerts.js.coffee3
-rw-r--r--app/assets/javascripts/application.js16
-rw-r--r--app/assets/javascripts/games.js.coffee3
-rw-r--r--app/assets/javascripts/main.js.coffee3
-rw-r--r--app/assets/javascripts/matches.js.coffee3
-rw-r--r--app/assets/javascripts/pms.js.coffee3
-rw-r--r--app/assets/javascripts/search.js.coffee3
-rw-r--r--app/assets/javascripts/servers.js.coffee3
-rw-r--r--app/assets/javascripts/sessions.js.coffee3
-rw-r--r--app/assets/javascripts/static.js.coffee3
-rw-r--r--app/assets/javascripts/teams.js.coffee3
-rw-r--r--app/assets/javascripts/tournaments.js.coffee3
-rw-r--r--app/assets/javascripts/users.js.coffee3
-rw-r--r--app/assets/stylesheets/alerts.css.scss3
-rw-r--r--app/assets/stylesheets/application.css7
-rw-r--r--app/assets/stylesheets/custom.css.scss7
-rw-r--r--app/assets/stylesheets/games.css.scss3
-rw-r--r--app/assets/stylesheets/main.css.scss3
-rw-r--r--app/assets/stylesheets/matches.css.scss3
-rw-r--r--app/assets/stylesheets/pms.css.scss3
-rw-r--r--app/assets/stylesheets/scaffolds.css.scss40
-rw-r--r--app/assets/stylesheets/search.css.scss3
-rw-r--r--app/assets/stylesheets/servers.css.scss3
-rw-r--r--app/assets/stylesheets/sessions.css.scss3
-rw-r--r--app/assets/stylesheets/static.css.scss4
-rw-r--r--app/assets/stylesheets/teams.css.scss3
-rw-r--r--app/assets/stylesheets/tournaments.css.scss3
-rw-r--r--app/assets/stylesheets/users.css.scss3
-rw-r--r--app/controllers/alerts_controller.rb74
-rw-r--r--app/controllers/games_controller.rb74
-rw-r--r--app/controllers/main_controller.rb2
-rw-r--r--app/controllers/matches_controller.rb74
-rw-r--r--app/controllers/pms_controller.rb74
-rw-r--r--app/controllers/search_controller.rb2
-rw-r--r--app/controllers/servers_controller.rb74
-rw-r--r--app/controllers/sessions_controller.rb32
-rw-r--r--app/controllers/teams_controller.rb74
-rw-r--r--app/controllers/tournaments_controller.rb6
-rw-r--r--app/controllers/users_controller.rb82
-rw-r--r--app/helpers/alerts_helper.rb2
-rw-r--r--app/helpers/games_helper.rb2
-rw-r--r--app/helpers/main_helper.rb2
-rw-r--r--app/helpers/matches_helper.rb2
-rw-r--r--app/helpers/pms_helper.rb2
-rw-r--r--app/helpers/search_helper.rb2
-rw-r--r--app/helpers/servers_helper.rb2
-rw-r--r--app/helpers/static_helper.rb2
-rw-r--r--app/helpers/teams_helper.rb2
-rw-r--r--app/helpers/tournaments_helper.rb2
-rw-r--r--app/models/alert.rb3
-rw-r--r--app/models/game_attribute.rb3
-rw-r--r--app/models/match.rb3
-rw-r--r--app/models/pm.rb4
-rw-r--r--app/models/server.rb2
-rw-r--r--app/models/server_settings.rb2
-rw-r--r--app/models/team.rb2
-rw-r--r--app/models/team_match_pair.rb4
-rw-r--r--app/models/tournament.rb3
-rw-r--r--app/models/tournament_option.rb2
-rw-r--r--app/models/user.rb241
-rw-r--r--app/models/user_team_pair.rb4
-rw-r--r--app/views/alerts/_form.html.erb25
-rw-r--r--app/views/alerts/edit.html.erb6
-rw-r--r--app/views/alerts/index.html.erb29
-rw-r--r--app/views/alerts/index.json.jbuilder4
-rw-r--r--app/views/alerts/new.html.erb5
-rw-r--r--app/views/alerts/show.html.erb12
-rw-r--r--app/views/alerts/show.json.jbuilder1
-rw-r--r--app/views/games/_form.html.erb37
-rw-r--r--app/views/games/edit.html.erb6
-rw-r--r--app/views/games/index.html.erb4
-rw-r--r--app/views/games/index.json.jbuilder4
-rw-r--r--app/views/games/new.html.erb5
-rw-r--r--app/views/games/show.html.erb27
-rw-r--r--app/views/games/show.json.jbuilder1
-rw-r--r--app/views/layouts/application.html.erb48
-rw-r--r--app/views/matches/_form.html.erb25
-rw-r--r--app/views/matches/edit.html.erb6
-rw-r--r--app/views/matches/index.html.erb29
-rw-r--r--app/views/matches/index.json.jbuilder4
-rw-r--r--app/views/matches/new.html.erb5
-rw-r--r--app/views/matches/show.html.erb12
-rw-r--r--app/views/matches/show.json.jbuilder1
-rw-r--r--app/views/pms/_form.html.erb29
-rw-r--r--app/views/pms/edit.html.erb6
-rw-r--r--app/views/pms/index.html.erb31
-rw-r--r--app/views/pms/index.json.jbuilder4
-rw-r--r--app/views/pms/new.html.erb5
-rw-r--r--app/views/pms/show.html.erb17
-rw-r--r--app/views/pms/show.json.jbuilder1
-rw-r--r--app/views/servers/_form.html.erb17
-rw-r--r--app/views/servers/edit.html.erb6
-rw-r--r--app/views/servers/index.html.erb25
-rw-r--r--app/views/servers/index.json.jbuilder4
-rw-r--r--app/views/servers/new.html.erb5
-rw-r--r--app/views/servers/show.html.erb2
-rw-r--r--app/views/servers/show.json.jbuilder1
-rw-r--r--app/views/sessions/new.html.erb6
-rw-r--r--app/views/static/homepage.html.erb12
-rw-r--r--app/views/teams/_form.html.erb17
-rw-r--r--app/views/teams/edit.html.erb6
-rw-r--r--app/views/teams/index.html.erb25
-rw-r--r--app/views/teams/index.json.jbuilder4
-rw-r--r--app/views/teams/new.html.erb5
-rw-r--r--app/views/teams/show.html.erb2
-rw-r--r--app/views/teams/show.json.jbuilder1
-rw-r--r--app/views/tournaments/_form.html.erb21
-rw-r--r--app/views/tournaments/_selected.html.erb25
-rw-r--r--app/views/tournaments/edit.html.erb6
-rw-r--r--app/views/tournaments/index.html.erb27
-rw-r--r--app/views/tournaments/index.json.jbuilder4
-rw-r--r--app/views/tournaments/new.html.erb3
-rw-r--r--app/views/tournaments/show.html.erb7
-rw-r--r--app/views/tournaments/show.json.jbuilder1
-rw-r--r--app/views/users/_form.html.erb10
-rw-r--r--app/views/users/edit.html.erb6
-rw-r--r--app/views/users/index.html.erb11
-rw-r--r--app/views/users/index.json.jbuilder2
-rw-r--r--app/views/users/new.html.erb10
-rw-r--r--app/views/users/show.html.erb18
-rw-r--r--app/views/users/show.json.jbuilder1
-rw-r--r--config/routes.rb76
-rw-r--r--db/migrate/20140304043618_create_servers.rb8
-rw-r--r--db/migrate/20140304043620_create_tournaments.rb (renamed from db/migrate/20140220221232_create_tournaments.rb)1
-rw-r--r--db/migrate/20140304043622_create_matches.rb10
-rw-r--r--db/migrate/20140304043624_create_teams.rb (renamed from db/migrate/20140220221239_create_teams.rb)0
-rw-r--r--db/migrate/20140304043626_create_alerts.rb (renamed from db/migrate/20140220221254_create_alerts.rb)0
-rw-r--r--db/migrate/20140304043629_create_pms.rb (renamed from db/migrate/20140220221257_create_pms.rb)0
-rw-r--r--db/migrate/20140304043631_create_games.rb13
-rw-r--r--db/migrate/20140304043633_create_users.rb (renamed from db/migrate/20140228164606_create_users.rb)2
-rw-r--r--db/migrate/20140304043635_create_game_attributes.rb (renamed from db/migrate/20140228014552_create_game_attributes.rb)0
-rw-r--r--db/migrate/20140304043637_create_server_settings.rb (renamed from db/migrate/20140220221301_create_server_settings.rb)0
-rw-r--r--db/migrate/20140304043639_create_user_team_pairs.rb (renamed from db/migrate/20140220221247_create_user_team_pairs.rb)0
-rw-r--r--db/migrate/20140304043642_create_team_match_pairs.rb (renamed from db/migrate/20140220221250_create_team_match_pairs.rb)0
-rw-r--r--db/migrate/20140304043652_add_index_to_users_email.rb (renamed from db/migrate/20140301210808_add_index_to_users_email.rb)0
-rw-r--r--db/migrate/20140304043654_add_index_to_users_user_name.rb (renamed from db/migrate/20140301211316_add_index_to_users_user_name.rb)0
-rw-r--r--db/migrate/20140304043656_add_password_digest_to_users.rb (renamed from db/migrate/20140301213814_add_password_digest_to_users.rb)0
-rw-r--r--db/migrate/20140304043658_add_remember_token_to_users.rb (renamed from db/migrate/20140302210209_add_remember_token_to_users.rb)0
-rw-r--r--db/migrate/20140304043700_create_tournament_options.rb (renamed from db/migrate/20140228014607_create_tournament_options.rb)0
-rw-r--r--db/schema.rb127
-rw-r--r--generate.bat8
-rwxr-xr-xgenerate.sh24
-rwxr-xr-xstart.sh1
-rw-r--r--test/controllers/.keep (renamed from app/assets/images/.keep)0
-rw-r--r--test/controllers/alerts_controller_test.rb49
-rw-r--r--test/controllers/games_controller_test.rb49
-rw-r--r--test/controllers/main_controller_test.rb7
-rw-r--r--test/controllers/matches_controller_test.rb49
-rw-r--r--test/controllers/pms_controller_test.rb49
-rw-r--r--test/controllers/search_controller_test.rb7
-rw-r--r--test/controllers/servers_controller_test.rb49
-rw-r--r--test/controllers/sessions_controller_test.rb7
-rw-r--r--test/controllers/static_controller_test.rb7
-rw-r--r--test/controllers/teams_controller_test.rb49
-rw-r--r--test/controllers/tournaments_controller_test.rb49
-rw-r--r--test/controllers/users_controller_test.rb49
-rw-r--r--test/fixtures/.keep0
-rw-r--r--test/fixtures/alerts.yml9
-rw-r--r--test/fixtures/game_attributes.yml11
-rw-r--r--test/fixtures/games.yml15
-rw-r--r--test/fixtures/matches.yml9
-rw-r--r--test/fixtures/pms.yml11
-rw-r--r--test/fixtures/server_settings.yml11
-rw-r--r--test/fixtures/servers.yml11
-rw-r--r--test/fixtures/team_match_pairs.yml9
-rw-r--r--test/fixtures/teams.yml11
-rw-r--r--test/fixtures/tournament_options.yml11
-rw-r--r--test/fixtures/tournaments.yml7
-rw-r--r--test/fixtures/user_team_pairs.yml9
-rw-r--r--test/fixtures/users.yml11
-rw-r--r--test/helpers/.keep0
-rw-r--r--test/helpers/alerts_helper_test.rb4
-rw-r--r--test/helpers/games_helper_test.rb4
-rw-r--r--test/helpers/main_helper_test.rb4
-rw-r--r--test/helpers/matches_helper_test.rb4
-rw-r--r--test/helpers/pms_helper_test.rb4
-rw-r--r--test/helpers/search_helper_test.rb4
-rw-r--r--test/helpers/servers_helper_test.rb4
-rw-r--r--test/helpers/sessions_helper_test.rb4
-rw-r--r--test/helpers/static_helper_test.rb4
-rw-r--r--test/helpers/teams_helper_test.rb4
-rw-r--r--test/helpers/tournaments_helper_test.rb4
-rw-r--r--test/helpers/users_helper_test.rb4
-rw-r--r--test/integration/.keep0
-rw-r--r--test/mailers/.keep0
-rw-r--r--test/models/.keep0
-rw-r--r--test/models/alert_test.rb7
-rw-r--r--test/models/game_attribute_test.rb7
-rw-r--r--test/models/game_test.rb7
-rw-r--r--test/models/match_test.rb7
-rw-r--r--test/models/pm_test.rb7
-rw-r--r--test/models/server_settings_test.rb7
-rw-r--r--test/models/server_test.rb7
-rw-r--r--test/models/team_match_pair_test.rb7
-rw-r--r--test/models/team_test.rb7
-rw-r--r--test/models/tournament_option_test.rb7
-rw-r--r--test/models/tournament_test.rb7
-rw-r--r--test/models/user_team_pair_test.rb7
-rw-r--r--test/models/user_test.rb7
-rw-r--r--test/test_helper.rb15
204 files changed, 2336 insertions, 388 deletions
diff --git a/.gitignore b/.gitignore
index 9e29fc1..0e07518 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,7 +17,8 @@
# The above is from Rails. The following is from Luke.
/vendor/bundle
-# As noted aboce, you probably want to add the following to your global git config.
+nohup.out
+# As noted above, you probably want to add the following to your global git config.
.~lock.*
*~
*#
diff --git a/Gemfile b/Gemfile
index cb3d6f6..fbf6232 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,24 +1,23 @@
+#!/usr/bin/ruby -h # not executable, but as a hint to text editors
+
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
-
# bcrypt is used for password digesting
gem 'bcrypt-ruby', '3.1.2'
group :development, :test do
-
-# Use sqlite3 as the database for Active Record
+ # Use sqlite3 as the database for Active Record
gem 'sqlite3'
- gem 'rspec-rails', '2.13.1'
-end
-
-group :test do
- gem 'selenium-webdriver', '2.35.1'
- gem 'capybara', '2.1.0'
end
+# group :test do
+# gem 'rspec-rails', '2.13.1'
+# gem 'selenium-webdriver', '2.35.1'
+# gem 'capybara', '2.1.0'
+# end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
@@ -43,8 +42,8 @@ gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
- # bundle exec rake doc:rails generates the API under doc/api.
- gem 'sdoc', require: false
+ # bundle exec rake doc:rails generates the API under doc/api.
+ gem 'sdoc', require: false
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 9dd0199..7899a93 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -31,14 +31,6 @@ GEM
bootstrap-sass (3.1.1.0)
sass (~> 3.2)
builder (3.1.4)
- capybara (2.1.0)
- mime-types (>= 1.16)
- nokogiri (>= 1.3.3)
- rack (>= 1.0.0)
- rack-test (>= 0.5.4)
- xpath (~> 2.0)
- childprocess (0.5.1)
- ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@@ -46,10 +38,8 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.7.0)
- diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.0.2)
- ffi (1.9.3)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
@@ -64,11 +54,8 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
- mini_portile (0.5.2)
minitest (4.7.5)
multi_json (1.8.4)
- nokogiri (1.6.1)
- mini_portile (~> 0.5.0)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
@@ -90,18 +77,6 @@ GEM
rdoc (4.1.1)
json (~> 1.4)
ref (1.0.5)
- rspec-core (2.13.1)
- rspec-expectations (2.13.0)
- diff-lcs (>= 1.1.3, < 2.0)
- rspec-mocks (2.13.1)
- rspec-rails (2.13.1)
- actionpack (>= 3.0)
- activesupport (>= 3.0)
- railties (>= 3.0)
- rspec-core (~> 2.13.0)
- rspec-expectations (~> 2.13.0)
- rspec-mocks (~> 2.13.0)
- rubyzip (0.9.9)
sass (3.2.14)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
@@ -110,11 +85,6 @@ GEM
sdoc (0.4.0)
json (~> 1.8)
rdoc (~> 4.0, < 5.0)
- selenium-webdriver (2.35.1)
- childprocess (>= 0.2.5)
- multi_json (~> 1.0)
- rubyzip (< 1.0.0)
- websocket (~> 1.0.4)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
@@ -141,9 +111,6 @@ GEM
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
- websocket (1.0.7)
- xpath (2.0.0)
- nokogiri (~> 1.3)
PLATFORMS
ruby
@@ -151,15 +118,12 @@ PLATFORMS
DEPENDENCIES
bcrypt-ruby (= 3.1.2)
bootstrap-sass
- capybara (= 2.1.0)
coffee-rails (~> 4.0.0)
jbuilder (~> 1.2)
jquery-rails
rails (= 4.0.2)
- rspec-rails (= 2.13.1)
sass-rails (~> 4.0.0)
sdoc
- selenium-webdriver (= 2.35.1)
sqlite3
therubyracer
turbolinks
diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js
index 475dddc..31578dd 100644
--- a/app/assets/javascripts/ajax.js
+++ b/app/assets/javascripts/ajax.js
@@ -5,7 +5,7 @@ function populate() {
var gameType = e.options[e.selectedIndex].text;
if (gameType != "Select a Game Type") {
alert(gameType + " was Selected!");
- //populate optionArray
+ //populate optionArray via AJAX
//select * from tournament_settings where gametype = GameType
for(var option in optionArray){
//identify the number of
diff --git a/app/assets/javascripts/alerts.js.coffee b/app/assets/javascripts/alerts.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/alerts.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
deleted file mode 100644
index d6925fa..0000000
--- a/app/assets/javascripts/application.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// This is a manifest file that'll be compiled into application.js, which will include all the files
-// listed below.
-//
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
-// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
-//
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// compiled file.
-//
-// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
-// about supported directives.
-//
-//= require jquery
-//= require jquery_ujs
-//= require turbolinks
-//= require_tree .
diff --git a/app/assets/javascripts/games.js.coffee b/app/assets/javascripts/games.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/games.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/main.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/matches.js.coffee b/app/assets/javascripts/matches.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/matches.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/pms.js.coffee b/app/assets/javascripts/pms.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/pms.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/search.js.coffee b/app/assets/javascripts/search.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/search.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/servers.js.coffee b/app/assets/javascripts/servers.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/servers.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/sessions.js.coffee b/app/assets/javascripts/sessions.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/sessions.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/static.js.coffee b/app/assets/javascripts/static.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/static.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/teams.js.coffee b/app/assets/javascripts/teams.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/teams.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/tournaments.js.coffee b/app/assets/javascripts/tournaments.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/tournaments.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/javascripts/users.js.coffee b/app/assets/javascripts/users.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/users.js.coffee
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
diff --git a/app/assets/stylesheets/alerts.css.scss b/app/assets/stylesheets/alerts.css.scss
new file mode 100644
index 0000000..c01a620
--- /dev/null
+++ b/app/assets/stylesheets/alerts.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the alerts controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 355c0d4..896d7c1 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -9,16 +9,15 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
- *= require_tree
-
+ *= require_tree .
*/
#query{
- background-color: #888;
+ background-color: white;
border: 2px solid #ED9C28;
border-radius: 5px;
color: #FFF;
font-weight: bold;
height: 30px;
-} \ No newline at end of file
+}
diff --git a/app/assets/stylesheets/custom.css.scss b/app/assets/stylesheets/custom.css.scss
index b0692d8..25cac21 100644
--- a/app/assets/stylesheets/custom.css.scss
+++ b/app/assets/stylesheets/custom.css.scss
@@ -1 +1,6 @@
-@import "bootstrap"; \ No newline at end of file
+@import "bootstrap";
+
+header > nav {
+ @extend .navbar;
+ @extend .navbar-inverse;
+}
diff --git a/app/assets/stylesheets/games.css.scss b/app/assets/stylesheets/games.css.scss
new file mode 100644
index 0000000..db1b7bc
--- /dev/null
+++ b/app/assets/stylesheets/games.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the games controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/main.css.scss b/app/assets/stylesheets/main.css.scss
new file mode 100644
index 0000000..a0d94c1
--- /dev/null
+++ b/app/assets/stylesheets/main.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the main controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/matches.css.scss b/app/assets/stylesheets/matches.css.scss
new file mode 100644
index 0000000..4c396e3
--- /dev/null
+++ b/app/assets/stylesheets/matches.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the matches controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/pms.css.scss b/app/assets/stylesheets/pms.css.scss
new file mode 100644
index 0000000..5106093
--- /dev/null
+++ b/app/assets/stylesheets/pms.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the pms controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss
index 6ec6a8f..566d05d 100644
--- a/app/assets/stylesheets/scaffolds.css.scss
+++ b/app/assets/stylesheets/scaffolds.css.scss
@@ -4,6 +4,13 @@ body {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
+<<<<<<< HEAD
+=======
+}
+
+h1, h2, h3, h4, h5{
+ color: #0f0f0f;
+>>>>>>> aca85cf084702c29014a17eafb090421061fae8b
}
p, ol, ul, td {
@@ -24,8 +31,8 @@ a {
color: #666;
}
&:hover {
- color: #fff;
- background-color: #000;
+ color: #000;
+ text-decoration: none;
}
}
@@ -67,3 +74,32 @@ div {
list-style: square;
}
}
+<<<<<<< HEAD
+=======
+
+hr {
+ -moz-border-bottom-colors: none;
+ -moz-border-image: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ border-color: #999 -moz-use-text-color #FFFFFF;
+ border-style: solid none;
+ border-width: 1px 0;
+ margin: 18px 0;
+}
+
+.navbar-brand {
+ a{
+ &:hover {
+ color: #FFF;
+ font-weight: normal;
+ text-decoration: none;
+ }
+ }
+}
+
+#footer{
+ text-align: center;
+}
+>>>>>>> aca85cf084702c29014a17eafb090421061fae8b
diff --git a/app/assets/stylesheets/search.css.scss b/app/assets/stylesheets/search.css.scss
new file mode 100644
index 0000000..22fd394
--- /dev/null
+++ b/app/assets/stylesheets/search.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the search controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/servers.css.scss b/app/assets/stylesheets/servers.css.scss
new file mode 100644
index 0000000..4710386
--- /dev/null
+++ b/app/assets/stylesheets/servers.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the servers controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/sessions.css.scss b/app/assets/stylesheets/sessions.css.scss
new file mode 100644
index 0000000..7bef9cf
--- /dev/null
+++ b/app/assets/stylesheets/sessions.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the sessions controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/static.css.scss b/app/assets/stylesheets/static.css.scss
index 9457e7f..d73e77d 100644
--- a/app/assets/stylesheets/static.css.scss
+++ b/app/assets/stylesheets/static.css.scss
@@ -1,6 +1,6 @@
// Place all the styles related to the static controller here.
// They will automatically be included in application.css.
-// You can use Sass (SCSS) here:
+// You can use Sass (SCSS) here: http://sass-lang.com/
.jumbotron {
background-color: #FFF;
@@ -9,4 +9,4 @@
line-height: 1.5em;
}
-} \ No newline at end of file
+}
diff --git a/app/assets/stylesheets/teams.css.scss b/app/assets/stylesheets/teams.css.scss
new file mode 100644
index 0000000..320d00d
--- /dev/null
+++ b/app/assets/stylesheets/teams.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the teams controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/tournaments.css.scss b/app/assets/stylesheets/tournaments.css.scss
new file mode 100644
index 0000000..e372b90
--- /dev/null
+++ b/app/assets/stylesheets/tournaments.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the tournaments controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/assets/stylesheets/users.css.scss b/app/assets/stylesheets/users.css.scss
new file mode 100644
index 0000000..1efc835
--- /dev/null
+++ b/app/assets/stylesheets/users.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the users controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb
new file mode 100644
index 0000000..873e9b7
--- /dev/null
+++ b/app/controllers/alerts_controller.rb
@@ -0,0 +1,74 @@
+class AlertsController < ApplicationController
+ before_action :set_alert, only: [:show, :edit, :update, :destroy]
+
+ # GET /alerts
+ # GET /alerts.json
+ def index
+ @alerts = Alert.all
+ end
+
+ # GET /alerts/1
+ # GET /alerts/1.json
+ def show
+ end
+
+ # GET /alerts/new
+ def new
+ @alert = Alert.new
+ end
+
+ # GET /alerts/1/edit
+ def edit
+ end
+
+ # POST /alerts
+ # POST /alerts.json
+ def create
+ @alert = Alert.new(alert_params)
+
+ respond_to do |format|
+ if @alert.save
+ format.html { redirect_to @alert, notice: 'Alert was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @alert }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @alert.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /alerts/1
+ # PATCH/PUT /alerts/1.json
+ def update
+ respond_to do |format|
+ if @alert.update(alert_params)
+ format.html { redirect_to @alert, notice: 'Alert was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @alert.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /alerts/1
+ # DELETE /alerts/1.json
+ def destroy
+ @alert.destroy
+ respond_to do |format|
+ format.html { redirect_to alerts_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_alert
+ @alert = Alert.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def alert_params
+ params.require(:alert).permit(:author_id, :message)
+ end
+end
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
new file mode 100644
index 0000000..4ecff17
--- /dev/null
+++ b/app/controllers/games_controller.rb
@@ -0,0 +1,74 @@
+class GamesController < ApplicationController
+ before_action :set_game, only: [:show, :edit, :update, :destroy]
+
+ # GET /games
+ # GET /games.json
+ def index
+ @games = Game.all
+ end
+
+ # GET /games/1
+ # GET /games/1.json
+ def show
+ end
+
+ # GET /games/new
+ def new
+ @game = Game.new
+ end
+
+ # GET /games/1/edit
+ def edit
+ end
+
+ # POST /games
+ # POST /games.json
+ def create
+ @game = Game.new(game_params)
+
+ respond_to do |format|
+ if @game.save
+ format.html { redirect_to @game, notice: 'Game was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @game }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @game.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /games/1
+ # PATCH/PUT /games/1.json
+ def update
+ respond_to do |format|
+ if @game.update(game_params)
+ format.html { redirect_to @game, notice: 'Game was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @game.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /games/1
+ # DELETE /games/1.json
+ def destroy
+ @game.destroy
+ respond_to do |format|
+ format.html { redirect_to games_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_game
+ @game = Game.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def game_params
+ params.require(:game).permit(:name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams)
+ end
+end
diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb
new file mode 100644
index 0000000..6519d7b
--- /dev/null
+++ b/app/controllers/main_controller.rb
@@ -0,0 +1,2 @@
+class MainController < ApplicationController
+end
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb
new file mode 100644
index 0000000..984be3f
--- /dev/null
+++ b/app/controllers/matches_controller.rb
@@ -0,0 +1,74 @@
+class MatchesController < ApplicationController
+ before_action :set_match, only: [:show, :edit, :update, :destroy]
+
+ # GET /matches
+ # GET /matches.json
+ def index
+ @matches = Match.all
+ end
+
+ # GET /matches/1
+ # GET /matches/1.json
+ def show
+ end
+
+ # GET /matches/new
+ def new
+ @match = Match.new
+ end
+
+ # GET /matches/1/edit
+ def edit
+ end
+
+ # POST /matches
+ # POST /matches.json
+ def create
+ @match = Match.new(match_params)
+
+ respond_to do |format|
+ if @match.save
+ format.html { redirect_to @match, notice: 'Match was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @match }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @match.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /matches/1
+ # PATCH/PUT /matches/1.json
+ def update
+ respond_to do |format|
+ if @match.update(match_params)
+ format.html { redirect_to @match, notice: 'Match was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @match.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /matches/1
+ # DELETE /matches/1.json
+ def destroy
+ @match.destroy
+ respond_to do |format|
+ format.html { redirect_to matches_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_match
+ @match = Match.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def match_params
+ params.require(:match).permit(:tournament_id, :name)
+ end
+end
diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb
new file mode 100644
index 0000000..5dd0d69
--- /dev/null
+++ b/app/controllers/pms_controller.rb
@@ -0,0 +1,74 @@
+class PmsController < ApplicationController
+ before_action :set_pm, only: [:show, :edit, :update, :destroy]
+
+ # GET /pms
+ # GET /pms.json
+ def index
+ @pms = Pm.all
+ end
+
+ # GET /pms/1
+ # GET /pms/1.json
+ def show
+ end
+
+ # GET /pms/new
+ def new
+ @pm = Pm.new
+ end
+
+ # GET /pms/1/edit
+ def edit
+ end
+
+ # POST /pms
+ # POST /pms.json
+ def create
+ @pm = Pm.new(pm_params)
+
+ respond_to do |format|
+ if @pm.save
+ format.html { redirect_to @pm, notice: 'Pm was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @pm }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @pm.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /pms/1
+ # PATCH/PUT /pms/1.json
+ def update
+ respond_to do |format|
+ if @pm.update(pm_params)
+ format.html { redirect_to @pm, notice: 'Pm was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @pm.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /pms/1
+ # DELETE /pms/1.json
+ def destroy
+ @pm.destroy
+ respond_to do |format|
+ format.html { redirect_to pms_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_pm
+ @pm = Pm.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def pm_params
+ params.require(:pm).permit(:author_id, :recipient_id, :message)
+ end
+end
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
new file mode 100644
index 0000000..ee61487
--- /dev/null
+++ b/app/controllers/search_controller.rb
@@ -0,0 +1,2 @@
+class SearchController < ApplicationController
+end
diff --git a/app/controllers/servers_controller.rb b/app/controllers/servers_controller.rb
new file mode 100644
index 0000000..7d54eb6
--- /dev/null
+++ b/app/controllers/servers_controller.rb
@@ -0,0 +1,74 @@
+class ServersController < ApplicationController
+ before_action :set_server, only: [:show, :edit, :update, :destroy]
+
+ # GET /servers
+ # GET /servers.json
+ def index
+ @servers = Server.all
+ end
+
+ # GET /servers/1
+ # GET /servers/1.json
+ def show
+ end
+
+ # GET /servers/new
+ def new
+ @server = Server.new
+ end
+
+ # GET /servers/1/edit
+ def edit
+ end
+
+ # POST /servers
+ # POST /servers.json
+ def create
+ @server = Server.new(server_params)
+
+ respond_to do |format|
+ if @server.save
+ format.html { redirect_to @server, notice: 'Server was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @server }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @server.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /servers/1
+ # PATCH/PUT /servers/1.json
+ def update
+ respond_to do |format|
+ if @server.update(server_params)
+ format.html { redirect_to @server, notice: 'Server was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @server.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /servers/1
+ # DELETE /servers/1.json
+ def destroy
+ @server.destroy
+ respond_to do |format|
+ format.html { redirect_to servers_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_server
+ @server = Server.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def server_params
+ params[:server]
+ end
+end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 68cb949..fa5d024 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -1,22 +1,28 @@
class SessionsController < ApplicationController
+ # GET /sessions/new
def new
+ if @user.nil?
+ @user = User.new
+ end
end
- # find the user and create a new session
- def create
- user = User.find_by(email: params[:session][:email].downcase)
- if user && user.authenticate(params[:session][:password])
- sign_in user
- redirect_to root_path
- else
- render 'new'
- end
- end
+ # POST /sessions
+ def create
+ # find the user...
+ @user = User.find_by(email: params[:session][:email].downcase)
+ # ... and create a new session
+ if @user && @user.authenticate(params[:session][:password])
+ sign_in @user
+ redirect_to root_path
+ else
+ redirect_to new_session_path
+ end
+ end
+ # DELETE /sessions/current
def destroy
- sign_out
- redirect_to root_path
+ sign_out
+ redirect_to root_path
end
-
end
diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb
new file mode 100644
index 0000000..f14c97f
--- /dev/null
+++ b/app/controllers/teams_controller.rb
@@ -0,0 +1,74 @@
+class TeamsController < ApplicationController
+ before_action :set_team, only: [:show, :edit, :update, :destroy]
+
+ # GET /teams
+ # GET /teams.json
+ def index
+ @teams = Team.all
+ end
+
+ # GET /teams/1
+ # GET /teams/1.json
+ def show
+ end
+
+ # GET /teams/new
+ def new
+ @team = Team.new
+ end
+
+ # GET /teams/1/edit
+ def edit
+ end
+
+ # POST /teams
+ # POST /teams.json
+ def create
+ @team = Team.new(team_params)
+
+ respond_to do |format|
+ if @team.save
+ format.html { redirect_to @team, notice: 'Team was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @team }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @team.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PATCH/PUT /teams/1
+ # PATCH/PUT /teams/1.json
+ def update
+ respond_to do |format|
+ if @team.update(team_params)
+ format.html { redirect_to @team, notice: 'Team was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @team.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /teams/1
+ # DELETE /teams/1.json
+ def destroy
+ @team.destroy
+ respond_to do |format|
+ format.html { redirect_to teams_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_team
+ @team = Team.find(params[:id])
+ end
+
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def team_params
+ params[:team]
+ end
+end
diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb
index 56233b6..27ba020 100644
--- a/app/controllers/tournaments_controller.rb
+++ b/app/controllers/tournaments_controller.rb
@@ -22,6 +22,12 @@ class TournamentsController < ApplicationController
def edit
end
+ def selected
+ render :update do |page|
+ page.replace_html 'ajax-form', :partial => 'selected'
+ end
+ end
+
# POST /tournaments
# POST /tournaments.json
def create
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 6436e4e..284892b 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,26 +1,76 @@
class UsersController < ApplicationController
+ before_action :set_user, only: [:show, :edit, :update, :destroy]
- def new
- @user = User.new
- end
+ # GET /users
+ # GET /users.json
+ def index
+ @users = User.all
+ end
+
+ # GET /users/1
+ # GET /users/1.json
+ def show
+ @user = User.find(params[:id])
+ end
+
+ # GET /users/new
+ def new
+ @user = User.new
+ end
+
+ # GET /users/1/edit
+ def edit
+ end
+ # POST /users
+ # POST /users.json
def create
@user = User.new(user_params)
- if @user.save
- sign_in @user
- redirect_to root_path
- else
- render 'new'
+
+ respond_to do |format|
+ if @user.save
+ sign_in @user
+ format.html { redirect_to root_path, notice: 'User was successfully created.' }
+ format.json { render action: 'show', status: :created, location: @user }
+ else
+ format.html { render action: 'new' }
+ format.json { render json: @user.errors, status: :unprocessable_entity }
+ end
end
end
- def show
- @user = User.find(param[:id])
- end
+ # PATCH/PUT /users/1
+ # PATCH/PUT /users/1.json
+ def update
+ respond_to do |format|
+ if @user.update(user_params)
+ format.html { redirect_to @user, notice: 'User was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: 'edit' }
+ format.json { render json: @user.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /users/1
+ # DELETE /users/1.json
+ def destroy
+ @user.destroy
+ respond_to do |format|
+ format.html { redirect_to users_url }
+ format.json { head :no_content }
+ end
+ end
+
+ private
+ # Use callbacks to share common setup or constraints between actions.
+ def set_user
+ @user = User.find(params[:id])
+ end
- private
-
- def user_params
- params.require(:user).permit(:name, :email, :user_name, :password, :password_confirmation)
- end
+ # Never trust parameters from the scary internet, only allow the white list through.
+ def user_params
+ params.require(:user).permit(:name, :email, :user_name, :password, :password_confirmation)
+ end
end
diff --git a/app/helpers/alerts_helper.rb b/app/helpers/alerts_helper.rb
new file mode 100644
index 0000000..20f5b50
--- /dev/null
+++ b/app/helpers/alerts_helper.rb
@@ -0,0 +1,2 @@
+module AlertsHelper
+end
diff --git a/app/helpers/games_helper.rb b/app/helpers/games_helper.rb
new file mode 100644
index 0000000..2ef8c1f
--- /dev/null
+++ b/app/helpers/games_helper.rb
@@ -0,0 +1,2 @@
+module GamesHelper
+end
diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb
new file mode 100644
index 0000000..826effe
--- /dev/null
+++ b/app/helpers/main_helper.rb
@@ -0,0 +1,2 @@
+module MainHelper
+end
diff --git a/app/helpers/matches_helper.rb b/app/helpers/matches_helper.rb
new file mode 100644
index 0000000..cc2ef83
--- /dev/null
+++ b/app/helpers/matches_helper.rb
@@ -0,0 +1,2 @@
+module MatchesHelper
+end
diff --git a/app/helpers/pms_helper.rb b/app/helpers/pms_helper.rb
new file mode 100644
index 0000000..0188e59
--- /dev/null
+++ b/app/helpers/pms_helper.rb
@@ -0,0 +1,2 @@
+module PmsHelper
+end
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
new file mode 100644
index 0000000..b3ce20a
--- /dev/null
+++ b/app/helpers/search_helper.rb
@@ -0,0 +1,2 @@
+module SearchHelper
+end
diff --git a/app/helpers/servers_helper.rb b/app/helpers/servers_helper.rb
new file mode 100644
index 0000000..a36fb17
--- /dev/null
+++ b/app/helpers/servers_helper.rb
@@ -0,0 +1,2 @@
+module ServersHelper
+end
diff --git a/app/helpers/static_helper.rb b/app/helpers/static_helper.rb
new file mode 100644
index 0000000..8cfc9af
--- /dev/null
+++ b/app/helpers/static_helper.rb
@@ -0,0 +1,2 @@
+module StaticHelper
+end
diff --git a/app/helpers/teams_helper.rb b/app/helpers/teams_helper.rb
new file mode 100644
index 0000000..5fb41eb
--- /dev/null
+++ b/app/helpers/teams_helper.rb
@@ -0,0 +1,2 @@
+module TeamsHelper
+end
diff --git a/app/helpers/tournaments_helper.rb b/app/helpers/tournaments_helper.rb
new file mode 100644
index 0000000..2b6e27c
--- /dev/null
+++ b/app/helpers/tournaments_helper.rb
@@ -0,0 +1,2 @@
+module TournamentsHelper
+end
diff --git a/app/models/alert.rb b/app/models/alert.rb
new file mode 100644
index 0000000..343c269
--- /dev/null
+++ b/app/models/alert.rb
@@ -0,0 +1,3 @@
+class Alert < ActiveRecord::Base
+ belongs_to :author
+end
diff --git a/app/models/game_attribute.rb b/app/models/game_attribute.rb
new file mode 100644
index 0000000..c12723b
--- /dev/null
+++ b/app/models/game_attribute.rb
@@ -0,0 +1,3 @@
+class GameAttribute < ActiveRecord::Base
+ belongs_to :game
+end
diff --git a/app/models/match.rb b/app/models/match.rb
new file mode 100644
index 0000000..533435a
--- /dev/null
+++ b/app/models/match.rb
@@ -0,0 +1,3 @@
+class Match < ActiveRecord::Base
+ belongs_to :tournament
+end
diff --git a/app/models/pm.rb b/app/models/pm.rb
new file mode 100644
index 0000000..ab5af3b
--- /dev/null
+++ b/app/models/pm.rb
@@ -0,0 +1,4 @@
+class Pm < ActiveRecord::Base
+ belongs_to :author
+ belongs_to :recipient
+end
diff --git a/app/models/server.rb b/app/models/server.rb
new file mode 100644
index 0000000..120f0fa
--- /dev/null
+++ b/app/models/server.rb
@@ -0,0 +1,2 @@
+class Server < ActiveRecord::Base
+end
diff --git a/app/models/server_settings.rb b/app/models/server_settings.rb
new file mode 100644
index 0000000..7f49863
--- /dev/null
+++ b/app/models/server_settings.rb
@@ -0,0 +1,2 @@
+class ServerSettings < ActiveRecord::Base
+end
diff --git a/app/models/team.rb b/app/models/team.rb
new file mode 100644
index 0000000..fa7ba9e
--- /dev/null
+++ b/app/models/team.rb
@@ -0,0 +1,2 @@
+class Team < ActiveRecord::Base
+end
diff --git a/app/models/team_match_pair.rb b/app/models/team_match_pair.rb
new file mode 100644
index 0000000..85f8eaa
--- /dev/null
+++ b/app/models/team_match_pair.rb
@@ -0,0 +1,4 @@
+class TeamMatchPair < ActiveRecord::Base
+ belongs_to :team
+ belongs_to :match
+end
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
new file mode 100644
index 0000000..cc915a0
--- /dev/null
+++ b/app/models/tournament.rb
@@ -0,0 +1,3 @@
+class Tournament < ActiveRecord::Base
+ belongs_to :game
+end
diff --git a/app/models/tournament_option.rb b/app/models/tournament_option.rb
new file mode 100644
index 0000000..950b351
--- /dev/null
+++ b/app/models/tournament_option.rb
@@ -0,0 +1,2 @@
+class TournamentOption < ActiveRecord::Base
+end
diff --git a/app/models/user.rb b/app/models/user.rb
index 55a7da0..55ea60f 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,158 +1,107 @@
class User < ActiveRecord::Base
-before_save { self.email = email.downcase }
-before_save { self.user_name = user_name.downcase }
-
-=begin
-
-Rails looks for the create_remember_token and runs the method
-before anything else.
-
-This method cannot be called by a user since it is denoted
-as private.
-
-=end
-
-before_create :create_remember_token
-
-=begin
-
-VAILD_EMAIL is the regex used to valid a user given email.
-
-A break down of the regex is listed below.
-
-/ -------------> Start of the regex
-\A ------------> match start of a string
-[\w+\-.]+ -----> at least one owrd character, plus, hyphen, or
- dot
-@ -------------> literal ampersand
-[a-z\d\-.]+ ---> at least one letter, digit, hyphen, or dot
-(?:\.[a-z]+) --> ensures that the error of example@foo..com
- does not occur
-\z ------------> match end of a string
-/ -------------> end of the regex
-i -------------> case sensative
-
-=end
-
- VALID_EMAIL_REG = /\A[\w+\-.]+@[a-z\d\-.]+(?:\.[a-z]+)\z/i
-
-=begin
-
-VALID_USER_NAME checks to make sure a user's user_name
-is in the proper format.
-
-=end
-
- VALID_USER_NAME_REG = /[a-zA-Z0-9\-]/
-
-=begin
-
-The following lines put a user accout through a series of
-validations in order to make sure all of their information
-is in the proper format.
-
-validates :symbol_to_be_valided
-
-presence: determines whether or not a symbol is filled or not
-length: ensures there is a length limit on the symbol
-format: checks the format of given information to ensure
- validity
-
-=end
-
- validates :name, presence: true, length: { maximum: 50 }
- validates :email, presence: true, format: {with:
- VALID_EMAIL_REG},
- uniqueness: { case_sensitive: false }
- validates :user_name, presence: true, length:{maximum: 50},
- format: {with: VALID_USER_NAME_REG },
- uniqueness: {case_sensitive: false }
-
-=begin
-
-Instead of adding password and password_confirmation
-attributes, requiring the presence of a password,
-requirin that pw and pw_com match, and add an authenticate
-method to compare an encrypted password to the
-password_digest to authenticate users, I can just add
-has_secure_password which does all of this for me.
-
-=end
-
+ before_save { self.email = email.downcase }
+ before_save { self.user_name = user_name.downcase }
+
+ ##
+ # Rails looks for the create_remember_token and runs the method
+ # before anything else.
+ #
+ # This method cannot be called by a user since it is denoted
+ # as private.
+ before_create :create_remember_token
+
+ ##
+ # VAILD_EMAIL is the regex used to validate a user given email.
+ VALID_EMAIL_REG = /\A\S+@\S+\.\S+\z/i
+
+ ##
+ # VALID_USER_NAME checks to make sure a user's user_name
+ # is in the proper format.
+ VALID_USER_NAME_REG = /\A[a-zA-Z0-9\-]+\z/
+
+ ##
+ # The following lines put a user account through a series of
+ # validations in order to make sure all of their information
+ # is in the proper format.
+ #
+ # validates :symbol_to_be_validated
+ #
+ # - presence: determines whether or not a symbol is filled or not
+ # - length: ensures there is a length limit on the symbol
+ # - format: checks the format of given information to ensure
+ # validity
+ validates(:name, presence: true, length: { maximum: 50 })
+ validates(:email, presence: true, format: {with:
+ VALID_EMAIL_REG},
+ uniqueness: { case_sensitive: false })
+ validates(:user_name, presence: true, length:{maximum: 50},
+ format: {with: VALID_USER_NAME_REG },
+ uniqueness: {case_sensitive: false })
+
+ ##
+ # Instead of adding password and password_confirmation
+ # attributes, requiring the presence of a password,
+ # requiring that pw and pw_com match, and add an authenticate
+ # method to compare an encrypted password to the
+ # password_digest to authenticate users, I can just add
+ # has_secure_password which does all of this for me.
has_secure_password
validates :password, length: { minimum: 6 }
-=begin
-
- Create a random remember token for the user. This will be
- changed every time the user creates a new session.
-
- By changing the cookie every new session, any hijacked sessions
- (where the attacker steals a cookie to sign in as a certain
- user) will expire the next time the user signs back in.
-
- The random string is of length 16 composed of A-Z, a-z, 0-9
- This is the browser's cookie value.
-
-=end
-
- def User.new_remember_token
- SecureRandom.urlsafe_base64
- end
-
-=begin
-
- Encrypt the remember token.
- This is the encrypted version of the cookie stored on
- the database.
-
- The reasoning for storing a hashed token is so that even if
- the database is compromised, the atacker won't be able to use
- the remember tokens to sign in.
-
-=end
+ ##
+ # Create a random remember token for the user. This will be
+ # changed every time the user creates a new session.
+ #
+ # By changing the cookie every new session, any hijacked sessions
+ # (where the attacker steals a cookie to sign in as a certain
+ # user) will expire the next time the user signs back in.
+ #
+ # The random string is of length 16 composed of A-Z, a-z, 0-9
+ # This is the browser's cookie value.
+ def User.new_remember_token
+ SecureRandom.urlsafe_base64
+ end
+
+ ##
+ # Encrypt the remember token.
+ # This is the encrypted version of the cookie stored on
+ # the database.
+ #
+ # The reasoning for storing a hashed token is so that even if
+ # the database is compromised, the attacker won't be able to use
+ # the remember tokens to sign in.
+ def User.hash(token)
+ Digest::SHA1.hexdigest(token.to_s)
+ end
+
+ ##
+ # SHA-1 (Secure Hash Algorithm) is a US engineered hash
+ # function that produces a 20 byte hash value which typically
+ # forms a hexadecimal number 40 digits long.
+ # The reason I am not using the Bcrypt algorithm is because
+ # SHA-1 is much faster and I will be calling this on
+ # every page a user accesses.
+ #
+ # https://en.wikipedia.org/wiki/SHA-1
- def User.hash(token)
- Digest::SHA1.hexdigest(token.to_s)
- end
-
-=begin
-
-SHA-1 (Secure Hash Algorithm) is a US engineered hash
-function that produces a 20 byte hash value which typically
-forms a hexadecimal number 40 digits long.
-The reason I am not using the Bcrypt algorithm is because
-SHA-1 is much faster and I will be calling this on
-every page a user accesses.
-
-https://en.wikipedia.org/wiki/SHA-1
-
-=end
# Everything under private is hidden so you cannot call.
private
-=begin
-
- Create_remember_token in order to ensure a user always has
- a remember token.
-
-=end
- def create_remember_token
- self.remember_token = User.hash(User.new_remember_token)
- end
-
-=begin
-
-In order to ensure that someone did not accidently submit
-two accounts rapidly (which would throw off the validates
-for user_name and email), I added an index to the Users
-email and user_name in the database to ensure uniqueness
-This also gives and index to the user_name and email
-so finding a user SHOULD be easier for the database.
-
-=end
-
+ ##
+ # Create_remember_token in order to ensure a user always has
+ # a remember token.
+ def create_remember_token
+ self.remember_token = User.hash(User.new_remember_token)
+ end
+
+ ##
+ # In order to ensure that someone did not accidentally submit
+ # two accounts rapidly (which would throw off the validates
+ # for user_name and email), I added an index to the Users
+ # email and user_name in the database to ensure uniqueness
+ # This also gives and index to the user_name and email
+ # so finding a user SHOULD be easier for the database.
end
diff --git a/app/models/user_team_pair.rb b/app/models/user_team_pair.rb
new file mode 100644
index 0000000..c55dc2e
--- /dev/null
+++ b/app/models/user_team_pair.rb
@@ -0,0 +1,4 @@
+class UserTeamPair < ActiveRecord::Base
+ belongs_to :user
+ belongs_to :team
+end
diff --git a/app/views/alerts/_form.html.erb b/app/views/alerts/_form.html.erb
new file mode 100644
index 0000000..b60eaf2
--- /dev/null
+++ b/app/views/alerts/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@alert) do |f| %>
+ <% if @alert.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@alert.errors.count, "error") %> prohibited this alert from being saved:</h2>
+
+ <ul>
+ <% @alert.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :author_id %><br>
+ <%= f.text_field :author_id %>
+ </div>
+ <div class="field">
+ <%= f.label :message %><br>
+ <%= f.text_area :message %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/alerts/edit.html.erb b/app/views/alerts/edit.html.erb
new file mode 100644
index 0000000..ad99164
--- /dev/null
+++ b/app/views/alerts/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing alert</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @alert %> |
+<%= link_to 'Back', alerts_path %>
diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb
new file mode 100644
index 0000000..458b951
--- /dev/null
+++ b/app/views/alerts/index.html.erb
@@ -0,0 +1,29 @@
+<h1>Listing alerts</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Author</th>
+ <th>Message</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @alerts.each do |alert| %>
+ <tr>
+ <td><%= alert.author %></td>
+ <td><%= alert.message %></td>
+ <td><%= link_to 'Show', alert %></td>
+ <td><%= link_to 'Edit', edit_alert_path(alert) %></td>
+ <td><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Alert', new_alert_path %>
diff --git a/app/views/alerts/index.json.jbuilder b/app/views/alerts/index.json.jbuilder
new file mode 100644
index 0000000..0911a5c
--- /dev/null
+++ b/app/views/alerts/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@alerts) do |alert|
+ json.extract! alert, :id, :author_id, :message
+ json.url alert_url(alert, format: :json)
+end
diff --git a/app/views/alerts/new.html.erb b/app/views/alerts/new.html.erb
new file mode 100644
index 0000000..6d04589
--- /dev/null
+++ b/app/views/alerts/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New alert</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', alerts_path %>
diff --git a/app/views/alerts/show.html.erb b/app/views/alerts/show.html.erb
new file mode 100644
index 0000000..5dda2c9
--- /dev/null
+++ b/app/views/alerts/show.html.erb
@@ -0,0 +1,12 @@
+<p>
+ <strong>Author:</strong>
+ <%= @alert.author %>
+</p>
+
+<p>
+ <strong>Message:</strong>
+ <%= @alert.message %>
+</p>
+
+<%= link_to 'Edit', edit_alert_path(@alert) %> |
+<%= link_to 'Back', alerts_path %>
diff --git a/app/views/alerts/show.json.jbuilder b/app/views/alerts/show.json.jbuilder
new file mode 100644
index 0000000..95481eb
--- /dev/null
+++ b/app/views/alerts/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @alert, :id, :author_id, :message, :created_at, :updated_at
diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb
new file mode 100644
index 0000000..8941c59
--- /dev/null
+++ b/app/views/games/_form.html.erb
@@ -0,0 +1,37 @@
+<%= form_for(@game) do |f| %>
+ <% if @game.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@game.errors.count, "error") %> prohibited this game from being saved:</h2>
+
+ <ul>
+ <% @game.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :name %><br>
+ <%= f.text_area :name %>
+ </div>
+ <div class="field">
+ <%= f.label :players_per_team %><br>
+ <%= f.number_field :players_per_team %>
+ </div>
+ <div class="field">
+ <%= f.label :teams_per_match %><br>
+ <%= f.number_field :teams_per_match %>
+ </div>
+ <div class="field">
+ <%= f.label :set_rounds %><br>
+ <%= f.number_field :set_rounds %>
+ </div>
+ <div class="field">
+ <%= f.label :randomized_teams %><br>
+ <%= f.number_field :randomized_teams %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/games/edit.html.erb b/app/views/games/edit.html.erb
new file mode 100644
index 0000000..d72bd2e
--- /dev/null
+++ b/app/views/games/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing game</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @game %> |
+<%= link_to 'Back', games_path %>
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb
index ccd0f63..ac362cd 100644
--- a/app/views/games/index.html.erb
+++ b/app/views/games/index.html.erb
@@ -32,4 +32,8 @@
<br>
+<<<<<<< HEAD
<%= link_to 'New Game', new_game_path %>
+=======
+<%= link_to 'New Game', new_game_path, {:class => "btn btn-warning"} %>
+>>>>>>> aca85cf084702c29014a17eafb090421061fae8b
diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder
new file mode 100644
index 0000000..7e5c1a1
--- /dev/null
+++ b/app/views/games/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@games) do |game|
+ json.extract! game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams
+ json.url game_url(game, format: :json)
+end
diff --git a/app/views/games/new.html.erb b/app/views/games/new.html.erb
new file mode 100644
index 0000000..ab95f70
--- /dev/null
+++ b/app/views/games/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New game</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', games_path %>
diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb
new file mode 100644
index 0000000..88bf91c
--- /dev/null
+++ b/app/views/games/show.html.erb
@@ -0,0 +1,27 @@
+<p>
+ <strong>Name:</strong>
+ <%= @game.name %>
+</p>
+
+<p>
+ <strong>Players per team:</strong>
+ <%= @game.players_per_team %>
+</p>
+
+<p>
+ <strong>Teams per match:</strong>
+ <%= @game.teams_per_match %>
+</p>
+
+<p>
+ <strong>Set rounds:</strong>
+ <%= @game.set_rounds %>
+</p>
+
+<p>
+ <strong>Randomized teams:</strong>
+ <%= @game.randomized_teams %>
+</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
new file mode 100644
index 0000000..1a2d0c7
--- /dev/null
+++ b/app/views/games/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index b36c0c5..d817484 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -8,35 +8,33 @@
<%= yield :head %>
</head>
<body>
-<div role="navigation" class="navbar navbar-inverse">
-<header>
- <div class="navbar-brand no-dec">
- <%= link_to('Leaguer', '/', nil) %>
- </div>
+<header><nav>
+ <div class="navbar-brand no-dec"><%= link_to('Leaguer', root_path, nil) %></div>
<div>
- <%= form_tag("/search", method: "get", :class => "navbar-form navbar-right") do %>
- <%= text_field_tag(:query, nil, :placeholder => "Search") %>
- <%= submit_tag("Go", {:class => "btn btn-warning"}) %>
- <% end %>
+ <%= form_tag("/search", method: "get", :class => "navbar-form navbar-right") do %>
+ <%= text_field_tag(:query, nil, :placeholder => "Search") %>
+ <%= submit_tag("Go", {:class => "btn btn-warning"}) %>
+ <% end %>
</div>
- <% if signed_in? %>
- <li> <%= current_user.user_name.upcase %> </li>
- <% end %>
- <li>
- <%= if signed_in? do %>
- <%= link_to "Sign out", signout_path, method: "delete" %>
- <% end; end %>
- </li>
-</header>
- </div>
+ <ul>
+ <% if signed_in? %>
+ <li><%= current_user.user_name.upcase %></li>
+ <li><%= link_to "Sign out", session_path("current"), method: "delete" %></li>
+ <% else %>
+ <li><%= link_to "Log in", new_session_path %></li>
+ <li><%= link_to "Sign up", new_user_path %></li>
+ <% end %>
+ </ul>
+</nav></header>
+
+<% if notice %><div id="notice"><p><%= notice %></p></div><% end %>
+
+<div class="container"><%= yield %></div>
-<div class="container">
-<%= yield %>
-</div>
<hr>
<footer id="footer">
-<p> Tomer Kimia Andrew Murrell Luke Shumaker Nathaniel Foy Davis Webb Guntas Grewal </p>
-<p> The Leaguer System &#169; <%= Time.now.year %> </p> </footer>
- <%= debug(params) if Rails.env.development? %>
+ <p>Leaguer is copyright &copy; 2014, Tomer Kimia, Andrew Murrell, Luke Shumaker, Nathaniel Foy, Davis Webb, and Guntas Grewal</p>
+</footer>
+<%= debug(params) if Rails.env.development? %>
</body>
</html>
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb
new file mode 100644
index 0000000..c5f1ba8
--- /dev/null
+++ b/app/views/matches/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@match) do |f| %>
+ <% if @match.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:</h2>
+
+ <ul>
+ <% @match.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :tournament_id %><br>
+ <%= f.text_field :tournament_id %>
+ </div>
+ <div class="field">
+ <%= f.label :name %><br>
+ <%= f.text_field :name %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/matches/edit.html.erb b/app/views/matches/edit.html.erb
new file mode 100644
index 0000000..38b7d70
--- /dev/null
+++ b/app/views/matches/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing match</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @match %> |
+<%= link_to 'Back', matches_path %>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
new file mode 100644
index 0000000..0742770
--- /dev/null
+++ b/app/views/matches/index.html.erb
@@ -0,0 +1,29 @@
+<h1>Listing matches</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Tournament</th>
+ <th>Name</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @matches.each do |match| %>
+ <tr>
+ <td><%= match.tournament %></td>
+ <td><%= match.name %></td>
+ <td><%= link_to 'Show', match %></td>
+ <td><%= link_to 'Edit', edit_match_path(match) %></td>
+ <td><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Match', new_match_path %>
diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder
new file mode 100644
index 0000000..08ae0ef
--- /dev/null
+++ b/app/views/matches/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@matches) do |match|
+ json.extract! match, :id, :tournament_id, :name
+ json.url match_url(match, format: :json)
+end
diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb
new file mode 100644
index 0000000..bd4c78c
--- /dev/null
+++ b/app/views/matches/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New match</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', matches_path %>
diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb
new file mode 100644
index 0000000..9c9cbb4
--- /dev/null
+++ b/app/views/matches/show.html.erb
@@ -0,0 +1,12 @@
+<p>
+ <strong>Tournament:</strong>
+ <%= @match.tournament %>
+</p>
+
+<p>
+ <strong>Name:</strong>
+ <%= @match.name %>
+</p>
+
+<%= link_to 'Edit', edit_match_path(@match) %> |
+<%= link_to 'Back', matches_path %>
diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder
new file mode 100644
index 0000000..128550f
--- /dev/null
+++ b/app/views/matches/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @match, :id, :tournament_id, :name, :created_at, :updated_at
diff --git a/app/views/pms/_form.html.erb b/app/views/pms/_form.html.erb
new file mode 100644
index 0000000..480e308
--- /dev/null
+++ b/app/views/pms/_form.html.erb
@@ -0,0 +1,29 @@
+<%= form_for(@pm) do |f| %>
+ <% if @pm.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@pm.errors.count, "error") %> prohibited this pm from being saved:</h2>
+
+ <ul>
+ <% @pm.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :author_id %><br>
+ <%= f.text_field :author_id %>
+ </div>
+ <div class="field">
+ <%= f.label :recipient_id %><br>
+ <%= f.text_field :recipient_id %>
+ </div>
+ <div class="field">
+ <%= f.label :message %><br>
+ <%= f.text_area :message %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/pms/edit.html.erb b/app/views/pms/edit.html.erb
new file mode 100644
index 0000000..074a4fd
--- /dev/null
+++ b/app/views/pms/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing pm</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @pm %> |
+<%= link_to 'Back', pms_path %>
diff --git a/app/views/pms/index.html.erb b/app/views/pms/index.html.erb
new file mode 100644
index 0000000..cb7fe4b
--- /dev/null
+++ b/app/views/pms/index.html.erb
@@ -0,0 +1,31 @@
+<h1>Listing pms</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th>Author</th>
+ <th>Recipient</th>
+ <th>Message</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @pms.each do |pm| %>
+ <tr>
+ <td><%= pm.author %></td>
+ <td><%= pm.recipient %></td>
+ <td><%= pm.message %></td>
+ <td><%= link_to 'Show', pm %></td>
+ <td><%= link_to 'Edit', edit_pm_path(pm) %></td>
+ <td><%= link_to 'Destroy', pm, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Pm', new_pm_path %>
diff --git a/app/views/pms/index.json.jbuilder b/app/views/pms/index.json.jbuilder
new file mode 100644
index 0000000..fcfca84
--- /dev/null
+++ b/app/views/pms/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@pms) do |pm|
+ json.extract! pm, :id, :author_id, :recipient_id, :message
+ json.url pm_url(pm, format: :json)
+end
diff --git a/app/views/pms/new.html.erb b/app/views/pms/new.html.erb
new file mode 100644
index 0000000..29e24ec
--- /dev/null
+++ b/app/views/pms/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New pm</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', pms_path %>
diff --git a/app/views/pms/show.html.erb b/app/views/pms/show.html.erb
new file mode 100644
index 0000000..2a03716
--- /dev/null
+++ b/app/views/pms/show.html.erb
@@ -0,0 +1,17 @@
+<p>
+ <strong>Author:</strong>
+ <%= @pm.author %>
+</p>
+
+<p>
+ <strong>Recipient:</strong>
+ <%= @pm.recipient %>
+</p>
+
+<p>
+ <strong>Message:</strong>
+ <%= @pm.message %>
+</p>
+
+<%= link_to 'Edit', edit_pm_path(@pm) %> |
+<%= link_to 'Back', pms_path %>
diff --git a/app/views/pms/show.json.jbuilder b/app/views/pms/show.json.jbuilder
new file mode 100644
index 0000000..94252e9
--- /dev/null
+++ b/app/views/pms/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @pm, :id, :author_id, :recipient_id, :message, :created_at, :updated_at
diff --git a/app/views/servers/_form.html.erb b/app/views/servers/_form.html.erb
new file mode 100644
index 0000000..b08654b
--- /dev/null
+++ b/app/views/servers/_form.html.erb
@@ -0,0 +1,17 @@
+<%= form_for(@server) do |f| %>
+ <% if @server.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@server.errors.count, "error") %> prohibited this server from being saved:</h2>
+
+ <ul>
+ <% @server.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/servers/edit.html.erb b/app/views/servers/edit.html.erb
new file mode 100644
index 0000000..a92cdb5
--- /dev/null
+++ b/app/views/servers/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing server</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @server %> |
+<%= link_to 'Back', servers_path %>
diff --git a/app/views/servers/index.html.erb b/app/views/servers/index.html.erb
new file mode 100644
index 0000000..f45d393
--- /dev/null
+++ b/app/views/servers/index.html.erb
@@ -0,0 +1,25 @@
+<h1>Listing servers</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @servers.each do |server| %>
+ <tr>
+ <td><%= link_to 'Show', server %></td>
+ <td><%= link_to 'Edit', edit_server_path(server) %></td>
+ <td><%= link_to 'Destroy', server, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Server', new_server_path %>
diff --git a/app/views/servers/index.json.jbuilder b/app/views/servers/index.json.jbuilder
new file mode 100644
index 0000000..2776abc
--- /dev/null
+++ b/app/views/servers/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@servers) do |server|
+ json.extract! server, :id
+ json.url server_url(server, format: :json)
+end
diff --git a/app/views/servers/new.html.erb b/app/views/servers/new.html.erb
new file mode 100644
index 0000000..0422009
--- /dev/null
+++ b/app/views/servers/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New server</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', servers_path %>
diff --git a/app/views/servers/show.html.erb b/app/views/servers/show.html.erb
new file mode 100644
index 0000000..67f7647
--- /dev/null
+++ b/app/views/servers/show.html.erb
@@ -0,0 +1,2 @@
+<%= link_to 'Edit', edit_server_path(@server) %> |
+<%= link_to 'Back', servers_path %>
diff --git a/app/views/servers/show.json.jbuilder b/app/views/servers/show.json.jbuilder
new file mode 100644
index 0000000..972b1c0
--- /dev/null
+++ b/app/views/servers/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @server, :id, :created_at, :updated_at
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
index f942cf6..a820b2f 100644
--- a/app/views/sessions/new.html.erb
+++ b/app/views/sessions/new.html.erb
@@ -1,5 +1,7 @@
<h1>Sign in</h1>
-
+<% if @fail %>
+ <p class="error">Email and password combination not found</p>
+<% end %>
<div class="row">
<div class="span6 offset3">
<%= form_for(:session, url: sessions_path) do |f| %>
@@ -13,6 +15,6 @@
<%= f.submit "Sign in", class: "btn btn-large btn-primary" %>
<% end %>
- <p>New user? <%= link_to "Sign up now!", signup_path %></p>
+ <p>New user? <%= link_to "Sign up now!", new_user_path %></p>
</div>
</div>
diff --git a/app/views/static/homepage.html.erb b/app/views/static/homepage.html.erb
index 4d52e5b..3ca8176 100644
--- a/app/views/static/homepage.html.erb
+++ b/app/views/static/homepage.html.erb
@@ -1,10 +1,18 @@
<div role="main" class="container theme-showcase">
- <!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Welcome to Leaguer</h1>
<p>This is a tournment management system designed to be used for any team sport. Our peer review system ensures that the best players move on to the next round! Try creating a new tournament and having people sign up for it. </p>
- <p id="jumbo-buttons"><%= link_to 'Log In / Sign Up', "signup", :class => "btn btn-warning btn-lg", :role => "button" %> <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %> </p>
+ <p id="jumbo-buttons">
+ <% if !signed_in? %>
+ <%= link_to 'Log In', new_session_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+ <%= link_to 'Sign Up', new_user_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+ <% else %>
+ <%= link_to 'Start a Tournament', new_tournament_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+ <% end %>
+ <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %>
+
+ </p>
</div>
</div>
diff --git a/app/views/teams/_form.html.erb b/app/views/teams/_form.html.erb
new file mode 100644
index 0000000..fd10129
--- /dev/null
+++ b/app/views/teams/_form.html.erb
@@ -0,0 +1,17 @@
+<%= form_for(@team) do |f| %>
+ <% if @team.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@team.errors.count, "error") %> prohibited this team from being saved:</h2>
+
+ <ul>
+ <% @team.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/teams/edit.html.erb b/app/views/teams/edit.html.erb
new file mode 100644
index 0000000..49858ad
--- /dev/null
+++ b/app/views/teams/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing team</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @team %> |
+<%= link_to 'Back', teams_path %>
diff --git a/app/views/teams/index.html.erb b/app/views/teams/index.html.erb
new file mode 100644
index 0000000..b077e10
--- /dev/null
+++ b/app/views/teams/index.html.erb
@@ -0,0 +1,25 @@
+<h1>Listing teams</h1>
+
+<table>
+ <thead>
+ <tr>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @teams.each do |team| %>
+ <tr>
+ <td><%= link_to 'Show', team %></td>
+ <td><%= link_to 'Edit', edit_team_path(team) %></td>
+ <td><%= link_to 'Destroy', team, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Team', new_team_path %>
diff --git a/app/views/teams/index.json.jbuilder b/app/views/teams/index.json.jbuilder
new file mode 100644
index 0000000..b29428b
--- /dev/null
+++ b/app/views/teams/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@teams) do |team|
+ json.extract! team, :id
+ json.url team_url(team, format: :json)
+end
diff --git a/app/views/teams/new.html.erb b/app/views/teams/new.html.erb
new file mode 100644
index 0000000..433d944
--- /dev/null
+++ b/app/views/teams/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New team</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', teams_path %>
diff --git a/app/views/teams/show.html.erb b/app/views/teams/show.html.erb
new file mode 100644
index 0000000..ab49d65
--- /dev/null
+++ b/app/views/teams/show.html.erb
@@ -0,0 +1,2 @@
+<%= link_to 'Edit', edit_team_path(@team) %> |
+<%= link_to 'Back', teams_path %>
diff --git a/app/views/teams/show.json.jbuilder b/app/views/teams/show.json.jbuilder
new file mode 100644
index 0000000..1538019
--- /dev/null
+++ b/app/views/teams/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @team, :id, :created_at, :updated_at
diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb
new file mode 100644
index 0000000..1fd63e9
--- /dev/null
+++ b/app/views/tournaments/_form.html.erb
@@ -0,0 +1,21 @@
+<%= form_for(@tournament) do |f| %>
+ <% if @tournament.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@tournament.errors.count, "error") %> prohibited this tournament from being saved:</h2>
+
+ <ul>
+ <% @tournament.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :game_id %><br>
+ <%= f.text_field :game_id %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb
new file mode 100644
index 0000000..302283d
--- /dev/null
+++ b/app/views/tournaments/_selected.html.erb
@@ -0,0 +1,25 @@
+<form accept-charset="UTF-8" action="/users" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="6WQoPLFISlDYCsi4LhAgT0hgrht19yydD3w5TlKfb7I=" /></div>
+ <p>
+ <label for="GameType">Game</label><br>
+ <input id="GameType" name="League of Legends" type="text" />
+ </p>
+ <p>
+ <label for="players_per_team">Number of Players</label><br>
+ <input id="players_per_team" name="5" type="text" />
+ </p>
+ <p>
+ <label for="teams_per_match">Teams per Match</label><br>
+ <input id="teams_per_match" name="2" type="text" />
+ </p>
+ <p>
+ <label for="set_rounds">Set Number of Rounds?</label><br>
+ <input id="set_rounds" name="1" type="text" />
+ </p>
+ <p>
+ <label for="randomized_teams">Randomized Teams?</label><br>
+ <input id="randomized_teams" name="0" type="text" />
+ </p>
+ <p>
+ <input name="create" type="submit" value="Create Tournament" />
+ </p>
+</form> \ No newline at end of file
diff --git a/app/views/tournaments/edit.html.erb b/app/views/tournaments/edit.html.erb
new file mode 100644
index 0000000..2913025
--- /dev/null
+++ b/app/views/tournaments/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing tournament</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @tournament %> |
+<%= link_to 'Back', tournaments_path %>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
deleted file mode 100644
index 6006cad..0000000
--- a/app/views/tournaments/index.html.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-<h1>Listing tournaments</h1>
-
-<table>
- <thead>
- <tr>
- <th></th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
- </thead>
-
- <tbody>
- <% @tournaments.each do |tournament| %>
- <tr>
- <td><%= tournament.game %></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>
- </tr>
- <% end %>
- </tbody>
-</table>
-
-<br>
-
-<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %>
diff --git a/app/views/tournaments/index.json.jbuilder b/app/views/tournaments/index.json.jbuilder
new file mode 100644
index 0000000..e6f3b49
--- /dev/null
+++ b/app/views/tournaments/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@tournaments) do |tournament|
+ json.extract! tournament, :id, :game_id
+ json.url tournament_url(tournament, format: :json)
+end
diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb
index dee18fb..f1dec90 100644
--- a/app/views/tournaments/new.html.erb
+++ b/app/views/tournaments/new.html.erb
@@ -4,9 +4,8 @@
<br />
<div id='ajax-form'>
+ <% render :partial => "selected" %>
</div>
<br /><br />
-<p id=jumbo-buttons>
-<%= link_to 'Create Tournament', "#", :class => "btn btn-warning btn-lg" %>
<%= link_to 'Back', tournaments_path %>
diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb
new file mode 100644
index 0000000..0d9dd10
--- /dev/null
+++ b/app/views/tournaments/show.html.erb
@@ -0,0 +1,7 @@
+<p>
+ <strong>Game:</strong>
+ <%= @tournament.game %>
+</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
new file mode 100644
index 0000000..0fe65a6
--- /dev/null
+++ b/app/views/tournaments/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @tournament, :id, :game_id, :created_at, :updated_at
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index 56d9f90..4d28738 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -13,11 +13,15 @@
<div class="field">
<%= f.label :name %><br>
- <%= f.text_area :name %>
+ <%= f.text_field :name %>
</div>
<div class="field">
- <%= f.label :pw_hash %><br>
- <%= f.text_area :pw_hash %>
+ <%= f.label :email %><br>
+ <%= f.text_field :email %>
+ </div>
+ <div class="field">
+ <%= f.label :user_name %><br>
+ <%= f.text_field :user_name %>
</div>
<div class="actions">
<%= f.submit %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
deleted file mode 100644
index 99bd4cc..0000000
--- a/app/views/users/edit.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-<h1>Editing user</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Show', @user %> |
-<%= link_to 'Back', users_path %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 8b9056b..d7b46da 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -1,10 +1,13 @@
<h1>Listing users</h1>
-<table>
+<table class="table table-hover">
<thead>
<tr>
+ <th>Username</th>
<th>Name</th>
- <th>Pw hash</th>
+ <th>Email</th>
+ <th>User name</th>
+ <th></th>
<th></th>
<th></th>
<th></th>
@@ -14,8 +17,10 @@
<tbody>
<% @users.each do |user| %>
<tr>
+ <td><%= link_to("#{user.user_name}", user, nil) %></td>
<td><%= user.name %></td>
- <td><%= user.pw_hash %></td>
+ <td> ******* </td>
+ <td><%= user.user_name %></td>
<td><%= link_to 'Show', user %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder
index 182437e..42d8b72 100644
--- a/app/views/users/index.json.jbuilder
+++ b/app/views/users/index.json.jbuilder
@@ -1,4 +1,4 @@
json.array!(@users) do |user|
- json.extract! user, :id, :name, :pw_hash
+ json.extract! user, :id, :name, :email, :user_name
json.url user_url(user, format: :json)
end
diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb
index 2a745cc..f0ce746 100644
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -16,11 +16,11 @@
</p>
<p>
<%= f.label :password %><br>
- <%= f.text_field :password %>
+ <%= f.password_field :password %>
</p>
<p>
<%= f.label :password_confirm %><br>
- <%= f.text_field :password_confirmation %>
+ <%= f.password_field :password_confirmation %>
</p>
<p>
<%= f.submit %>
@@ -45,16 +45,16 @@
</p>
<p>
<label for="user_password">Password</label><br>
- <input id="user_password" name="user[password]" type="text" />
+ <input id="user_password" name="user[password]" type="password" />
</p>
<p>
<label for="user_password_confirm">Password confirm</label><br>
- <input id="user_password_confirmation" name="user[password_confirmation]" type="text" />
+ <input id="user_password_confirmation" name="user[password_confirmation]" type="password" />
</p>
<p>
<input name="commit" type="submit" value="Save User" />
</p>
</form>
-<%= link_to 'Already Have an Account? Log in', "signin", :class => "btn btn-warning btn-lg" %>
+<%= link_to 'Already Have an Account? Log in', new_session_path, :class => "btn btn-warning btn-lg" %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 43c12fe..d8cc82b 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,3 +1,17 @@
-app/views/users/show.html.erb
+<p>
+ <strong>Name:</strong>
+ <%= @user.name %>
+</p>
-<%= @user.name %>, <%= @user.email %>
+<p>
+ <strong>Email:</strong>
+ <%= @user.email %>
+</p>
+
+<p>
+ <strong>User name:</strong>
+ <%= @user.user_name %>
+</p>
+
+<%= link_to 'Edit', edit_user_path(@user) %> |
+<%= link_to 'Back', users_path %>
diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder
deleted file mode 100644
index 1262e80..0000000
--- a/app/views/users/show.json.jbuilder
+++ /dev/null
@@ -1 +0,0 @@
-json.extract! @user, :id, :name, :pw_hash, :created_at, :updated_at
diff --git a/config/routes.rb b/config/routes.rb
index 8a06cff..022ce42 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,14 +1,12 @@
Leaguer::Application.routes.draw do
- #creates sessions as a resource but limits it to these actions
- resources :sessions, only: [:new, :create, :destroy]
-
- match 'signup', to: 'users#new', via: 'get'
- match 'signin', to: 'sessions#new', via: 'get'
- match 'signout', to: 'sessions#destroy', via: 'delete'
+ #creates sessions as a resource but limits it to these actions
+ resources :sessions, only: [:new, :create, :destroy]
resources :users
+ resources :games
+
resources :pms
resources :alerts
@@ -21,8 +19,6 @@ Leaguer::Application.routes.draw do
resources :servers
- resources :games
-
root to: 'static#homepage'
# The priority is based upon order of creation: first created -> highest priority.
@@ -32,51 +28,51 @@ Leaguer::Application.routes.draw do
# root 'welcome#index'
# Example of regular route:
- # get 'products/:id' => 'catalog#view'
+ # get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
- # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
- # resources :products
+ # resources :products
# Example resource route with options:
- # resources :products do
- # member do
- # get 'short'
- # post 'toggle'
- # end
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
#
- # collection do
- # get 'sold'
- # end
- # end
+ # collection do
+ # get 'sold'
+ # end
+ # end
# Example resource route with sub-resources:
- # resources :products do
- # resources :comments, :sales
- # resource :seller
- # end
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
# Example resource route with more complex sub-resources:
- # resources :products do
- # resources :comments
- # resources :sales do
- # get 'recent', on: :collection
- # end
- # end
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', on: :collection
+ # end
+ # end
# Example resource route with concerns:
- # concern :toggleable do
- # post 'toggle'
- # end
- # resources :posts, concerns: :toggleable
- # resources :photos, concerns: :toggleable
+ # concern :toggleable do
+ # post 'toggle'
+ # end
+ # resources :posts, concerns: :toggleable
+ # resources :photos, concerns: :toggleable
# Example resource route within a namespace:
- # namespace :admin do
- # # Directs /admin/products/* to Admin::ProductsController
- # # (app/controllers/admin/products_controller.rb)
- # resources :products
- # end
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
end
diff --git a/db/migrate/20140304043618_create_servers.rb b/db/migrate/20140304043618_create_servers.rb
new file mode 100644
index 0000000..f33241a
--- /dev/null
+++ b/db/migrate/20140304043618_create_servers.rb
@@ -0,0 +1,8 @@
+class CreateServers < ActiveRecord::Migration
+ def change
+ create_table :servers do |t|
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140220221232_create_tournaments.rb b/db/migrate/20140304043620_create_tournaments.rb
index 2095590..36fcf7e 100644
--- a/db/migrate/20140220221232_create_tournaments.rb
+++ b/db/migrate/20140304043620_create_tournaments.rb
@@ -1,6 +1,7 @@
class CreateTournaments < ActiveRecord::Migration
def change
create_table :tournaments do |t|
+ t.references :game, index: true
t.timestamps
end
diff --git a/db/migrate/20140304043622_create_matches.rb b/db/migrate/20140304043622_create_matches.rb
new file mode 100644
index 0000000..325863d
--- /dev/null
+++ b/db/migrate/20140304043622_create_matches.rb
@@ -0,0 +1,10 @@
+class CreateMatches < ActiveRecord::Migration
+ def change
+ create_table :matches do |t|
+ t.references :tournament, index: true
+ t.string :name
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140220221239_create_teams.rb b/db/migrate/20140304043624_create_teams.rb
index dd8397d..dd8397d 100644
--- a/db/migrate/20140220221239_create_teams.rb
+++ b/db/migrate/20140304043624_create_teams.rb
diff --git a/db/migrate/20140220221254_create_alerts.rb b/db/migrate/20140304043626_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140220221254_create_alerts.rb
+++ b/db/migrate/20140304043626_create_alerts.rb
diff --git a/db/migrate/20140220221257_create_pms.rb b/db/migrate/20140304043629_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140220221257_create_pms.rb
+++ b/db/migrate/20140304043629_create_pms.rb
diff --git a/db/migrate/20140304043631_create_games.rb b/db/migrate/20140304043631_create_games.rb
new file mode 100644
index 0000000..59d4ef0
--- /dev/null
+++ b/db/migrate/20140304043631_create_games.rb
@@ -0,0 +1,13 @@
+class CreateGames < ActiveRecord::Migration
+ def change
+ create_table :games do |t|
+ t.text :name
+ t.integer :players_per_team
+ t.integer :teams_per_match
+ t.integer :set_rounds
+ t.integer :randomized_teams
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140228164606_create_users.rb b/db/migrate/20140304043633_create_users.rb
index 1c37f38..f0986d4 100644
--- a/db/migrate/20140228164606_create_users.rb
+++ b/db/migrate/20140304043633_create_users.rb
@@ -3,7 +3,7 @@ class CreateUsers < ActiveRecord::Migration
create_table :users do |t|
t.string :name
t.string :email
- t.string :user_name
+ t.string :user_name
t.timestamps
end
diff --git a/db/migrate/20140228014552_create_game_attributes.rb b/db/migrate/20140304043635_create_game_attributes.rb
index b63f134..b63f134 100644
--- a/db/migrate/20140228014552_create_game_attributes.rb
+++ b/db/migrate/20140304043635_create_game_attributes.rb
diff --git a/db/migrate/20140220221301_create_server_settings.rb b/db/migrate/20140304043637_create_server_settings.rb
index dfdd91b..dfdd91b 100644
--- a/db/migrate/20140220221301_create_server_settings.rb
+++ b/db/migrate/20140304043637_create_server_settings.rb
diff --git a/db/migrate/20140220221247_create_user_team_pairs.rb b/db/migrate/20140304043639_create_user_team_pairs.rb
index 2c492ac..2c492ac 100644
--- a/db/migrate/20140220221247_create_user_team_pairs.rb
+++ b/db/migrate/20140304043639_create_user_team_pairs.rb
diff --git a/db/migrate/20140220221250_create_team_match_pairs.rb b/db/migrate/20140304043642_create_team_match_pairs.rb
index 8fac07e..8fac07e 100644
--- a/db/migrate/20140220221250_create_team_match_pairs.rb
+++ b/db/migrate/20140304043642_create_team_match_pairs.rb
diff --git a/db/migrate/20140301210808_add_index_to_users_email.rb b/db/migrate/20140304043652_add_index_to_users_email.rb
index 934d23b..934d23b 100644
--- a/db/migrate/20140301210808_add_index_to_users_email.rb
+++ b/db/migrate/20140304043652_add_index_to_users_email.rb
diff --git a/db/migrate/20140301211316_add_index_to_users_user_name.rb b/db/migrate/20140304043654_add_index_to_users_user_name.rb
index 22ca8c3..22ca8c3 100644
--- a/db/migrate/20140301211316_add_index_to_users_user_name.rb
+++ b/db/migrate/20140304043654_add_index_to_users_user_name.rb
diff --git a/db/migrate/20140301213814_add_password_digest_to_users.rb b/db/migrate/20140304043656_add_password_digest_to_users.rb
index 7ad1f62..7ad1f62 100644
--- a/db/migrate/20140301213814_add_password_digest_to_users.rb
+++ b/db/migrate/20140304043656_add_password_digest_to_users.rb
diff --git a/db/migrate/20140302210209_add_remember_token_to_users.rb b/db/migrate/20140304043658_add_remember_token_to_users.rb
index 6d84942..6d84942 100644
--- a/db/migrate/20140302210209_add_remember_token_to_users.rb
+++ b/db/migrate/20140304043658_add_remember_token_to_users.rb
diff --git a/db/migrate/20140228014607_create_tournament_options.rb b/db/migrate/20140304043700_create_tournament_options.rb
index d2df22e..d2df22e 100644
--- a/db/migrate/20140228014607_create_tournament_options.rb
+++ b/db/migrate/20140304043700_create_tournament_options.rb
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 0000000..494fb09
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,127 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended that you check this file into your version control system.
+
+ActiveRecord::Schema.define(version: 20140304043700) do
+
+ create_table "alerts", force: true do |t|
+ t.integer "author_id"
+ t.text "message"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "alerts", ["author_id"], name: "index_alerts_on_author_id"
+
+ create_table "game_attributes", force: true do |t|
+ t.integer "game_id"
+ t.text "key"
+ t.integer "type"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "game_attributes", ["game_id"], name: "index_game_attributes_on_game_id"
+
+ create_table "games", force: true do |t|
+ t.text "name"
+ t.integer "players_per_team"
+ t.integer "teams_per_match"
+ t.integer "set_rounds"
+ t.integer "randomized_teams"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "matches", force: true do |t|
+ t.integer "tournament_id"
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "matches", ["tournament_id"], name: "index_matches_on_tournament_id"
+
+ create_table "pms", force: true do |t|
+ t.integer "author_id"
+ t.integer "recipient_id"
+ t.text "message"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "pms", ["author_id"], name: "index_pms_on_author_id"
+ add_index "pms", ["recipient_id"], name: "index_pms_on_recipient_id"
+
+ create_table "server_settings", force: true do |t|
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "servers", force: true do |t|
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "team_match_pairs", force: true do |t|
+ t.integer "team_id"
+ t.integer "match_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "team_match_pairs", ["match_id"], name: "index_team_match_pairs_on_match_id"
+ add_index "team_match_pairs", ["team_id"], name: "index_team_match_pairs_on_team_id"
+
+ create_table "teams", force: true do |t|
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "tournament_options", force: true do |t|
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "tournaments", force: true do |t|
+ t.integer "game_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "tournaments", ["game_id"], name: "index_tournaments_on_game_id"
+
+ create_table "user_team_pairs", force: true do |t|
+ t.integer "user_id"
+ t.integer "team_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "user_team_pairs", ["team_id"], name: "index_user_team_pairs_on_team_id"
+ add_index "user_team_pairs", ["user_id"], name: "index_user_team_pairs_on_user_id"
+
+ create_table "users", force: true do |t|
+ t.string "name"
+ t.string "email"
+ t.string "user_name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "password_digest"
+ t.string "remember_token"
+ end
+
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
+ add_index "users", ["remember_token"], name: "index_users_on_remember_token"
+ add_index "users", ["user_name"], name: "index_users_on_user_name", unique: true
+
+end
diff --git a/generate.bat b/generate.bat
deleted file mode 100644
index ae6a3e4..0000000
--- a/generate.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-
-bundle exec rails generate scaffold server
-bundle exec rails generate scaffold tournament
-bundle exec rails generate scaffold match
-bundle exec rails generate scaffold team
-bundle exec rails generate scaffold user
-bundle exec rake db:drop RAILS_ENV=development
-bundle exec rake db:migrate RAILS_ENV=development
diff --git a/generate.sh b/generate.sh
index 4d70de1..f0db78e 100755
--- a/generate.sh
+++ b/generate.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -x
# The generate.sh bash file is used to generate all of the necessary .rb files to run the website
#
@@ -10,9 +11,11 @@
# To Clear the Generated Files:
# git clean -df
#
-NOTEST='--skip-test-unit'
+#NOTEST='--skip-test-unit'
+
+git rm -rf app test config/routes.rb db/migrate
+git checkout clean-start -- app test config/routes.rb
-set -x
bundle exec rails generate scaffold server --force $NOTEST
bundle exec rails generate scaffold tournament game:references $NOTEST
bundle exec rails generate scaffold match tournament:references name:string --force $NOTEST
@@ -20,30 +23,31 @@ bundle exec rails generate scaffold team $NOTEST
bundle exec rails generate scaffold alert author:references message:text $NOTEST
bundle exec rails generate scaffold pm author:references recipient:references message:text $NOTEST
bundle exec rails generate scaffold game name:text players_per_team:integer teams_per_match:integer set_rounds:integer randomized_teams:integer --force $NOTEST
+bundle exec rails generate scaffold user name:string email:string user_name:string $NOTEST
bundle exec rails generate model game_attribute game:references key:text type:integer $NOTEST
bundle exec rails generate model server_settings $NOTEST
-bundle exec rails generate model user name:string email:string user_name:string $NOTEST
bundle exec rails generate model user_team_pair user:references team:references $NOTEST
bundle exec rails generate model team_match_pair team:references match:references $NOTEST
bundle exec rails generate controller search $NOTEST
bundle exec rails generate controller main $NOTEST
bundle exec rails generate controller static $NOTEST
-bundle exec rails generate controller users $NOTEST
-bundle exec rails generate controller Sessions
+bundle exec rails generate controller sessions
#added some stuff to the database
-rails generate migration add_index_to_user_email
-rails generate migration add_index_to_user_name
-rails generate migration add_password_digest_to_users
-rails generate migration add_remember_token_to_users
+bundle exec rails generate migration add_index_to_users_email
+bundle exec rails generate migration add_index_to_users_user_name
+bundle exec rails generate migration add_password_digest_to_users
+bundle exec rails generate migration add_remember_token_to_users
#for the tournament controller to generate options
bundle exec rails generate model tournament_option $NOTEST
+#bundle exec rails generate scaffold
bundle exec rake db:drop RAILS_ENV=development
bundle exec rake db:migrate RAILS_ENV=development
bundle exec rake db:seed
-#bundle exec rails generate scaffold
+
+git add app test config/routes.rb db/migrate db/schema.rb
diff --git a/start.sh b/start.sh
index 6c0d594..cb9cdda 100755
--- a/start.sh
+++ b/start.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-generate.sh
nohup bundle exec rails server &
diff --git a/app/assets/images/.keep b/test/controllers/.keep
index e69de29..e69de29 100644
--- a/app/assets/images/.keep
+++ b/test/controllers/.keep
diff --git a/test/controllers/alerts_controller_test.rb b/test/controllers/alerts_controller_test.rb
new file mode 100644
index 0000000..4a5d911
--- /dev/null
+++ b/test/controllers/alerts_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class AlertsControllerTest < ActionController::TestCase
+ setup do
+ @alert = alerts(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:alerts)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create alert" do
+ assert_difference('Alert.count') do
+ post :create, alert: { author_id: @alert.author_id, message: @alert.message }
+ end
+
+ assert_redirected_to alert_path(assigns(:alert))
+ end
+
+ test "should show alert" do
+ get :show, id: @alert
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @alert
+ assert_response :success
+ end
+
+ test "should update alert" do
+ patch :update, id: @alert, alert: { author_id: @alert.author_id, message: @alert.message }
+ assert_redirected_to alert_path(assigns(:alert))
+ end
+
+ test "should destroy alert" do
+ assert_difference('Alert.count', -1) do
+ delete :destroy, id: @alert
+ end
+
+ assert_redirected_to alerts_path
+ end
+end
diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb
new file mode 100644
index 0000000..95c3145
--- /dev/null
+++ b/test/controllers/games_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class GamesControllerTest < ActionController::TestCase
+ setup do
+ @game = games(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:games)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create game" do
+ assert_difference('Game.count') do
+ post :create, game: { name: @game.name, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match }
+ end
+
+ assert_redirected_to game_path(assigns(:game))
+ end
+
+ test "should show game" do
+ get :show, id: @game
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @game
+ assert_response :success
+ end
+
+ test "should update game" do
+ patch :update, id: @game, game: { name: @game.name, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match }
+ assert_redirected_to game_path(assigns(:game))
+ end
+
+ test "should destroy game" do
+ assert_difference('Game.count', -1) do
+ delete :destroy, id: @game
+ end
+
+ assert_redirected_to games_path
+ end
+end
diff --git a/test/controllers/main_controller_test.rb b/test/controllers/main_controller_test.rb
new file mode 100644
index 0000000..b7ec6bf
--- /dev/null
+++ b/test/controllers/main_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class MainControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb
new file mode 100644
index 0000000..50675d8
--- /dev/null
+++ b/test/controllers/matches_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class MatchesControllerTest < ActionController::TestCase
+ setup do
+ @match = matches(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:matches)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create match" do
+ assert_difference('Match.count') do
+ post :create, match: { name: @match.name, tournament_id: @match.tournament_id }
+ end
+
+ assert_redirected_to match_path(assigns(:match))
+ end
+
+ test "should show match" do
+ get :show, id: @match
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @match
+ assert_response :success
+ end
+
+ test "should update match" do
+ patch :update, id: @match, match: { name: @match.name, tournament_id: @match.tournament_id }
+ assert_redirected_to match_path(assigns(:match))
+ end
+
+ test "should destroy match" do
+ assert_difference('Match.count', -1) do
+ delete :destroy, id: @match
+ end
+
+ assert_redirected_to matches_path
+ end
+end
diff --git a/test/controllers/pms_controller_test.rb b/test/controllers/pms_controller_test.rb
new file mode 100644
index 0000000..18b2449
--- /dev/null
+++ b/test/controllers/pms_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class PmsControllerTest < ActionController::TestCase
+ setup do
+ @pm = pms(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:pms)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create pm" do
+ assert_difference('Pm.count') do
+ post :create, pm: { author_id: @pm.author_id, message: @pm.message, recipient_id: @pm.recipient_id }
+ end
+
+ assert_redirected_to pm_path(assigns(:pm))
+ end
+
+ test "should show pm" do
+ get :show, id: @pm
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @pm
+ assert_response :success
+ end
+
+ test "should update pm" do
+ patch :update, id: @pm, pm: { author_id: @pm.author_id, message: @pm.message, recipient_id: @pm.recipient_id }
+ assert_redirected_to pm_path(assigns(:pm))
+ end
+
+ test "should destroy pm" do
+ assert_difference('Pm.count', -1) do
+ delete :destroy, id: @pm
+ end
+
+ assert_redirected_to pms_path
+ end
+end
diff --git a/test/controllers/search_controller_test.rb b/test/controllers/search_controller_test.rb
new file mode 100644
index 0000000..bfbf22d
--- /dev/null
+++ b/test/controllers/search_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class SearchControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/controllers/servers_controller_test.rb b/test/controllers/servers_controller_test.rb
new file mode 100644
index 0000000..5891bb0
--- /dev/null
+++ b/test/controllers/servers_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class ServersControllerTest < ActionController::TestCase
+ setup do
+ @server = servers(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:servers)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create server" do
+ assert_difference('Server.count') do
+ post :create, server: { }
+ end
+
+ assert_redirected_to server_path(assigns(:server))
+ end
+
+ test "should show server" do
+ get :show, id: @server
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @server
+ assert_response :success
+ end
+
+ test "should update server" do
+ patch :update, id: @server, server: { }
+ assert_redirected_to server_path(assigns(:server))
+ end
+
+ test "should destroy server" do
+ assert_difference('Server.count', -1) do
+ delete :destroy, id: @server
+ end
+
+ assert_redirected_to servers_path
+ end
+end
diff --git a/test/controllers/sessions_controller_test.rb b/test/controllers/sessions_controller_test.rb
new file mode 100644
index 0000000..d30ebc3
--- /dev/null
+++ b/test/controllers/sessions_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class SessionsControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/controllers/static_controller_test.rb b/test/controllers/static_controller_test.rb
new file mode 100644
index 0000000..e62ae2a
--- /dev/null
+++ b/test/controllers/static_controller_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class StaticControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/controllers/teams_controller_test.rb b/test/controllers/teams_controller_test.rb
new file mode 100644
index 0000000..8bf60be
--- /dev/null
+++ b/test/controllers/teams_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class TeamsControllerTest < ActionController::TestCase
+ setup do
+ @team = teams(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:teams)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create team" do
+ assert_difference('Team.count') do
+ post :create, team: { }
+ end
+
+ assert_redirected_to team_path(assigns(:team))
+ end
+
+ test "should show team" do
+ get :show, id: @team
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @team
+ assert_response :success
+ end
+
+ test "should update team" do
+ patch :update, id: @team, team: { }
+ assert_redirected_to team_path(assigns(:team))
+ end
+
+ test "should destroy team" do
+ assert_difference('Team.count', -1) do
+ delete :destroy, id: @team
+ end
+
+ assert_redirected_to teams_path
+ end
+end
diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb
new file mode 100644
index 0000000..bdbbfac
--- /dev/null
+++ b/test/controllers/tournaments_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class TournamentsControllerTest < ActionController::TestCase
+ setup do
+ @tournament = tournaments(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:tournaments)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create tournament" do
+ assert_difference('Tournament.count') do
+ post :create, tournament: { game_id: @tournament.game_id }
+ end
+
+ assert_redirected_to tournament_path(assigns(:tournament))
+ end
+
+ test "should show tournament" do
+ get :show, id: @tournament
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @tournament
+ assert_response :success
+ end
+
+ test "should update tournament" do
+ patch :update, id: @tournament, tournament: { game_id: @tournament.game_id }
+ assert_redirected_to tournament_path(assigns(:tournament))
+ end
+
+ test "should destroy tournament" do
+ assert_difference('Tournament.count', -1) do
+ delete :destroy, id: @tournament
+ end
+
+ assert_redirected_to tournaments_path
+ end
+end
diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb
new file mode 100644
index 0000000..79a5700
--- /dev/null
+++ b/test/controllers/users_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class UsersControllerTest < ActionController::TestCase
+ setup do
+ @user = users(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:users)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create user" do
+ assert_difference('User.count') do
+ post :create, user: { email: @user.email, name: @user.name, user_name: @user.user_name }
+ end
+
+ assert_redirected_to user_path(assigns(:user))
+ end
+
+ test "should show user" do
+ get :show, id: @user
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @user
+ assert_response :success
+ end
+
+ test "should update user" do
+ patch :update, id: @user, user: { email: @user.email, name: @user.name, user_name: @user.user_name }
+ assert_redirected_to user_path(assigns(:user))
+ end
+
+ test "should destroy user" do
+ assert_difference('User.count', -1) do
+ delete :destroy, id: @user
+ end
+
+ assert_redirected_to users_path
+ end
+end
diff --git a/test/fixtures/.keep b/test/fixtures/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/fixtures/.keep
diff --git a/test/fixtures/alerts.yml b/test/fixtures/alerts.yml
new file mode 100644
index 0000000..52959af
--- /dev/null
+++ b/test/fixtures/alerts.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ author_id:
+ message: MyText
+
+two:
+ author_id:
+ message: MyText
diff --git a/test/fixtures/game_attributes.yml b/test/fixtures/game_attributes.yml
new file mode 100644
index 0000000..eff7212
--- /dev/null
+++ b/test/fixtures/game_attributes.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ game_id:
+ key: MyText
+ type: 1
+
+two:
+ game_id:
+ key: MyText
+ type: 1
diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml
new file mode 100644
index 0000000..3068527
--- /dev/null
+++ b/test/fixtures/games.yml
@@ -0,0 +1,15 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ name: MyText
+ players_per_team: 1
+ teams_per_match: 1
+ set_rounds: 1
+ randomized_teams: 1
+
+two:
+ name: MyText
+ players_per_team: 1
+ teams_per_match: 1
+ set_rounds: 1
+ randomized_teams: 1
diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml
new file mode 100644
index 0000000..089fc65
--- /dev/null
+++ b/test/fixtures/matches.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ tournament_id:
+ name: MyString
+
+two:
+ tournament_id:
+ name: MyString
diff --git a/test/fixtures/pms.yml b/test/fixtures/pms.yml
new file mode 100644
index 0000000..f77e727
--- /dev/null
+++ b/test/fixtures/pms.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ author_id:
+ recipient_id:
+ message: MyText
+
+two:
+ author_id:
+ recipient_id:
+ message: MyText
diff --git a/test/fixtures/server_settings.yml b/test/fixtures/server_settings.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/server_settings.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/servers.yml b/test/fixtures/servers.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/servers.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/team_match_pairs.yml b/test/fixtures/team_match_pairs.yml
new file mode 100644
index 0000000..5f9cf2f
--- /dev/null
+++ b/test/fixtures/team_match_pairs.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ team_id:
+ match_id:
+
+two:
+ team_id:
+ match_id:
diff --git a/test/fixtures/teams.yml b/test/fixtures/teams.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/teams.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/tournament_options.yml b/test/fixtures/tournament_options.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/tournament_options.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml
new file mode 100644
index 0000000..4cba7ca
--- /dev/null
+++ b/test/fixtures/tournaments.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ game_id:
+
+two:
+ game_id:
diff --git a/test/fixtures/user_team_pairs.yml b/test/fixtures/user_team_pairs.yml
new file mode 100644
index 0000000..a76036f
--- /dev/null
+++ b/test/fixtures/user_team_pairs.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ user_id:
+ team_id:
+
+two:
+ user_id:
+ team_id:
diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml
new file mode 100644
index 0000000..ea3e874
--- /dev/null
+++ b/test/fixtures/users.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ name: MyString
+ email: MyString
+ user_name: MyString
+
+two:
+ name: MyString
+ email: MyString
+ user_name: MyString
diff --git a/test/helpers/.keep b/test/helpers/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/helpers/.keep
diff --git a/test/helpers/alerts_helper_test.rb b/test/helpers/alerts_helper_test.rb
new file mode 100644
index 0000000..1d9079d
--- /dev/null
+++ b/test/helpers/alerts_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class AlertsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/games_helper_test.rb b/test/helpers/games_helper_test.rb
new file mode 100644
index 0000000..449a85c
--- /dev/null
+++ b/test/helpers/games_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class GamesHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/main_helper_test.rb b/test/helpers/main_helper_test.rb
new file mode 100644
index 0000000..22da3c4
--- /dev/null
+++ b/test/helpers/main_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class MainHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/matches_helper_test.rb b/test/helpers/matches_helper_test.rb
new file mode 100644
index 0000000..4cc472f
--- /dev/null
+++ b/test/helpers/matches_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class MatchesHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/pms_helper_test.rb b/test/helpers/pms_helper_test.rb
new file mode 100644
index 0000000..af80f10
--- /dev/null
+++ b/test/helpers/pms_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class PmsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/search_helper_test.rb b/test/helpers/search_helper_test.rb
new file mode 100644
index 0000000..3034163
--- /dev/null
+++ b/test/helpers/search_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class SearchHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/servers_helper_test.rb b/test/helpers/servers_helper_test.rb
new file mode 100644
index 0000000..8fddf34
--- /dev/null
+++ b/test/helpers/servers_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class ServersHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/sessions_helper_test.rb b/test/helpers/sessions_helper_test.rb
new file mode 100644
index 0000000..7d44e09
--- /dev/null
+++ b/test/helpers/sessions_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class SessionsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/static_helper_test.rb b/test/helpers/static_helper_test.rb
new file mode 100644
index 0000000..3b96f2b
--- /dev/null
+++ b/test/helpers/static_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class StaticHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/teams_helper_test.rb b/test/helpers/teams_helper_test.rb
new file mode 100644
index 0000000..b736483
--- /dev/null
+++ b/test/helpers/teams_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class TeamsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/tournaments_helper_test.rb b/test/helpers/tournaments_helper_test.rb
new file mode 100644
index 0000000..1cf5269
--- /dev/null
+++ b/test/helpers/tournaments_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class TournamentsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/users_helper_test.rb b/test/helpers/users_helper_test.rb
new file mode 100644
index 0000000..96af37a
--- /dev/null
+++ b/test/helpers/users_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class UsersHelperTest < ActionView::TestCase
+end
diff --git a/test/integration/.keep b/test/integration/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/integration/.keep
diff --git a/test/mailers/.keep b/test/mailers/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/mailers/.keep
diff --git a/test/models/.keep b/test/models/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/models/.keep
diff --git a/test/models/alert_test.rb b/test/models/alert_test.rb
new file mode 100644
index 0000000..b59c65e
--- /dev/null
+++ b/test/models/alert_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class AlertTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/game_attribute_test.rb b/test/models/game_attribute_test.rb
new file mode 100644
index 0000000..13c6e65
--- /dev/null
+++ b/test/models/game_attribute_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class GameAttributeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/game_test.rb b/test/models/game_test.rb
new file mode 100644
index 0000000..2cab36e
--- /dev/null
+++ b/test/models/game_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class GameTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/match_test.rb b/test/models/match_test.rb
new file mode 100644
index 0000000..14436b1
--- /dev/null
+++ b/test/models/match_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class MatchTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/pm_test.rb b/test/models/pm_test.rb
new file mode 100644
index 0000000..e7f6b8f
--- /dev/null
+++ b/test/models/pm_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class PmTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/server_settings_test.rb b/test/models/server_settings_test.rb
new file mode 100644
index 0000000..470b316
--- /dev/null
+++ b/test/models/server_settings_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ServerSettingsTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/server_test.rb b/test/models/server_test.rb
new file mode 100644
index 0000000..125ffc9
--- /dev/null
+++ b/test/models/server_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ServerTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/team_match_pair_test.rb b/test/models/team_match_pair_test.rb
new file mode 100644
index 0000000..c250b3c
--- /dev/null
+++ b/test/models/team_match_pair_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TeamMatchPairTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/team_test.rb b/test/models/team_test.rb
new file mode 100644
index 0000000..8b101cb
--- /dev/null
+++ b/test/models/team_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TeamTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/tournament_option_test.rb b/test/models/tournament_option_test.rb
new file mode 100644
index 0000000..8fa9628
--- /dev/null
+++ b/test/models/tournament_option_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TournamentOptionTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/tournament_test.rb b/test/models/tournament_test.rb
new file mode 100644
index 0000000..24a7e5f
--- /dev/null
+++ b/test/models/tournament_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TournamentTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/user_team_pair_test.rb b/test/models/user_team_pair_test.rb
new file mode 100644
index 0000000..55f5c58
--- /dev/null
+++ b/test/models/user_team_pair_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UserTeamPairTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/user_test.rb b/test/models/user_test.rb
new file mode 100644
index 0000000..82f61e0
--- /dev/null
+++ b/test/models/user_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UserTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/test_helper.rb b/test/test_helper.rb
new file mode 100644
index 0000000..bc7e05d
--- /dev/null
+++ b/test/test_helper.rb
@@ -0,0 +1,15 @@
+ENV["RAILS_ENV"] ||= "test"
+require File.expand_path('../../config/environment', __FILE__)
+require 'rails/test_help'
+
+class ActiveSupport::TestCase
+ ActiveRecord::Migration.check_pending!
+
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
+ #
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
+ # -- they do not yet inherit this setting
+ fixtures :all
+
+ # Add more helper methods to be used by all tests here...
+end