[DRE-commits] [ruby-twitter-text] 04/05: Make tests run

Balasankar C balasankarc-guest at moszumanska.debian.org
Tue Mar 8 14:50:00 UTC 2016


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

balasankarc-guest pushed a commit to branch master
in repository ruby-twitter-text.

commit 26bca86def9ab60f9b6117f87fdd95c273c91d2c
Author: Balasankar C <balasankarc at autistici.org>
Date:   Tue Mar 8 20:16:09 2016 +0530

    Make tests run
---
 debian/patches/3001-fix-path.patch | 27 ++++++++++++++++++++-------
 debian/ruby-tests.rake             |  5 +++++
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/debian/patches/3001-fix-path.patch b/debian/patches/3001-fix-path.patch
index f0a1725..c900b44 100644
--- a/debian/patches/3001-fix-path.patch
+++ b/debian/patches/3001-fix-path.patch
@@ -5,16 +5,29 @@ Description: fix relative path for file outside lib
 Author: Pirate Praveen <praveen at debian.org>
 Last-Update: 2014-11-23
 
-Index: ruby-twitter-text/lib/twitter-text/regex.rb
-===================================================================
---- ruby-twitter-text.orig/lib/twitter-text/regex.rb
-+++ ruby-twitter-text/lib/twitter-text/regex.rb
-@@ -28,7 +28,7 @@ module Twitter
+--- a/lib/twitter-text/regex.rb
++++ b/lib/twitter-text/regex.rb
+@@ -26,12 +26,23 @@
+       end
+     end
  
++    if File.exists?(File.expand_path('../../../../../share/ruby-twitter-text', __FILE__))
++    TLDS = YAML.load_file(
++      File.join(
++        File.expand_path('../../../../../share/ruby-twitter-text', __FILE__), # project root
++        'lib', 'assets', 'tld_lib.yml'
++      )
++    )
++    else
      TLDS = YAML.load_file(
        File.join(
--        File.expand_path('../../..', __FILE__), # project root
-+        File.expand_path('../../../../../share/ruby-twitter-text', __FILE__), # project root
+         File.expand_path('../../..', __FILE__), # project root
          'lib', 'assets', 'tld_lib.yml'
        )
      )
++    end
++
++
+ 
+     # Space is more than %20, U+3000 for example is the full-width space used with Kanji. Provide a short-hand
+     # to access both the list of characters and a pattern suitible for use with String#split
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
new file mode 100644
index 0000000..cf1591e
--- /dev/null
+++ b/debian/ruby-tests.rake
@@ -0,0 +1,5 @@
+require 'gem2deb/rake/spectask'
+
+Gem2Deb::Rake::RSpecTask.new do |spec|
+  spec.pattern = './spec/**/*_spec.rb'
+end

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



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