[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ruby-mysql2 package is prepared



Hi Mickael,

On Sun, Nov 11, 2012 at 10:48:07PM +0100, Michael Franzl wrote:
> On 11/11/2012 05:06 PM, Cédric Boutillier wrote:
> >Maybe you can have a look at ruby-dataobjects-mysql. A script is called
> >to run the mysql server before running the tests. It was adapted from
> >the libdbi-drivers source package. Maybe you'll find it inspiring.

> Thank you. That was exactly what I needed. I pushed my working changes to

> https://github.com/michaelfranzl/ruby-mysql2

> and just uploaded the package to mentors.debian.net, target "unstable".

> Let me know if you need anything else.

Thanks for your work, and sorry for the delay. Here are a few comments:

Currently, tests for packages using ruby-spec will not run using the
debian/ruby-test-files.yaml method. Please use the ruby-tests.rake
method, and don't forget to add rake as a build-dependency (see diff
attached).

You could patch the examples so that they do not use rubygems, and don't
modify the LOAD_PATH (the library will be installed in a place where
ruby can find it, and the relative path ../lib is not valid anymore
from /usr/share/doc/ruby-mysql2/examples).

The package ruby-eventmachine is a dependency of ruby-mysql2, so you
need to add it also to the Depends: field (not only Build-Depends).

Other than that, the package looks fine. I will upload it once you have
addressed the points above.

Cheers,

Cédric
From 968236ff1945b80c6b813424b8c6256eb0e40fcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= <boutil@debian.org>
Date: Fri, 7 Dec 2012 22:26:42 +0100
Subject: [PATCH] run specs with rake

---
 debian/control              |    2 +-
 debian/ruby-test-files.yaml |    6 ------
 debian/ruby-tests.rake      |    7 +++++++
 3 files changed, 8 insertions(+), 7 deletions(-)
 delete mode 100644 debian/ruby-test-files.yaml
 create mode 100644 debian/ruby-tests.rake

diff --git a/debian/control b/debian/control
index 01939d5..9302f2d 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
 Uploaders: Michael Franzl <office@michaelfranzl.com>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.13~), libmysqld-dev, ruby-eventmachine, mysql-server, ruby-rspec
+Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.13~), libmysqld-dev, ruby-eventmachine, mysql-server, ruby-rspec, rake
 Standards-Version: 3.9.3
 #Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-mysql2.git
 #Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-mysql2.git;a=summary
diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml
deleted file mode 100644
index 53398eb..0000000
--- a/debian/ruby-test-files.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- spec/spec_helper.rb
-- spec/mysql2/client_spec.rb
-- spec/mysql2/error_spec.rb
-- spec/mysql2/result_spec.rb
-- spec/em/em_spec.rb
\ No newline at end of file
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
new file mode 100644
index 0000000..89a753d
--- /dev/null
+++ b/debian/ruby-tests.rake
@@ -0,0 +1,7 @@
+require 'rspec/core/rake_task'
+
+RSpec::Core::RakeTask.new(:spec) do |spec|
+  spec.pattern      = './spec/**/*_spec.rb'
+end
+
+task :default => :spec
-- 
1.7.10.4

Attachment: signature.asc
Description: Digital signature


Reply to: