-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows support #4
base: main
Are you sure you want to change the base?
Conversation
@allisterb I think I got this in #6 if you wanna take a gander (took a mildly different approach) |
# Conflicts: # build.sh # lib/auditrb/commands/gems.rb
Thanks for the contribution! Before we can merge this, we need @allisterb to sign the Sonatype Contributor License Agreement. |
@@ -0,0 +1,2 @@ | |||
@echo off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need a chelsea.cmd
? I'd been Googling around to try and see exactly what you need for a cross platform Ruby CLI app (surprisingly hard to find).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's strictly needed but it's a convenience feature to save some keystrokes plus people may not be sure how to go about launching the CLI . Usually with DevAudit and the ther tools we'd have a .cmd and .sh launcher scripts for Windows and Linux.
@@ -0,0 +1,5 @@ | |||
#!/usr/bin/env ruby | |||
# frozen_string_literal: true | |||
require ".\\lib\\chelsea.rb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want to use require_relative
here, as once this is deployed out into the ether (RubyGems), it will struggle to find that file, at least from my experience publishing 0.0.1
, lol
Also, I wonder if in bin/chelsea
you can just do a quick check on Host OS, and switch the require based on that? I don't know for sure if you even need this tho, because I did some quick googling and from what I understand Ruby treats paths identically across platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah you're right I think require_relative should be used here and I do believe Ruby treats paths with / correctly according to the platform so a require_relative should work on Linux + Windows and elsewhere.
No description provided.