From b6c6dda7ea5f72c9c40ea67a62a68c00fc3c0870 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Tue, 12 Mar 2013 13:53:43 +0900 Subject: [PATCH 1/6] Fix Invalid examples 1. String#encode should not fail if given an invalid code like '\x81' This is because this problem has been resolved by #41. 2. Net::LDAP#search should return a boolean if return_result is false. --- spec/unit/ber/ber_spec.rb | 4 ++-- spec/unit/ldap/search_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/unit/ber/ber_spec.rb b/spec/unit/ber/ber_spec.rb index 10288d09..994c2312 100644 --- a/spec/unit/ber/ber_spec.rb +++ b/spec/unit/ber/ber_spec.rb @@ -89,9 +89,9 @@ ["6a31b4a12aa27a41aca9603f27dd5116"].pack("H*").to_ber_bin.should == "\x04\x10" + "j1\xB4\xA1*\xA2zA\xAC\xA9`?'\xDDQ\x16" end - it "should fail on strings that can not be converted to UTF-8" do + it "should not fail on strings that can not be converted to UTF-8" do error = Encoding::UndefinedConversionError - lambda {"\x81".to_ber }.should raise_exception(error) + lambda {"\x81".to_ber }.should_not raise_exception(error) end end end diff --git a/spec/unit/ldap/search_spec.rb b/spec/unit/ldap/search_spec.rb index 8f9446ca..5d06a88e 100644 --- a/spec/unit/ldap/search_spec.rb +++ b/spec/unit/ldap/search_spec.rb @@ -3,7 +3,7 @@ describe Net::LDAP, "search method" do class FakeConnection def search(args) - OpenStruct.new(:result_code => 1, :message => "error") + OpenStruct.new(:result_code => 1, :message => "error", :success? => false) end end @@ -22,7 +22,7 @@ def search(args) context "when :return_result => false" do it "should return false upon error" do result = @connection.search(:return_result => false) - result.result_code.should == 1 + result.should be_false end end From 8759acb75919d017db06898e6d1ce708c27cb24a Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Wed, 13 Mar 2013 16:35:13 +0900 Subject: [PATCH 2/6] Adopt Travis-CI --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..3e1e6f43 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: ruby +rvm: + - 1.8.7 + - 1.9.2 + - 1.9.3 +script: bundle exec rake spec From c1166278439ecff5c8092dc42ad7ac8aa239cdca Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Wed, 13 Mar 2013 16:46:29 +0900 Subject: [PATCH 3/6] Add status image to README --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 25f9078f..b0c93bc4 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,4 +1,4 @@ -= Net::LDAP for Ruby += Net::LDAP for Ruby {}[https://travis-ci.org/ruby-ldap/ruby-net-ldap]] == Description From 2e1d78d0d8c130a37f1d3acb53b006f85e3b6de4 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Wed, 13 Mar 2013 16:49:49 +0900 Subject: [PATCH 4/6] Update README.rdoc Fix typo --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index b0c93bc4..115d2e2c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,4 +1,4 @@ -= Net::LDAP for Ruby {}[https://travis-ci.org/ruby-ldap/ruby-net-ldap]] += Net::LDAP for Ruby {}[https://travis-ci.org/ruby-ldap/ruby-net-ldap] == Description From 251735bacc8483bbc3aa487cffcca200e6bbe0e7 Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Fri, 12 Apr 2013 20:48:28 +0900 Subject: [PATCH 5/6] Add support version of ruby --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3e1e6f43..ae42b003 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,10 @@ rvm: - 1.8.7 - 1.9.2 - 1.9.3 + - 2.0.0 + - jruby-18mode + - jruby-19mode + - rbx-18mode + - rbx-19mode + - ree script: bundle exec rake spec From fe95779fac9ed761c00712403ed0a186a41fd5ec Mon Sep 17 00:00:00 2001 From: Tatsuya Sato Date: Fri, 12 Apr 2013 20:54:07 +0900 Subject: [PATCH 6/6] Change the value of source in Gemfile because deprecated --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index e45e65f8..851fabc2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,2 @@ -source :rubygems +source 'https://rubygems.org' gemspec