diff options
Diffstat (limited to 'lib')
51 files changed, 4 insertions, 65 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index c1ca5280..496047f6 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -460,6 +460,5 @@ module Bundler lockfile.rmtree end end - end end diff --git a/lib/bundler/cli/binstubs.rb b/lib/bundler/cli/binstubs.rb index d5ff5b68..7c67b7d7 100644 --- a/lib/bundler/cli/binstubs.rb +++ b/lib/bundler/cli/binstubs.rb @@ -33,6 +33,5 @@ module Bundler end end end - end end diff --git a/lib/bundler/cli/cache.rb b/lib/bundler/cli/cache.rb index 751cb801..8bc876ba 100644 --- a/lib/bundler/cli/cache.rb +++ b/lib/bundler/cli/cache.rb @@ -30,6 +30,5 @@ module Bundler "on Bundler 2.0." end end - end end diff --git a/lib/bundler/cli/check.rb b/lib/bundler/cli/check.rb index e8abaf55..22fea6e4 100644 --- a/lib/bundler/cli/check.rb +++ b/lib/bundler/cli/check.rb @@ -33,6 +33,5 @@ module Bundler Bundler.ui.info "The Gemfile's dependencies are satisfied" end end - end end diff --git a/lib/bundler/cli/clean.rb b/lib/bundler/cli/clean.rb index 99508820..d70a5b9b 100644 --- a/lib/bundler/cli/clean.rb +++ b/lib/bundler/cli/clean.rb @@ -21,6 +21,5 @@ module Bundler exit 1 end end - end end diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb index 43625584..7dcdea3f 100644 --- a/lib/bundler/cli/config.rb +++ b/lib/bundler/cli/config.rb @@ -82,6 +82,5 @@ module Bundler exit 1 end end - end end diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb index bc4f377d..eee3baba 100644 --- a/lib/bundler/cli/console.rb +++ b/lib/bundler/cli/console.rb @@ -33,6 +33,5 @@ module Bundler Bundler.ui.error "Could not find constant #{const_name}" exit 1 end - end end diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb index 7803ae55..aee7960c 100644 --- a/lib/bundler/cli/exec.rb +++ b/lib/bundler/cli/exec.rb @@ -47,6 +47,5 @@ module Bundler Bundler.ui.error "bundler: exec needs a command to run" exit 128 end - end end diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index a7eceec4..4890e2f7 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -196,6 +196,5 @@ module Bundler exit 1 end end - end end diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb index fbf17424..31299bb2 100644 --- a/lib/bundler/cli/init.rb +++ b/lib/bundler/cli/init.rb @@ -28,6 +28,5 @@ module Bundler FileUtils.cp(File.expand_path('../../templates/Gemfile', __FILE__), 'Gemfile') end end - end end diff --git a/lib/bundler/cli/inject.rb b/lib/bundler/cli/inject.rb index 004e0a54..e4660b37 100644 --- a/lib/bundler/cli/inject.rb +++ b/lib/bundler/cli/inject.rb @@ -28,6 +28,5 @@ module Bundler Bundler.ui.confirm "All injected gems were already present in the Gemfile" end end - end end diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index 9ce670e0..8b9d8ebb 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -184,6 +184,5 @@ module Bundler Bundler.ui.confirm "Post-install message from #{name}:" Bundler.ui.info msg end - end end diff --git a/lib/bundler/cli/lock.rb b/lib/bundler/cli/lock.rb index 543deb59..14c42037 100644 --- a/lib/bundler/cli/lock.rb +++ b/lib/bundler/cli/lock.rb @@ -31,6 +31,5 @@ module Bundler Bundler.ui = ui end - end end diff --git a/lib/bundler/cli/open.rb b/lib/bundler/cli/open.rb index c6c61794..474eec43 100644 --- a/lib/bundler/cli/open.rb +++ b/lib/bundler/cli/open.rb @@ -18,6 +18,5 @@ module Bundler system(*command) || Bundler.ui.info("Could not run '#{command.join(' ')}'") end end - end end diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 08bcbde6..1612adf8 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -82,6 +82,5 @@ module Bundler exit 1 end end - end end diff --git a/lib/bundler/cli/platform.rb b/lib/bundler/cli/platform.rb index bc947cf8..8a385537 100644 --- a/lib/bundler/cli/platform.rb +++ b/lib/bundler/cli/platform.rb @@ -38,6 +38,5 @@ module Bundler Bundler.ui.info output.join("\n\n") end - end end diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb index 6ed38f2c..5bcc89ba 100644 --- a/lib/bundler/cli/update.rb +++ b/lib/bundler/cli/update.rb @@ -68,6 +68,5 @@ module Bundler Bundler.ui.confirm Bundler::CLI::Common.without_groups_message end end - end end diff --git a/lib/bundler/cli/viz.rb b/lib/bundler/cli/viz.rb index 09557e59..06f3deb2 100644 --- a/lib/bundler/cli/viz.rb +++ b/lib/bundler/cli/viz.rb @@ -22,6 +22,5 @@ module Bundler raise end end - end end diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb index 58674800..532f587f 100644 --- a/lib/bundler/current_ruby.rb +++ b/lib/bundler/current_ruby.rb @@ -186,6 +186,5 @@ module Bundler def x64_mingw_22? x64_mingw? && on_22? end - end end diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 997258c3..40781f41 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -26,7 +26,6 @@ module Bundler Dsl.evaluate(gemfile, lockfile, unlock) end - # # How does the new system work? # @@ -666,6 +665,5 @@ module Bundler current == proposed end end - end end diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb index ef98a351..47de2968 100644 --- a/lib/bundler/dep_proxy.rb +++ b/lib/bundler/dep_proxy.rb @@ -1,6 +1,5 @@ module Bundler class DepProxy - attr_reader :__platform, :dep def initialize(dep, platform) @@ -38,6 +37,5 @@ module Bundler def method_missing(*args) @dep.send(*args) end - end end diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index e5432fa4..31f82a51 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -465,7 +465,6 @@ module Bundler [trace_line, description] end end - end end diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb index 2c023308..f5276431 100644 --- a/lib/bundler/env.rb +++ b/lib/bundler/env.rb @@ -3,7 +3,6 @@ require 'bundler/source/git/git_proxy' module Bundler class Env - def write(io) io.write report(:print_gemfile => true) end @@ -70,6 +69,5 @@ module Bundler rescue Bundler::Source::Git::GitNotInstalledError "not installed" end - end end diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb index 4b006c9c..837c4db0 100644 --- a/lib/bundler/environment.rb +++ b/lib/bundler/environment.rb @@ -37,6 +37,5 @@ module Bundler def update(*gems) # Nothing end - end end diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb index 0b0c409d..d2f7551e 100644 --- a/lib/bundler/fetcher.rb +++ b/lib/bundler/fetcher.rb @@ -273,6 +273,5 @@ module Bundler def downloader @downloader ||= Downloader.new(connection, self.class.redirect_limit) end - end end diff --git a/lib/bundler/fetcher/base.rb b/lib/bundler/fetcher/base.rb index 31d6f8a0..729be04f 100644 --- a/lib/bundler/fetcher/base.rb +++ b/lib/bundler/fetcher/base.rb @@ -21,7 +21,6 @@ module Bundler def api_fetcher? false end - end end end diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb index ca36dcb5..e495c7fd 100644 --- a/lib/bundler/fetcher/dependency.rb +++ b/lib/bundler/fetcher/dependency.rb @@ -82,7 +82,6 @@ module Bundler "gemspec. \nPlease ask the gem author to yank the bad version to fix " \ "this issue. For more information, see http://bit.ly/syck-defaultkey." end - end end end diff --git a/lib/bundler/fetcher/downloader.rb b/lib/bundler/fetcher/downloader.rb index 55657195..8efeb144 100644 --- a/lib/bundler/fetcher/downloader.rb +++ b/lib/bundler/fetcher/downloader.rb @@ -55,7 +55,6 @@ module Bundler raise HTTPError, "Network error while fetching #{uri}" end end - end end end diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 4189a602..2d8684b7 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -89,6 +89,7 @@ module Bundler end protected + def rubygem_push(path) if Pathname.new("~/.gem/credentials").expand_path.exist? sh("gem push '#{path}'") diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index ea1edaca..acd3a7b9 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -192,6 +192,5 @@ module Bundler return false unless dep.name == spec.name dep.requirement.satisfied_by?(spec.version) end - end end diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb index 79350b5e..5bac0c8e 100644 --- a/lib/bundler/injector.rb +++ b/lib/bundler/injector.rb @@ -58,7 +58,5 @@ module Bundler f.puts new_gem_lines end end - - end end diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 9f1dfe81..fc6249dc 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -70,7 +70,6 @@ module Bundler generate_standalone(options[:standalone]) if options[:standalone] end - def install_gem_from_spec(spec, standalone = false, worker = 0, force = false) # Fetch the build settings, if there are any settings = Bundler.settings["build.#{spec.name}"] @@ -237,7 +236,6 @@ module Bundler end end - File.open File.join(bundler_path, "setup.rb"), "w" do |file| file.puts "require 'rbconfig'" file.puts "# ruby 1.8.7 doesn't define RUBY_ENGINE" @@ -285,6 +283,5 @@ module Bundler options["local"] ? @definition.resolve_with_cache! : @definition.resolve_remotely! end end - end end diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb index 6e05f73c..c0d858aa 100644 --- a/lib/bundler/installer/parallel_installer.rb +++ b/lib/bundler/installer/parallel_installer.rb @@ -1,10 +1,7 @@ require 'bundler/worker' - class ParallelInstaller - class SpecInstallation - attr_accessor :spec, :name, :post_install_message, :state def initialize(spec) @spec, @name = spec, spec.name diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 1119bdee..e8f73095 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -78,6 +78,5 @@ module Bundler @specification.send(method, *args, &blk) end - end end diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb index 241a78c6..aff5f9a9 100644 --- a/lib/bundler/lockfile_parser.rb +++ b/lib/bundler/lockfile_parser.rb @@ -190,6 +190,5 @@ module Bundler @bundler_version = Gem::Version.create(line) end end - end end diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index 49ce913e..2acf746e 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -8,7 +8,6 @@ require 'set' module Bundler class Resolver - require 'bundler/vendored_molinillo' class Molinillo::VersionConflict @@ -183,7 +182,6 @@ module Bundler SpecSet.new(result) end - def initialize(index, source_requirements, base) @index = index @source_requirements = source_requirements @@ -348,6 +346,5 @@ module Bundler end end end - end end diff --git a/lib/bundler/retry.rb b/lib/bundler/retry.rb index 585888f8..75365070 100644 --- a/lib/bundler/retry.rb +++ b/lib/bundler/retry.rb @@ -33,6 +33,7 @@ module Bundler alias :attempts :attempt private + def run(&block) @failed = false @current_run += 1 diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index bf1b3cb3..f423f4a6 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -102,7 +102,6 @@ module Gem end gemfile end - end class Dependency diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 42811022..ac5e6d62 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -646,7 +646,6 @@ module Bundler end end end - end if RubygemsIntegration.provides?(">= 2.1.0") diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index 8915bea6..1364f670 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -284,6 +284,5 @@ module Bundler ).uniq.join(File::PATH_SEPARATOR) end end - end end diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 7b2c1a70..c2f3ab6a 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -159,6 +159,7 @@ module Bundler end private + def key_for(key) if key.is_a?(String) && /https?:/ =~ key key = normalize_uri(key).to_s @@ -255,6 +256,5 @@ module Bundler end uri end - end end diff --git a/lib/bundler/similarity_detector.rb b/lib/bundler/similarity_detector.rb index 9bb1e8dd..66f1044c 100644 --- a/lib/bundler/similarity_detector.rb +++ b/lib/bundler/similarity_detector.rb @@ -24,8 +24,8 @@ module Bundler end end - protected + # http://www.informit.com/articles/article.aspx?p=683059&seqNum=36 def levenshtein_distance(this, that, ins=2, del=2, sub=1) # ins, del, sub are weighted costs @@ -58,6 +58,5 @@ module Bundler # The last value in matrix is the Levenshtein distance between the strings dm[that.length][this.length] end - end end diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index 869931a1..d715b78f 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -31,6 +31,5 @@ module Bundler def include?(other) other == self end - end end diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 59deb58a..5bc2086b 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -4,7 +4,6 @@ require 'digest/sha1' module Bundler class Source - class Git < Path autoload :GitProxy, 'bundler/source/git/git_proxy' @@ -286,8 +285,6 @@ module Bundler def git_proxy @git_proxy ||= GitProxy.new(cache_path, uri, ref, cached_revision, self) end - end - end end diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb index ca8fbfde..d406b11e 100644 --- a/lib/bundler/source/git/git_proxy.rb +++ b/lib/bundler/source/git/git_proxy.rb @@ -1,7 +1,6 @@ module Bundler class Source class Git < Path - class GitNotInstalledError < GitError def initialize msg = "You need to install git to be able to use gems from git repositories. " @@ -162,9 +161,7 @@ module Bundler return in_path { yield } if allow? raise GitError, "The git source #{uri} is not yet checked out. Please run `bundle install` before trying to start your application" end - end - end end end diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index a3f6370c..a7aa9899 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -219,7 +219,6 @@ module Bundler end end end - end end end diff --git a/lib/bundler/source/path/installer.rb b/lib/bundler/source/path/installer.rb index ef9faa9c..a4a2461e 100644 --- a/lib/bundler/source/path/installer.rb +++ b/lib/bundler/source/path/installer.rb @@ -1,7 +1,6 @@ module Bundler class Source class Path - class Installer < Bundler::GemInstaller attr_reader :spec @@ -37,7 +36,6 @@ module Bundler Bundler.rm_rf(@tmp_dir) if Bundler.requires_sudo? end end - end end end diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 92d14774..2cc61313 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -417,7 +417,6 @@ module Bundler def installed?(spec) installed_specs[spec].any? end - end end end diff --git a/lib/bundler/source/rubygems/remote.rb b/lib/bundler/source/rubygems/remote.rb index 82ce1a4f..da52128a 100644 --- a/lib/bundler/source/rubygems/remote.rb +++ b/lib/bundler/source/rubygems/remote.rb @@ -32,7 +32,6 @@ module Bundler uri end - end end end diff --git a/lib/bundler/ssl_certs/certificate_manager.rb b/lib/bundler/ssl_certs/certificate_manager.rb index 22872cc7..0148736b 100644 --- a/lib/bundler/ssl_certs/certificate_manager.rb +++ b/lib/bundler/ssl_certs/certificate_manager.rb @@ -59,7 +59,6 @@ module Bundler store end end - end end end diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb index 49615883..d5d3b195 100644 --- a/lib/bundler/worker.rb +++ b/lib/bundler/worker.rb @@ -68,6 +68,5 @@ module Bundler @threads.each {|i| i.exit } exit 1 end - end end |