Run of fresh-releases for ruby-minitest-around

Merge these changes:

git pull https://janitor.debian.net/git/ruby-minitest-around fresh-releases/main
git pull https://janitor.debian.net/git/ruby-minitest-around fresh-releases/pristine-tar
git pull https://janitor.debian.net/git/ruby-minitest-around fresh-releases/upstream

Summary

Merged new upstream version: 0.5.0 (was: 0.4.1).

Diff

Branch: main

diff --git a/Rakefile b/Rakefile
index c240163..e44163e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,7 @@
 require 'bundler/setup'
 require 'bundler/gem_tasks'
 require 'cucumber/rake/task'
+require 'bump/tasks'
 
 desc 'Default: run unit tests.'
 task :default => [:test, :"test:isolated", :features]
diff --git a/debian/changelog b/debian/changelog
index 24555de..687ed7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-ruby-minitest-around (0.4.1-2) UNRELEASED; urgency=medium
+ruby-minitest-around (0.5.0-1) UNRELEASED; urgency=medium
 
   [ Utkarsh Gupta ]
   * Add salsa-ci.yml
@@ -13,8 +13,9 @@ ruby-minitest-around (0.4.1-2) UNRELEASED; urgency=medium
     Repository-Browse.
   * Update watch file format version to 4.
   * Bump debhelper from old 12 to 13.
+  * New upstream release.
 
- -- Utkarsh Gupta <guptautkarsh2102@gmail.com>  Tue, 13 Aug 2019 06:02:49 +0530
+ -- Utkarsh Gupta <guptautkarsh2102@gmail.com>  Mon, 14 Mar 2022 22:59:27 -0000
 
 ruby-minitest-around (0.4.1-1) unstable; urgency=medium
 
diff --git a/debian/patches/bundler b/debian/patches/bundler
index 63e108d..c1a8403 100644
--- a/debian/patches/bundler
+++ b/debian/patches/bundler
@@ -10,9 +10,11 @@ Reviewed-by: <name and email of a reviewer, optional>
 Last-Update: <YYYY-MM-DD, last update of the meta-information, optional>
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/test/helper.rb
-+++ b/test/helper.rb
-@@ -3,6 +3,5 @@
+Index: ruby-minitest-around/test/helper.rb
+===================================================================
+--- ruby-minitest-around.orig/test/helper.rb
++++ ruby-minitest-around/test/helper.rb
+@@ -3,6 +3,5 @@ if ENV['CODECLIMATE_REPO_TOKEN']
    CodeClimate::TestReporter.start
  end
  
diff --git a/lib/minitest/around/spec.rb b/lib/minitest/around/spec.rb
index 40d36bd..9ab57ba 100644
--- a/lib/minitest/around/spec.rb
+++ b/lib/minitest/around/spec.rb
@@ -31,6 +31,14 @@ Minitest::Spec::DSL.class_eval do
 
   remove_method :after
   def after(type=nil, &block)
-    include Module.new { define_method(:teardown) { instance_exec(&block); super() } }
+    include(Module.new do
+      define_method(:teardown) do
+        begin
+          instance_exec(&block)
+        ensure
+          super()
+        end
+      end
+    end)
   end
 end
diff --git a/lib/minitest/around/version.rb b/lib/minitest/around/version.rb
index 51de643..668e551 100644
--- a/lib/minitest/around/version.rb
+++ b/lib/minitest/around/version.rb
@@ -1,3 +1,3 @@
 module MinitestAround
-  VERSION = '0.4.1'
+  VERSION = '0.5.0'
 end
diff --git a/minitest-around.gemspec b/minitest-around.gemspec
index e019027..09c5677 100644
--- a/minitest-around.gemspec
+++ b/minitest-around.gemspec
@@ -14,4 +14,5 @@ Gem::Specification.new "minitest-around", MinitestAround::VERSION do |s|
   s.add_development_dependency 'rdoc'
   s.add_development_dependency 'rake'
   s.add_development_dependency 'cucumber', '~> 2.4.0'
+  s.add_development_dependency 'bump'
 end
diff --git a/test/around_spec.rb b/test/around_spec.rb
index 09ea84f..204a6fe 100644
--- a/test/around_spec.rb
+++ b/test/around_spec.rb
@@ -82,6 +82,25 @@ describe "Minitest Around" do
       output.wont_include "FiberError"
     end
   end
+
+  describe "ensure blocks in around" do
+    it "runs the ensure block even if another teardown fails" do
+      output = spawn_test <<-RUBY
+        describe "x" do
+          around do |b|
+            begin
+              b.call
+            ensure
+              puts "ENSURE"
+            end
+          end
+          after { raise }
+          it("x") {}
+        end
+      RUBY
+      output.must_include("ENSURE")
+    end
+  end
 end
 
 def spawn_test(code)

Branch: pristine-tar

diff --git a/ruby-minitest-around_0.5.0.orig.tar.gz.delta b/ruby-minitest-around_0.5.0.orig.tar.gz.delta
new file mode 100644
index 0000000..d5f1956
Binary files /dev/null and b/ruby-minitest-around_0.5.0.orig.tar.gz.delta differ
diff --git a/ruby-minitest-around_0.5.0.orig.tar.gz.id b/ruby-minitest-around_0.5.0.orig.tar.gz.id
new file mode 100644
index 0000000..37d2dfb
--- /dev/null
+++ b/ruby-minitest-around_0.5.0.orig.tar.gz.id
@@ -0,0 +1 @@
+8ed37ddbd5b3e869e59566dd1db9ac7586b80fde

Branch: upstream

Tag: upstream/0.5.0
diff --git a/Rakefile b/Rakefile
index c240163..e44163e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,7 @@
 require 'bundler/setup'
 require 'bundler/gem_tasks'
 require 'cucumber/rake/task'
+require 'bump/tasks'
 
 desc 'Default: run unit tests.'
 task :default => [:test, :"test:isolated", :features]
diff --git a/lib/minitest/around/spec.rb b/lib/minitest/around/spec.rb
index 40d36bd..9ab57ba 100644
--- a/lib/minitest/around/spec.rb
+++ b/lib/minitest/around/spec.rb
@@ -31,6 +31,14 @@ Minitest::Spec::DSL.class_eval do
 
   remove_method :after
   def after(type=nil, &block)
-    include Module.new { define_method(:teardown) { instance_exec(&block); super() } }
+    include(Module.new do
+      define_method(:teardown) do
+        begin
+          instance_exec(&block)
+        ensure
+          super()
+        end
+      end
+    end)
   end
 end
diff --git a/lib/minitest/around/version.rb b/lib/minitest/around/version.rb
index 51de643..668e551 100644
--- a/lib/minitest/around/version.rb
+++ b/lib/minitest/around/version.rb
@@ -1,3 +1,3 @@
 module MinitestAround
-  VERSION = '0.4.1'
+  VERSION = '0.5.0'
 end
diff --git a/minitest-around.gemspec b/minitest-around.gemspec
index e019027..09c5677 100644
--- a/minitest-around.gemspec
+++ b/minitest-around.gemspec
@@ -14,4 +14,5 @@ Gem::Specification.new "minitest-around", MinitestAround::VERSION do |s|
   s.add_development_dependency 'rdoc'
   s.add_development_dependency 'rake'
   s.add_development_dependency 'cucumber', '~> 2.4.0'
+  s.add_development_dependency 'bump'
 end
diff --git a/test/around_spec.rb b/test/around_spec.rb
index 09ea84f..204a6fe 100644
--- a/test/around_spec.rb
+++ b/test/around_spec.rb
@@ -82,6 +82,25 @@ describe "Minitest Around" do
       output.wont_include "FiberError"
     end
   end
+
+  describe "ensure blocks in around" do
+    it "runs the ensure block even if another teardown fails" do
+      output = spawn_test <<-RUBY
+        describe "x" do
+          around do |b|
+            begin
+              b.call
+            ensure
+              puts "ENSURE"
+            end
+          end
+          after { raise }
+          it("x") {}
+        end
+      RUBY
+      output.must_include("ENSURE")
+    end
+  end
 end
 
 def spawn_test(code)

Publish Blockers

  • ☑ run was successful
  • ☑ package has not been removed from the archive
  • ☑ command has not changed
  • ☒ not yet reviewed, but review needed
  • ☑ 0 publish attempts so far.not currently attempting to back off
  • ☒ merge proposals for the package maintainer are currently being rate-limited (open: 1253, max open: 300)
  • ☑ change set fb96ddf0-d9af-492f-9333-5c8814c7bf86 is ready

Resulting package

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases ruby-minitest-around

Lintian Result

Full worker log Full build log