+ create_directory 'Membres'
+ BASE_MEMBERS.each_pair do |number, data|
+ file = member_filename_for_id(number)
+ File.write file, render_member_file(data)
+ run_command_and_stop "git add #{file}"
+ end
+ run_command_and_stop 'git commit -m "Initial data set from fixtures"'
+ run_command_and_stop 'git push --quiet origin master'
+end
+
+Given /^le « pre-commit hook » correctement configuré$/ do
+ FileUtils.ln_s File.expand_path('../../../bin/pre-commit-hook', __FILE__),
+ "#{expand_path('.')}/.git/hooks/pre-commit"
+end
+
+Given /^le « pre-receive hook » configuré sur le dépôt principal$/ do
+ FileUtils.ln_s File.expand_path('../../../bin/pre-receive-hook', __FILE__),
+ "#{@main_repository_path}/hooks/pre-receive"
+end
+
+When /je fais un `commit` du nouveau fichier$/ do
+ run_command_and_stop "git add #{@file}"
+ run_command_and_stop "git commit #{@file} -m 'new file'", :fail_on_error => false # do not fail on error