diff options
Diffstat (limited to 'lib/bundler/vendor/thor/lib/thor/actions.rb')
-rw-r--r-- | lib/bundler/vendor/thor/lib/thor/actions.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bundler/vendor/thor/lib/thor/actions.rb b/lib/bundler/vendor/thor/lib/thor/actions.rb index de9b3b4c86..a7afaf1d07 100644 --- a/lib/bundler/vendor/thor/lib/thor/actions.rb +++ b/lib/bundler/vendor/thor/lib/thor/actions.rb @@ -175,7 +175,7 @@ class Bundler::Thor shell.padding += 1 if verbose @destination_stack.push File.expand_path(dir, destination_root) - # If the directory doesnt exist and we're not pretending + # If the directory doesn't exist and we're not pretending if !File.exist?(destination_root) && !pretend require "fileutils" FileUtils.mkdir_p(destination_root) @@ -223,9 +223,10 @@ class Bundler::Thor contents = if is_uri require "open-uri" - URI.open(path, "Accept" => "application/x-thor-template", &:read) + # for ruby 2.1-2.4 + URI.send(:open, path, "Accept" => "application/x-thor-template", &:read) else - open(path, &:read) + File.open(path, &:read) end instance_eval(contents, path) |