diff options
author | Agrim Mittal <agrimmittal97@gmail.com> | 2018-06-26 11:32:09 +0530 |
---|---|---|
committer | Agrim Mittal <agrimmittal97@gmail.com> | 2018-06-28 15:35:17 +0530 |
commit | df258d9f5098d4ed103adcff2eb01afacfa2abe7 (patch) | |
tree | 2ba6c5db43c48b09e2a671c82c755f8458ccee69 /lib/bundler/shared_helpers.rb | |
parent | e0c0c4b696c64b42729173922703ab7e75163a8a (diff) | |
download | bundler-df258d9f5098d4ed103adcff2eb01afacfa2abe7.tar.gz |
Move write_to_gemfile to SharedHelpers
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r-- | lib/bundler/shared_helpers.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 326ffa466b..93e2a35b54 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -226,6 +226,10 @@ module Bundler Digest(name) end + def write_to_gemfile(gemfile_path, contents) + filesystem_access(gemfile_path) {|g| File.open(g, "w") {|file| file.puts contents } } + end + private def validate_bundle_path |