Permalink
Browse files

lets open source, its cool

  • Loading branch information...
1 parent 3fc9172 commit 6c079d336f2ad84a1b7f14b07bc21b7cc6469e28 @Arie committed Oct 26, 2012
Showing with 2,647 additions and 3 deletions.
  1. +18 −0 .gitignore
  2. +7 −0 Capfile
  3. +46 −0 Gemfile
  4. +235 −0 Gemfile.lock
  5. +17 −3 README.md
  6. +7 −0 Rakefile
  7. BIN app/assets/images/rails.png
  8. BIN app/assets/images/sits_small.png
  9. +17 −0 app/assets/javascripts/application.js
  10. +2 −0 app/assets/javascripts/sessions.js
  11. +3 −0 app/assets/stylesheets/_navigation.sass
  12. +4 −0 app/assets/stylesheets/application.sass
  13. +4 −0 app/assets/stylesheets/sessions.css
  14. +7 −0 app/controllers/application_controller.rb
  15. +23 −0 app/controllers/pages_controller.rb
  16. +80 −0 app/controllers/reservations_controller.rb
  17. +19 −0 app/controllers/sessions_controller.rb
  18. +7 −0 app/helpers/application_helper.rb
  19. +2 −0 app/helpers/sessions_helper.rb
  20. 0 app/mailers/.gitkeep
  21. 0 app/models/.gitkeep
  22. +9 −0 app/models/group.rb
  23. +5 −0 app/models/group_server.rb
  24. +5 −0 app/models/group_user.rb
  25. +121 −0 app/models/reservation.rb
  26. +74 −0 app/models/server.rb
  27. +32 −0 app/models/user.rb
  28. +15 −0 app/views/layouts/application.html.haml
  29. +16 −0 app/views/pages/_todays_reservations.html.haml
  30. +34 −0 app/views/pages/credits.html.haml
  31. +31 −0 app/views/pages/welcome.html.haml
  32. +13 −0 app/views/reservations/_form.html.haml
  33. +1 −0 app/views/reservations/edit.html.haml
  34. +1 −0 app/views/reservations/new.html.haml
  35. +15 −0 app/views/reservations/show.html.haml
  36. +2 −0 app/views/sessions/create.html.erb
  37. +2 −0 app/views/sessions/failure.html.haml
  38. +2 −0 app/views/sessions/new.html.erb
  39. +4 −0 app/views/shared/_flash.html.haml
  40. +13 −0 app/views/shared/_navigation.html.haml
  41. +9 −0 app/views/shared/_paypal.html.erb
  42. +4 −0 config.ru
  43. +63 −0 config/application.rb
  44. +6 −0 config/boot.rb
  45. +25 −0 config/database.yml
  46. +60 −0 config/deploy.rb
  47. +5 −0 config/environment.rb
  48. +37 −0 config/environments/development.rb
  49. +67 −0 config/environments/production.rb
  50. +37 −0 config/environments/test.rb
  51. +7 −0 config/initializers/backtrace_silencers.rb
  52. +232 −0 config/initializers/devise.rb
  53. +15 −0 config/initializers/inflections.rb
  54. +5 −0 config/initializers/mime_types.rb
  55. +6 −0 config/initializers/omni_auth.rb
  56. +7 −0 config/initializers/secret_token.rb
  57. +8 −0 config/initializers/session_store.rb
  58. +142 −0 config/initializers/simple_form.rb
  59. +45 −0 config/initializers/simple_form_bootstrap.rb
  60. +14 −0 config/initializers/wrap_parameters.rb
  61. +60 −0 config/locales/devise.en.yml
  62. +5 −0 config/locales/en.yml
  63. +26 −0 config/locales/simple_form.en.yml
  64. +27 −0 config/routes.rb
  65. +14 −0 config/thin.yml
  66. +14 −0 db/migrate/20121014191738_create_users.rb
  67. +53 −0 db/migrate/20121014194656_add_devise_to_users.rb
  68. +14 −0 db/migrate/20121014211338_create_servers.rb
  69. +17 −0 db/migrate/20121014211429_create_reservations.rb
  70. +9 −0 db/migrate/20121015121626_remove_email_index.rb
  71. +14 −0 db/migrate/20121016150021_add_timestamps_to_tables.rb
  72. +13 −0 db/migrate/20121016191120_create_group_servers.rb
  73. +12 −0 db/migrate/20121016192842_create_groups.rb
  74. +13 −0 db/migrate/20121016193011_create_group_users.rb
  75. +78 −0 db/schema.rb
  76. +28 −0 db/seeds.rb
  77. +2 −0 doc/README_FOR_APP
  78. 0 lib/assets/.gitkeep
  79. +5 −0 lib/reservation.cfg.erb
  80. 0 lib/tasks/.gitkeep
  81. +13 −0 lib/templates/erb/scaffold/_form.html.erb
  82. 0 log/.gitkeep
  83. +26 −0 public/404.html
  84. +26 −0 public/422.html
  85. +25 −0 public/500.html
  86. 0 public/favicon.ico
  87. +5 −0 public/robots.txt
  88. +6 −0 script/rails
  89. +24 −0 spec/factories.rb
  90. +38 −0 spec/helpers/application_helper_spec.rb
  91. +174 −0 spec/models/reservation_spec.rb
  92. +114 −0 spec/models/server_spec.rb
  93. +19 −0 spec/models/user_spec.rb
  94. +38 −0 spec/spec_helper.rb
  95. 0 test/fixtures/.gitkeep
  96. 0 test/functional/.gitkeep
  97. +19 −0 test/functional/sessions_controller_test.rb
  98. 0 test/integration/.gitkeep
  99. +12 −0 test/performance/browsing_test.rb
  100. +13 −0 test/test_helper.rb
  101. 0 test/unit/.gitkeep
  102. +4 −0 test/unit/helpers/sessions_helper_test.rb
  103. 0 vendor/assets/javascripts/.gitkeep
  104. 0 vendor/assets/stylesheets/.gitkeep
  105. 0 vendor/plugins/.gitkeep
