require_gem_if_need.call("active_record", "activerecord", "= 2.3.5")
begin
- require_gem_if_need.call("locale", nil, "= 2.0.5")
- require_gem_if_need.call("gettext", nil, "= 2.1.0")
- require_gem_if_need.call("gettext_activerecord", nil, "= 2.1.0")
+ #require_gem_if_need.call("locale", nil, "= 2.0.5")
+ #require_gem_if_need.call("gettext", nil, "= 2.1.0")
+ #require_gem_if_need.call("gettext_activerecord", nil, "= 2.1.0")
rescue LoadError
end
require 'active_ldap/get_text'
}\r
else\r
config_hash.each {|key, conf|\r
- if options[:ldap_setting]\r
- raise "Failed to bind to LDAP server" if key == :ldap_user_attribute && !bind_check(options)\r
- raise "Failed to bind as admin account" if key == :admin_mail && !admin_check(options)\r
- end\r
+ options[key] = conf[:default] if options[key].nil?\r
+ }\r
\r
+ if options[:ldap_setting]\r
+ raise "Failed to bind to LDAP server" unless bind_check(options)\r
+ raise "Failed to bind as admin account" unless admin_check(options)\r
+ end\r
+\r
+ config_hash.each {|key, conf|\r
next unless options[key].nil?\r
p_key = conf[:parent]\r
next if p_key && options[p_key].nil?\r
- raise "#{key.to_s} is not specified" if conf[:default].nil? && p_key.nil?\r
- options[key] = conf[:default]\r
+ raise "#{key.to_s} is not specified" if p_key.nil?\r
}\r
end\r
options[:apache_host] += ":#{options[:apache_port]}" unless options[:apache_port] == 80\r
lang = (ENV["REDMINE_LANG"] ||= "ja")\r
\r
Dir.chdir(options[:redmine_root]) {\r
- system_or_raise("rake config/initializers/session_store.rb")\r
+ system_or_raise("rake generate_session_store")\r
system_or_raise("rake db:migrate")\r
system_or_raise("rake redmine:load_default_data")\r
system_or_raise("rake db:migrate_plugins")\r
:base_dn => options[:ldap_base_dn]\r
}\r
ldap = AuthSourceLdap.find(:first, :conditions => opt) || AuthSourceLdap.new(opt)\r
- ldap.name = options[:apache_host] if ldap.name.blank?\r
+ ldap.name = options[:ldap_host] if ldap.name.blank?\r
ldap.account = options[:ldap_bind_dn]\r
ldap.account_password = options[:ldap_bind_password]\r
ldap.attr_login = options[:ldap_user_attribute]\r