aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/source/git.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r--lib/bundler/source/git.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 5bc2086b..992a908c 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -1,11 +1,11 @@
-require 'fileutils'
-require 'uri'
-require 'digest/sha1'
+require "fileutils"
+require "uri"
+require "digest/sha1"
module Bundler
class Source
class Git < Path
- autoload :GitProxy, 'bundler/source/git/git_proxy'
+ autoload :GitProxy, "bundler/source/git/git_proxy"
attr_reader :uri, :ref, :branch, :options, :submodules
@@ -19,9 +19,9 @@ module Bundler
# Stringify options that could be set as symbols
%w(ref branch tag revision).each{|k| options[k] = options[k].to_s if options[k] }
- @uri = options["uri"] || ''
+ @uri = options["uri"] || ""
@branch = options["branch"]
- @ref = options["ref"] || options["branch"] || options["tag"] || 'master'
+ @ref = options["ref"] || options["branch"] || options["tag"] || "master"
@submodules = options["submodules"]
@name = options["name"]
@version = options["version"]
@@ -73,7 +73,7 @@ module Bundler
end
def name
- File.basename(@uri, '.git')
+ File.basename(@uri, ".git")
end
# This is the path which is going to contain a specific
@@ -228,7 +228,7 @@ module Bundler
# The gemspecs we cache should already be evaluated.
spec = Bundler.load_gemspec(spec_path)
next unless spec
- File.open(spec_path, 'wb') {|file| file.write(spec.to_ruby) }
+ File.open(spec_path, "wb") {|file| file.write(spec.to_ruby) }
end
end
@@ -251,7 +251,7 @@ module Bundler
end
def base_name
- File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)?(//\w*/)?(\w*/)*},''),".git")
+ File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)?(//\w*/)?(\w*/)*},""),".git")
end
def shortref_for_display(ref)
@@ -266,7 +266,7 @@ module Bundler
if uri =~ %r{^\w+://(\w+@)?}
# Downcase the domain component of the URI
# and strip off a trailing slash, if one is present
- input = URI.parse(uri).normalize.to_s.sub(%r{/$},'')
+ input = URI.parse(uri).normalize.to_s.sub(%r{/$},"")
else
# If there is no URI scheme, assume it is an ssh/git URI
input = uri