[DRE-commits] [ruby-mime-types] 05/06: Install data files to /usr/share/ruby-mime-types/

Antonio Terceiro terceiro at moszumanska.debian.org
Sat Jun 13 15:33:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-mime-types.

commit 51e4c04e33e7275ec748579f59f636748ec920d4
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Jun 13 12:09:12 2015 -0300

    Install data files to /usr/share/ruby-mime-types/
---
 debian/changelog                                      |  4 ++++
 debian/control                                        |  2 +-
 ...ad-data-files-from-usr-share-ruby-mime-types.patch | 19 +++++++++++++++++++
 debian/patches/series                                 |  1 +
 debian/tests/control                                  |  4 ++++
 debian/tests/smoke-test                               | 14 ++++++++++++++
 6 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index d75e2ef..643d61e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,10 @@ ruby-mime-types (2.6.1-1) UNRELEASED; urgency=medium
   * New upstream release
   * Update packaging with a new dh-make-ruby run
     - not running the tests for now
+  * Install data files to /usr/share/ruby-mime-types/
+    - add 0001-Read-data-files-from-usr-share-ruby-mime-types.patch to make
+      the code look for them there
+    - add a DEP-8 smoke test for that
 
  -- Antonio Terceiro <terceiro at debian.org>  Sat, 13 Jun 2015 11:39:49 -0300
 
diff --git a/debian/control b/debian/control
index 39122ca..fe4bee7 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Standards-Version: 3.9.6
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-mime-types.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-mime-types.git
 Homepage: https://github.com/mime-types/ruby-mime-types/
-Testsuite: autopkgtest-pkg-ruby
+Testsuite: autopkgtest
 XS-Ruby-Versions: all
 
 Package: ruby-mime-types
diff --git a/debian/patches/0001-Read-data-files-from-usr-share-ruby-mime-types.patch b/debian/patches/0001-Read-data-files-from-usr-share-ruby-mime-types.patch
new file mode 100644
index 0000000..31456e9
--- /dev/null
+++ b/debian/patches/0001-Read-data-files-from-usr-share-ruby-mime-types.patch
@@ -0,0 +1,19 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Sat, 13 Jun 2015 12:02:35 -0300
+Subject: Read data files from /usr/share/ruby-mime-types
+
+---
+ lib/mime/types/loader_path.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/mime/types/loader_path.rb b/lib/mime/types/loader_path.rb
+index 5f4dd88..742fcda 100644
+--- a/lib/mime/types/loader_path.rb
++++ b/lib/mime/types/loader_path.rb
+@@ -11,5 +11,5 @@ class MIME::Types::Loader
+   # System repackagers note: this is the constant that you would change if
+   # you repackage mime-types for your system. It is recommended that the
+   # path be something like /usr/share/ruby/mime-types/.
+-  PATH = File.expand_path('../../../../data', __FILE__)
++  PATH = '/usr/share/ruby-mime-types'
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e198849
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Read-data-files-from-usr-share-ruby-mime-types.patch
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..e7ba919
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,4 @@
+Tests: smoke-test
+
+Test-Command: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
+Depends: @, @builddeps@, gem2deb-test-runner
diff --git a/debian/tests/smoke-test b/debian/tests/smoke-test
new file mode 100755
index 0000000..d491990
--- /dev/null
+++ b/debian/tests/smoke-test
@@ -0,0 +1,14 @@
+#!/usr/bin/ruby
+
+require 'test/unit'
+require 'mime/types'
+
+class SmokeTest < Test::Unit::TestCase
+
+  def test_text_plain
+    type = MIME::Types['text/plain'].first
+    assert_equal 'text', type.media_type
+    assert_equal 'plain', type.sub_type
+  end
+
+end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mime-types.git



More information about the Pkg-ruby-extras-commits mailing list