debian/0000755000000000000000000000000012247434771007201 5ustar debian/ruby-tests.rb0000755000000000000000000000020512151745613011641 0ustar #ensure that Mocha is defined before running tests module Mocha; end Dir['test/{unit,acceptance}/*_test.rb'].each { |f| require f } debian/changelog0000644000000000000000000002176012247434260011052 0ustar ruby-mocha (0.14.0-2ubuntu1) trusty; urgency=low * Merge from debian unstable. Remaining changes: - Remove build dependencies on ruby-redcarpet and yard (universe), and don't build the documentation. * debian/control: really remove rubygems to make sure it's not pulled in. -- Marc Deslauriers Tue, 03 Dec 2013 14:58:17 -0500 ruby-mocha (0.14.0-2) unstable; urgency=low * Do not force rubygems to avoid forcing a transitive dependency on ruby1.8. Removed explicit build-dependency on rubygems since gem2deb already depends on it (at least for as long as Ruby 1.8 is supported). Removed unconditional dependency on rubygems, replaced with rubygems | ruby (>= 1:1.9) to make sure it sill works with Ruby1.8 while it's still supported. -- Antonio Terceiro Mon, 12 Aug 2013 11:40:09 +0200 ruby-mocha (0.14.0-1ubuntu1) saucy; urgency=low * Remove build dependencies on ruby-redcarpet and yard (universe), and don't build the documentation. Might want to revert this, if more ruby packages in main use this, and promote the 30 dependencies ... -- Matthias Klose Tue, 02 Jul 2013 16:15:26 +0200 ruby-mocha (0.14.0-1) unstable; urgency=low * New upstream version * debian/control: add a Build-Depends on rubygems for tests with ruby1.8 * debian/ruby-tests.rb: ensure Mocha is defined before loading the tests * debian/patches: + update add_rubygems_requirement.patch + add deactivate_failing_tests.patch: temporarily deactivate two tests failing with Debian ruby-minitests 5.0 -- Cédric Boutillier Thu, 16 May 2013 17:25:32 +0200 ruby-mocha (0.13.3-2) unstable; urgency=low * Upload to unstable * Remove obsolete transitional packages libmocha-ruby* -- Cédric Boutillier Tue, 07 May 2013 11:42:29 +0200 ruby-mocha (0.13.3-1) experimental; urgency=low * New upstream version * reflect change of extension of README in ruby-mocha.docs * debian/patches: + remove remove_rubygems_stuff_in_minitest_test.patch (not needed anymore) + refresh add_rubygems_requirement.patch * debian/control: + bump Standards-Version to 3.9.4 (no changes needed) + remove obsolete DM-Upload-Allowed field + update my email address + update Vcs-* fields to use anonscm.debian.org + build-dependencies: add yard and ruby-redcarpet, remove libjs-jquery * debian/rules: + install upstream changelog + build documentation with yard * debian/copyright + update years and my email address + remove info about embedded copy of libjsquery (not present anymore) + rename MIT license paragraph to Expat + upate Ruby license + remove paragraph about GPL-2 * move debian/source/options to debian/source/local-options -- Cédric Boutillier Sat, 13 Apr 2013 15:29:02 +0200 ruby-mocha (0.11.3-3) unstable; urgency=low * Modify remove_rubygems_stuff_in_minitest_test.patch to restore loading of minitest/unit conditional to the definition of MiniTest. Loading minitest/unit before Minitest is defined screens the definition of TestUnitResult, causing tests to fail (Closes: #684860). -- Cédric Boutillier Wed, 12 Sep 2012 12:41:26 +0200 ruby-mocha (0.11.3-2) unstable; urgency=low * Bump the build-dependency on gem2deb to >= 0.3.0~ (closes: #674388). -- Paul van Tilburg Wed, 27 Jun 2012 00:01:46 +0200 ruby-mocha (0.11.3-1) unstable; urgency=low * New upstream version * Bump Standards-Version: to 3.9.3 (no changes needed) * Ship documentation in ruby-mocha-doc * Remove debian/README.Debian-sources (no more applicable) * debian/ruby-tests.rb: - do not exclude tests with Ruby 1.9 anymore * debian/patches: - refresh remove_rubygems_stuff_in_minitest_test.patch * add a copy of the source for minified jquery.js in debian/jquery-1.5.2.js -- Cédric Boutillier Thu, 26 Apr 2012 23:15:03 +0200 ruby-mocha (0.10.3-1) unstable; urgency=low * New upstream version * debian/control - add myself to the uploaders - add (build-)dependency on ruby-metaclass and rubygems - add build-dependency on ruby-introspection and ruby-minitest - set Priority of transitional packages to extra * debian/ruby-tests.rb: - remove unneeded $LOAD_PATH manipulation - ignore two test files with Ruby1.9 due to ruby-introspection misbehaving with Ruby1.9.3 * debian/patches: - add_rubygems_requirement.patch: require "rubygems/requirement" in lib/mocha/integration/{test_unit,mini_test}.rb - remove_rubygems_stuff_in_minitest_test.patch: remove use of rubygems to load minitest and reorder require statements to avoid conflicts between minitest and test_unit * debian/require-rubygems.overrides: lib/mocha/integration/{test_unit,mini_test}.rb need "rubygems/requirement" -- Cédric Boutillier Mon, 30 Jan 2012 14:43:32 +0100 ruby-mocha (0.9.12-2) unstable; urgency=low * Remove files that were in the debian packaging branch but not in upstream tarball we were using. This makes the package build with dpkg 1.16.1 (Closes: #643270) * debian/control: move pkg-ruby-extras team to Maintainer: field. Move myself with new e-mail address to Uploaders: * Bumped standards version to 3.9.2. No changes needed. * Make lintian ignore duplicated descriptions in transitional packages * debian/control: + Use Conflicts: instead of Breaks as recommended. + use 'ruby | ruby-interpreter' instead of 'ruby-interpreter | ruby' in Depends: this way we always have an actual package as first alternative instead of a virtual one. * debian/copyright: adjusted to adhere more strictly to DEP5. -- Antonio Terceiro Sun, 02 Oct 2011 07:56:58 -0300 ruby-mocha (0.9.12-1) unstable; urgency=low * New upload, since the previous was REJECTED by the ftpmasters. + Add verbatim copies of licenses to debian/copyright, was requested by policy 4.5. * Bump debhelper compatibility level * Update with files generated by dh-make-ruby: + debian/rules + debian/watch * New upstream release. * Updating the package as for the new Ruby practices + Renaming package to ruby-mocha. + Using a single binary package + Migrate to gem2deb - removed build dependency on cdbs and ruby-pkg-tools + Added XS-Ruby-Versions field to debian/control + ruby-mocha Provides, Replaces and Conflicts with libmocha-ruby and libmocha-ruby1.8 * Bumped Standards-Version to 3.9.1 * debian/source/format: using '3.0 (quilt)' * Source migrated to pkg-ruby-extras team's git repository * Run tests during package build * Added transitional packages in debian/control to allow smooth upgrades from Squeeze. -- Antonio Terceiro Mon, 11 Apr 2011 10:37:50 -0700 libmocha-ruby (0.9.8-1) unstable; urgency=low [ Gunnar Wolf ] * Changed section to Ruby as per ftp-masters' request [ Antonio Terceiro ] * New upstream release. * debian/copyright: + Updating licensing information according to upstream README file. + Relicensing the Debian packaging under the same terms as the original package. * debian/control: updated Standards version to 3.8.3. No changes needed. -- Antonio Terceiro Fri, 20 Nov 2009 20:06:38 -0300 libmocha-ruby (0.9.5-1) unstable; urgency=low * New upstream release. * debian/rules: - clarified version of GPL - added proper copyrigh signs (©) * debian/control: - Added ${misc:Depends} to libmocha-ruby -- Antonio Terceiro Sun, 15 Feb 2009 21:06:03 -0300 libmocha-ruby (0.9.0-1) unstable; urgency=low * New upstream release. * debian/control: bumped standards to 3.8.0; no changes needed. * debian/rules: calling rdoc by hand without --diagram option. For some reason rdoc generates several identical PNG files when generating diagrams, and dh_rdoc always use --diagram. -- Antonio Terceiro Sun, 29 Jun 2008 18:26:29 -0300 libmocha-ruby (0.5.6-1) unstable; urgency=low [ Antonio Terceiro ] * New upstream release. * Generating rdoc HTML and installing to -ruby package. * Bumped standards to 3.7.3; no changes needed. * Removed setup.rb from .diff.gz, now requiring ruby-pkg-tools >= 0.13 to build. * Adding Dm-Upload-Allowed field to debian/control. [ Lucas Nussbaum ] * Use new Homepage dpkg header. [ Paul van Tilburg ] * Updated debian/control: - added myself to the Uploaders field. - added Vcs-* fields. - build-depend on ruby1.8 should be on libruby1.8 (only stdlib is used). - changed section from interpreters to libs! -- Paul van Tilburg Fri, 04 Apr 2008 21:48:41 +0200 libmocha-ruby (0.5.3-1) unstable; urgency=low * Initial Debian release (Closes: #434555). -- Antonio Terceiro Wed, 1 Aug 2007 19:06:38 -0300 debian/ruby-mocha-doc.examples0000644000000000000000000000001311745017046013536 0ustar examples/* debian/ruby-mocha.docs0000644000000000000000000000001212142300725012073 0ustar README.md debian/compat0000644000000000000000000000000211745017046010371 0ustar 7 debian/rules0000755000000000000000000000142512247433726010262 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 export MOCHA_NO_DOCS=true UPSTREAM_VERSION := $(shell dpkg-parsechangelog | grep "^Version:" | cut -d\ -f2 | cut -d- -f1) %: dh $@ --buildsystem=ruby --with ruby override_dh_installchangelogs: dh_installchangelogs RELEASE.md -O--buildsystem=ruby override_dh_install: # yard --title "Mocha $(UPSTREAM_VERSION)" dh_install override_dh_clean: rm -rf doc/ .yardoc/ dh_clean debian/watch0000644000000000000000000000013711745017046010225 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/mocha .*/mocha-(.*).tar.gz debian/test.rb0000644000000000000000000000062111745017046010476 0ustar require 'test/unit' require 'mocha' class MochaDebianTest < Test::Unit::TestCase def test_should_create_mock_objects obj = mock obj.expects(:something).returns("something") assert_equal "something", obj.something end def test_should_mock_real_objects obj = Object.new obj.expects(:data).returns(:x => 7, :y => 9) assert_equal({ :x => 7, :y => 9}, obj.data) end end debian/ruby-mocha-doc.docs0000644000000000000000000000003111745017046012650 0ustar debian/README.source doc debian/copyright0000644000000000000000000000771412142300725011126 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mocha Source: https://github.com/floehopper/mocha Files: * Copyright: Copyright Revieworld Ltd. 2006 License: Expat or Ruby Files: debian/* Copyright: Copyright 2011 Antonio Terceiro Copyright 2012-2013 Cédric Boutillier License: Expat or Ruby License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: Ruby Ruby is copyrighted free software by Yukihiro Matsumoto . You can redistribute it and/or modify it under either the terms of the 2-clause BSDL (see the file BSDL), or the conditions below: . 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. . 2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: . a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. . b) use the modified software only within your corporation or organization. . c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. . d) make other distribution arrangements with the author. . 3. You may distribute the software in object code or binary form, provided that you do at least ONE of the following: . a) distribute the binaries and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. . b) accompany the distribution with the machine-readable source of the software. . c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. . d) make other distribution arrangements with the author. . 4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under these terms. . For the list of those files and their copying conditions, see the file LEGAL. . 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. . 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. debian/README.source0000644000000000000000000000057211745017046011356 0ustar The documentation provided in the ruby-mocha-doc package is shipped with the upstream gem file. It is automatically generated from the source files. In order to regenerate it, you can call rake -f debian/generate-doc.rake from the root of the source package. The Rakefile mentionned above is adapted from the upstream Rakefile. It requires the following packages: rake, yard debian/source/0000755000000000000000000000000012142300725010462 5ustar debian/source/format0000644000000000000000000000001411745017046011701 0ustar 3.0 (quilt) debian/require-rubygems.overrides0000644000000000000000000000032411745017046014425 0ustar debian/ruby-mocha/usr/lib/ruby/vendor_ruby/mocha/integration/mini_test.rb: require 'rubygems/requirement' debian/ruby-mocha/usr/lib/ruby/vendor_ruby/mocha/integration/test_unit.rb: require 'rubygems/requirement' debian/generate-doc.rake0000644000000000000000000000157211745017046012401 0ustar require 'yard' require './lib/mocha/version' desc 'Remove generated documentation' task 'clobber_yardoc' do `rm -rf ./doc` end desc 'Generate documentation' YARD::Rake::YardocTask.new('yardoc') do |task| task.options = ["--title", "Mocha #{Mocha::VERSION}", "--no-private"] task.files = [ 'lib/mocha/api.rb', 'lib/mocha/mock.rb', 'lib/mocha/expectation.rb', 'lib/mocha/object.rb', 'lib/mocha/parameter_matchers.rb', 'lib/mocha/parameter_matchers', 'lib/mocha/state_machine.rb', 'lib/mocha/sequence.rb', 'lib/mocha/configuration.rb', 'lib/mocha/stubbing_error.rb', 'lib/mocha/unexpected_invocation.rb', '-', 'RELEASE.rdoc', 'COPYING.rdoc', 'MIT-LICENSE.rdoc', 'examples/mocha.rb', 'examples/stubba.rb', 'examples/misc.rb', ] end desc "Generate documentation" task 'default' => ['clobber_yardoc', 'yardoc'] debian/ruby-mocha-doc.links0000644000000000000000000000026211745017046013046 0ustar usr/share/javascript/jquery/jquery.js usr/share/doc/ruby-mocha-doc/doc/js/jquery.js usr/share/doc/ruby-mocha-doc/doc/file.README.html usr/share/doc/ruby-mocha-doc/doc/index.html debian/ruby-mocha-doc.doc-base0000644000000000000000000000057411745017046013411 0ustar Document: mocha-doc Title: Documentation of the Ruby Mocha library Author: James Mead et al. Abstract: This documentation is generated with YARD from the source of the Mocha library. It contains the API documentation as well as some examples. Section: Programming/Ruby Format: HTML Index: /usr/share/doc/ruby-mocha-doc/doc/index.html Files: /usr/share/doc/ruby-mocha-doc/doc/* debian/patches/0000755000000000000000000000000012202126552010612 5ustar debian/patches/add_rubygems_requirement.patch0000644000000000000000000000233512151745613016733 0ustar Description: add requirement on rubygems Gem::Version is used to compare versions of the test_unit and mini_test gems. Defining by hand the Gem module and requiring on rubygems/requirement is enough to have the comparisons working. Author: Cédric Boutillier Forwarded: https://github.com/floehopper/mocha/issues/50#issuecomment-3719831 Last-Update: 2013-05-16 --- a/lib/mocha/integration/test_unit.rb +++ b/lib/mocha/integration/test_unit.rb @@ -1,3 +1,6 @@ +module Gem ; end +require 'rubygems/requirement' + require 'mocha/debug' require 'mocha/integration/test_unit/nothing' --- a/lib/mocha/integration/mini_test.rb +++ b/lib/mocha/integration/mini_test.rb @@ -1,3 +1,6 @@ +module Gem ; end +require 'rubygems/requirement' + require 'mocha/debug' require 'mocha/integration/mini_test/nothing' --- a/test/test_runner.rb +++ b/test/test_runner.rb @@ -1,3 +1,6 @@ +module Gem ; end +require 'rubygems/requirement' + if defined?(::Minitest::VERSION) && (Gem::Version.new(::Minitest::VERSION) >= Gem::Version.new('5.0.0')) require File.expand_path('../minitest_result', __FILE__) elsif defined?(::MiniTest::Unit::VERSION) && (Gem::Version.new(::MiniTest::Unit::VERSION) < Gem::Version.new('5.0.0')) debian/patches/deactivate_failing_tests.patch0000644000000000000000000000247612151745613016700 0ustar Description: deactivate temporarily failing tests with Minitest 5.0.1 They do not fail with 4.7.4, nor with 5.0.1 installed with gem They return /usr/lib/ruby/vendor_ruby/minitest/assertions.rb:129 instead of the respective actual position of failure. Author: Cédric Boutillier Forwarded: not-needed Last-Update: 2013-05-16 --- a/test/acceptance/stubba_test_result_test.rb +++ b/test/acceptance/stubba_test_result_test.rb @@ -54,7 +54,7 @@ assert_equal 1, test_result.failure_count end - def test_should_display_backtrace_indicating_line_number_where_failing_assertion_was_called + def est_should_display_backtrace_indicating_line_number_where_failing_assertion_was_called execution_point = nil test_result = run_as_test do execution_point = ExecutionPoint.current; flunk --- a/test/acceptance/mocha_test_result_test.rb +++ b/test/acceptance/mocha_test_result_test.rb @@ -72,7 +72,7 @@ assert_equal execution_point, ExecutionPoint.new(test_result.failures[0].location) end - def test_should_display_backtrace_indicating_line_number_where_failing_assertion_was_called + def est_should_display_backtrace_indicating_line_number_where_failing_assertion_was_called execution_point = nil test_result = run_as_test do execution_point = ExecutionPoint.current; flunk debian/patches/series0000644000000000000000000000007612151745613012042 0ustar add_rubygems_requirement.patch deactivate_failing_tests.patch debian/control0000644000000000000000000000307412247435047010605 0ustar Source: ruby-mocha Section: ruby Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Ruby Extras Maintainers Uploaders: Antonio Terceiro , Paul van Tilburg , Cédric Boutillier Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-metaclass, ruby-introspection, ruby-minitest Standards-Version: 3.9.4 Homepage: http://mocha.rubyforge.org/ Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-mocha.git;a=summary Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-mocha.git XS-Ruby-Versions: all Package: ruby-mocha Architecture: all Depends: ruby | ruby-interpreter, ruby-metaclass, ruby (>= 1:1.9), ${misc:Depends} Suggests: ruby-mocha-doc Description: Mocking and stubbing library for Ruby Mocha is a mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes. Mocking and stubbing are techniques used to improve unit testing. #Package: ruby-mocha-doc #Section: doc #Architecture: all #Depends: libjs-jquery, ${misc:Depends} #Suggests: ruby-mocha, doc-base #Description: Mocking and stubbing library for Ruby - documentation # Mocha is a mocking and stubbing library with JMock/SchMock syntax, which # allows mocking and stubbing of methods on real (non-mock) classes. Mocking and # stubbing are techniques used to improve unit testing. # . # This package contains the documentation of the Mocha library.