Skip to content

v0.1.0

Compare
Choose a tag to compare
@dry-bot dry-bot released this 04 May 09:36
v0.1.0
1f3a253

Initial release

Added

  • Introduced Dry::Files
  • Introduced Dry::Files#initialize which accepts an optional memory: true/false argument to use the in-memory adapter (@jodosha)
  • Introduced Dry::Files#read to read the file all at once (@jodosha)
  • Introduced Dry::Files#touch to touch a file and create all the intermediate directories, if needed (@jodosha)
  • Introduced Dry::Files#write to write/replace a file and create all the intermediate directories, if needed (@jodosha)
  • Introduced Dry::Files#join to join the given path tokens (@jodosha)
  • Introduced Dry::Files#expand_path to make the relative path absolute, starting from the current directory of from a custom one (@jodosha)
  • Introduced Dry::Files#pwd to return the current directory (@jodosha)
  • Introduced Dry::Files#chdir to temporary change the current directory (@jodosha)
  • Introduced Dry::Files#mkdir to create intermediate directories for the given directory name (@jodosha)
  • Introduced Dry::Files#mkdir_p to create intermediate directories for the given file name (@jodosha)
  • Introduced Dry::Files#cp to copy source file into destination and create intermediate destination directories, if needed (@jodosha)
  • Introduced Dry::Files#delete to delete a file (@jodosha)
  • Introduced Dry::Files#delete_directory to delete a directory (@jodosha)
  • Introduced Dry::Files#exist? to check if a path exists (@jodosha)
  • Introduced Dry::Files#directory? to check if a path is a directory (@jodosha)
  • Introduced Dry::Files#executable? to check if a path is an executable (@jodosha)
  • Introduced Dry::Files#unshift to add a new line at the top of the file (@jodosha)
  • Introduced Dry::Files#append to add a new line at the bottom of the file (@jodosha)
  • Introduced Dry::Files#replace_first_line to replace first line that match target (@jodosha)
  • Introduced Dry::Files#replace_last_line to replace last line that match target (@jodosha)
  • Introduced Dry::Files#inject_line_before to inject content before the first match of target (@jodosha)
  • Introduced Dry::Files#inject_line_before_last to inject content before the last match of target (@jodosha)
  • Introduced Dry::Files#inject_line_after to inject content after the first match of target (@jodosha)
  • Introduced Dry::Files#inject_line_after_last to inject content after the last match of target (@jodosha)
  • Introduced Dry::Files#inject_line_at_block_top to inject content as the first line of the matching code block (@jodosha)
  • Introduced Dry::Files#inject_line_at_block_bottom to inject content as the last line of the matching code block (@jodosha)
  • Introduced Dry::Files#remove_line to remove the first matching line (@jodosha)
  • Introduced Dry::Files#remove_block remove the first matching block (@jodosha)