diff options
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 037bea44..750c549d 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -1,5 +1,5 @@ -require 'bundler/dependency' -require 'bundler/ruby_dsl' +require "bundler/dependency" +require "bundler/ruby_dsl" module Bundler class Dsl @@ -38,9 +38,9 @@ module Bundler end def gemspec(opts = nil) - path = opts && opts[:path] || '.' + path = opts && opts[:path] || "." glob = opts && opts[:glob] - name = opts && opts[:name] || '{,*}' + name = opts && opts[:name] || "{,*}" development_group = opts && opts[:development_group] || :development expanded_path = File.expand_path(path, Bundler.default_gemfile.dirname) @@ -104,7 +104,7 @@ module Bundler else raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \ "You specified that #{dep.name} (#{dep.requirement}) should come from " \ - "#{current.source || 'an unspecified source'} and #{dep.source}\n" + "#{current.source || "an unspecified source"} and #{dep.source}\n" end end end @@ -219,7 +219,7 @@ module Bundler git_source(:gist){ |repo_name| "https://gist.github.com/#{repo_name}.git" } git_source(:bitbucket) do |repo_name| - user_name, repo_name = repo_name.split '/' + user_name, repo_name = repo_name.split "/" repo_name ||= user_name "https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git" end @@ -321,7 +321,7 @@ module Bundler def validate_keys(command, opts, valid_keys) invalid_keys = opts.keys - valid_keys if invalid_keys.any? - message = "You passed #{invalid_keys.map{|k| ':'+k }.join(", ")} " + message = "You passed #{invalid_keys.map{|k| ":"+k }.join(", ")} " message << if invalid_keys.size > 1 "as options for #{command}, but they are invalid." else @@ -434,17 +434,17 @@ module Bundler trace_line = backtrace.find { |l| l.include?(dsl_path.to_s) } || trace_line return m unless trace_line - line_numer = trace_line.split(':')[1].to_i - 1 + line_numer = trace_line.split(":")[1].to_i - 1 return m unless line_numer lines = contents.lines.to_a - indent = ' # ' - indicator = indent.gsub('#', '>') + indent = " # " + indicator = indent.gsub("#", ">") first_line = (line_numer.zero?) last_line = (line_numer == (lines.count - 1)) m << "\n" - m << "#{indent}from #{trace_line.gsub(/:in.*$/, '')}\n" + m << "#{indent}from #{trace_line.gsub(/:in.*$/, "")}\n" m << "#{indent}-------------------------------------------\n" m << "#{indent}#{ lines[line_numer - 1] }" unless first_line m << "#{indicator}#{ lines[line_numer] }" @@ -460,7 +460,7 @@ module Bundler description = self.description if dsl_path && description =~ /((#{Regexp.quote File.expand_path(dsl_path)}|#{Regexp.quote dsl_path.to_s}):\d+)/ trace_line = Regexp.last_match[1] - description = description.sub(/#{Regexp.quote trace_line}:\s*/, '').sub("\n", ' - ') + description = description.sub(/#{Regexp.quote trace_line}:\s*/, "").sub("\n", " - ") end [trace_line, description] end |