diff options
author | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2019-05-01 17:16:53 +0900 |
---|---|---|
committer | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2019-05-01 17:18:19 +0900 |
commit | 7b17bf47bfaee83c108a802a26b7525952df2003 (patch) | |
tree | 0273af66961cc4c59bb7783acc42ece3f35ba09a | |
parent | f75efc27501ca4390abbae3d8846d0e54dab048b (diff) | |
download | bundler-7b17bf47bfaee83c108a802a26b7525952df2003.tar.gz |
Rename local variables for readability
-rw-r--r-- | lib/bundler/definition.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 81b362fed6..76950ff96a 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -782,7 +782,7 @@ module Bundler # Path sources have special logic if s.source.instance_of?(Source::Path) || s.source.instance_of?(Source::Gemspec) - other_sources_specs = begin + new_specs = begin s.source.specs rescue PathError, GitError # if we won't need the source (according to the lockfile), @@ -794,18 +794,18 @@ module Bundler raise end - other = other_sources_specs[s].first + new_spec = new_specs[s].first # If the spec is no longer in the path source, unlock it. This # commonly happens if the version changed in the gemspec - next unless other + next unless new_spec - deps2 = other.dependencies.select {|d| d.type != :development } - runtime_dependencies = s.dependencies.select {|d| d.type != :development } + new_runtime_deps = new_spec.dependencies.select {|d| d.type != :development } + old_runtime_deps = s.dependencies.select {|d| d.type != :development } # If the dependencies of the path source have changed and locked spec can't satisfy new dependencies, unlock it - next unless deps2.sort == runtime_dependencies.sort || deps2.all? {|d| satisfies_locked_spec?(d) } + next unless new_runtime_deps.sort == old_runtime_deps.sort || new_runtime_deps.all? {|d| satisfies_locked_spec?(d) } - s.dependencies.replace(other.dependencies) + s.dependencies.replace(new_spec.dependencies) end converged << s |