Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn on .bundle/config file presence #471

Merged
merged 1 commit into from
Mar 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/language_pack/helpers/bundler_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def exists?

# writes cache contents to cache store
def store
@cache.store(".bundle")
@cache.store(@bundler_dir, @stack_dir)
end

Expand Down
14 changes: 10 additions & 4 deletions lib/language_pack/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,16 @@ def build_bundler
bundle_command = "#{bundle_bin} install --without #{bundle_without} --path vendor/bundle --binstubs #{bundler_binstubs_path}"
bundle_command << " -j4"

if File.exist?("#{Dir.pwd}/.bundle/config")
warn(<<-WARNING, inline: true)
You have the `.bundle/config` file checked into your repository
It contains local state like the location of the installed bundle
as well as configured git local gems, and other settings that should
not be shared between multiple checkouts of a single repo. Please
remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
WARNING
end

if bundler.windows_gemfile_lock?
warn(<<-WARNING, inline: true)
Removing `Gemfile.lock` because it was generated on Windows.
Expand All @@ -558,7 +568,6 @@ def build_bundler
else
# using --deployment is preferred if we can
bundle_command += " --deployment"
cache.load ".bundle"
end

topic("Installing dependencies using bundler #{bundler.version}")
Expand Down Expand Up @@ -837,7 +846,6 @@ def load_bundler_cache
old_stack = @metadata.read(stack_cache).chomp if @metadata.exists?(stack_cache)
old_stack ||= DEFAULT_LEGACY_STACK


if old_bundler_version && old_bundler_version != BUNDLER_VERSION
puts(<<-WARNING)
Your app was upgraded to bundler #{ BUNDLER_VERSION }.
Expand All @@ -849,8 +857,6 @@ def load_bundler_cache
WARNING
end



stack_change = old_stack != @stack
convert_stack = @bundler_cache.old?
@bundler_cache.convert_stack(stack_change) if convert_stack
Expand Down