Simple tournament manager for Super Smash Bros. matches (Ruby on Rails project)
Local commands:
bundle update
rake db:migrate
rake db:rollback
rails s
rails c
dropdb swisssmash_development
heroku pg:pull \<postgresql-name> swisssmash_development --app swisssmash
heroku pg:reset --app swisssmash-stage --confirm swisssmash-stage
heroku pg:push swisssmash_development \<postgresql-name> --app swisssmash-stage
Stage commands:
git push stage
heroku logs --tail --remote stage
heroku run rake db:migrate --remote stage
heroku run rails c --remote stage
heroku restart --remote stage
heroku run rake tournaments_crawler_ch:all --remote stage
heroku run rake "utils:remove_player_from_finished_tournament[
Prod commands:
git push prod master
heroku logs --tail --remote prod
heroku run rake db:migrate --remote prod
heroku run rails c --remote prod
heroku restart --remote prod
heroku run rake tournaments_crawler_ch:all --remote prod
heroku run rake tournaments_crawler_de:all --remote prod
heroku run rake tournaments_crawler_fr:all --remote prod
heroku run rake tournaments_crawler_lu:all --remote prod
heroku run rake tournaments_crawler_it:all --remote prod
heroku run rake tournaments_crawler_uk:all --remote prod
heroku run rake tournaments_crawler_ie:all --remote prod
heroku run rake tournaments_crawler_im:all --remote prod
heroku run rake tournaments_crawler_pt:all --remote prod
heroku run rake tournaments_crawler_is:all --remote prod
heroku run rake results_crawler_ch:all --remote prod
heroku run rake results_crawler_de:all --remote prod
heroku run rake results_crawler_fr:all --remote prod
heroku run rake results_crawler_lu:all --remote prod
heroku run rake results_crawler_it:all --remote prod
heroku run rake results_crawler_uk:all --remote prod
heroku run rake results_crawler_pt:all --remote prod
heroku run rake results_crawler_is:all --remote prod
heroku run rake "utils:remove_player_from_finished_tournament[
Note:
UK also includes Ireland (IE) & Isle of Men (IM) in this application.
Surveys:
heroku run rails c --remote prod
# Create survey:
Survey.create(
question: "",
option1: "",
option2: "",
option3: "",
ends_at: DateTime.now.beginning_of_day+14.days,
)
# Evaluate survey:
responses = Survey.last.survey_responses
t = responses.count
o1 = responses.where(response: 1).count
o2 = responses.where(response: 2).count
o3 = responses.where(response: 3).count
puts "total = #{t} #{responses.group_by(&:country_code).map{ |d| [d[0], d[1].count] }}"
puts "o1 = #{o1} (#{(100.0*o1/t).round(1)}%)"
puts "o2 = #{o2} (#{(100.0*o2/t).round(1)}%)"
puts "o3 = #{o3} (#{(100.0*o3/t).round(1)}%)"
puts "by_resp_and_country:"
pp responses.group_by{ |r| [r.response, r.country_code]}.map{ |d| [d[0], d[1].count] }.sort
puts "by_country_and_resp:"
pp responses.group_by{ |r| [r.country_code, r.response]}.map{ |d| [d[0], d[1].count] }.sort
General links:
Tournaments crawler links:
Twitch API:
Icons:
SVG flags:
Banner:
Google Analytics:
Roles overview:
news | communities | tournaments | teams | players | users | feedback | inactive tournaments | alts | |
---|---|---|---|---|---|---|---|---|---|
super_admin | x | x | x | x | x | x | x | x | x |
admin | x | x | x | x | x | ||||
news_editor | x | ||||||||
community_editor | x | ||||||||
tournament_organizer | x | ||||||||
team_captain | x |