-
-
Notifications
You must be signed in to change notification settings - Fork 638
Fix Windows compatibility #666
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
Fix Windows compatibility #666
Conversation
1 similar comment
|
Thanks for this! We need a CHANGELOG.md entry per the instructions in https://github.com/shakacode/react_on_rails/blob/master/CONTRIBUTING.md and need travis to be passing. Reviewed 1 of 1 files at r1. lib/generators/react_on_rails/install_generator.rb, line 68 at r1 (raw file):
Let's dry up this check in for a windows ruby platform by creating a utility method in https://github.com/shakacode/react_on_rails/blob/master/lib/react_on_rails/utils.rb Let's add a unit test for this utility method that will compare the result against a different way of figuring out the value, as suggested by the answers here. http://stackoverflow.com/a/171011/1009332 Comments from Reviewable |
da203cc to
13cff3f
Compare
|
@GeorgeGorbanev Why did you close this PR? |
|
@justin808 My bad, it was not expected. Will fix it soon. |
|
@justin808 Added few lines in changelog and separated checking method to utils module. But have some troubles with tests. Practically I never did it before and don't know how to do it. I tried to do it using this tips and on command:
get error Log file is attached. npm-debug.txt Can you help me? |
|
@GeorgeGorbanev You'll have to yak shave that one. Possibly there's issues with Windows? Maybe downgrade the version of node to the latest 6.x version? |
|
Please rebase on top of master and try again. |
|
Remove the last commit and please try the rebase again. You should ONLY see the changes that you've made. @GeorgeGorbanev |
20b015f to
779fa51
Compare
|
@GeorgeGorbanev Any progress? |
|
@justin808 Yes, some kind of progress. I configured system to run tests and ready to write rspec. Also, did I rebased branch right way this time? |
|
almost there. Yes, tests and pass CI. did you lint? Reviewed 2 of 3 files at r2, 1 of 1 files at r3. Comments from Reviewable |
|
@justin808 Guess no, don't know how to do it. |
|
@justin808 Thank you. It will be done. |
27b4894 to
b368777
Compare
1 similar comment
c19a744 to
2085aa2
Compare
|
@justin808 How it looks now? |
|
I've never seen the def `(where) syntax I don't see why you will call the wrong command on the wrong OS. That's the point of your fix. And yes, no need to detect Mac. |
|
@justin808 This syntax described by Hal Fulton for example. Hope it is not bad style.
Actually it turns wrong command to correct, so we can test method behavior as it would be correct OS. Now it defined in wrong place and "node_missing?" can't use it, but I'll fix it, when find how. Better do another way? |
|
@justin808 Besides a RUBY_PLATFORM constant method I found method using shell command "uname -s" and method using rbconfig. But all of them require the same regexp-matching. Did you mean one of them? |
2 similar comments
3 similar comments
67a7f02 to
e7d068c
Compare
e7d068c to
13cff3f
Compare
… unit-tests for it.
e17671e to
463ddb6
Compare
3 similar comments
|
@justin808 Fixed all. It works and tests without weird syntax. Also changelog and commits history was cleared. Can I do something else to make it better? |
|
Big improvement! Reviewed 4 of 4 files at r6. Comments from Reviewable |
system call for Windows and unit-tests for it. (#666)
'install_generator.rb' uses *nix instruction 'which' to find Node and npm path.
Now it use 'where' if detect running on Windows and 'which' in other case.
This change is