Skip to content

Commit

Permalink
Also create empty exploits/ and payloads/ directories in the new …
Browse files Browse the repository at this point in the history
…repo.
  • Loading branch information
postmodern committed Apr 14, 2024
1 parent 346a454 commit b8285d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ronin/repos/cli/commands/new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions spec/cli/commands/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8285d5

Please sign in to comment.