-
-
Notifications
You must be signed in to change notification settings - Fork 631
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 symlink regression #541
Conversation
47fc608
to
642ba75
Compare
Possibly related: #537 (comment) |
Reviewed 3 of 3 files at r1, 3 of 3 files at r2. lib/react_on_rails/assets_precompile.rb, line 40 [r2] (raw file):
I think we should not use any OS calls in gem at all. Why not to change to Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. lib/react_on_rails/assets_precompile.rb, line 40 [r2] (raw file):
|
When we changed this method in #513 we introduced a regression due to the difference between calling the shell's `ln -s` command and using Ruby's `File.symlink` command. Specifically, the former would not error if the symlink already existed, while the latter did throw an error. Because it is sometimes the case that the symlink will already exist, throwing in this case is not desirable. This should have not been a problem, however, as this scenario was supposed to have been properly handled, but that code was not correct. This commit fixes that code.
a17f7fd
to
7ecdc36
Compare
Review status: 2 of 3 files reviewed at latest revision, 1 unresolved discussion. lib/react_on_rails/assets_precompile.rb, line 40 [r2] (raw file):
|
Overall good. Couple questions. Plus, can we get a couple unit tests that show the changes? Reviewed 2 of 3 files at r1, 1 of 4 files at r3. lib/react_on_rails/assets_precompile.rb, line 31 [r3] (raw file):
Can this be a method and end with lib/react_on_rails/assets_precompile.rb, line 85 [r3] (raw file):
Why do we need to check this here? lib/react_on_rails/assets_precompile.rb, line 123 [r3] (raw file):
unit test? Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. lib/react_on_rails/assets_precompile.rb, line 31 [r3] (raw file):
|
@robwise or @dzirtusss Please confirm my last commit. I changed the things I commented on. |
@@ -62,6 +62,48 @@ module ReactOnRails | |||
end.to raise_exception(AssetsPrecompile::SymlinkTargetDoesNotExistException) | |||
end | |||
end | |||
|
|||
it "creates a proper symlink when a file exists at destination" do |
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.
you should specify which destination you are talking about
Review status: 1 of 3 files reviewed at latest revision, 12 unresolved discussions. spec/react_on_rails/assets_precompile_spec.rb, line 66 [r4] (raw file):
|
This change is