aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/file
Commit message (Collapse)AuthorAgeFilesLines
* Ensure correct permission when `tmpdir` is the same as `dirname`.Markus Reiter2018-10-021-1/+1
|
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Rails documentation use american english.[ci skip]ravindra kumar kumawat2015-09-091-1/+1
|
* Removed Extra ‘the’ [ci skip]Ronak Jangir2015-09-061-1/+1
|
* File renaming should be the last operation of an atomic writeJean Boussier2015-08-201-27/+29
|
* Return value of yielded block in File.atomic_writeIan Ker-Seymer2015-01-281-1/+4
| | | | | | Staying true to Ruby convention, we now return the value of the yielded block from `File.atomic_write {...}`. This mimics the behavior of MRI's `File.open {...}`.
* atomic_write rescue also Errno::EACCESRoberto Zanon2014-10-101-1/+1
| | | atomic_write rescue also Errno::EACCES on changing file permission. It could be raised with some type of filesystem
* Warnings removed for ruby trunkArun Agrawal2013-11-011-1/+1
| | | Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
* atomicc.rb: Don't assume we may chown/chmod a file.Daniele Sluijters2012-10-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | Previously this code just assumed it is capable of changing the file ownership, both user and group. This will fail in a lot of scenario's unless: * The process is run as a superuser (root); * The owning user and group are already set to the user and group we're trying to chown to; * The user chown'ing only changes the group to another group it is a member of. If either of those conditions are not met the filesystem will simply deny the operation throwing an error. It is also not always possible to do a chmod, there might be a SELinux policy or another limitation preventing the user to change the file mode. To this end the chmod call has also been added to the rescue block. I've also added a little comment above the chmod command that doing a chmod on a file which has an ACL set will cause the ACL to be recalculated / modified.
* Replace flow-control exception with explicit test.Patrick Mahoney2012-10-271-2/+2
| | | | | | | | | | | It was noticed while profiling 'assets:precompile' in JRuby that exception creation was consuming a large portion of time, and some of that was due to File.atomic_write. Testing first with File.exists? eliminates the need for an exception which should be a perfomrance improvement on both JRuby and MRI. In this case, the stat() isn't even extra overhead, since it is always called.
* revises a brittle test in Active SupportXavier Noria2012-08-221-11/+21
| | | | | | | The revised test assumed that the default permissions of a file matched the umask of the process, but in the general case that depends also on the file system. This test was failing in the /vagrant shared folder of Rails development boxes.
* String quotes and trailing spacesAlexey Gaziev2012-04-291-4/+4
|
* AS core_ext refactoring pt.2Alexey Gaziev2012-04-291-2/+8
|
* call binmode on the tempfile for Ruby 1.8 compatibilityAaron Patterson2012-02-271-1/+2
|
* Merge pull request #5179 from RalphShnelvar/Binary_mode_Window_bugAaron Patterson2012-02-271-1/+1
| | | | Binary mode window bug
* remove File#to_path aliasVasiliy Ermolovich2011-12-251-5/+0
|
* Remove extra white spaces on ActiveSupport docs.Sebastian Martinez2011-05-231-1/+1
|
* Woops, forgot to actually add active_support/core_ext/file/path.rbCarlhuda2010-02-231-0/+5
|
* Use FileUtils.mv instead of rename to copy in case of cross-device linksJeremy Kemper2010-02-181-1/+2
|
* Fix doc typo and update fast_xs URL. Thanks to Dmitrii Golub.Jeremy Kemper2010-02-071-1/+1
|
* * Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)Jeremy Kemper2009-03-211-40/+34
| | | | | | * Convert some extension modules to simply reopening the class * Remove deprecated Float time extensions * Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
* Make atomic_write() puts the check_file in the cache dir, not in applicationBruno Duyé2009-02-191-1/+1
| | | | | root [#1962 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Lazy-require tempfile for File#atomic_writeJeremy Kemper2008-11-231-2/+2
|
* Make sure the permissions check file is closed before being unlinked.Michael Koziarski2008-09-141-1/+1
| | | | [#1035 state:committed]
* Make File.atomic_write copy the original permissions or use the directories ↵Joshua Peek2008-08-061-0/+46
default.