diff --git a/lib/ronin/repos/cli/commands/new.rb b/lib/ronin/repos/cli/commands/new.rb index e0a4f1e..4727f75 100644 --- a/lib/ronin/repos/cli/commands/new.rb +++ b/lib/ronin/repos/cli/commands/new.rb @@ -67,6 +67,8 @@ def run(path) @github_user = Core::Git.github_user || ENV['USER'] mkdir path + mkdir File.join(path,'exploits') + mkdir File.join(path,'payloads') erb 'README.md.erb', File.join(path,'README.md') Dir.chdir(path) do diff --git a/spec/cli/commands/new_spec.rb b/spec/cli/commands/new_spec.rb index 0c892aa..85084b1 100644 --- a/spec/cli/commands/new_spec.rb +++ b/spec/cli/commands/new_spec.rb @@ -33,6 +33,14 @@ expect(File.directory?(@path)).to be(true) end + it "must create the exploits/ directory within the repo directory" do + expect(File.directory?(File.join(@path,'exploits'))).to be(true) + end + + it "must create the payloads/ directory within the repo directory" do + expect(File.directory?(File.join(@path,'payloads'))).to be(true) + end + it "must create a git repository within the directory" do expect(File.directory?(File.join(@path,'.git'))).to be(true) end