Merge branch 'guange_dev' into szzh

This commit is contained in:
sw 2015-04-22 14:54:17 +08:00
commit f6dd7ff652
7 changed files with 225 additions and 230 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
*.swp *.swp
/config/database.yml /config/database.yml
/config/configuration.yml /config/configuration.yml
/config/additional_environment.rb
/files/* /files/*
/log/* /log/*
/public/tmp/* /public/tmp/*

View File

@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'iconv' gem 'iconv'
end end
gem 'redis-rails'
gem 'rubyzip' gem 'rubyzip'
gem 'delayed_job_active_record'#, :group => :production gem 'delayed_job_active_record'#, :group => :production
gem 'daemons' gem 'daemons'

View File

@ -332,7 +332,7 @@ class AccountController < ApplicationController
token = Token.create(:user => user, :action => 'autologin') token = Token.create(:user => user, :action => 'autologin')
cookie_options = { cookie_options = {
:value => token.value, :value => token.value,
:expires => 1.year.from_now, :expires => 7.days.from_now,
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'), :path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false), :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
:httponly => true :httponly => true

View File

@ -68,7 +68,7 @@
<td align="left"> <td align="left">
<% if Setting.autologin? %> <% if Setting.autologin? %>
<label for="autologin"> <label for="autologin">
<%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
<%= l(:label_stay_logged_in) %> <%= l(:label_stay_logged_in) %>
</label> </label>
<% end %> <% end %>

View File

@ -1,10 +0,0 @@
# Copy this file to additional_environment.rb and add any statements
# that need to be passed to the Rails::Initializer. `config` is
# available in this context.
#
# Example:
#
# config.log_level = :debug
# ...
#
#config.relative_url_root = '/socialforge'

View File

@ -67,8 +67,6 @@ module RedmineApp
# Do not include all helpers # Do not include all helpers
config.action_controller.include_all_helpers = false config.action_controller.include_all_helpers = false
config.session_store :cookie_store, :key => '_redmine_session'
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
end end

View File

@ -19,7 +19,12 @@ RedmineApp::Application.configure do
# Full error reports are disabled and caching is turned on # Full error reports are disabled and caching is turned on
config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
# to additional_environment.rb
# config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
# config.cache_store = :redis_store, 'redis://localhost:6379/0/cache', { expires_in: 90.minutes }
#
# Enable serving of images, stylesheets, and javascripts from an asset server # Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"