Skip to content
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
4 changes: 2 additions & 2 deletions lib/thor/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_relative "group"

require "yaml"
require "digest/md5"
require "digest/sha2"
require "pathname"

class Thor::Runner < Thor #:nodoc: # rubocop:disable ClassLength
Expand Down Expand Up @@ -91,7 +91,7 @@ def install(name) # rubocop:disable MethodLength
end

thor_yaml[as] = {
:filename => Digest::MD5.hexdigest(name + as),
:filename => Digest::SHA256.hexdigest(name + as),
:location => location,
:namespaces => Thor::Util.namespaces_in_content(contents, base)
}
Expand Down
2 changes: 1 addition & 1 deletion spec/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def when_no_thorfiles_exist
allow(FileUtils).to receive(:touch)
allow(Thor::LineEditor).to receive(:readline).and_return("Y")

path = File.join(Thor::Util.thor_root, Digest::MD5.hexdigest(@location + "random"))
path = File.join(Thor::Util.thor_root, Digest::SHA256.hexdigest(@location + "random"))
expect(File).to receive(:open).with(path, "w")
end

Expand Down