Commit Graph

438 Commits

Author SHA1 Message Date
Daniel Schädler b28561043e Implement stages controller (GET UPDATE) 2019-06-18 22:22:10 +02:00
Daniel Schädler 3dfeae8bf3 Test #teams_sorted_by_group_scores 2019-06-18 22:22:10 +02:00
Daniel Schädler 54ab1570b1 Sort teams more explicitly and in the right order 2019-06-18 22:22:10 +02:00
Daniel Schädler 15e2bd830f Randomize points in group_scores factory 2019-06-18 22:22:10 +02:00
Daniel Schädler 4925ea9d83 Make teams added to PlayoffStage configurable 2019-06-18 22:22:10 +02:00
Daniel Schädler 748ac18b35 Implement finished_group_match factory 2019-06-18 22:22:10 +02:00
Daniel Schädler 4e72d015ff Implement method to check if stage is over 2019-06-18 19:22:05 +02:00
Daniel Schädler 68efd3caae Add factory for a finished_playoff_match 2019-06-18 19:22:05 +02:00
Daniel Schädler bc0c7fddc3 Make match position randomizable 2019-06-18 19:22:05 +02:00
Daniel Schädler 88cbba440d Implement methods to get teams sorted by their group scores 2019-06-18 19:22:05 +02:00
Daniel Schädler c5780c2da3 Implement function to calculate the difference in points 2019-06-18 19:22:05 +02:00
Thor77 e8207c95c1
Merge pull request #66 from turniere/ticket/TURNIERE-256
Include bets in match serializer
2019-06-18 19:21:43 +02:00
Thor77 041ee4ab2c Include bets in match resource 2019-06-18 18:51:55 +02:00
Thor77 f3b8fd4184 Use collection serializer 2019-06-18 18:51:55 +02:00
Thor77 123649a4f4 Add collection serializer for bets 2019-06-18 18:51:55 +02:00
Daniel Schädler 7955425c38
Merge pull request #65 from turniere/ticket/TURNIERE-255
Fix last Match not being stopped correctly
2019-06-18 14:39:32 +02:00
Daniel Schädler 386155a690 Fix last Match not being stopped correctly 2019-06-18 14:09:29 +02:00
Daniel Schädler b57c2498c3
Merge pull request #63 from turniere/ticket/TURNIERE-253
Fix teams not associated with created tournament
2019-06-18 14:08:02 +02:00
Thor77 2baefb9ae6 Associate teams only on interactor success 2019-06-18 13:29:31 +02:00
Thor77 3109308817 Fix teams not associated with created tournament
when choosing a group stage
2019-06-18 13:29:31 +02:00
Daniel Schädler f71179ee8a
Merge pull request #64 from turniere/ticket/TURNIERE-235
Verify E-Mail Adress of account creator
2019-06-18 12:59:55 +02:00
Thor77 4f10d23763 Add mailgun credentials 2019-06-18 12:28:57 +02:00
Thor77 8c1acb9cc7 Add configuration for mail delivery 2019-06-18 12:27:00 +02:00
Thor77 6640be1e9a Add devise confirmable to user model 2019-06-18 12:27:00 +02:00
Thor77 fb2e7aa385 Add generated devise mailer views 2019-06-18 12:27:00 +02:00
Thor77 fc37c5031b Add mailgun-ruby dependency 2019-06-18 12:27:00 +02:00
Thor77 685e7de6c9
Merge pull request #53 from turniere/feature/production_db
Add production database config and secret
2019-06-17 15:54:37 +02:00
Thor77 376b721ec7
Add postgresql-dev package for pg-gem 2019-06-17 15:38:20 +02:00
Thor77 b38a0e2ed9
Add production database config and secret 2019-06-17 15:38:17 +02:00
Thor77 30e852aba9
Merge pull request #56 from turniere/ticket/TURNIERE-246
Fix teams not being put into second stage if part of :single_team match
2019-06-17 15:31:42 +02:00
Daniel Schädler 7630f6b432 Fix Typo 2019-06-17 15:02:30 +02:00
Daniel Schädler 6dff05b5e6 Test AdvanceTeamsInIntermediateStage Interactor 2019-06-17 15:02:30 +02:00
Daniel Schädler 213867a827 Let context fail if population of match below fails 2019-06-17 15:02:30 +02:00
Daniel Schädler f35ba5c745 Create factory for :single_team_match 2019-06-17 15:02:30 +02:00
Daniel Schädler e0da9ff7b5 Assign empty array if object_to_save is nil before pushing values to it
https://stackoverflow.com/questions/12163625/create-or-append-to-array-in-ruby
2019-06-17 15:02:30 +02:00
Daniel Schädler c9e1e153df Add interactor to advance all teams stuck in single team matches
After playoffs are created, before saving the stage this interactor
goes to the intermediate stage, looks for all the matches that are
:single_team matches and populates the match below with their respective
"winner".
2019-06-17 15:02:30 +02:00
Daniel Schädler 98319e9625 Assign :intermediate_stage to first stage if single_team matches present 2019-06-17 15:02:30 +02:00
Daniel Schädler 62f3ccba31 Rename method test 2019-06-17 15:02:30 +02:00
Daniel Schädler 5f378f27b2 Correct position for :single_team matches 2019-06-17 15:02:30 +02:00
Daniel Schädler 36db03293e Return a "winner" for :single_team matches 2019-06-17 15:02:30 +02:00
Daniel Schädler 8e3325bbfc Simplify concatenation of empty stages 2019-06-17 15:02:30 +02:00
Daniel Schädler 4384eb18e7
Merge pull request #58 from turniere/ticket/TURNIERE-231
Implement Match betting
2019-06-17 15:00:03 +02:00
Thor77 ce154a821c
Fix error message not changed in spec 2019-06-17 13:48:50 +02:00
Thor77 914cfbd94d
Reword error on invalid match state 2019-06-17 13:48:50 +02:00
Thor77 175870ab42
Prevent betting on running/finished matches 2019-06-17 13:48:50 +02:00
Thor77 6d12f889c5
Add Bet serializer 2019-06-17 13:48:50 +02:00
Thor77 48fc9fab57
Refactor spec to use let instead of class vars 2019-06-17 13:48:50 +02:00
Thor77 167a2116f1
Prevent duplicate bets on the same match 2019-06-17 13:48:50 +02:00
Thor77 ba758c73ff
Fix mock using throw instead of raise 2019-06-17 13:48:50 +02:00
Thor77 f08c4693ad
Expect UserServiceError in spec 2019-06-17 13:48:49 +02:00