OSDN Git Service

Fix errors caused by gettext
authorAkihiro Ono <a-ono@users.sourceforge.jp>
Sun, 6 Feb 2011 08:29:25 +0000 (17:29 +0900)
committerAkihiro Ono <a-ono@users.sourceforge.jp>
Sun, 6 Feb 2011 08:29:25 +0000 (17:29 +0900)
ruby/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap.rb
script/install
script/lib/redmine.rb

index 8ea67ee..4670639 100644 (file)
@@ -925,9 +925,9 @@ end
 
 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'
index e1c61b1..c8b1272 100644 (file)
@@ -206,16 +206,19 @@ if options[:interact]
   }\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
index 6ad14da..59ff9d6 100644 (file)
@@ -4,7 +4,7 @@ module Redmine
                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
@@ -19,7 +19,7 @@ module Redmine
                                :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