debian/0000755000000000000000000000000012061647752007200 5ustar debian/rules0000755000000000000000000000070112061264737010254 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby debian/watch0000644000000000000000000000015512061264737010230 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/minimization .*/minimization-(.*).tar.gz debian/source/0000755000000000000000000000000012061305045010462 5ustar debian/source/format0000644000000000000000000000001412061264737011704 0ustar 3.0 (quilt) debian/ruby-tests.rake0000644000000000000000000000022312061305232012142 0ustar require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = './spec/**/*_spec.rb' end task :default => :spec debian/copyright0000644000000000000000000000212012061305204011105 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: minimization Source: https://github.com/clbustos/minimization Files: * Copyright: 2010 Claudio Bustos License: GPL-2 Files: debian/* Copyright: 2012 Cédric Boutillier License: GPL-2 License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation. . This program 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 General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/control0000644000000000000000000000170412061647752010605 0ustar Source: ruby-minimization Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Cédric Boutillier Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-rspec, rake, ruby-text-table Standards-Version: 3.9.4 Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-minimization.git Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-minimization.git;a=summary Homepage: http://github.com/clbustos/minimization XS-Ruby-Versions: all Package: ruby-minimization Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-text-table Description: Ruby library providing minimization algorithms This library provides pure Ruby implementation of some unidimensional minimization algorithms: the Newton-Raphson method, the golden section search, and Brent minimization algorithm. debian/patches/0000755000000000000000000000000012061321312010604 5ustar debian/patches/series0000644000000000000000000000003412061302223012016 0ustar adapt_specs_to_rspec2.patch debian/patches/adapt_specs_to_rspec2.patch0000644000000000000000000000406112061321312016074 0ustar Description: Adapt specs to RSpec2 Do require 'spec', the deprecated version of RSpec. Change be_close to be_within to avoid warnings Author: Cédric Boutillier Bug: https://github.com/clbustos/minimization/pull/1 Last-Update: 2012-12-10 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,12 +1,6 @@ $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'minimization.rb' -require 'spec' -require 'spec/autorun' - -Spec::Runner.configure do |config| - -end class String def deindent --- a/spec/minimization_unidimensional_spec.rb +++ b/spec/minimization_unidimensional_spec.rb @@ -14,10 +14,10 @@ @min.iterate end it "#x_minimum be close to expected" do - @min.x_minimum.should be_close(@p1,@min.epsilon) + @min.x_minimum.should be_within(@min.epsilon).of(@p1) end it "#f_minimum ( f(x)) be close to expected" do - @min.f_minimum.should be_close(@p2,@min.epsilon) + @min.f_minimum.should be_within(@min.epsilon).of(@p2) end context "#log" do subject {@min.log} @@ -32,10 +32,10 @@ @min = Minimization::GoldenSection.minimize(-1000,1000, &@func) end it "#x_minimum be close to expected" do - @min.x_minimum.should be_close(@p1,@min.epsilon) + @min.x_minimum.should be_within(@min.epsilon).of(@p1) end it "#f_minimum ( f(x)) be close to expected" do - @min.f_minimum.should be_close(@p2,@min.epsilon) + @min.f_minimum.should be_within(@min.epsilon).of(@p2) end context "#log" do subject {@min.log} @@ -48,10 +48,10 @@ @min = Minimization::Brent.minimize(-1000,1000, &@func) end it "should x be correct" do - @min.x_minimum.should be_close(@p1,@min.epsilon) + @min.x_minimum.should be_within(@min.epsilon).of(@p1) end it "should f(x) be correct" do - @min.f_minimum.should be_close(@p2,@min.epsilon) + @min.f_minimum.should be_within(@min.epsilon).of(@p2) end context "#log" do subject {@min.log} debian/compat0000644000000000000000000000000212061264737010374 0ustar 7 debian/changelog0000644000000000000000000000041612061305232011033 0ustar ruby-minimization (0.2.1-1) unstable; urgency=low * Initial release (Closes: #695562) * Add debian/patches/adapt_specs_to_rspec2.patch to avoid warnings with newer versions of RSpec2. -- Cédric Boutillier Mon, 10 Dec 2012 08:04:54 +0100