README.md in git-ssh-wrapper-0.0.1 vs README.md in git-ssh-wrapper-0.1.0

- old
+ new

@@ -4,17 +4,26 @@ can be used to connect git to protected git@github.com repositories. ## Example def get_refs - wrapper = GitSSHWrapper.new(:private_key_path => '~/.ssh/id_rsa') + wrapper = GitSSHWrapper.new(:private_key_path => '~/.ssh/id_rsa', :log_level => 'ERROR') `env #{wrapper.git_ssh} git ls-remote git@github.com:martinemde/git-ssh-wrapper.git` ensure wrapper.unlink end OR - GitSSHWrapper.new(:private_key => Pathname.new('id_rsa').read) + # :log_level default in 'INFO' + def get_refs + GitSSHWrapper.new(:private_key_path => '~/.ssh/id_rsa') do |wrapper| + `env #{wrapper.cmd_prefix} git ls-remote git@github.com:martinemde/git-ssh-wrapper.git` + end + end -The wrapper creates Temfiles when it is initialized. They will be cleaned at +OR + + wrapper = GitSSHWrapper.new(:private_key => Pathname.new('id_rsa').read) + +The wrapper creates Tempfiles when it is initialized. They will be cleaned at program exit, or you can unlink them by calling #unlink like the example above.