summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/config.yml8
-rw-r--r--config/config.yml.example8
-rw-r--r--config/deploy.rb37
-rw-r--r--config/initializers/client_side_validations.rb14
-rw-r--r--config/initializers/load_config.rb1
5 files changed, 31 insertions, 37 deletions
diff --git a/config/config.yml b/config/config.yml
new file mode 100644
index 0000000..c34dd10
--- /dev/null
+++ b/config/config.yml
@@ -0,0 +1,8 @@
+development:
+ admins: [admin, admin2]
+
+test:
+ admins: [admin, admin2]
+
+production:
+ admins: []
diff --git a/config/config.yml.example b/config/config.yml.example
new file mode 100644
index 0000000..c34dd10
--- /dev/null
+++ b/config/config.yml.example
@@ -0,0 +1,8 @@
+development:
+ admins: [admin, admin2]
+
+test:
+ admins: [admin, admin2]
+
+production:
+ admins: []
diff --git a/config/deploy.rb b/config/deploy.rb
deleted file mode 100644
index 9dc058a..0000000
--- a/config/deploy.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require "bundler/capistrano"
-
-set :application, "webapp"
-
-set :scm, :git
-set :repository, "git://leap.se/leap_web"
-set :branch, "deploy"
-
-set :deploy_via, :remote_cache
-set :deploy_to, '/home/webapp'
-set :use_sudo, false
-
-set :normalize_asset_timestamps, false
-
-set :user, "webapp"
-
-set :git_enable_submodules, 1 # we're using an srp js submodule for now
-
-role :web, "94.103.43.3" # Your HTTP server, Apache/etc
-role :app, "94.103.43.3" # This may be the same as your `Web` server
-# role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
-# role :db, "your slave db-server here"
-
-# if you want to clean up old releases on each deploy uncomment this:
-# after "deploy:restart", "deploy:cleanup"
-
-# if you're still using the script/reaper helper you will need
-# these http://github.com/rails/irs_process_scripts
-
-# If you are using Passenger mod_rails uncomment this:
-# namespace :deploy do
-# task :start do ; end
-# task :stop do ; end
-# task :restart, :roles => :app, :except => { :no_release => true } do
-# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
-# end
-# end
diff --git a/config/initializers/client_side_validations.rb b/config/initializers/client_side_validations.rb
new file mode 100644
index 0000000..252aded
--- /dev/null
+++ b/config/initializers/client_side_validations.rb
@@ -0,0 +1,14 @@
+# ClientSideValidations Initializer
+
+# Uncomment to disable uniqueness validator, possible security issue
+ClientSideValidations::Config.disabled_validators = [:uniqueness]
+
+# Uncomment the following block if you want each input field to have the validation messages attached.
+ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
+ unless html_tag =~ /^<label/
+ %{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
+ else
+ %{<div class="field_with_errors">#{html_tag}</div>}.html_safe
+ end
+end
+
diff --git a/config/initializers/load_config.rb b/config/initializers/load_config.rb
new file mode 100644
index 0000000..e687429
--- /dev/null
+++ b/config/initializers/load_config.rb
@@ -0,0 +1 @@
+APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.yml")[Rails.env]