Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takuya/thinwire
Minal set of TripeWrire . ThinWire check file Hash and report if changed.
https://github.com/takuya/thinwire
Last synced: 21 days ago
JSON representation
Minal set of TripeWrire . ThinWire check file Hash and report if changed.
- Host: GitHub
- URL: https://github.com/takuya/thinwire
- Owner: takuya
- Created: 2013-12-15T03:46:59.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-15T03:55:12.000Z (almost 11 years ago)
- Last Synced: 2024-10-13T18:53:46.471Z (about 1 month ago)
- Size: 105 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ThinWire
========Minal set of TripeWrire . ThinWire check file Hash and report if changed.
Usage: Simple Check
=============require 'thinwire.rb'
tw = ThinWire.new
tw.start()Usage: Select Checking file
==============To chagen file watching, set path in constructor.
require 'thinwire.rb'
tw = ThinWire.new("/var/www/example.com")
tw.start()Ussage: Reports by MAIL
============To Chage report destination.
Add callback to class to report mailtw.report = Proc.new{|msg|
require 'mail'
options = { :address => "smtp.gmail.com",
:port => 587,
:user_name => '[email protected]'
:password => '***',
:authentication => 'plain',
:enable_starttls_auto => true }
Mail.defaults do
delivery_method :smtp, options
end
mail = Mail.new do
from '[email protected]'
to '[email protected]'
subject "ThinWire reports"
body msg
end
mail.deliver!
puts :end
}
tw.start()