View
@@ -0,0 +1,18 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
+
+/public/uploads
+/config/initializers/steam.rb
View
@@ -0,0 +1,7 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+load 'deploy/assets'
+load 'config/deploy'
+require "bundler/capistrano"
+require 'capistrano_colors' unless ENV['COLORIZE_CAPISTRANO'] == 'off'
+
+require "rvm/capistrano" # Load RVM's capistrano plugin.
View
@@ -0,0 +1,46 @@
+source :rubygems
+
+gem 'rails'
+gem 'jquery-rails'
+gem 'haml'
+gem 'sass'
+gem 'mysql2'
+gem 'escape'
+gem 'memoizable'
+gem 'dalli'
+gem 'thin'
+gem 'omniauth-openid'
+gem 'omniauth-steam'
+gem 'devise'
+gem 'bootstrap-sass'
+gem 'turbo-sprockets-rails3' #faster precompile
+gem 'simple_form'
+gem 'rubyzip'
+
+group :development do
+ #Debugging
+ gem 'pry-nav'
+ #Deployment
+ gem 'capistrano-ext'
+ gem 'capistrano_colors'
+ gem 'capistrano'
+ gem 'rvm-capistrano'
+end
+
+group :test, :development do
+ gem 'pry-nav'
+ gem 'factory_girl_rails'
+ gem 'rspec-rails'
+end
+
+group :assets do
+ gem 'coffee-script' #less horrible javascript
+ gem 'uglifier'
+ gem 'jquery-rails'
+ gem 'fancybox-rails'
+ gem 'compass' #because spriting is cool
+ gem 'compass-rails'
+ gem 'sass-rails'
+ gem 'therubyracer'
+ gem 'bootstrap-sass' #<3 twitter bootstrap
+end
View
@@ -0,0 +1,235 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ bcrypt-ruby (3.0.1)
+ bootstrap-sass (2.1.0.0)
+ builder (3.0.3)
+ capistrano (2.13.4)
+ highline
+ net-scp (>= 1.0.0)
+ net-sftp (>= 2.0.0)
+ net-ssh (>= 2.0.14)
+ net-ssh-gateway (>= 1.1.0)
+ capistrano-ext (1.2.1)
+ capistrano (>= 1.0.0)
+ capistrano_colors (0.5.5)
+ chunky_png (1.2.6)
+ coderay (1.0.8)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.3.3)
+ compass (0.12.2)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ compass-rails (1.0.3)
+ compass (>= 0.12.2, < 0.14)
+ daemons (1.1.9)
+ dalli (2.2.1)
+ devise (2.1.2)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.1)
+ railties (~> 3.1)
+ warden (~> 1.2.1)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ escape (0.0.4)
+ eventmachine (1.0.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ factory_girl (4.1.0)
+ activesupport (>= 3.0.0)
+ factory_girl_rails (4.1.0)
+ factory_girl (~> 4.1.0)
+ railties (>= 3.0.0)
+ fancybox-rails (0.1.4)
+ railties (>= 3.1.0)
+ fssm (0.2.9)
+ haml (3.1.7)
+ hashie (1.2.0)
+ highline (1.6.15)
+ hike (1.2.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
+ thor (~> 0.14)
+ jruby-pageant (1.1.1)
+ json (1.7.5)
+ libv8 (3.3.10.4)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ memoizable (0.1.0)
+ method_source (0.8)
+ mime-types (1.19)
+ multi_json (1.3.6)
+ mysql2 (0.3.11)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-sftp (2.0.5)
+ net-ssh (>= 2.0.9)
+ net-ssh (2.6.0)
+ jruby-pageant (>= 1.1.1)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
+ omniauth (1.1.1)
+ hashie (~> 1.2)
+ rack
+ omniauth-openid (1.0.1)
+ omniauth (~> 1.0)
+ rack-openid (~> 1.3.1)
+ omniauth-steam (1.0.0)
+ multi_json
+ omniauth-openid
+ orm_adapter (0.4.0)
+ polyglot (0.3.3)
+ pry (0.9.10)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.3.1)
+ pry-nav (0.2.2)
+ pry (~> 0.9.10)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-openid (1.3.1)
+ rack (>= 1.1.0)
+ ruby-openid (>= 2.1.8)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
+ bundler (~> 1.0)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ rspec-rails (2.11.4)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.11.0)
+ ruby-openid (2.2.1)
+ rubyzip (0.9.9)
+ rvm-capistrano (1.2.7)
+ capistrano (>= 2.0.0)
+ sass (3.2.1)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ simple_form (2.0.4)
+ actionpack (~> 3.0)
+ activemodel (~> 3.0)
+ slop (3.3.3)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ therubyracer (0.10.2)
+ libv8 (~> 3.3.10)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.11)
+ polyglot
+ polyglot (>= 0.3.1)
+ turbo-sprockets-rails3 (0.1.15)
+ railties (>= 3.1.0)
+ sprockets (>= 2.0.0)
+ tzinfo (0.3.33)
+ uglifier (1.3.0)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
+ warden (1.2.1)
+ rack (>= 1.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bootstrap-sass
+ capistrano
+ capistrano-ext
+ capistrano_colors
+ coffee-script
+ compass
+ compass-rails
+ dalli
+ devise
+ escape
+ factory_girl_rails
+ fancybox-rails
+ haml
+ jquery-rails
+ memoizable
+ mysql2
+ omniauth-openid
+ omniauth-steam
+ pry-nav
+ rails
+ rspec-rails
+ rubyzip
+ rvm-capistrano
+ sass
+ sass-rails
+ simple_form
+ therubyracer
+ thin
+ turbo-sprockets-rails3
+ uglifier
View
@@ -1,4 +1,18 @@
-serveme
-=======
+# FakkelBrigade communitye gameserver interface
-Fakkelbrigade Server Reservation System
+A web-interface to reserve TF2 gameservers
+
+## Requirements
+
+* Ruby, preferbly 1.9, but other versions might work. You should use [ruby-build](https://github.com/sstephenson/ruby-build/) to install Ruby.
+* A Source game dedicated server installation, only tested with TF2 on linux for now.
+* A Steam API key for user sign in
+
+## Installation
+1. Make sure you've installed the requirements.
+2. Review the yaml files in the `config` directory.
+3. Enter your Steam API key in config/initializers/steam.rb: STEAM_API_KEY = your_api_key_here
+4. Install the required gems using bundler: `gem install bundler && bundle`
+5. Edit the seed data in db/seeds.rb
+6. Setup and migrate the databases: rake db:create db:migrate db:seed RAILS_ENV=production
+7. Start the webserver: `thin -C config/thin.yml start`
View
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Serveme::Application.load_tasks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,17 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
+//// Loads all Bootstrap javascripts
+//= require bootstrap
@@ -0,0 +1,2 @@
+// Place all the behaviors and hooks related to the matching controller here.
+// All this logic will automatically be available in application.js.
@@ -0,0 +1,3 @@
+.navbar
+ .account
+ margin-top: 8px
@@ -0,0 +1,4 @@
+@import compass
+@import bootstrap
+
+@import navigation
@@ -0,0 +1,4 @@
+/*
+ Place all the styles related to the matching controller here.
+ They will automatically be included in application.css.
+*/
@@ -0,0 +1,7 @@
+class ApplicationController < ActionController::Base
+
+ include ApplicationHelper
+
+ protect_from_forgery
+ before_filter :authenticate_user!
+end
Oops, something went wrong.

0 comments on commit 6c079d3

Please sign in to comment.