Skip to content
This repository
Browse code

maven does not need leading slash, bundle mirror does not a leading s…

…lash on the url string
  • Loading branch information...
commit d93893823e870615255a06024a990d2bbebee406 1 parent 0fbb3a1
Christian Meier authored January 25, 2013

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  lib/jbundler/config.rb
6  lib/jbundler/config.rb
@@ -82,10 +82,16 @@ def proxy
82 82
 
83 83
     def mirror
84 84
       @mirror ||= jbundler_env('JBUNDLE_MIRROR')
  85
+      # nce to have no leading slash
  86
+      @mirror.sub!( /\/$/, '' ) if @mirror
  87
+      @mirror
85 88
     end
86 89
 
87 90
     def rubygems_mirror
88 91
       @rubygems_mirror ||= jbundler_env('BUNDLE_RUBYGEMS_MIRROR')
  92
+      # here a leading slash is needed !!
  93
+      @rubygems_mirror.sub!( /([^\/])$/ , "\\1/" ) if @rubygems_mirror
  94
+      @rubygems_mirror
89 95
     end
90 96
   end
91 97
 end

0 notes on commit d938938

Please sign in to comment.
Something went wrong with that request. Please try again.