From codesite-noreply at google.com Sun Dec 13 22:01:42 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 14 Dec 2009 03:01:42 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1111 committed - * support nested attribute options. Message-ID: <0016361e7a9239e828047aa77ef1@google.com> Revision: 1111 Author: koutou Date: Sun Dec 13 19:01:30 2009 Log: * support nested attribute options. http://code.google.com/p/ruby-activeldap/source/detail?r=1111 Modified: /trunk/CHANGES /trunk/README /trunk/lib/active_ldap/attributes.rb /trunk/test/test_attributes.rb ======================================= --- /trunk/CHANGES Wed Nov 11 04:06:00 2009 +++ /trunk/CHANGES Sun Dec 13 19:01:30 2009 @@ -1,12 +1,13 @@ = CHANGES -== 1.2.1: 2009-11-12 +== 1.2.1: 2009-XX-XX * belongs_to(:many) support DN attribute. * [#31] ActiveLdap::Base#attributes returns data that reflects schema definition. [Alexey.Chebotar] * blocks DN attribute change by mass assignment with :id => .... * [#35] fix has_many association is broken. [culturespy] +* Supported nested attribute options. [Hideyuki Yasuda] == 1.2.0: 2009-09-22 ======================================= --- /trunk/README Wed Nov 11 04:11:51 2009 +++ /trunk/README Sun Dec 13 19:01:30 2009 @@ -139,3 +139,4 @@ * George Montana Harkin: A suggestion. * Marc Dequ?nes: Bug reports. * brad at lucky-dip.net: A bug report. +* Hideyuki Yasuda: Bug reports. ======================================= --- /trunk/lib/active_ldap/attributes.rb Sun Oct 11 19:13:06 2009 +++ /trunk/lib/active_ldap/attributes.rb Sun Dec 13 19:01:30 2009 @@ -101,8 +101,7 @@ if value.is_a?(Hash) suffix, real_value = unnormalize_attribute_options(value) new_name = name + suffix - result[new_name] ||= [] - result[new_name].concat(real_value) + unnormalize_attribute(new_name, real_value, result) else result[name] ||= [] if value.is_a?(DN) ======================================= --- /trunk/test/test_attributes.rb Thu Apr 9 08:05:10 2009 +++ /trunk/test/test_attributes.rb Sun Dec 13 19:01:30 2009 @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + require 'al-test-utils' class TestAttributes < Test::Unit::TestCase @@ -46,15 +48,24 @@ end def test_unnormalize_attribute - assert_equal({"sn" => ["Surname"]}, - ActiveLdap::Base.unnormalize_attribute("sn", ["Surname"])) - assert_equal({"userCertificate;binary" => []}, - ActiveLdap::Base.unnormalize_attribute("userCertificate", - [{"binary" => []}])) - assert_equal({"userCertificate;binary" => ["BINARY DATA"]}, - ActiveLdap::Base.unnormalize_attribute("userCertificate", - [{"binary" => - ["BINARY DATA"]}])) + assert_unnormalize_attribute({"sn" => ["Surname"]}, + "sn", + ["Surname"]) + assert_unnormalize_attribute({"userCertificate;binary" => []}, + "userCertificate", + [{"binary" => []}]) + assert_unnormalize_attribute({"userCertificate;binary" => ["BINARY DATA"]}, + "userCertificate", + [{"binary" => ["BINARY DATA"]}]) + assert_unnormalize_attribute({ + "sn" => ["Yamada"], + "sn;lang-ja" => ["??"], + "sn;lang-ja;phonetic" => ["???"] + }, + "sn", + ["Yamada", + {"lang-ja" => ["??", + {"phonetic" => ["?? ?"]}]}]) end def test_attr_protected @@ -91,4 +102,9 @@ assert_nil(user.sn) assert_equal("Common Name", user.cn) end + + private + def assert_unnormalize_attribute(expected, name, value) + assert_equal(expected, ActiveLdap::Base.unnormalize_attribute(name, value)) + end end From codesite-noreply at google.com Sun Dec 13 22:06:49 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 14 Dec 2009 03:06:49 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1112 committed - * cleanup. Message-ID: <0016361e7e707f3a60047aa79090@google.com> Revision: 1112 Author: koutou Date: Sun Dec 13 19:05:40 2009 Log: * cleanup. http://code.google.com/p/ruby-activeldap/source/detail?r=1112 Modified: /trunk/test/test_attributes.rb ======================================= --- /trunk/test/test_attributes.rb Sun Dec 13 19:01:30 2009 +++ /trunk/test/test_attributes.rb Sun Dec 13 19:05:40 2009 @@ -34,17 +34,20 @@ end def test_normalize_attribute - assert_equal(["usercertificate", [{"binary" => []}]], - ActiveLdap::Base.normalize_attribute("userCertificate", [])) - assert_equal(["usercertificate", [{"binary" => []}]], - ActiveLdap::Base.normalize_attribute("userCertificate", nil)) - assert_equal(["usercertificate", [{"binary" => "BINARY DATA"}]], - ActiveLdap::Base.normalize_attribute("userCertificate", - "BINARY DATA")) - assert_equal(["usercertificate", [{"binary" => ["BINARY DATA"]}]], - ActiveLdap::Base.normalize_attribute("userCertificate", - {"binary" => - ["BINARY DATA"]})) + assert_normalize_attribute(["usercertificate", [{"binary" => []}]], + "userCertificate", + []) + assert_normalize_attribute(["usercertificate", [{"binary" => []}]], + "userCertificate", + nil) + assert_normalize_attribute(["usercertificate", + [{"binary" => "BINARY DATA"}]], + "userCertificate", + "BINARY DATA") + assert_normalize_attribute(["usercertificate", + [{"binary" => ["BINARY DATA"]}]], + "userCertificate", + {"binary" => ["BINARY DATA"]}) end def test_unnormalize_attribute @@ -104,6 +107,10 @@ end private + def assert_normalize_attribute(expected, name, value) + assert_equal(expected, ActiveLdap::Base.normalize_attribute(name, value)) + end + def assert_unnormalize_attribute(expected, name, value) assert_equal(expected, ActiveLdap::Base.unnormalize_attribute(name, value)) end From codesite-noreply at google.com Sun Dec 13 22:14:55 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 14 Dec 2009 03:14:55 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1114 committed - * add a test for modifying an entry with nested options. Message-ID: <0016e68e8118814e23047aa7ade7@google.com> Revision: 1114 Author: koutou Date: Sun Dec 13 19:10:47 2009 Log: * add a test for modifying an entry with nested options. http://code.google.com/p/ruby-activeldap/source/detail?r=1114 Modified: /trunk/test/test_base.rb ======================================= --- /trunk/test/test_base.rb Sun Dec 13 19:09:14 2009 +++ /trunk/test/test_base.rb Sun Dec 13 19:10:47 2009 @@ -6,6 +6,18 @@ include AlTestUtils priority :must + def test_modify_entry_with_attribute_with_nested_options + make_temporary_user(:simple => true) do |user,| + user.sn = ["Yamada", + {"lang-ja" => ["??", + {"phonetic" => ["???"]}]}] + assert_nothing_raised do + user.save! + end + end + end + + priority :normal def test_add_entry_with_attribute_with_nested_options ensure_delete_user("temp-user") do |uid,| user = @user_class.new @@ -26,7 +38,6 @@ end end - priority :normal def test_not_rename_by_mass_update make_temporary_user(:simple => true) do |user,| original_id = user.id From codesite-noreply at google.com Sun Dec 13 22:10:54 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 14 Dec 2009 03:10:54 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1113 committed - * add a test for adding an entry with nested options. Message-ID: <0016361641c32207a3047aa79f32@google.com> Revision: 1113 Author: koutou Date: Sun Dec 13 19:09:14 2009 Log: * add a test for adding an entry with nested options. http://code.google.com/p/ruby-activeldap/source/detail?r=1113 Modified: /trunk/test/test_base.rb ======================================= --- /trunk/test/test_base.rb Sun Oct 11 19:13:06 2009 +++ /trunk/test/test_base.rb Sun Dec 13 19:09:14 2009 @@ -6,6 +6,27 @@ include AlTestUtils priority :must + def test_add_entry_with_attribute_with_nested_options + ensure_delete_user("temp-user") do |uid,| + user = @user_class.new + user.cn = uid + user.uid = uid + user.uid_number = 1000 + user.gid_number = 1000 + user.home_directory = "/home/#{uid}" + + assert_not_predicate(user, :valid?) + user.sn = ["Yamada", + {"lang-ja" => ["??", + {"phonetic" => ["???"]}]}] + assert_predicate(user, :valid?) + assert_nothing_raised do + user.save! + end + end + end + + priority :normal def test_not_rename_by_mass_update make_temporary_user(:simple => true) do |user,| original_id = user.id @@ -14,7 +35,6 @@ end end - priority :normal def test_attributes make_temporary_group do |group| assert_equal({ From codesite-noreply at google.com Sun Dec 13 22:44:10 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 14 Dec 2009 03:44:10 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1115 committed - * Supported ActiveRecord 2.3.5 and Rails 2.3.5. Message-ID: <00504502e9d219906c047aa81618@google.com> Revision: 1115 Author: koutou Date: Sun Dec 13 19:43:09 2009 Log: * Supported ActiveRecord 2.3.5 and Rails 2.3.5. http://code.google.com/p/ruby-activeldap/source/detail?r=1115 Modified: /trunk/CHANGES /trunk/examples/al-admin/config/environment.rb /trunk/lib/active_ldap.rb ======================================= --- /trunk/CHANGES Sun Dec 13 19:01:30 2009 +++ /trunk/CHANGES Sun Dec 13 19:43:09 2009 @@ -2,6 +2,7 @@ == 1.2.1: 2009-XX-XX +* Supported ActiveRecord 2.3.5 and Rails 2.3.5. * belongs_to(:many) support DN attribute. * [#31] ActiveLdap::Base#attributes returns data that reflects schema definition. [Alexey.Chebotar] ======================================= --- /trunk/examples/al-admin/config/environment.rb Mon Sep 21 04:49:29 2009 +++ /trunk/examples/al-admin/config/environment.rb Sun Dec 13 19:43:09 2009 @@ -5,7 +5,7 @@ # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') ======================================= --- /trunk/lib/active_ldap.rb Mon Sep 21 22:02:06 2009 +++ /trunk/lib/active_ldap.rb Sun Dec 13 19:43:09 2009 @@ -901,7 +901,7 @@ end end -require_gem_if_need.call("active_support", "activesupport", "= 2.3.4") +require_gem_if_need.call("active_support", "activesupport", "= 2.3.5") if ActiveSupport.const_defined?(:Dependencies) dependencies = ActiveSupport::Dependencies @@ -923,7 +923,7 @@ require 'active_ldap/timeout_stub' end -require_gem_if_need.call("active_record", "activerecord", "= 2.3.4") +require_gem_if_need.call("active_record", "activerecord", "= 2.3.5") begin require_gem_if_need.call("locale", nil, "= 2.0.4") require_gem_if_need.call("gettext", nil, "= 2.0.4") From codesite-noreply at google.com Sun Dec 13 22:48:12 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 14 Dec 2009 03:48:12 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1116 committed - * Supported GetText 2.1.0 and Locale 2.0.5. Message-ID: <001485f9124a8484ac047aa824a8@google.com> Revision: 1116 Author: koutou Date: Sun Dec 13 19:46:47 2009 Log: * Supported GetText 2.1.0 and Locale 2.0.5. http://code.google.com/p/ruby-activeldap/source/detail?r=1116 Modified: /trunk/CHANGES /trunk/examples/al-admin/config/environment.rb /trunk/lib/active_ldap.rb ======================================= --- /trunk/CHANGES Sun Dec 13 19:43:09 2009 +++ /trunk/CHANGES Sun Dec 13 19:46:47 2009 @@ -3,6 +3,7 @@ == 1.2.1: 2009-XX-XX * Supported ActiveRecord 2.3.5 and Rails 2.3.5. +* Supported GetText 2.1.0 and Locale 2.0.5. * belongs_to(:many) support DN attribute. * [#31] ActiveLdap::Base#attributes returns data that reflects schema definition. [Alexey.Chebotar] ======================================= --- /trunk/examples/al-admin/config/environment.rb Sun Dec 13 19:43:09 2009 +++ /trunk/examples/al-admin/config/environment.rb Sun Dec 13 19:46:47 2009 @@ -27,8 +27,8 @@ # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" # config.gem "sqlite3-ruby", :lib => "sqlite3" # config.gem "aws-s3", :lib => "aws/s3" - config.gem "locale_rails", :version => "2.0.4" - config.gem "gettext_rails", :version => "2.0.4" + config.gem "locale_rails", :version => "2.0.5" + config.gem "gettext_rails", :version => "2.1.0" # Only load the plugins named here, in the order given. By default, all plugins # in vendor/plugins are loaded in alphabetical order. ======================================= --- /trunk/lib/active_ldap.rb Sun Dec 13 19:43:09 2009 +++ /trunk/lib/active_ldap.rb Sun Dec 13 19:46:47 2009 @@ -925,9 +925,9 @@ require_gem_if_need.call("active_record", "activerecord", "= 2.3.5") begin - require_gem_if_need.call("locale", nil, "= 2.0.4") - require_gem_if_need.call("gettext", nil, "= 2.0.4") - require_gem_if_need.call("gettext_activerecord", nil, "= 2.0.4") + 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' From codesite-noreply at google.com Tue Dec 15 07:59:15 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Tue, 15 Dec 2009 12:59:15 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1117 committed - * 1.2.1 will be released at 2009/12/15. Message-ID: <001485f94dec0fbe42047ac3f522@google.com> Revision: 1117 Author: koutou Date: Tue Dec 15 04:58:54 2009 Log: * 1.2.1 will be released at 2009/12/15. http://code.google.com/p/ruby-activeldap/source/detail?r=1117 Modified: /trunk/CHANGES ======================================= --- /trunk/CHANGES Sun Dec 13 19:46:47 2009 +++ /trunk/CHANGES Tue Dec 15 04:58:54 2009 @@ -1,6 +1,6 @@ = CHANGES -== 1.2.1: 2009-XX-XX +== 1.2.1: 2009-12-15 * Supported ActiveRecord 2.3.5 and Rails 2.3.5. * Supported GetText 2.1.0 and Locale 2.0.5. From codesite-noreply at google.com Tue Dec 15 08:02:49 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Tue, 15 Dec 2009 13:02:49 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1118 committed - New release tag Message-ID: <0016e6434adad0442e047ac401ad@google.com> Revision: 1118 Author: koutou Date: Tue Dec 15 05:02:19 2009 Log: New release tag http://code.google.com/p/ruby-activeldap/source/detail?r=1118 Added: /tags/r1.2.1 From codesite-noreply at google.com Tue Dec 15 08:06:52 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Tue, 15 Dec 2009 13:06:52 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1119 committed - * 1.2.1 -> 1.2.2. Message-ID: <001485f9124a493698047ac410ab@google.com> Revision: 1119 Author: koutou Date: Tue Dec 15 05:03:27 2009 Log: * 1.2.1 -> 1.2.2. http://code.google.com/p/ruby-activeldap/source/detail?r=1119 Modified: /trunk/CHANGES /trunk/lib/active_ldap.rb ======================================= --- /trunk/CHANGES Tue Dec 15 04:58:54 2009 +++ /trunk/CHANGES Tue Dec 15 05:03:27 2009 @@ -1,5 +1,9 @@ = CHANGES +== 1.2.2: 2010-XX-XX + +* ... + == 1.2.1: 2009-12-15 * Supported ActiveRecord 2.3.5 and Rails 2.3.5. ======================================= --- /trunk/lib/active_ldap.rb Sun Dec 13 19:46:47 2009 +++ /trunk/lib/active_ldap.rb Tue Dec 15 05:03:27 2009 @@ -914,7 +914,7 @@ end module ActiveLdap - VERSION = "1.2.1" + VERSION = "1.2.2" end if RUBY_PLATFORM.match('linux') From codesite-noreply at google.com Wed Dec 16 06:35:20 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Wed, 16 Dec 2009 11:35:20 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1120 committed - * [#37] Fixed gem dependencies in Rakefile.... Message-ID: <001636b2b210d1dd9e047ad6e60e@google.com> Revision: 1120 Author: koutou Date: Wed Dec 16 03:34:41 2009 Log: * [#37] Fixed gem dependencies in Rakefile. Reported by zachwily. Thanks!!! http://code.google.com/p/ruby-activeldap/source/detail?r=1120 Modified: /trunk/CHANGES /trunk/Rakefile ======================================= --- /trunk/CHANGES Tue Dec 15 05:03:27 2009 +++ /trunk/CHANGES Wed Dec 16 03:34:41 2009 @@ -2,7 +2,7 @@ == 1.2.2: 2010-XX-XX -* ... +* [#37] Fixed gem dependencies in Rakefile. [zachwily] == 1.2.1: 2009-12-15 ======================================= --- /trunk/Rakefile Wed Nov 11 04:17:38 2009 +++ /trunk/Rakefile Wed Dec 16 03:34:41 2009 @@ -65,10 +65,10 @@ self.changes = self.paragraphs_of('CHANGES', 1..2).join("\n\n") self.extra_deps = [ # ['ruby-ldap', '= 0.9.9'], - ['activerecord', '= 2.3.4'], - ['locale', '= 2.0.4'], - ['gettext', '= 2.0.4'], - ['gettext_activerecord', '= 2.0.4'], + ['activerecord', '= 2.3.5'], + ['locale', '= 2.0.5'], + ['gettext', '= 2.1.0'], + ['gettext_activerecord', '= 2.1.0'], ] self.remote_rdoc_dir = "doc" self.rsync_args += " --chmod=Dg+ws,Fg+w" From codesite-noreply at google.com Wed Dec 16 06:39:23 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Wed, 16 Dec 2009 11:39:23 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1121 committed - * adad zachwily to thanks list. Thanks!!! Message-ID: <0016e6407ac249e9e7047ad6f5dd@google.com> Revision: 1121 Author: koutou Date: Wed Dec 16 03:35:11 2009 Log: * adad zachwily to thanks list. Thanks!!! http://code.google.com/p/ruby-activeldap/source/detail?r=1121 Modified: /trunk/README ======================================= --- /trunk/README Sun Dec 13 19:01:30 2009 +++ /trunk/README Wed Dec 16 03:35:11 2009 @@ -140,3 +140,4 @@ * Marc Dequ?nes: Bug reports. * brad at lucky-dip.net: A bug report. * Hideyuki Yasuda: Bug reports. +* zachwily: A bug report. From codesite-noreply at google.com Fri Dec 18 06:53:33 2009 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 18 Dec 2009 11:53:33 +0000 Subject: [activeldap-commit] [ruby-activeldap] r1122 committed - * Fixed a bug that setting 'false' but 'nil' is returned.... Message-ID: <001636c9297ca05adc047aff6310@google.com> Revision: 1122 Author: koutou Date: Fri Dec 18 03:53:08 2009 Log: * Fixed a bug that setting 'false' but 'nil' is returned. Reported by Hideyuki Yasuda. Thanks!!! http://code.google.com/p/ruby-activeldap/source/detail?r=1122 Modified: /trunk/CHANGES /trunk/lib/active_ldap/base.rb /trunk/test/test_base.rb ======================================= --- /trunk/CHANGES Wed Dec 16 03:34:41 2009 +++ /trunk/CHANGES Fri Dec 18 03:53:08 2009 @@ -3,6 +3,7 @@ == 1.2.2: 2010-XX-XX * [#37] Fixed gem dependencies in Rakefile. [zachwily] +* Fixed a bug that setting 'false' but 'nil' is returned. [Hideyuki Yasuda] == 1.2.1: 2009-12-15 ======================================= --- /trunk/lib/active_ldap/base.rb Sun Oct 11 19:05:40 2009 +++ /trunk/lib/active_ldap/base.rb Fri Dec 18 03:53:08 2009 @@ -1240,7 +1240,8 @@ def get_attribute_before_type_cast(name, force_array=false) name = to_real_attribute_name(name) - value = @data[name] || [] + value = @data[name] + value = [] if value.nil? [name, array_of(value, force_array)] end ======================================= --- /trunk/test/test_base.rb Sun Dec 13 19:10:47 2009 +++ /trunk/test/test_base.rb Fri Dec 18 03:53:08 2009 @@ -6,6 +6,13 @@ include AlTestUtils priority :must + def test_set_and_get_false + user = @user_class.new + user.sn = false + assert_equal(false, user.sn) + end + + priority :normal def test_modify_entry_with_attribute_with_nested_options make_temporary_user(:simple => true) do |user,| user.sn = ["Yamada", @@ -17,7 +24,6 @@ end end - priority :normal def test_add_entry_with_attribute_with_nested_options ensure_delete_user("temp-user") do |uid,| user = @user_class.new