From null at cozmixng.org Sun Jul 8 04:04:41 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:04:41 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Add Piotr Romanczuk to thanks list. Thanks!!! Message-ID: <20120708040454.2844C940C0D@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:04:41 +0900 (Sun, 08 Jul 2012) New Revision: e801bf592e6215006c8faede922539761030de79 https://github.com/activeldap/activesambaldap/commit/e801bf592e6215006c8faede922539761030de79 Log: Add Piotr Romanczuk to thanks list. Thanks!!! Modified files: README.en README.ja Modified: README.en (+1 -0) =================================================================== --- README.en 2012-07-08 13:03:58 +0900 (9d2b2e5) +++ README.en 2012-07-08 13:04:41 +0900 (0d919ba) @@ -366,3 +366,4 @@ asl-populate, please confirm the following: * Francesco Malvezzi: Some bug report. * Kazuhiro NISHIYAMA: Some bug reports. * Orlando Marquina: Some bug reports. +* Piotr Romanczuk: A bug report. Modified: README.ja (+1 -0) =================================================================== --- README.ja 2012-07-08 13:03:58 +0900 (f7a5358) +++ README.ja 2012-07-08 13:04:41 +0900 (0cb4d6d) @@ -361,3 +361,4 @@ LDAP????????????????????????? * Francesco Malvezzi: ????????????? * Kazuhiro NISHIYAMA: ????????????? * Orlando Marquina: ????????????? +* Piotr Romanczuk: ????????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:02:35 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:02:35 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Support ActiveLdap 3.1.1 Message-ID: <20120708040453.F14DF9403FF@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:02:35 +0900 (Sun, 08 Jul 2012) New Revision: 49d84006fa3356e1318f3884b9b5bd4ab05e51e6 https://github.com/activeldap/activesambaldap/commit/49d84006fa3356e1318f3884b9b5bd4ab05e51e6 Log: Support ActiveLdap 3.1.1 RubyForge: fix #29610 Reported by Piotr Romanczuk. Thanks!!! Modified files: lib/active_samba_ldap/get_text_support.rb Modified: lib/active_samba_ldap/get_text_support.rb (+1 -1) =================================================================== --- lib/active_samba_ldap/get_text_support.rb 2010-09-11 11:45:06 +0900 (5f24e18) +++ lib/active_samba_ldap/get_text_support.rb 2012-07-08 13:02:35 +0900 (f453cf8) @@ -4,7 +4,7 @@ module ActiveSambaLdap def included(base) base.class_eval do include(ActiveLdap::GetText) - bindtextdomain("active-samba-ldap") + bindtextdomain("active-samba-ldap") if respond_to?(:bindtextdomain) end end end -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:03:58 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:03:58 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Change thanks descriptions Message-ID: <20120708040454.12E36940BD2@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:03:58 +0900 (Sun, 08 Jul 2012) New Revision: c07a0e7b7789379593fac974521c2981c9b45b46 https://github.com/activeldap/activesambaldap/commit/c07a0e7b7789379593fac974521c2981c9b45b46 Log: Change thanks descriptions Modified files: README.en Modified: README.en (+5 -5) =================================================================== --- README.en 2012-07-08 13:02:35 +0900 (b513116) +++ README.en 2012-07-08 13:03:58 +0900 (9d2b2e5) @@ -361,8 +361,8 @@ asl-populate, please confirm the following: == Thanks -* Henrik Kr?g: He reported some bugs. -* Olivier DIRRENBERGER: He reported a bug. -* Francesco Malvezzi: He reported some bugs. -* Kazuhiro NISHIYAMA: He reported some bugs. -* Orlando Marquina: He reported some bugs. +* Henrik Kr?g: Some bug reports. +* Olivier DIRRENBERGER: A bug report. +* Francesco Malvezzi: Some bug report. +* Kazuhiro NISHIYAMA: Some bug reports. +* Orlando Marquina: Some bug reports. -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:09:45 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:09:45 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Change license to LGPLv2.1 or later from Ruby's Message-ID: <20120708040956.BA5969403FF@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:09:45 +0900 (Sun, 08 Jul 2012) New Revision: 7858e258b45d6324a8e438047cf5a11314bcae4b https://github.com/activeldap/activesambaldap/commit/7858e258b45d6324a8e438047cf5a11314bcae4b Log: Change license to LGPLv2.1 or later from Ruby's Added files: license/lgpl-2.1.txt Modified files: README.en README.ja Modified: README.en (+4 -1) =================================================================== --- README.en 2012-07-08 13:04:41 +0900 (0d919ba) +++ README.en 2012-07-08 13:09:45 +0900 (5847415) @@ -21,7 +21,10 @@ Kouhei Sutou == Licence -Ruby's. +LGPL 2.1 or later. See license/lgpl-2.1.txt for details. + +(Kouhei Sutou has a right to change the license including +contributed patches.) == Dependency libraries Modified: README.ja (+3 -1) =================================================================== --- README.ja 2012-07-08 13:04:41 +0900 (0cb4d6d) +++ README.ja 2012-07-08 13:09:45 +0900 (d0170f5) @@ -18,7 +18,9 @@ Kouhei Sutou == ????? -Ruby's. +LGPL 2.1?????????????????license/lgpl-2.1.txt???????? + +?Kouhei Sutou???????????????????????????????? == ??????? Added: license/lgpl-2.1.txt (+165 -0) 100644 =================================================================== --- /dev/null +++ license/lgpl-2.1.txt 2012-07-08 13:09:45 +0900 (65c5ca8) @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:29:03 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:29:03 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Use gemspec and Bundler Message-ID: <20120708042913.E371E9403FF@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:29:03 +0900 (Sun, 08 Jul 2012) New Revision: 0535854e3c92b80d5627b8ac2b739d94b19e5d84 https://github.com/activeldap/activesambaldap/commit/0535854e3c92b80d5627b8ac2b739d94b19e5d84 Log: Use gemspec and Bundler Added files: Gemfile activesambaldap.gemspec Modified files: Rakefile Added: Gemfile (+21 -0) 100644 =================================================================== --- /dev/null +++ Gemfile 2012-07-08 13:29:03 +0900 (b772556) @@ -0,0 +1,21 @@ +# -*- coding: utf-8; mode: ruby -*- +# +# Copyright (C) 2012 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +source :rubygems + +gemspec Modified: Rakefile (+27 -121) =================================================================== --- Rakefile 2012-07-08 13:09:45 +0900 (c54ce08) +++ Rakefile 2012-07-08 13:29:03 +0900 (5c231a4) @@ -1,131 +1,37 @@ # -*- ruby -*- -require 'find' -require 'fileutils' +require "find" +require "fileutils" -base_dir = File.expand_path(File.dirname(__FILE__)) -truncate_base_dir = Proc.new do |x| - x.gsub(/^#{Regexp.escape(base_dir + File::SEPARATOR)}/, '') -end - -_binding = binding -file = "#{base_dir}/lib/active_samba_ldap.rb" -eval(File.read(file), _binding, file) -eval('require_gem_if_need.call("hoe")', _binding) -required_active_ldap_version = eval('required_active_ldap_version', _binding) - -manifest = File.join(base_dir, "Manifest.txt") -manifest_contents = [] -base_dir_included_components = %w(README.ja README.en NEWS.ja NEWS.en setup.rb - Rakefile) -excluded_components = %w(.svn .test-result .config Manifest.txt config.yml doc - pkg html config.yaml) -excluded_suffixes = %w(.help) -Find.find(base_dir) do |target| - target = truncate_base_dir[target] - components = target.split(File::SEPARATOR) - if components.size == 1 and !File.directory?(target) - next unless base_dir_included_components.include?(components[0]) - end - Find.prune if (excluded_components - components) != excluded_components - next if excluded_suffixes.include?(File.extname(target)) - manifest_contents << target if File.file?(target) -end - -File.open(manifest, "w") do |f| - f.puts manifest_contents.sort.join("\n") -end -at_exit do - FileUtils.rm_f(manifest) -end - -def cleanup_white_space(entry) - entry.gsub(/(\A\n+|\n+\z)/, '') + "\n" -end - -# For Hoe's no user friendly default behavior. :< -File.open("README.txt", "w") {|file| file << "= Dummy README\n== XXX\n"} -FileUtils.cp("NEWS.en", "History.txt") -at_exit do - FileUtils.rm_f("README.txt") - FileUtils.rm_f("History.txt") -end - -ENV["VERSION"] = ActiveSambaLdap::VERSION -project = Hoe.spec("activesambaldap") do - self.version = ActiveSambaLdap::VERSION - self.rubyforge_name = "asl" - self.summary = "Samba+LDAP administration tools" - self.extra_deps << ["activeldap", required_active_ldap_version] - self.email = ["kou at clear-code.com"] - self.author = "Kouhei Sutou" - self.url = "http://asl.rubyforge.org/" - - news_of_current_release = File.read("NEWS.en").split(/^==\s.*$/)[1] - self.changes = cleanup_white_space(news_of_current_release) +require "rubygems" +require "yard" +require "bundler/gem_helper" - entries = File.read("README.en").split(/^==\s(.*)$/) - whats_this = cleanup_white_space(entries[entries.index("Description") + 1]) - self.summary, self.description, = whats_this.split(/\n\n+/, 3) -end - - -rdoc_main = "README.en" - -rdoc_task = nil -if ObjectSpace.each_object(Rake::RDocTask) {|rdoc_task|} != 1 - puts "hoe may be changed" -end -rdoc_task.main = rdoc_main -rdoc_task.options.delete("-d") -rdoc_task.options << "--charset=UTF-8" -rdoc_task.rdoc_files -= project.spec.executables -rdoc_task.rdoc_files += project.spec.executables.collect {|x| "bin/#{x}.help"} -rdoc_task.rdoc_files += project.spec.files.find_all {|x| /\.(en|ja)\z/ =~ x} -rdoc_task.rdoc_files.reject! {|file| /\Atest-unit\// =~ file} - -rdoc_options = rdoc_task.option_list -output_option_index = rdoc_options.index("-o") -rdoc_options[output_option_index, 2] = nil -project.spec.rdoc_options = rdoc_options -project.spec.extra_rdoc_files = rdoc_task.rdoc_files - -project.spec.executables.each do |bin| - bin = "bin/#{bin}" - bin_help = "#{bin}.help" - File.open(bin_help, "w") do |f| - lang = ENV["LANG"] - ENV["LANG"] = "C" - f.puts(`#{RUBY} -I #{File.join(base_dir, 'lib')} #{bin} --help`) - ENV["LANG"] = lang +class Bundler::GemHelper + def version_tag + "#{version}" end - at_exit do - FileUtils.rm_f(bin_help) - end -end - -task :docs do - css_file = "doc/rdoc.css" - css = File.read(css_file) - reset_spacing = Regexp.escape("*{ padding: 0; margin: 0; }") - customized_css = css.sub(/#{reset_spacing}/, '') - if css != customized_css - File.open(css_file, "w") do |output| - output.print(customized_css) - end - end -end - -desc 'Tag the repository for release.' -task :tag do - version = ActiveSambaLdap::VERSION - message = "Released ActiveSambaLdap #{version}!" - base = "svn+ssh://#{ENV['USER']}@rubyforge.org/var/svn/asl/" - sh 'svn', 'copy', '-m', message, "#{base}trunk", "#{base}tags/#{version}" end -desc "Distribute new release." -task :dist => [:publish_docs, :release, :tag, :announce] +base_dir = File.dirname(__FILE__) + +helper = Bundler::GemHelper.new(base_dir) +helper.install +spec = helper.gemspec + +# spec.executables.each do |bin| +# bin = "bin/#{bin}" +# bin_help = "#{bin}.help" +# File.open(bin_help, "w") do |f| +# lang = ENV["LANG"] +# ENV["LANG"] = "C" +# f.puts(`#{RUBY} -I #{File.join(base_dir, 'lib')} #{bin} --help`) +# ENV["LANG"] = lang +# end +# at_exit do +# FileUtils.rm_f(bin_help) +# end +# end desc "Update *.po/*.pot files and create *.mo from *.po files" task :gettext => ["gettext:po:update", "gettext:mo:create"] Added: activesambaldap.gemspec (+52 -0) 100644 =================================================================== --- /dev/null +++ activesambaldap.gemspec 2012-07-08 13:29:03 +0900 (97e9c5c) @@ -0,0 +1,52 @@ +# -*- mode: ruby; coding: utf-8 -*- + +clean_white_space = lambda do |entry| + entry.gsub(/(\A\n+|\n+\z)/, '') + "\n" +end + +Gem::Specification.new do |spec| + base_dir = File.expand_path(File.dirname(__FILE__)) + $LOAD_PATH.unshift(File.join(base_dir, 'lib')) + require 'active_samba_ldap/version' + + collect_files = lambda do |*globs| + files = [] + globs.each do |glob| + files.concat(Dir.glob(glob)) + end + files.uniq.sort + end + + spec.name = 'activesambaldap' + spec.version = ActiveSambaLdap::VERSION.dup + spec.rubyforge_project = 'asl' + spec.authors = ["Kouhei Sutou"] + spec.email = ["kou at clear-code.com"] + spec.summary = "Samba+LDAP administration tools" + spec.homepage = "http://github.com/activeldap/activesambaldap" + spec.files = collect_files.call("{lib,rails,rails_generator}/**/*", + "bin/*", + "{examples,po,misc}/**/*", + "license/*", + "Rakefile", + "Gemfile", + "NEWS*", + "README.*") + spec.files.delete_if {|file| /\.help\z/ =~ File.basename(file)} + spec.files.delete_if {|file| /\.yaml\z/ =~ File.basename(file)} + spec.test_files = collect_files.call("test/**/*.rb", + "test/config.yaml.sample") + + entries = File.read("README.en").split(/^==\s(.*)$/) + whats_this = clean_white_space.call(entries[entries.index("Description") + 1]) + spec.summary, spec.description, = whats_this.split(/\n\n+/, 3) + spec.license = "LGPLv2 or later" + + spec.add_dependency("activeldap") + + spec.add_development_dependency("bundler") + spec.add_development_dependency("rake") + spec.add_development_dependency("yard") + spec.add_development_dependency("test-unit") + spec.add_development_dependency("test-unit-notify") +end -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:38:48 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:38:48 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Ignore auto-generated .gem Message-ID: <20120708043905.00DF2940C0D@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:38:48 +0900 (Sun, 08 Jul 2012) New Revision: e193376033ede395807fa9f0c867670d68ec0872 https://github.com/activeldap/activesambaldap/commit/e193376033ede395807fa9f0c867670d68ec0872 Log: Ignore auto-generated .gem Added files: .gitignore Added: .gitignore (+1 -0) 100644 =================================================================== --- /dev/null +++ .gitignore 2012-07-08 13:38:48 +0900 (8c68b5c) @@ -0,0 +1 @@ +/pkg/*.gem -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:36:30 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:36:30 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] 0.0.9 -> 1.0.0 Message-ID: <20120708043904.C9D1C9403FF@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:36:30 +0900 (Sun, 08 Jul 2012) New Revision: b4febbc8e8a9d005c8718f4abe71c2c0d155c67a https://github.com/activeldap/activesambaldap/commit/b4febbc8e8a9d005c8718f4abe71c2c0d155c67a Log: 0.0.9 -> 1.0.0 Modified files: lib/active_samba_ldap/version.rb Modified: lib/active_samba_ldap/version.rb (+1 -1) =================================================================== --- lib/active_samba_ldap/version.rb 2012-07-08 13:29:03 +0900 (843b8e6) +++ lib/active_samba_ldap/version.rb 2012-07-08 13:36:30 +0900 (eac2ec0) @@ -1,3 +1,3 @@ module ActiveSambaLdap - VERSION = "0.0.9" + VERSION = "0.1.0" end -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:38:55 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:38:55 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Fix LGPL version Message-ID: <20120708043905.16A62940C0F@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:38:55 +0900 (Sun, 08 Jul 2012) New Revision: 3fff47fff59354af550849866c0dabaa5bcac1c1 https://github.com/activeldap/activesambaldap/commit/3fff47fff59354af550849866c0dabaa5bcac1c1 Log: Fix LGPL version Modified files: activesambaldap.gemspec Modified: activesambaldap.gemspec (+1 -1) =================================================================== --- activesambaldap.gemspec 2012-07-08 13:38:48 +0900 (97e9c5c) +++ activesambaldap.gemspec 2012-07-08 13:38:55 +0900 (8ae18f8) @@ -40,7 +40,7 @@ Gem::Specification.new do |spec| entries = File.read("README.en").split(/^==\s(.*)$/) whats_this = clean_white_space.call(entries[entries.index("Description") + 1]) spec.summary, spec.description, = whats_this.split(/\n\n+/, 3) - spec.license = "LGPLv2 or later" + spec.license = "LGPLv2.1 or later" spec.add_dependency("activeldap") -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:39:41 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:39:41 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] 0.1.0 -> 0.1.1 Message-ID: <20120708043951.55D259403FF@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:39:41 +0900 (Sun, 08 Jul 2012) New Revision: 0255a155581bb1aa336ad5ef2412388907ecd95a https://github.com/activeldap/activesambaldap/commit/0255a155581bb1aa336ad5ef2412388907ecd95a Log: 0.1.0 -> 0.1.1 Modified files: lib/active_samba_ldap/version.rb Modified: lib/active_samba_ldap/version.rb (+1 -1) =================================================================== --- lib/active_samba_ldap/version.rb 2012-07-08 13:38:55 +0900 (eac2ec0) +++ lib/active_samba_ldap/version.rb 2012-07-08 13:39:41 +0900 (465e3f6) @@ -1,3 +1,3 @@ module ActiveSambaLdap - VERSION = "0.1.0" + VERSION = "0.1.1" end -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 8 04:38:34 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 08 Jul 2012 13:38:34 +0900 Subject: [activeldap-commit] activeldap/activesambaldap [master] Add 0.1.0 entry Message-ID: <20120708043904.DF113940BD2@jenkins.clear-code.com> Kouhei Sutou 2012-07-08 13:38:34 +0900 (Sun, 08 Jul 2012) New Revision: 2fa7575cf006aa0f6e68bd92f8dc3a8e64fedcc3 https://github.com/activeldap/activesambaldap/commit/2fa7575cf006aa0f6e68bd92f8dc3a8e64fedcc3 Log: Add 0.1.0 entry Modified files: NEWS.en NEWS.ja Modified: NEWS.en (+5 -0) =================================================================== --- NEWS.en 2012-07-08 13:36:30 +0900 (01d26a0) +++ NEWS.en 2012-07-08 13:38:34 +0900 (3028805) @@ -2,6 +2,11 @@ $Id$ +== 0.1.0: 2012-07-08 + +* [#29610] Supported ActiveLdap 3.1.1 [Piotr Romanczuk] +* Changed license from Ruby's to LGPLv2.1 or later. + == 0.0.8: 2009-09-22 * [#26692] scaffold_active_samba_ldap doesn't work with Rails 2.2.2. Modified: NEWS.ja (+5 -0) =================================================================== --- NEWS.ja 2012-07-08 13:36:30 +0900 (3844259) +++ NEWS.ja 2012-07-08 13:38:34 +0900 (3bb9d0d) @@ -2,6 +2,11 @@ $Id$ +== 0.1.0: 2012-07-08 + +* [#29610] ActiveLdap 3.1.1??? [Piotr Romanczuk] +* ??????Ruby???????LGPLv2.1????????????????? + == 0.0.8: 2009-09-22 * [#26692] scaffold_active_samba_ldap?Rails 2.2.2?????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:14:03 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:14:03 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Add a missing space before ":" Message-ID: <20120722133611.7462E940175@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:14:03 +0900 (Sun, 22 Jul 2012) New Revision: b3221fb26e818198a50ae4a28619d5a4ffe994bd https://github.com/activeldap/activeldap/commit/b3221fb26e818198a50ae4a28619d5a4ffe994bd Log: Add a missing space before ":" Modified files: lib/active_ldap/validations.rb Modified: lib/active_ldap/validations.rb (+2 -2) =================================================================== --- lib/active_ldap/validations.rb 2012-06-12 07:03:56 +0900 (f839ea6) +++ lib/active_ldap/validations.rb 2012-07-22 22:14:03 +0900 (f737371) @@ -41,11 +41,11 @@ module ActiveLdap end def save(*) - valid? ? super: false + valid? ? super : false end def save!(*) - valid? ? super: raise(EntryInvalid.new(self)) + valid? ? super : raise(EntryInvalid.new(self)) end private -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:14:26 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:14:26 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] test: remove needless assertions Message-ID: <20120722133611.8B4D2940BCD@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:14:26 +0900 (Sun, 22 Jul 2012) New Revision: 4f46dde9f9bc8d6ee8a796200ab18428e1005daa https://github.com/activeldap/activeldap/commit/4f46dde9f9bc8d6ee8a796200ab18428e1005daa Log: test: remove needless assertions Modified files: test/al-test-utils.rb Modified: test/al-test-utils.rb (+0 -11) =================================================================== --- test/al-test-utils.rb 2012-07-22 22:14:03 +0900 (3e6f6df) +++ test/al-test-utils.rb 2012-07-22 22:14:26 +0900 (743c8c5) @@ -17,7 +17,6 @@ module AlTestUtils base.class_eval do include ActiveLdap::GetTextSupport include Utilities - include Assertions include Config include Connection include Populate @@ -33,16 +32,6 @@ module AlTestUtils end end - module Assertions - def assert_true(actual, *args) - assert_equal(true, actual, *args) - end - - def assert_false(actual, *args) - assert_equal(false, actual, *args) - end - end - module Config def setup super -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:15:52 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:15:52 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Remove needless code Message-ID: <20120722133611.B5EB3940C21@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:15:52 +0900 (Sun, 22 Jul 2012) New Revision: 07568a96f6647933b92886d81b2d993a0d36ea3f https://github.com/activeldap/activeldap/commit/07568a96f6647933b92886d81b2d993a0d36ea3f Log: Remove needless code It's not worked yet. GitHub: #39 Reported by Ben Langfeld. Thanks!!! Modified files: lib/active_ldap/attribute_methods/read.rb Modified: lib/active_ldap/attribute_methods/read.rb (+0 -4) =================================================================== --- lib/active_ldap/attribute_methods/read.rb 2012-07-22 22:15:21 +0900 (5fc0587) +++ lib/active_ldap/attribute_methods/read.rb 2012-07-22 22:15:52 +0900 (4e4b5f8) @@ -3,10 +3,6 @@ module ActiveLdap module Read extend ActiveSupport::Concern - included do - attribute_method_suffix '' - end - protected def attribute(attr, *args) return get_attribute(attr, args.first) -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:35:10 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:35:10 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Fix a typo Message-ID: <20120722133611.E0D54940C25@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:35:10 +0900 (Sun, 22 Jul 2012) New Revision: 171a853b175b2b0fb13012b92267ed16157a8a51 https://github.com/activeldap/activeldap/commit/171a853b175b2b0fb13012b92267ed16157a8a51 Log: Fix a typo Modified files: lib/active_ldap/attribute_methods.rb Modified: lib/active_ldap/attribute_methods.rb (+1 -1) =================================================================== --- lib/active_ldap/attribute_methods.rb 2012-07-22 22:19:05 +0900 (73e9903) +++ lib/active_ldap/attribute_methods.rb 2012-07-22 22:35:10 +0900 (c4b2608) @@ -15,7 +15,7 @@ module ActiveLdap protected - # ovveriding ActiveModel::AttributeMethods + # overiding ActiveModel::AttributeMethods def attribute_method?(method_name) have_attribute?(method_name, ['objectClass']) end -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:43:56 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:43:56 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Use Bundler instead of Jeweler Message-ID: <20120722134408.A67C4940175@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:43:56 +0900 (Sun, 22 Jul 2012) New Revision: dadeb6ccc01d8d88e6ccada4f3064b9f80fe7ef3 https://github.com/activeldap/activeldap/commit/dadeb6ccc01d8d88e6ccada4f3064b9f80fe7ef3 Log: Use Bundler instead of Jeweler Modified files: Rakefile activeldap.gemspec Modified: Rakefile (+4 -8) =================================================================== --- Rakefile 2012-07-22 22:35:56 +0900 (f2709ff) +++ Rakefile 2012-07-22 22:43:56 +0900 (088ac05) @@ -8,7 +8,7 @@ require 'erb' require 'rubygems' require 'bundler/setup' -require 'jeweler' +require 'bundler/gem_helper' require 'rake/testtask' require "rake/clean" require "yard" @@ -17,13 +17,9 @@ $KCODE = "u" if RUBY_VERSION < "1.9" project_name = "ActiveLdap" -gemspec_file = Pathname.new(__FILE__).dirname + "activeldap.gemspec" -spec = eval(gemspec_file.read) -Jeweler::Tasks.new(spec) - -Rake::Task["release"].prerequisites.clear -Jeweler::RubygemsDotOrgTasks.new do -end +helper = Bundler::GemHelper.new(base_dir) +helper.install +spec = helper.gemspec Rake::TestTask.new(:test) do |test| test.libs << "lib" Modified: activeldap.gemspec (+2 -1) =================================================================== --- activeldap.gemspec 2012-07-22 22:35:56 +0900 (77f1b47) +++ activeldap.gemspec 2012-07-22 22:43:56 +0900 (11bf7b8) @@ -49,7 +49,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency("ruby-ldap") spec.add_development_dependency("net-ldap") - spec.add_development_dependency("jeweler") + spec.add_development_dependency("bundler") + spec.add_development_dependency("rake") spec.add_development_dependency("test-unit") spec.add_development_dependency("test-unit-notify") spec.add_development_dependency("yard") -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:15:21 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:15:21 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Use Active Model 3.2.6 Message-ID: <20120722133611.A0C7D940C1E@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:15:21 +0900 (Sun, 22 Jul 2012) New Revision: f0009ffa175f9f0773c97af748a58d40262007f8 https://github.com/activeldap/activeldap/commit/f0009ffa175f9f0773c97af748a58d40262007f8 Log: Use Active Model 3.2.6 It's not worked yet. GitHub: #39 Reported by Ben Langfeld. Thanks!!! Modified files: activeldap.gemspec Modified: activeldap.gemspec (+1 -1) =================================================================== --- activeldap.gemspec 2012-07-22 22:14:26 +0900 (e2d6a59) +++ activeldap.gemspec 2012-07-22 22:15:21 +0900 (77f1b47) @@ -42,7 +42,7 @@ Gem::Specification.new do |spec| EOF spec.license = "Ruby's or GPLv2 or later" - spec.add_dependency("activemodel", ["~> 3.1.0"]) + spec.add_dependency("activemodel", ["~> 3.2.6"]) spec.add_dependency("locale") spec.add_dependency("fast_gettext") spec.add_dependency("gettext_i18n_rails") -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:35:56 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:35:56 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Support dirty Message-ID: <20120722133612.014A5940C27@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:35:56 +0900 (Sun, 22 Jul 2012) New Revision: ded54e3cc277671ccca19d301f749c15bf5d29ac https://github.com/activeldap/activeldap/commit/ded54e3cc277671ccca19d301f749c15bf5d29ac Log: Support dirty GitHub: #39 Reported by Ben Langfeld. Thanks!!! Modified files: lib/active_ldap.rb lib/active_ldap/attribute_methods/dirty.rb lib/active_ldap/base.rb lib/active_ldap/operations.rb test/test_dirty.rb test/test_usermod-binary-del.rb Modified: lib/active_ldap.rb (+5 -5) =================================================================== --- lib/active_ldap.rb 2012-07-22 22:35:10 +0900 (8d3ca8c) +++ lib/active_ldap.rb 2012-07-22 22:35:56 +0900 (e266e97) @@ -57,27 +57,27 @@ require 'active_ldap/callbacks' ActiveLdap::Base.class_eval do + include ActiveLdap::Persistence + include ActiveLdap::Associations include ActiveModel::MassAssignmentSecurity include ActiveLdap::Attributes include ActiveLdap::AttributeMethods - include ActiveLdap::AttributeMethods::Query include ActiveLdap::AttributeMethods::BeforeTypeCast - include ActiveLdap::AttributeMethods::Read include ActiveLdap::AttributeMethods::Write + include ActiveLdap::AttributeMethods::Dirty + include ActiveLdap::AttributeMethods::Query + include ActiveLdap::AttributeMethods::Read include ActiveLdap::Configuration include ActiveLdap::Connection include ActiveLdap::Operations include ActiveLdap::ObjectClass - include ActiveLdap::Persistence - include ActiveLdap::Acts::Tree include ActiveLdap::Validations include ActiveLdap::Callbacks include ActiveLdap::HumanReadable - include ActiveLdap::AttributeMethods::Dirty end unless defined?(ACTIVE_LDAP_CONNECTION_ADAPTERS) Modified: lib/active_ldap/attribute_methods/dirty.rb (+14 -9) =================================================================== --- lib/active_ldap/attribute_methods/dirty.rb 2012-07-22 22:35:10 +0900 (49e464b) +++ lib/active_ldap/attribute_methods/dirty.rb 2012-07-22 22:35:56 +0900 (62fc1e5) @@ -7,30 +7,35 @@ module ActiveLdap # Attempts to +save+ the record and clears changed attributes if successful. def save(*) #:nodoc: - if status = super - changed_attributes.clear + succeeded = super + if succeeded + @previously_changed = changes + @changed_attributes.clear end - status + succeeded end # Attempts to save! the record and clears changed attributes if successful. def save!(*) #:nodoc: - if status = super - changed_attributes.clear + super.tap do + @previously_changed = changes + @changed_attributes.clear end - status end # reload the record and clears changed attributes. def reload(*) #:nodoc: super.tap do - changed_attributes.clear + @previously_changed.clear + @changed_attributes.clear end end protected - def attribute=(attr, val) - attribute_will_change!(attr) unless val == get_attribute(attr) + def set_attribute(name, value) + if name != "objectClass" + attribute_will_change!(name) unless value == get_attribute(name) + end super end end Modified: lib/active_ldap/base.rb (+6 -0) =================================================================== --- lib/active_ldap/base.rb 2012-07-22 22:35:10 +0900 (26ba297) +++ lib/active_ldap/base.rb 2012-07-22 22:35:56 +0900 (f69dc3e) @@ -934,6 +934,9 @@ module ActiveLdap def clear_object_class_based_cache @entry_attribute = nil @real_names = {} + @changed_attributes.reject! do |key, _| + not attribute_method?(key) + end end def schema @@ -1076,6 +1079,7 @@ module ActiveLdap end set_attribute(key, value) end + @changed_attributes.clear end private :initialize_attributes @@ -1125,6 +1129,8 @@ module ActiveLdap @dn_split_value = nil @connection ||= nil @_hashing = false + @previously_changed = [] + @changed_attributes = {} clear_connection_based_cache end Modified: lib/active_ldap/operations.rb (+46 -40) =================================================================== --- lib/active_ldap/operations.rb 2012-07-22 22:35:10 +0900 (93cf8b3) +++ lib/active_ldap/operations.rb 2012-07-22 22:35:56 +0900 (8064323) @@ -8,7 +8,9 @@ module ActiveLdap extend(Find) extend(LDIF) extend(Delete) + extend(ClassOnlyDelete) extend(Update) + extend(ClassOnlyUpdate) include(Common) include(Find) @@ -487,13 +489,6 @@ module ActiveLdap end module Delete - def destroy(targets, options={}) - targets = [targets] unless targets.is_a?(Array) - targets.each do |target| - find(target, options).destroy - end - end - def destroy_all(options_or_filter=nil, deprecated_options=nil) if deprecated_options.nil? if options_or_filter.is_a?(String) @@ -512,24 +507,6 @@ module ActiveLdap end end - def delete(targets, options={}) - targets = [targets] unless targets.is_a?(Array) - targets = targets.collect do |target| - ensure_dn_attribute(ensure_base(target)) - end - delete_entry(targets, options) - end - - def delete_entry(dn, options={}) - options[:connection] ||= connection - begin - options[:connection].delete(dn, options) - rescue Error - format = _("Failed to delete LDAP entry: <%s>: %s") - raise DeleteError.new(format % [dn.inspect, $!.message]) - end - end - def delete_all(options_or_filter=nil, deprecated_options=nil) if deprecated_options.nil? if options_or_filter.is_a?(String) @@ -548,6 +525,33 @@ module ActiveLdap delete_entry(targets, options) end + + def delete_entry(dn, options={}) + options[:connection] ||= connection + begin + options[:connection].delete(dn, options) + rescue Error + format = _("Failed to delete LDAP entry: <%s>: %s") + raise DeleteError.new(format % [dn.inspect, $!.message]) + end + end + end + + module ClassOnlyDelete + def destroy(targets, options={}) + targets = [targets] unless targets.is_a?(Array) + targets.each do |target| + find(target, options).destroy + end + end + + def delete(targets, options={}) + targets = [targets] unless targets.is_a?(Array) + targets = targets.collect do |target| + ensure_dn_attribute(ensure_base(target)) + end + delete_entry(targets, options) + end end module Update @@ -574,21 +578,6 @@ module ActiveLdap new_superior, options) end - def update(dn, attributes, options={}) - if dn.is_a?(Array) - i = -1 - dns = dn - dns.collect do |_dn| - i += 1 - update(_dn, attributes[i], options) - end - else - object = find(dn, options) - object.update_attributes(attributes) - object - end - end - def update_all(attributes, filter=nil, options={}) search_options = options.dup if filter @@ -614,5 +603,22 @@ module ActiveLdap end end end + + module ClassOnlyUpdate + def update(dn, attributes, options={}) + if dn.is_a?(Array) + i = -1 + dns = dn + dns.collect do |_dn| + i += 1 + update(_dn, attributes[i], options) + end + else + object = find(dn, options) + object.update_attributes(attributes) + object + end + end + end end end Modified: test/test_dirty.rb (+10 -2) =================================================================== --- test/test_dirty.rb 2012-07-22 22:35:10 +0900 (0b8426b) +++ test/test_dirty.rb 2012-07-22 22:35:56 +0900 (39c4458) @@ -22,7 +22,9 @@ class TestDirty < Test::Unit::TestCase attributes = (user.must + user.may).collect(&:name) - ['objectClass'] user.cn = 'New cn' + assert_true(user.cn_changed?) user.reload + assert_false(user.cn_changed?) _wrap_assertion do attributes.each do |name| @@ -36,13 +38,14 @@ class TestDirty < Test::Unit::TestCase make_temporary_user do |user, password| attributes = (user.must + user.may).collect(&:name) - ['objectClass', 'cn'] user.cn = 'New cn' + assert_true(user.cn_changed?) _wrap_assertion do (attributes - ['cn']).each do |name| assert_false(user.send("#{name}_changed?")) end - assert(user.cn_changed?) + assert_true(user.cn_changed?) end end end @@ -51,7 +54,10 @@ class TestDirty < Test::Unit::TestCase make_temporary_user do |user, password| attributes = (user.must + user.may).collect(&:name) - ['objectClass', 'cn'] user.cn = 'New cn' + assert_true(user.cn_changed?) user.save + assert_false(user.cn_changed?) + _wrap_assertion do attributes.each do |name| assert_false(user.send("#{name}_changed?")) @@ -64,7 +70,10 @@ class TestDirty < Test::Unit::TestCase make_temporary_user do |user, password| attributes = (user.must + user.may).collect(&:name) - ['objectClass', 'cn'] user.cn = 'New cn' + assert_true(user.cn_changed?) user.save! + assert_false(user.cn_changed?) + _wrap_assertion do attributes.each do |name| assert_false(user.send("#{name}_changed?")) @@ -72,5 +81,4 @@ class TestDirty < Test::Unit::TestCase end end end - end Modified: test/test_usermod-binary-del.rb (+1 -1) =================================================================== --- test/test_usermod-binary-del.rb 2012-07-22 22:35:10 +0900 (1f0418f) +++ test/test_usermod-binary-del.rb 2012-07-22 22:35:56 +0900 (8a7b06e) @@ -26,7 +26,7 @@ class TestUsermodBinaryDel < Test::Unit::TestCase make_temporary_user(:simple => true) do |user, password| user.add_class("strongAuthenticationUser") user.user_certificate = certificate - assert(user.save) + assert_true(user.save) assert_usermod_binary_del_successfully(user.uid, "New #{user.cn}", user.uid_number.to_i + 100) end -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 13:19:05 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 22:19:05 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] test: remove needless code Message-ID: <20120722133611.CB3CF940C23@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 22:19:05 +0900 (Sun, 22 Jul 2012) New Revision: ebe2078fcf3574c807f0e49dbac75d2d3ca1f5e1 https://github.com/activeldap/activeldap/commit/ebe2078fcf3574c807f0e49dbac75d2d3ca1f5e1 Log: test: remove needless code Modified files: test/test_ldif.rb Modified: test/test_ldif.rb (+0 -1) =================================================================== --- test/test_ldif.rb 2012-07-22 22:15:52 +0900 (4298873) +++ test/test_ldif.rb 2012-07-22 22:19:05 +0900 (0cb1325) @@ -4,7 +4,6 @@ require 'al-test-utils' class TestLDIF < Test::Unit::TestCase include ActiveLdap::GetTextSupport - include AlTestUtils::Assertions include AlTestUtils::Config include AlTestUtils::ExampleFile -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 14:05:53 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 23:05:53 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] test: use 'require "test-unit"' instead of "test/unit" Message-ID: <20120722140806.3E60E940175@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 23:05:53 +0900 (Sun, 22 Jul 2012) New Revision: c6570339c8fed69a32f465e3995270c1f558a095 https://github.com/activeldap/activeldap/commit/c6570339c8fed69a32f465e3995270c1f558a095 Log: test: use 'require "test-unit"' instead of "test/unit" Modified files: test/al-test-utils.rb Modified: test/al-test-utils.rb (+1 -1) =================================================================== --- test/al-test-utils.rb 2012-07-22 22:43:56 +0900 (743c8c5) +++ test/al-test-utils.rb 2012-07-22 23:05:53 +0900 (a76ef7c) @@ -1,4 +1,4 @@ -require 'test/unit' +require 'test-unit' require 'erb' require 'yaml' -------------- next part -------------- An HTML attachment was scrubbed... URL: From null at cozmixng.org Sun Jul 22 14:07:53 2012 From: null at cozmixng.org (null at cozmixng.org) Date: Sun, 22 Jul 2012 23:07:53 +0900 Subject: [activeldap-commit] activeldap/activeldap [master] Use gettext instead of fast_gettext Message-ID: <20120722140806.53CAC940BCD@jenkins.clear-code.com> Kouhei Sutou 2012-07-22 23:07:53 +0900 (Sun, 22 Jul 2012) New Revision: 9dc2793f7168dbbdc63a1d4e14ada75bfa0e9827 https://github.com/activeldap/activeldap/commit/9dc2793f7168dbbdc63a1d4e14ada75bfa0e9827 Log: Use gettext instead of fast_gettext Removed files: lib/active_ldap/get_text_fallback.rb lib/active_ldap/get_text_support.rb Modified files: activeldap.gemspec lib/active_ldap.rb lib/active_ldap/base.rb lib/active_ldap/get_text.rb test/al-test-utils.rb Modified: activeldap.gemspec (+1 -1) =================================================================== --- activeldap.gemspec 2012-07-22 23:05:53 +0900 (11bf7b8) +++ activeldap.gemspec 2012-07-22 23:07:53 +0900 (4c4edde) @@ -44,7 +44,7 @@ Gem::Specification.new do |spec| spec.add_dependency("activemodel", ["~> 3.2.6"]) spec.add_dependency("locale") - spec.add_dependency("fast_gettext") + spec.add_dependency("gettext") spec.add_dependency("gettext_i18n_rails") spec.add_development_dependency("ruby-ldap") Modified: lib/active_ldap.rb (+0 -5) =================================================================== --- lib/active_ldap.rb 2012-07-22 23:05:53 +0900 (e266e97) +++ lib/active_ldap.rb 2012-07-22 23:07:53 +0900 (316d9e4) @@ -14,11 +14,6 @@ else require 'active_ldap/timeout_stub' end -begin - require "locale" - require "fast_gettext" -rescue LoadError -end require 'active_ldap/get_text' require 'active_ldap/compatible' Modified: lib/active_ldap/base.rb (+1 -0) =================================================================== --- lib/active_ldap/base.rb 2012-07-22 23:05:53 +0900 (f69dc3e) +++ lib/active_ldap/base.rb 2012-07-22 23:07:53 +0900 (f96fe20) @@ -281,6 +281,7 @@ module ActiveLdap # by extension classes. class Base include GetTextSupport + public :gettext public :_ if Object.const_defined?(:Reloadable) Modified: lib/active_ldap/get_text.rb (+18 -7) =================================================================== --- lib/active_ldap/get_text.rb 2012-07-22 23:05:53 +0900 (b7cacd0) +++ lib/active_ldap/get_text.rb 2012-07-22 23:07:53 +0900 (cf0d807) @@ -1,9 +1,20 @@ -if Object.const_defined?(:FastGettext) - ActiveLdap.const_set("GetText", FastGettext) -end +require "gettext" -unless ActiveLdap.const_defined?(:GetText) - require 'active_ldap/get_text_fallback' -end +module ActiveLdap + class << self + def get_text_supported? + true + end + end -require 'active_ldap/get_text_support' + module GetTextSupport + class << self + def included(base) + base.class_eval do + include(GetText) + bindtextdomain("active-ldap") + end + end + end + end +end Deleted: lib/active_ldap/get_text_fallback.rb (+0 -60) 100644 =================================================================== --- lib/active_ldap/get_text_fallback.rb 2012-07-22 23:05:53 +0900 (b0bb1d9) +++ /dev/null @@ -1,60 +0,0 @@ -module ActiveLdap - module GetTextFallback - module_function - def add_text_domain(name, options) - end - - module_function - def default_available_locales=(name) - end - - module_function - def default_text_domain=(name) - end - - module Translation - class << self - def included(base) - base.extend(self) - end - end - - def _(msg_id) - msg_id - end - - def n_(arg1, arg2, arg3=nil) - if arg1.kind_of?(Array) - msg_id = arg1[0] - msg_id_plural = arg1[1] - n = arg2 - else - msg_id = arg1 - msg_id_plural = arg2 - n = arg3 - end - n == 1 ? msg_id : msg_id_plural - end - - def N_(msg_id) - msg_id - end - - def Nn_(msg_id, msg_id_plural) - [msg_id, msg_id_plural] - end - - def s_(msg_id, div='|') - index = msg_id.rindex(div) - if index - msg_id[(index + 1)..-1] - else - msg_id - end - end - end - - end - - GetText = GetTextFallback -end Deleted: lib/active_ldap/get_text_support.rb (+0 -22) 100644 =================================================================== --- lib/active_ldap/get_text_support.rb 2012-07-22 23:05:53 +0900 (0076062) +++ /dev/null @@ -1,22 +0,0 @@ -module ActiveLdap - class << self - def get_text_supported? - not const_defined?(:GetTextFallback) - end - end - - module GetTextSupport - class << self - def included(base) - base.class_eval do - include(GetText::Translation) - po_dir = File.join(File.dirname(__FILE__), "..", "..", "po") - po_dir = File.expand_path(po_dir) - GetText.add_text_domain('active-ldap', :path => po_dir, :type => :po) - GetText.default_available_locales = ['en', 'jp'] - GetText.default_text_domain = "active-ldap" - end - end - end - end -end Modified: test/al-test-utils.rb (+13 -6) =================================================================== --- test/al-test-utils.rb 2012-07-22 23:05:53 +0900 (a76ef7c) +++ test/al-test-utils.rb 2012-07-22 23:07:53 +0900 (f590e95) @@ -228,9 +228,7 @@ module AlTestUtils :prefix => "ou=Users", :scope => :sub, :classes => @user_class_classes - def @user_class.name - "User" - end + assign_class_name(@user_class, "User") end def populate_group_class @@ -238,9 +236,7 @@ module AlTestUtils @group_class.ldap_mapping :prefix => "ou=Groups", :scope => :sub, :classes => ["posixGroup"] - def @group_class.name - "Group" - end + assign_class_name(@group_class, "Group") end def populate_associations @@ -257,6 +253,17 @@ module AlTestUtils @group_class.set_associated_class(:members, @user_class) @group_class.set_associated_class(:primary_members, @user_class) end + + def assign_class_name(klass, name) + singleton_class = class << klass; self; end + singleton_class.send(:define_method, :name) do + name + end + if Object.const_defined?(klass.name) + Object.send(:remove_const, klass.name) + end + Object.const_set(klass.name, klass) + end end module TemporaryEntry -------------- next part -------------- An HTML attachment was scrubbed... URL: