[DRE-commits] [ruby-simplecov] 01/05: Break dependency cycle with simplecov-html
Christian Hofstaedtler
zeha at moszumanska.debian.org
Mon Dec 23 23:14:30 UTC 2013
This is an automated email from the git hooks/post-receive script.
zeha pushed a commit to branch master
in repository ruby-simplecov.
commit 57910e93844366af4c4920226995078066c45645
Author: Christian Hofstaedtler <zeha at debian.org>
Date: Mon Dec 23 23:59:12 2013 +0100
Break dependency cycle with simplecov-html
Closes: #723199
---
debian/control | 5 ++---
debian/patches/ignore-simplecov-html | 35 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/debian/control b/debian/control
index 5bbd19a..9848708 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
Uploaders: Praveen Arimbrathodiyil <praveen at debian.org>
Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~), ruby-shoulda (>= 2.10), rake,
- ruby-simplecov-html (>= 0.7.1), ruby-multi-json, ruby-rspec
+ ruby-multi-json, ruby-rspec
Standards-Version: 3.9.4
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-simplecov.git
Vcs-Browser: http://anonscm.debian.org/?p=pkg-ruby-extras/ruby-simplecov.git;a=summary
@@ -14,8 +14,7 @@ XS-Ruby-Versions: all
Package: ruby-simplecov
Architecture: all
XB-Ruby-Versions: ${ruby:Versions}
-Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-simplecov-html (>= 0.7.1),
- ruby-multi-json
+Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-multi-json
Description: code coverage for Ruby 1.9
Code coverage for Ruby 1.9 with a powerful configuration library and automatic
merging of coverage across test suites.
diff --git a/debian/patches/ignore-simplecov-html b/debian/patches/ignore-simplecov-html
new file mode 100644
index 0000000..0a08db1
--- /dev/null
+++ b/debian/patches/ignore-simplecov-html
@@ -0,0 +1,35 @@
+Description: Ignore simplecov-html load failured
+ Break dependency cycle
+Author: Christian Hofstaedtler <zeha at debian.org>
+Last-updated: 2013-12-23
+
+
+Index: ruby-simplecov/lib/simplecov/defaults.rb
+===================================================================
+--- ruby-simplecov.orig/lib/simplecov/defaults.rb 2013-12-23 23:58:40.661796884 +0100
++++ ruby-simplecov/lib/simplecov/defaults.rb 2013-12-23 23:58:40.653796910 +0100
+@@ -1,5 +1,9 @@
+ # Load default formatter gem
+-require 'simplecov-html'
++begin
++ require 'simplecov-html'
++rescue LoadError
++ puts "Loading simplecov-html failed, install ruby-simplecov-html"
++end
+
+ SimpleCov.adapters.define 'root_filter' do
+ # Exclude all files outside of simplecov root
+@@ -32,7 +36,12 @@ end
+
+ # Default configuration
+ SimpleCov.configure do
+- formatter SimpleCov::Formatter::HTMLFormatter
++ begin
++ formatter SimpleCov::Formatter::HTMLFormatter
++ rescue NameError
++ # simplecov-html not installed, fall back to SimpleFormatter
++ formatter SimpleCov::Formatter::SimpleFormatter
++ end
+ # Exclude files outside of SimpleCov.root
+ load_adapter 'root_filter'
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 005fb51..94a931a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
remove-rubygems-bundler.patch
+ignore-simplecov-html
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-simplecov.git
More information about the Pkg-ruby-extras-commits
mailing list