diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/.cvsignore | 3 | ||||
-rwxr-xr-x | config/alert-tracks-debian.ugly | 2 | ||||
-rw-r--r-- | config/application.rb | 1 | ||||
-rw-r--r-- | config/deploy.rb | 2 | ||||
-rw-r--r-- | config/environments/production.rb | 15 | ||||
-rw-r--r-- | config/general.yml-example | 35 | ||||
-rwxr-xr-x | config/purge-varnish-debian.ugly | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 | ||||
-rw-r--r-- | config/varnish-alaveteli.vcl | 16 |
9 files changed, 64 insertions, 14 deletions
diff --git a/config/.cvsignore b/config/.cvsignore deleted file mode 100644 index 2539dd3cd..000000000 --- a/config/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -general -database.yml -rails_env.rb diff --git a/config/alert-tracks-debian.ugly b/config/alert-tracks-debian.ugly index f1ca68b03..a098bc332 100755 --- a/config/alert-tracks-debian.ugly +++ b/config/alert-tracks-debian.ugly @@ -41,7 +41,7 @@ start_daemon() { } stop_daemon() { - /sbin/start-stop-daemon --stop --oknodo --pidfile "$PIDFILE" + /sbin/start-stop-daemon --stop --oknodo --retry 5 --pidfile "$PIDFILE" } restart() { stop; start; } diff --git a/config/application.rb b/config/application.rb index 3c01e26c4..472077f06 100644 --- a/config/application.rb +++ b/config/application.rb @@ -116,6 +116,7 @@ module Alaveteli 'ie6.css', 'ie7.css', 'bootstrap-dropdown.js', + 'widget.css', 'responsive/print.css', 'responsive/application-lte-ie7.css', 'responsive/application-ie8.css'] diff --git a/config/deploy.rb b/config/deploy.rb index f4a0b536a..d02488bfa 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -58,6 +58,7 @@ namespace :deploy do "#{release_path}/log" => "#{shared_path}/log", "#{release_path}/tmp/pids" => "#{shared_path}/tmp/pids", "#{release_path}/lib/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs", + "#{release_path}/lib/themes" => "#{shared_path}/themes", } # "ln -sf <a> <b>" creates a symbolic link but deletes <b> if it already exists @@ -70,6 +71,7 @@ namespace :deploy do run "mkdir -p #{shared_path}/log" run "mkdir -p #{shared_path}/tmp/pids" run "mkdir -p #{shared_path}/xapiandbs" + run "mkdir -p #{shared_path}/themes" end end diff --git a/config/environments/production.rb b/config/environments/production.rb index a3e3cebd2..af2ca15b9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -17,7 +17,20 @@ Alaveteli::Application.configure do # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false - config.action_mailer.delivery_method = :sendmail # so is queued, rather than giving immediate errors + + config.action_mailer.delivery_method = AlaveteliConfiguration::production_mailer_delivery_method.to_sym + + if AlaveteliConfiguration::production_mailer_delivery_method.to_sym == :smtp + config.action_mailer.smtp_settings = { + :address => AlaveteliConfiguration::smtp_mailer_address, + :port => AlaveteliConfiguration.smtp_mailer_port, + :domain => AlaveteliConfiguration.smtp_mailer_domain, + :user_name => AlaveteliConfiguration.smtp_mailer_user_name, + :password => AlaveteliConfiguration.smtp_mailer_password, + :authentication => AlaveteliConfiguration.smtp_mailer_authentication, + :enable_starttls_auto => AlaveteliConfiguration.smtp_mailer_enable_starttls_auto + } + end config.active_support.deprecation = :notify diff --git a/config/general.yml-example b/config/general.yml-example index 8acea374b..df140136c 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -775,3 +775,38 @@ ALLOW_BATCH_REQUESTS: false # # --- RESPONSIVE_STYLING: true + +# Define the mailer delivery method to be used only in the production environment. +# By default, use sendmail. +# +# The list of accepted options are available in the Rails ActionMailer configuration +# documentation: http://guides.rubyonrails.org/action_mailer_basics.html#example-action-mailer-configuration +# +# The most common alternative is to use 'smtp' +# If you choose to use an external SMTP service then you will need to also include the SMTP configuration settings. +# +# As a string this is coerced into a symbol in config/environments/production.rb +# +# PRODUCTION_MAILER_DELIVERY_METHOD - String (default: sendmail) +# +# Examples: +# +# PRODUCTION_MAILER_DELIVERY_METHOD: smtp +# SMTP_MAILER_ADDRESS: smtp.gmail.com +# SMTP_MAILER_PORT: 587 +# SMTP_MAILER_DOMAIN: example.com +# SMTP_MAILER_USER_NAME: jane322 +# SMTP_MAILER_PASSWORD: supersecretpassword +# SMTP_MAILER_AUTHENTICATION: 'plain' +# SMTP_MAILER_ENABLE_STARTTLS_AUTO: true +# --- +PRODUCTION_MAILER_DELIVERY_METHOD: sendmail + +# If ENABLE_WIDGETS is set to true, Alaveteli will allow the embedding of a +# 'widget' linking to a request on other sites. This widget will record +# how many people click on an 'I also want to know' button. +# +# ENABLE_WIDGETS - Boolean (default: false) +# +# --- +ENABLE_WIDGETS: false diff --git a/config/purge-varnish-debian.ugly b/config/purge-varnish-debian.ugly index dc3f74ff6..457a77ed8 100755 --- a/config/purge-varnish-debian.ugly +++ b/config/purge-varnish-debian.ugly @@ -43,7 +43,7 @@ start_daemon() { } stop_daemon() { - /sbin/start-stop-daemon --stop --oknodo --pidfile "$PIDFILE" + /sbin/start-stop-daemon --stop --oknodo --retry 5 --pidfile "$PIDFILE" } restart() { stop; start; } diff --git a/config/routes.rb b/config/routes.rb index c975d6007..7319f92fc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -65,6 +65,7 @@ Alaveteli::Application.routes.draw do resources :request, :only => [] do resource :report, :only => [:new, :create] + resource :widget, :only => [:new, :show, :update] end resources :info_request_batch, :only => :show @@ -142,6 +143,7 @@ Alaveteli::Application.routes.draw do match '/track/update/:track_id' => 'track#update', :as => :update match '/track/delete_all_type' => 'track#delete_all_type', :as => :delete_all_type match '/track/feed/:track_id' => 'track#atom_feed', :as => :atom_feed + match '/track/widget_vote/:info_request_id' => 'track#widget_vote', :as => :widget_vote #### #### Help controller diff --git a/config/varnish-alaveteli.vcl b/config/varnish-alaveteli.vcl index d3726682c..59d76b0d1 100644 --- a/config/varnish-alaveteli.vcl +++ b/config/varnish-alaveteli.vcl @@ -2,10 +2,10 @@ # of Alaveteli. See the vcl(7) man page for details on VCL syntax and # semantics. -# +# # Default backend definition. Set this to point to your content # server. In this case, apache + Passenger running on port 80 -# +# backend default { .host = "127.0.0.1"; @@ -32,7 +32,7 @@ sub vcl_recv { # Sanitise X-Forwarded-For... remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = client.ip; - + # Remove Google Analytics, has_js, and last-seen cookies set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js|has_seen_country_message|seen_foi2)=[^;]*", ""); @@ -50,14 +50,14 @@ sub vcl_recv { remove req.http.Accept-Encoding; } } - + # Ignore empty cookies if (req.http.Cookie ~ "^\s*$") { remove req.http.Cookie; } - + if (req.request != "GET" && - req.request != "HEAD" && + req.request != "HEAD" && req.request != "POST" && req.request != "PUT" && req.request != "PURGE" && @@ -70,9 +70,9 @@ sub vcl_recv { /* We only deal with GET and HEAD by default, the rest get passed direct to backend */ return (pass); } - + # Ignore Cookies on images... - if (req.url ~ "\.(png|gif|jpg|jpeg|swf|css|js|rdf|ico|txt)(\?.*|)$") { + if (req.url ~ "\.(png|gif|jpg|jpeg|swf|css|js|rdf|ico)(\?.*|)$") { remove req.http.Cookie; return (lookup); } |