summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-07-07 22:07:50 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-07-07 22:07:50 -0400
commit4ac4600d7eca50bac1ba0603d4494cca3a5047a4 (patch)
treed9e1145dedec8387e80f9346eae9f6fa4c514d0d /app/models
parent4975d1c647781d1b132edb0ed7c7613d52adafdc (diff)
add AGPL copyright header to all non-trivial non-generated files
Diffstat (limited to 'app/models')
-rw-r--r--app/models/alert.rb22
-rw-r--r--app/models/bracket.rb22
-rw-r--r--app/models/bracket_match.rb22
-rw-r--r--app/models/game.rb22
-rw-r--r--app/models/game_setting.rb22
-rw-r--r--app/models/match.rb22
-rw-r--r--app/models/pm.rb22
-rw-r--r--app/models/remote_username.rb22
-rw-r--r--app/models/server.rb22
-rw-r--r--app/models/session.rb22
-rw-r--r--app/models/statistic.rb22
-rw-r--r--app/models/team.rb22
-rw-r--r--app/models/tournament.rb22
-rw-r--r--app/models/tournament_setting.rb22
-rw-r--r--app/models/tournament_stage.rb22
-rw-r--r--app/models/user.rb22
16 files changed, 352 insertions, 0 deletions
diff --git a/app/models/alert.rb b/app/models/alert.rb
index e8a4cf2..189dfde 100644
--- a/app/models/alert.rb
+++ b/app/models/alert.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Alert < ActiveRecord::Base
belongs_to :author, class_name: "User"
diff --git a/app/models/bracket.rb b/app/models/bracket.rb
index 5de3751..930015a 100644
--- a/app/models/bracket.rb
+++ b/app/models/bracket.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Bracket < ActiveRecord::Base
belongs_to :user
belongs_to :tournament
diff --git a/app/models/bracket_match.rb b/app/models/bracket_match.rb
index 14a8002..d6e53c6 100644
--- a/app/models/bracket_match.rb
+++ b/app/models/bracket_match.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class BracketMatch < ActiveRecord::Base
belongs_to :bracket
belongs_to :match
diff --git a/app/models/game.rb b/app/models/game.rb
index d5622af..f27f174 100644
--- a/app/models/game.rb
+++ b/app/models/game.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Game < ActiveRecord::Base
belongs_to :parent, class_name: "Game"
diff --git a/app/models/game_setting.rb b/app/models/game_setting.rb
index 40ab32f..514b57c 100644
--- a/app/models/game_setting.rb
+++ b/app/models/game_setting.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class GameSetting < ActiveRecord::Base
belongs_to :game
diff --git a/app/models/match.rb b/app/models/match.rb
index f1c32fe..27c4fbe 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Match < ActiveRecord::Base
belongs_to :tournament_stage
has_many :statistics
diff --git a/app/models/pm.rb b/app/models/pm.rb
index 3d14149..31a04b7 100644
--- a/app/models/pm.rb
+++ b/app/models/pm.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Pm < ActiveRecord::Base
belongs_to :author, class_name: "User"
belongs_to :recipient, class_name: "User"
diff --git a/app/models/remote_username.rb b/app/models/remote_username.rb
index 23dc0a8..e952779 100644
--- a/app/models/remote_username.rb
+++ b/app/models/remote_username.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class RemoteUsername < ActiveRecord::Base
belongs_to :game
belongs_to :user
diff --git a/app/models/server.rb b/app/models/server.rb
index 5ba7524..df053ca 100644
--- a/app/models/server.rb
+++ b/app/models/server.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Server < ActiveRecord::Base
def default_user_abilities
@abilities ||= User::Abilities.new(DefaultUser.new(self))
diff --git a/app/models/session.rb b/app/models/session.rb
index 27687eb..a85e4fc 100644
--- a/app/models/session.rb
+++ b/app/models/session.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Session < ActiveRecord::Base
belongs_to :user
diff --git a/app/models/statistic.rb b/app/models/statistic.rb
index 8abf1f4..6a79e99 100644
--- a/app/models/statistic.rb
+++ b/app/models/statistic.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Statistic < ActiveRecord::Base
belongs_to :user
belongs_to :match
diff --git a/app/models/team.rb b/app/models/team.rb
index 90981da..76ee510 100644
--- a/app/models/team.rb
+++ b/app/models/team.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Team < ActiveRecord::Base
has_and_belongs_to_many :matches
has_and_belongs_to_many :users
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index 854b8c9..b18e359 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class Tournament < ActiveRecord::Base
belongs_to :game
diff --git a/app/models/tournament_setting.rb b/app/models/tournament_setting.rb
index 48c607e..cbf607a 100644
--- a/app/models/tournament_setting.rb
+++ b/app/models/tournament_setting.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class TournamentSetting < ActiveRecord::Base
belongs_to :tournament
diff --git a/app/models/tournament_stage.rb b/app/models/tournament_stage.rb
index efb4d5c..4695238 100644
--- a/app/models/tournament_stage.rb
+++ b/app/models/tournament_stage.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class TournamentStage < ActiveRecord::Base
belongs_to :tournament
validates_presence_of :tournament
diff --git a/app/models/user.rb b/app/models/user.rb
index ad95683..462136f 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,3 +1,25 @@
+# Copyright (C) 2014 Andrew Murrell
+# Copyright (C) 2014 Davis Webb
+# Copyright (C) 2014 Guntas Grewal
+# Copyright (C) 2014 Luke Shumaker
+# Copyright (C) 2014 Nathaniel Foy
+# Copyright (C) 2014 Tomer Kimia
+#
+# This file is part of Leaguer.
+#
+# Leaguer is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Leaguer is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the Affero GNU General Public License
+# along with Leaguer. If not, see <http://www.gnu.org/licenses/>.
+
class User < ActiveRecord::Base
def owned_by?(tuser)
self == tuser