Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Offer an install strategy that does not preserve modes (#222)
* Offer an install strategy that does not preserve modes When compiling assets as different users (on a typical Linux file system), the `preserve` flag used in the Copy strategy can throw permission errors as it tries to preserve file mode/timestamp information. This `copy_no_preserve` strategy offers an alternative. It may be better to simply remove the flag, but this approach offers a choice. * Add specs for copy_no_preserve install strategy * Add copy_no_preserve info to README * Whitespace cleanup
- Loading branch information
Showing
5 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require "tinymce/rails/asset_installer/copy" | ||
|
||
module TinyMCE | ||
module Rails | ||
class AssetInstaller | ||
class CopyNoPreserve < Copy | ||
def copy_assets | ||
logger.info "Copying assets (without preserving modes) to #{File.join(target, "tinymce")}" | ||
FileUtils.cp_r(assets, target) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters