All Versions
10
Latest Version
Avg Release Cycle
0 days
Latest Release
1792 days ago

Changelog History

  • v0.6.0 Changes

    May 31, 2019

    โž• Added

    • SugarUtils::File.append, which is explicitly for appending to a file. It will
      also create a new file if it does not yet exist
    • SugarUtils::scrub_encoding, which is used for cleaning badly encoded
      characters out of a string
    • SugarUtils::File.change_access, a wrapper for changing ownership and
      permissions of a file
    • SugarUtils::File.atomic_write, to atomically write a file

    โœ‚ Removed

    • ๐Ÿ‘ append support in SugarUtils::File.write (could have been specified by { mode: 'a })

    ๐Ÿ”„ Changed

    • :mode and :perm are now aliases for setting permissions on files in all the
      related methods (i.e., .write, .write_json, .touch, .append)
    • convert SugarUtils::File.write_json to use .atomic_write
  • v0.5.0 Changes

    May 31, 2019

    ๐Ÿ”„ Changed

    • bring back :perm as option to set the permissions in SugarUtils::File.write and SugarUtils::File.touch methods
    • ๐Ÿ—„ :mode option in SugarUtils::File.write is now to be used for setting the file mode (e.g. read/write, append, etc). It can still be used for setting the permissions if it is an integer value for backwards compatibility purposes, but this usage has been deprecated.
  • v0.4.4 Changes

    May 31, 2019

    ๐Ÿ”„ Changed

    • ๐Ÿ›  fixed a bug in SugarUtils::File.read_json which it would raise an exception
      instead of returning an empty Hash, when :raise_on_missing was disabled and
      there was an error reading the file
  • v0.4.3 Changes

    May 31, 2019

    โž• Added

    • option to scrub character encoding in SugarUtils::File.read
    • option to set mtime in SugarUtils::File.touch
  • v0.4.2 Changes

    May 31, 2019

    ๐Ÿ”„ Changed

    • 0๏ธโƒฃ default file creation permissions from 666 to 644.
  • v0.4.1 Changes

    May 31, 2019

    โž• Added

    • options :owner, :group, :mode to SugarUtils::File.write and .touch

    ๐Ÿ”„ Changed

    • ๐Ÿ—„ marked the :perm option as deprecated by :mode
  • v0.4.0 Changes

    May 31, 2019

    โž• Added

    • SugarUtils::File.touch, which will ensure the directory before touching the
      specified file
  • v0.3.0 Changes

    May 31, 2019

    โž• Added

    • SugarUtils::File.read, with locking and error handling when reading a plain
      text file
    • SugarUtils::File.write, with locking and error handling when writing a plain
      text file

    ๐Ÿ”„ Changed

    • ๐Ÿ’Ž explicitly specify the Ruby v2.0.0 support limit
    • divide SugarUtils::File.flock into .flock_shared and .flock_exclusive
  • v0.2.0 Changes

    May 31, 2019

    โž• Added

    • โฑ SugarUtils::File.flock, for file locking with a timeout
    • SugarUtils::File.read_json, with locking and error handling
    • SugarUtils::File.write_json, with locking and error handling
    • this CHANGELOG.md, following the http://keepachangelog.com/ guidelines
  • v0.1.0 Changes

    May 31, 2019

    โž• Added

    • SugarUtils.ensure_boolean
    • SugarUtils.ensure_integer