rewrite hook to Ruby
add missed .gitignore file