-
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?
Changes from all commits
de0bfb1
3780b1d
bb3d2ee
fc992e1
4a6a360
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
require ".\\lib\\chelsea.rb" | ||
|
||
Chelsea::CLI.new.main |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
echo Installing Ruby dependencies... | ||
bundle install --deployment %* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
echo Installing Ruby dependencies... | ||
bundle install "$@" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need a There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
ruby .\bin\chelseawin.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 publishing0.0.1
, lolAlso, 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.