summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/remote_usernames.js.coffee3
-rw-r--r--app/assets/stylesheets/remote_usernames.css.scss3
-rw-r--r--app/controllers/remote_usernames_controller.rb74
-rw-r--r--app/helpers/remote_usernames_helper.rb2
-rw-r--r--app/views/remote_usernames/_form.html.erb29
-rw-r--r--app/views/remote_usernames/edit.html.erb6
-rw-r--r--app/views/remote_usernames/index.html.erb31
-rw-r--r--app/views/remote_usernames/index.json.jbuilder4
-rw-r--r--app/views/remote_usernames/new.html.erb5
-rw-r--r--app/views/remote_usernames/show.html.erb19
-rw-r--r--app/views/remote_usernames/show.json.jbuilder1
-rw-r--r--config/routes.rb2
-rw-r--r--db/migrate/20140405010436_create_servers.rb (renamed from db/migrate/20140403155007_create_servers.rb)0
-rw-r--r--db/migrate/20140405010438_create_matches.rb (renamed from db/migrate/20140403155008_create_matches.rb)0
-rw-r--r--db/migrate/20140405010441_create_teams.rb (renamed from db/migrate/20140403155011_create_teams.rb)0
-rw-r--r--db/migrate/20140405010443_create_alerts.rb (renamed from db/migrate/20140403155012_create_alerts.rb)0
-rw-r--r--db/migrate/20140405010446_create_pms.rb (renamed from db/migrate/20140403155014_create_pms.rb)0
-rw-r--r--db/migrate/20140405010448_create_tournaments.rb (renamed from db/migrate/20140403155017_create_tournaments.rb)0
-rw-r--r--db/migrate/20140405010451_create_games.rb (renamed from db/migrate/20140403155019_create_games.rb)0
-rw-r--r--db/migrate/20140405010454_create_users.rb (renamed from db/migrate/20140403155020_create_users.rb)0
-rw-r--r--db/migrate/20140405010456_create_sessions.rb (renamed from db/migrate/20140403155022_create_sessions.rb)0
-rw-r--r--db/migrate/20140405010459_create_server_settings.rb (renamed from db/migrate/20140403155026_create_server_settings.rb)0
-rw-r--r--db/migrate/20140405010501_create_game_settings.rb (renamed from db/migrate/20140403155029_create_game_settings.rb)2
-rw-r--r--db/migrate/20140405010503_create_tournament_preferences.rb (renamed from db/migrate/20140403155030_create_tournament_preferences.rb)0
-rw-r--r--db/migrate/20140405010506_create_scores.rb (renamed from db/migrate/20140403155032_create_scores.rb)0
-rw-r--r--db/migrate/20140405010508_create_remote_usernames.rb (renamed from db/migrate/20140403155024_create_remote_usernames.rb)2
-rw-r--r--db/migrate/20140405010511_create_tournament_players_join_table.rb (renamed from db/migrate/20140403155035_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140405010513_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140403155038_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140405010515_create_team_user_join_table.rb (renamed from db/migrate/20140403155039_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140405010518_create_match_team_join_table.rb (renamed from db/migrate/20140403155042_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140405010527_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140403155049_add_hidden_attrs_to_user.rb)0
-rw-r--r--db/schema.rb6
-rw-r--r--test/controllers/remote_usernames_controller_test.rb49
-rw-r--r--test/fixtures/game_settings.yml4
-rw-r--r--test/fixtures/remote_usernames.yml4
-rw-r--r--test/helpers/remote_usernames_helper_test.rb4
36 files changed, 9 insertions, 241 deletions
diff --git a/app/assets/javascripts/remote_usernames.js.coffee b/app/assets/javascripts/remote_usernames.js.coffee
deleted file mode 100644
index 24f83d1..0000000
--- a/app/assets/javascripts/remote_usernames.js.coffee
+++ /dev/null
@@ -1,3 +0,0 @@
-# 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/remote_usernames.css.scss b/app/assets/stylesheets/remote_usernames.css.scss
deleted file mode 100644
index b9e841e..0000000
--- a/app/assets/stylesheets/remote_usernames.css.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// Place all the styles related to the remote_usernames 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/remote_usernames_controller.rb b/app/controllers/remote_usernames_controller.rb
deleted file mode 100644
index 8676c00..0000000
--- a/app/controllers/remote_usernames_controller.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-class RemoteUsernamesController < ApplicationController
- before_action :set_remote_username, only: [:show, :edit, :update, :destroy]
-
- # GET /remote_usernames
- # GET /remote_usernames.json
- def index
- @remote_usernames = RemoteUsername.all
- end
-
- # GET /remote_usernames/1
- # GET /remote_usernames/1.json
- def show
- end
-
- # GET /remote_usernames/new
- def new
- @remote_username = RemoteUsername.new
- end
-
- # GET /remote_usernames/1/edit
- def edit
- end
-
- # POST /remote_usernames
- # POST /remote_usernames.json
- def create
- @remote_username = RemoteUsername.new(remote_username_params)
-
- respond_to do |format|
- if @remote_username.save
- format.html { redirect_to @remote_username, notice: 'Remote username was successfully created.' }
- format.json { render action: 'show', status: :created, location: @remote_username }
- else
- format.html { render action: 'new' }
- format.json { render json: @remote_username.errors, status: :unprocessable_entity }
- end
- end
- end
-
- # PATCH/PUT /remote_usernames/1
- # PATCH/PUT /remote_usernames/1.json
- def update
- respond_to do |format|
- if @remote_username.update(remote_username_params)
- format.html { redirect_to @remote_username, notice: 'Remote username was successfully updated.' }
- format.json { head :no_content }
- else
- format.html { render action: 'edit' }
- format.json { render json: @remote_username.errors, status: :unprocessable_entity }
- end
- end
- end
-
- # DELETE /remote_usernames/1
- # DELETE /remote_usernames/1.json
- def destroy
- @remote_username.destroy
- respond_to do |format|
- format.html { redirect_to remote_usernames_url }
- format.json { head :no_content }
- end
- end
-
- private
- # Use callbacks to share common setup or constraints between actions.
- def set_remote_username
- @remote_username = RemoteUsername.find(params[:id])
- end
-
- # Never trust parameters from the scary internet, only allow the white list through.
- def remote_username_params
- params.require(:remote_username).permit(:game_id, :user_id, :user_name)
- end
-end
diff --git a/app/helpers/remote_usernames_helper.rb b/app/helpers/remote_usernames_helper.rb
deleted file mode 100644
index 3240c4f..0000000
--- a/app/helpers/remote_usernames_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module RemoteUsernamesHelper
-end
diff --git a/app/views/remote_usernames/_form.html.erb b/app/views/remote_usernames/_form.html.erb
deleted file mode 100644
index 5da1f8f..0000000
--- a/app/views/remote_usernames/_form.html.erb
+++ /dev/null
@@ -1,29 +0,0 @@
-<%= form_for(@remote_username) do |f| %>
- <% if @remote_username.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@remote_username.errors.count, "error") %> prohibited this remote_username from being saved:</h2>
-
- <ul>
- <% @remote_username.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="field">
- <%= f.label :user_id %><br>
- <%= f.text_field :user_id %>
- </div>
- <div class="field">
- <%= f.label :user_name %><br>
- <%= f.text_field :user_name %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
-<% end %>
diff --git a/app/views/remote_usernames/edit.html.erb b/app/views/remote_usernames/edit.html.erb
deleted file mode 100644
index 52d4b37..0000000
--- a/app/views/remote_usernames/edit.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-<h1>Editing remote_username</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Show', @remote_username %> |
-<%= link_to 'Back', remote_usernames_path %>
diff --git a/app/views/remote_usernames/index.html.erb b/app/views/remote_usernames/index.html.erb
deleted file mode 100644
index 14f5876..0000000
--- a/app/views/remote_usernames/index.html.erb
+++ /dev/null
@@ -1,31 +0,0 @@
-<h1>Listing remote_usernames</h1>
-
-<table>
- <thead>
- <tr>
- <th>Game</th>
- <th>User</th>
- <th>User name</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
- </thead>
-
- <tbody>
- <% @remote_usernames.each do |remote_username| %>
- <tr>
- <td><%= remote_username.game %></td>
- <td><%= remote_username.user %></td>
- <td><%= remote_username.user_name %></td>
- <td><%= link_to 'Show', remote_username %></td>
- <td><%= link_to 'Edit', edit_remote_username_path(remote_username) %></td>
- <td><%= link_to 'Destroy', remote_username, method: :delete, data: { confirm: 'Are you sure?' } %></td>
- </tr>
- <% end %>
- </tbody>
-</table>
-
-<br>
-
-<%= link_to 'New Remote username', new_remote_username_path %>
diff --git a/app/views/remote_usernames/index.json.jbuilder b/app/views/remote_usernames/index.json.jbuilder
deleted file mode 100644
index c9fbc0f..0000000
--- a/app/views/remote_usernames/index.json.jbuilder
+++ /dev/null
@@ -1,4 +0,0 @@
-json.array!(@remote_usernames) do |remote_username|
- json.extract! remote_username, :id, :game_id, :user_id, :user_name
- json.url remote_username_url(remote_username, format: :json)
-end
diff --git a/app/views/remote_usernames/new.html.erb b/app/views/remote_usernames/new.html.erb
deleted file mode 100644
index b9cfcf4..0000000
--- a/app/views/remote_usernames/new.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>New remote_username</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Back', remote_usernames_path %>
diff --git a/app/views/remote_usernames/show.html.erb b/app/views/remote_usernames/show.html.erb
deleted file mode 100644
index 416ca9d..0000000
--- a/app/views/remote_usernames/show.html.erb
+++ /dev/null
@@ -1,19 +0,0 @@
-<p id="notice"><%= notice %></p>
-
-<p>
- <strong>Game:</strong>
- <%= @remote_username.game %>
-</p>
-
-<p>
- <strong>User:</strong>
- <%= @remote_username.user %>
-</p>
-
-<p>
- <strong>User name:</strong>
- <%= @remote_username.user_name %>
-</p>
-
-<%= link_to 'Edit', edit_remote_username_path(@remote_username) %> |
-<%= link_to 'Back', remote_usernames_path %>
diff --git a/app/views/remote_usernames/show.json.jbuilder b/app/views/remote_usernames/show.json.jbuilder
deleted file mode 100644
index 1a0f6f9..0000000
--- a/app/views/remote_usernames/show.json.jbuilder
+++ /dev/null
@@ -1 +0,0 @@
-json.extract! @remote_username, :id, :game_id, :user_id, :user_name, :created_at, :updated_at
diff --git a/config/routes.rb b/config/routes.rb
index ee624c9..97e82f8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,6 +1,4 @@
Leaguer::Application.routes.draw do
- resources :remote_usernames
-
resources :sessions
resources :users
diff --git a/db/migrate/20140403155007_create_servers.rb b/db/migrate/20140405010436_create_servers.rb
index f33241a..f33241a 100644
--- a/db/migrate/20140403155007_create_servers.rb
+++ b/db/migrate/20140405010436_create_servers.rb
diff --git a/db/migrate/20140403155008_create_matches.rb b/db/migrate/20140405010438_create_matches.rb
index 31eea12..31eea12 100644
--- a/db/migrate/20140403155008_create_matches.rb
+++ b/db/migrate/20140405010438_create_matches.rb
diff --git a/db/migrate/20140403155011_create_teams.rb b/db/migrate/20140405010441_create_teams.rb
index fdf9a68..fdf9a68 100644
--- a/db/migrate/20140403155011_create_teams.rb
+++ b/db/migrate/20140405010441_create_teams.rb
diff --git a/db/migrate/20140403155012_create_alerts.rb b/db/migrate/20140405010443_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140403155012_create_alerts.rb
+++ b/db/migrate/20140405010443_create_alerts.rb
diff --git a/db/migrate/20140403155014_create_pms.rb b/db/migrate/20140405010446_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140403155014_create_pms.rb
+++ b/db/migrate/20140405010446_create_pms.rb
diff --git a/db/migrate/20140403155017_create_tournaments.rb b/db/migrate/20140405010448_create_tournaments.rb
index c0d8929..c0d8929 100644
--- a/db/migrate/20140403155017_create_tournaments.rb
+++ b/db/migrate/20140405010448_create_tournaments.rb
diff --git a/db/migrate/20140403155019_create_games.rb b/db/migrate/20140405010451_create_games.rb
index 5e4f56f..5e4f56f 100644
--- a/db/migrate/20140403155019_create_games.rb
+++ b/db/migrate/20140405010451_create_games.rb
diff --git a/db/migrate/20140403155020_create_users.rb b/db/migrate/20140405010454_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140403155020_create_users.rb
+++ b/db/migrate/20140405010454_create_users.rb
diff --git a/db/migrate/20140403155022_create_sessions.rb b/db/migrate/20140405010456_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140403155022_create_sessions.rb
+++ b/db/migrate/20140405010456_create_sessions.rb
diff --git a/db/migrate/20140403155026_create_server_settings.rb b/db/migrate/20140405010459_create_server_settings.rb
index dfdd91b..dfdd91b 100644
--- a/db/migrate/20140403155026_create_server_settings.rb
+++ b/db/migrate/20140405010459_create_server_settings.rb
diff --git a/db/migrate/20140403155029_create_game_settings.rb b/db/migrate/20140405010501_create_game_settings.rb
index 0ebbf18..eed6b00 100644
--- a/db/migrate/20140403155029_create_game_settings.rb
+++ b/db/migrate/20140405010501_create_game_settings.rb
@@ -5,7 +5,7 @@ class CreateGameSettings < ActiveRecord::Migration
t.integer :type
t.string :name
t.text :default
- t.text :discription
+ t.text :description
t.text :type_opt
t.integer :display_order
diff --git a/db/migrate/20140403155030_create_tournament_preferences.rb b/db/migrate/20140405010503_create_tournament_preferences.rb
index 991d659..991d659 100644
--- a/db/migrate/20140403155030_create_tournament_preferences.rb
+++ b/db/migrate/20140405010503_create_tournament_preferences.rb
diff --git a/db/migrate/20140403155032_create_scores.rb b/db/migrate/20140405010506_create_scores.rb
index 4ca0b0b..4ca0b0b 100644
--- a/db/migrate/20140403155032_create_scores.rb
+++ b/db/migrate/20140405010506_create_scores.rb
diff --git a/db/migrate/20140403155024_create_remote_usernames.rb b/db/migrate/20140405010508_create_remote_usernames.rb
index b837e53..e265985 100644
--- a/db/migrate/20140403155024_create_remote_usernames.rb
+++ b/db/migrate/20140405010508_create_remote_usernames.rb
@@ -3,7 +3,7 @@ class CreateRemoteUsernames < ActiveRecord::Migration
create_table :remote_usernames do |t|
t.references :game, index: true
t.references :user, index: true
- t.string :user_name
+ t.text :json_value
t.timestamps
end
diff --git a/db/migrate/20140403155035_create_tournament_players_join_table.rb b/db/migrate/20140405010511_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140403155035_create_tournament_players_join_table.rb
+++ b/db/migrate/20140405010511_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140403155038_create_tournament_hosts_join_table.rb b/db/migrate/20140405010513_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140403155038_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140405010513_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140403155039_create_team_user_join_table.rb b/db/migrate/20140405010515_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140403155039_create_team_user_join_table.rb
+++ b/db/migrate/20140405010515_create_team_user_join_table.rb
diff --git a/db/migrate/20140403155042_create_match_team_join_table.rb b/db/migrate/20140405010518_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140403155042_create_match_team_join_table.rb
+++ b/db/migrate/20140405010518_create_match_team_join_table.rb
diff --git a/db/migrate/20140403155049_add_hidden_attrs_to_user.rb b/db/migrate/20140405010527_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140403155049_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140405010527_add_hidden_attrs_to_user.rb
diff --git a/db/schema.rb b/db/schema.rb
index 113f16d..0763348 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140403155049) do
+ActiveRecord::Schema.define(version: 20140405010527) do
create_table "alerts", force: true do |t|
t.integer "author_id"
@@ -27,7 +27,7 @@ ActiveRecord::Schema.define(version: 20140403155049) do
t.integer "type"
t.string "name"
t.text "default"
- t.text "discription"
+ t.text "description"
t.text "type_opt"
t.integer "display_order"
t.datetime "created_at"
@@ -90,7 +90,7 @@ ActiveRecord::Schema.define(version: 20140403155049) do
create_table "remote_usernames", force: true do |t|
t.integer "game_id"
t.integer "user_id"
- t.string "user_name"
+ t.text "json_value"
t.datetime "created_at"
t.datetime "updated_at"
end
diff --git a/test/controllers/remote_usernames_controller_test.rb b/test/controllers/remote_usernames_controller_test.rb
deleted file mode 100644
index ff6a91d..0000000
--- a/test/controllers/remote_usernames_controller_test.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'test_helper'
-
-class RemoteUsernamesControllerTest < ActionController::TestCase
- setup do
- @remote_username = remote_usernames(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:remote_usernames)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create remote_username" do
- assert_difference('RemoteUsername.count') do
- post :create, remote_username: { game_id: @remote_username.game_id, user_id: @remote_username.user_id, user_name: @remote_username.user_name }
- end
-
- assert_redirected_to remote_username_path(assigns(:remote_username))
- end
-
- test "should show remote_username" do
- get :show, id: @remote_username
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @remote_username
- assert_response :success
- end
-
- test "should update remote_username" do
- patch :update, id: @remote_username, remote_username: { game_id: @remote_username.game_id, user_id: @remote_username.user_id, user_name: @remote_username.user_name }
- assert_redirected_to remote_username_path(assigns(:remote_username))
- end
-
- test "should destroy remote_username" do
- assert_difference('RemoteUsername.count', -1) do
- delete :destroy, id: @remote_username
- end
-
- assert_redirected_to remote_usernames_path
- end
-end
diff --git a/test/fixtures/game_settings.yml b/test/fixtures/game_settings.yml
index 5626c97..7497d02 100644
--- a/test/fixtures/game_settings.yml
+++ b/test/fixtures/game_settings.yml
@@ -5,7 +5,7 @@ one:
type: 1
name: MyString
default: MyText
- discription: MyText
+ description: MyText
type_opt: MyText
display_order: 1
@@ -14,6 +14,6 @@ two:
type: 1
name: MyString
default: MyText
- discription: MyText
+ description: MyText
type_opt: MyText
display_order: 1
diff --git a/test/fixtures/remote_usernames.yml b/test/fixtures/remote_usernames.yml
index 0b3055a..baa1714 100644
--- a/test/fixtures/remote_usernames.yml
+++ b/test/fixtures/remote_usernames.yml
@@ -3,9 +3,9 @@
one:
game_id:
user_id:
- user_name: MyString
+ json_value: MyText
two:
game_id:
user_id:
- user_name: MyString
+ json_value: MyText
diff --git a/test/helpers/remote_usernames_helper_test.rb b/test/helpers/remote_usernames_helper_test.rb
deleted file mode 100644
index 1c9a795..0000000
--- a/test/helpers/remote_usernames_helper_test.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'test_helper'
-
-class RemoteUsernamesHelperTest < ActionView::TestCase
-end