Add some Models
This commit is contained in:
parent
2a20c02f56
commit
d5d61ec0a2
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/turniere-backend.iml" filepath="$PROJECT_DIR$/turniere-backend.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,346 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="a70d862e-5668-46ed-817a-f3a756158a43" name="TURNIERE-63 Rewrite Backend in Ruby" comment="" />
|
||||
<list id="67c7000a-2973-4ce5-b1e6-9fc28d9a6243" name="Default Changelist" comment="" />
|
||||
<ignored path="$PROJECT_DIR$/.bundle/" />
|
||||
<ignored path="$PROJECT_DIR$/components/" />
|
||||
<ignored path="$PROJECT_DIR$/public/system/" />
|
||||
<ignored path="$PROJECT_DIR$/tmp/" />
|
||||
<ignored path="$PROJECT_DIR$/vendor/bundle/" />
|
||||
<ignored path="$PROJECT_DIR$/vendor/cache/" />
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="DarkyenusTimeTracker">
|
||||
<option name="naggedAbout" value="1" />
|
||||
</component>
|
||||
<component name="FUSProjectUsageTrigger">
|
||||
<session id="-580199293">
|
||||
<usages-collector id="statistics.lifecycle.project">
|
||||
<counts>
|
||||
<entry key="project.closed" value="5" />
|
||||
<entry key="project.open.time.13" value="1" />
|
||||
<entry key="project.open.time.2" value="2" />
|
||||
<entry key="project.open.time.4" value="1" />
|
||||
<entry key="project.open.time.8" value="1" />
|
||||
<entry key="project.opened" value="5" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.open">
|
||||
<counts>
|
||||
<entry key="rb" value="7" />
|
||||
<entry key="ru" value="1" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.types.open">
|
||||
<counts>
|
||||
<entry key="Ruby" value="8" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.edit">
|
||||
<counts>
|
||||
<entry key="jql" value="24" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.types.edit">
|
||||
<counts>
|
||||
<entry key="JQL" value="24" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/application_record.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="221">
|
||||
<caret line="13" selection-start-line="13" selection-end-line="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/app/jobs/application_job.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="master" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||
<component name="JsGulpfileManager">
|
||||
<detection-done>true</detection-done>
|
||||
<sorting>DEFINITION_ORDER</sorting>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="758" />
|
||||
<option name="width" value="786" />
|
||||
<option name="height" value="859" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="controllers" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="jobs" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="mailers" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="models" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="views" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="turniere-backend" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="turniere-backend" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="app" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="views" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="layouts" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="RailsProjectView" />
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../gem/turniere" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="/usr/bin/node" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
<property name="settings.editor.selected.configurable" value="tasks.servers" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task id="Default" summary="Default task">
|
||||
<branch name="master" repository="$PROJECT_DIR$" original="true" />
|
||||
<changelist id="67c7000a-2973-4ce5-b1e6-9fc28d9a6243" name="Default Changelist" comment="" />
|
||||
<created>1540985236499</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1540985482306</updated>
|
||||
<workItem from="1540985241200" duration="240000" />
|
||||
</task>
|
||||
<task active="true" id="TURNIERE-63" summary="Rewrite Backend in Ruby">
|
||||
<branch name="master" repository="$PROJECT_DIR$" />
|
||||
<changelist id="a70d862e-5668-46ed-817a-f3a756158a43" name="TURNIERE-63 Rewrite Backend in Ruby" comment="" />
|
||||
<created>1540806299000</created>
|
||||
<option name="issue" value="true" />
|
||||
<url>https://jiratinf16b4.it.dh-karlsruhe.de:8443/browse/TURNIERE-63</url>
|
||||
<option name="number" value="63" />
|
||||
<option name="presentableId" value="TURNIERE-63" />
|
||||
<option name="project" value="TURNIERE" />
|
||||
<updated>1540985482338</updated>
|
||||
<workItem from="1540985483256" duration="120000" />
|
||||
<workItem from="1541233604769" duration="546000" />
|
||||
<workItem from="1541510627505" duration="595000" />
|
||||
<workItem from="1541511436015" duration="129000" />
|
||||
<workItem from="1541591328964" duration="1281000" />
|
||||
</task>
|
||||
<option name="createBranch" value="false" />
|
||||
<option name="useBranch" value="true" />
|
||||
<servers>
|
||||
<JIRA url="https://jiratinf16b4.it.dh-karlsruhe.de:8443">
|
||||
<option name="apiType" value="REST_2_0" />
|
||||
<password>dfe9df9ddfdcdfc1dff4dfc2dffddf80dfcbdfc6dfe8df89df9bdfe9df93dfc1df93df80dffcdfc0dfd0dfdddf9ddfe2dfdedfc2dfe5df92dff4dfdddf8fdf89dfcfdf99dfc5</password>
|
||||
<option name="jiraVersion" value="7.12.1" />
|
||||
<option name="searchQuery" value="resolution = Unresolved and project="TURNIERE" order by updated" />
|
||||
<username>malaber</username>
|
||||
</JIRA>
|
||||
</servers>
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="enabled" value="true" />
|
||||
<option name="totallyTimeSpent" value="2911000" />
|
||||
<option name="suspendDelayInSeconds" value="120" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-4" y="0" width="1608" height="864" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.11261261" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info id="Designer" order="2" />
|
||||
<window_info id="Favorites" order="3" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Docker" order="7" />
|
||||
<window_info anchor="bottom" id="Version Control" order="8" sideWeight="0.4993565" visible="true" weight="0.32959327" />
|
||||
<window_info anchor="bottom" id="Database Changes" order="9" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Terminal" order="10" sideWeight="0.4993565" weight="0.32959327" />
|
||||
<window_info anchor="bottom" id="Event Log" order="11" sideWeight="0.5006435" side_tool="true" weight="0.32959327" />
|
||||
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
<window_info anchor="right" id="Time Tracking" order="3" weight="0.68266666" />
|
||||
<window_info anchor="right" id="LuaJ" order="4" />
|
||||
<window_info anchor="right" id="Database" order="5" />
|
||||
<window_info anchor="right" id="Palette	" order="6" />
|
||||
<window_info anchor="right" id="Maven Projects" order="7" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="COLUMN_ORDER">
|
||||
<list>
|
||||
<option value="0" />
|
||||
<option value="1" />
|
||||
<option value="2" />
|
||||
<option value="3" />
|
||||
</list>
|
||||
</option>
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/config.ru">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/spring.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/mailers/application_mailer.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/application_record.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/jobs/application_job.rb">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="221">
|
||||
<caret line="13" selection-start-line="13" selection-end-line="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>1.8</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
class Group < ApplicationRecord
|
||||
belongs_to :matches
|
||||
belongs_to :teams
|
||||
end
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
class GroupStage < ApplicationRecord
|
||||
end
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
class Match < ApplicationRecord
|
||||
end
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
class PlayoffStage < ApplicationRecord
|
||||
end
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
class Team < ApplicationRecord
|
||||
end
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Turniere
|
||||
class GroupStage
|
||||
def self.generate_playoffs(teams, _tournament)
|
||||
stage_count = calculate_required_stage_count(teams.size)
|
||||
generate_matches(teams)
|
||||
end
|
||||
|
||||
def self.calculate_required_stage_count(number_of_teams)
|
||||
if number_of_teams.zero? || number_of_teams == 1
|
||||
0
|
||||
else
|
||||
Math.log(Turniere::Utils.previous_power_of_two(number_of_teams)) / Math.log(2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
module Turniere
|
||||
class Matches
|
||||
def self.generate_matches(teams)
|
||||
if teams.size == 1
|
||||
return #TODO error with only one team
|
||||
end
|
||||
neededGames = 0
|
||||
if (Turniere::Utils.po2?(teams.size())
|
||||
neededGames = teams.size() / 2
|
||||
else
|
||||
neededGames = teams.size() - Turniere::Utils.previous_power_of_two(teams.size()) / 2
|
||||
end
|
||||
|
||||
lastPos = 0
|
||||
matches = []
|
||||
i = 0
|
||||
|
||||
while i < neededGames
|
||||
match = Match(teams[2 * i], teams[( 2 * i ) + 1], 0, 0, :not_startet, i, false)
|
||||
matches.insert match
|
||||
i++
|
||||
end
|
||||
|
||||
lastPos = i + 1
|
||||
|
||||
while teams.size() != 0
|
||||
match = Match(teams[2 * i], teams[( 2 * i ) + 1], 0, 0, Match, i, false)
|
||||
matches.insert match
|
||||
end
|
||||
return lastPos
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
class CreateGroups < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :groups do |t|
|
||||
t.integer :id
|
||||
t.references :matches, foreign_key: true
|
||||
t.references :teams, foreign_key: true
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
class CreateGroupStages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :group_stages do |t|
|
||||
t.integer :id
|
||||
t.reference :groups
|
||||
t.integer :playoff_size
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
class CreateMatches < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :matches do |t|
|
||||
t.integer :id
|
||||
t.reference :team_1
|
||||
t.reference :team_2
|
||||
t.integer :score_team_1
|
||||
t.integer :score_team_2
|
||||
t.integer :state
|
||||
t.integer :position
|
||||
t.boolean :is_group_match
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
class CreatePlayoffStages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :playoff_stages do |t|
|
||||
t.integer :id
|
||||
t.integer :level
|
||||
t.reference :matches
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
class CreateTeams < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :teams do |t|
|
||||
t.integer :id
|
||||
t.string :name
|
||||
t.integer :group_score
|
||||
t.integer :group_points_scored
|
||||
t.integer :group_points_recieved
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
id: 1
|
||||
groups:
|
||||
playoff_size: 1
|
||||
|
||||
two:
|
||||
id: 1
|
||||
groups:
|
||||
playoff_size: 1
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
id: 1
|
||||
matches: one
|
||||
teams: one
|
||||
name: MyString
|
||||
|
||||
two:
|
||||
id: 1
|
||||
matches: two
|
||||
teams: two
|
||||
name: MyString
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
id: 1
|
||||
team_1:
|
||||
team_2:
|
||||
score_team_1: 1
|
||||
score_team_2: 1
|
||||
state: 1
|
||||
position: 1
|
||||
is_group_match: false
|
||||
|
||||
two:
|
||||
id: 1
|
||||
team_1:
|
||||
team_2:
|
||||
score_team_1: 1
|
||||
score_team_2: 1
|
||||
state: 1
|
||||
position: 1
|
||||
is_group_match: false
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
id: 1
|
||||
level: 1
|
||||
matches:
|
||||
|
||||
two:
|
||||
id: 1
|
||||
level: 1
|
||||
matches:
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
id: 1
|
||||
name: MyString
|
||||
group_score: 1
|
||||
group_points_scored: 1
|
||||
group_points_recieved: 1
|
||||
|
||||
two:
|
||||
id: 1
|
||||
name: MyString
|
||||
group_score: 1
|
||||
group_points_scored: 1
|
||||
group_points_recieved: 1
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class GroupStageTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class GroupTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class MatchTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class PlayoffStageTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class TeamTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="RUBY_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="RailsFacetType" name="Ruby on Rails">
|
||||
<configuration>
|
||||
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
|
||||
<RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
|
||||
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/components" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/public/system" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/vendor/cache" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="RModuleSettingsStorage">
|
||||
<LOAD_PATH number="0" />
|
||||
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
|
||||
</component>
|
||||
</module>
|
||||
Loading…
Reference in New Issue