Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Remove fileutils #1565

Merged
merged 2 commits into from
Jun 7, 2014
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
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Enhancements:
in commented out section of `spec_helper` rather than `.rspec` so users
have to consciously opt-in to the setting. (Andrew Hooker, #1572)

Bug Fixes:

* Remove dependency on `FileUtils` from the standard library so that users do
not get false positives where their code relies on it but they are not
requiring it. (Sam Phippen, #1565)

### 3.0.1 Development
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.0.0...3-0-maintenance)

Expand Down
2 changes: 0 additions & 2 deletions lib/rspec/core/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'fileutils'

RSpec::Support.require_rspec_core "backtrace_formatter"
RSpec::Support.require_rspec_core "ruby_project"
RSpec::Support.require_rspec_core "formatters/deprecation_formatter"
Expand Down
3 changes: 2 additions & 1 deletion lib/rspec/core/formatters.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
RSpec::Support.require_rspec_support "directory_maker"
# ## Built-in Formatters
#
# * progress (default) - prints dots for passing examples, `F` for failures, `*` for pending
Expand Down Expand Up @@ -232,7 +233,7 @@ def underscore(camel_cased_word)
end

def file_at(path)
FileUtils.mkdir_p(File.dirname(path))
RSpec::Support::DirectoryMaker.mkdir_p(File.dirname(path))
File.new(path, 'w')
end
end
Expand Down
4 changes: 3 additions & 1 deletion lib/rspec/core/project_initializer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
RSpec::Support.require_rspec_support "directory_maker"

module RSpec
module Core
# @private
Expand Down Expand Up @@ -28,7 +30,7 @@ def copy_template(file)
return report_exists(file) if File.exist?(destination_file)

report_creating(file)
FileUtils.mkdir_p(File.dirname(destination_file))
RSpec::Support::DirectoryMaker.mkdir_p(File.dirname(destination_file))
File.open(destination_file, 'w') do |f|
f.write File.read(File.join(template_path, file))
end
Expand Down
10 changes: 0 additions & 10 deletions spec/support/isolated_directory.rb

This file was deleted.