No commit activity in last 3 years
No release in over 3 years
Tar files changed by a block.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.15
~> 5.0
~> 10.0

Runtime

>= 0.10.0
 Project Readme

FileChangeObserver

This gem only supports macOS.

require 'tmpdir'

tgz_path = Dir.mktmpdir do |dir|
  FileChangeObserver.tar_changes(dir) do
    File.write("#{dir}/foo", 'neato')
    FileUtils.mkdir("#{dir}/bar")
    File.write("#{dir}/bar/baz", 'it works')
  end
end

# -rw-r--r--  0 wheel  wheel       5  2 Oct 15:01 foo
# -rw-r--r--  0 wheel  wheel       8  2 Oct 15:01 bar/baz
system("tar tvf #{tgz_path}")
File.unlink(tgz_path)

Installation

Add this line to your application's Gemfile:

gem 'file_change_observer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install file_change_observer