summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.example.yml3
-rw-r--r--config/application.rb3
-rw-r--r--config/initializers/mailboxer.rb2
-rw-r--r--config/initializers/secret_token.rb6
-rw-r--r--config/locales/en.yml8
-rw-r--r--config/routes.rb34
6 files changed, 48 insertions, 8 deletions
diff --git a/config/application.example.yml b/config/application.example.yml
new file mode 100644
index 0000000..a98b40e
--- /dev/null
+++ b/config/application.example.yml
@@ -0,0 +1,3 @@
+SECRET_TOKEN: 'cc884af613d0dd093f1d6c9153abac1200c5a0db923613245b80c5c3f5e9c9f9ba51712b702f2d494a22ddea8ab40601b38a41eb39eec97b50a7a2e37748b1bc'
+RIOT_API_KEY: 'ad539f86-22fd-474d-9279-79a7a296ac38'
+RIOT_API_REGION: 'na'
diff --git a/config/application.rb b/config/application.rb
index 658e0aa..13bab0b 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -12,6 +12,9 @@ module Leaguer
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
+ config.autoload_paths += ["#{Rails.root}/lib"]
+ config.watchable_dirs["#{Rails.root}/lib"] = [:rb]
+
I18n.enforce_available_locales = true
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
diff --git a/config/initializers/mailboxer.rb b/config/initializers/mailboxer.rb
index 8876f80..b529481 100644
--- a/config/initializers/mailboxer.rb
+++ b/config/initializers/mailboxer.rb
@@ -1,7 +1,7 @@
Mailboxer.setup do |config|
#Configures if you applications uses or no the email sending for Notifications and Messages
- config.uses_emails = true
+ config.uses_emails = false
#Configures the default from for the email sent for Messages and Notifications of Mailboxer
config.default_from = "no-reply@mailboxer.com"
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index 604d43d..fbab4b9 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -9,4 +9,8 @@
# Make sure your secret_key_base is kept private
# if you're sharing your code publicly.
-Leaguer::Application.config.secret_key_base = 'cc884af613d0dd093f1d6c9153abac1200c5a0db923613245b80c5c3f5e9c9f9ba51712b702f2d494a22ddea8ab40601b38a41eb39eec97b50a7a2e37748b1bc'
+Leaguer::Application.config.secret_key_base = if Rails.env.development? or Rails.env.test?
+ ('x' * 30) # meets minimum requirement of 30 chars long
+else
+ ENV['SECRET_TOKEN']
+end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 0653957..9b7f013 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -21,3 +21,11 @@
en:
hello: "Hello world"
+
+ simple_captcha:
+ placeholder: "Enter the image value"
+ label: "Enter the code in the box:"
+
+ message:
+ default: "Secret Code did not match with the Image"
+ user: "The secret Image and code were different"
diff --git a/config/routes.rb b/config/routes.rb
index 262a156..4094479 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,24 +1,46 @@
Leaguer::Application.routes.draw do
- resources :brackets
- resources :sessions
+ resources :sessions, only: [:new, :create, :destroy]
resources :users
resources :games
- resources :tournaments
-
resources :pms
resources :alerts
resources :teams
- resources :matches
+ resources :tournaments do
+ resources :matches, only: [:index, :show, :update]
+ resources :brackets, only: [:create, :index, :show, :edit, :update, :destroy]
+ end
+
+ resource :server, only: [:show, :edit, :update]
+
+ root to: 'main#homepage'
+
+ get '/search', to: 'search#go'
- resources :servers
+end
+
+Leaguer::Application.routes.named_routes.module.module_eval do
+ def match_path(match, options={})
+ tournament_match_path(match.tournament_stage.tournament, match, options)
+ end
+ def match_url(match, options={})
+ tournament_match_url(match.tournament_stage.tournament, match, options)
+ end
+ def bracket_path(bracket, options={})
+ tournament_bracket_path(bracket.tournament, bracket, options)
+ end
+ def bracket_url(bracket, options={})
+ tournament_bracket_url(bracket.tournament, bracket, options)
+ end
+end
+if false
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".