[DRE-commits] [gem2deb] 01/01: handle rails-assets gems

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Fri Sep 4 06:03:26 UTC 2015


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

praveen pushed a commit to branch master
in repository gem2deb.

commit 927ebd02b7cd3190a850648ebad21998f3a3895f
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Fri Sep 4 11:32:35 2015 +0530

    handle rails-assets gems
---
 bin/gem2deb | 6 +++++-
 bin/gem2tgz | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/bin/gem2deb b/bin/gem2deb
index 70c0905..99cd54a 100755
--- a/bin/gem2deb
+++ b/bin/gem2deb
@@ -86,7 +86,11 @@ if not File::exists?(gemfile) and gemfile !~ /.gem$/
   tmpdir = Dir.mktmpdir
   begin
     Dir.chdir(tmpdir) do
-      run("gem", "fetch", gemfile)
+      if gemfile =~ /^rails-assets/
+        run("gem", "fetch", "--source", "https://rails-assets.org", gemfile)
+      else
+        run("gem", "fetch", gemfile)
+      end
       gemfile = Dir.glob('*.gem').first
       unless gemfile
         # no .gem means that `gem fetch` failed (but still exited with 0)
diff --git a/bin/gem2tgz b/bin/gem2tgz
index 244b0c2..928bf10 100755
--- a/bin/gem2tgz
+++ b/bin/gem2tgz
@@ -46,7 +46,11 @@ gemfile = ARGV[0]
 # Download gem if not available locally
 if not File::exists?(gemfile) and gemfile !~ /.gem$/
   puts "#{gemfile} doesn't seem to exist. Let's try to download it with 'gem fetch #{ARGV[0]}'"
-  run("gem", "fetch", gemfile)
+      if gemfile =~ /^rails-assets/
+        run("gem", "fetch", "--source", "https://rails-assets.org", gemfile)
+      else
+        run("gem", "fetch", gemfile)
+      end
   versions = Dir::glob("#{gemfile}-*.gem").map do |a|
     Gem::Version.new(a.sub(/#{gemfile}-(.+)\.gem/, '\1'))
   end

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



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