lib/chef/knife/cookbook_github_install.rb in knife-github-cookbooks-0.1.4 vs lib/chef/knife/cookbook_github_install.rb in knife-github-cookbooks-0.1.5

- old
+ new

@@ -17,10 +17,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # require 'chef/knife' +require 'tempfile' class Chef class Knife class CookbookGithubInstall < Knife @@ -30,11 +31,11 @@ require 'chef/knife/core/cookbook_scm_repo' require File.join(File.dirname(__FILE__), 'core', 'coobook_scm_repo_extensions') end banner "knife cookbook github install USER/REPO [USER/REPO/BRANCH] (options)" - category "cookbook site" + category "cookbook" option :ssh, :short => "-S", :long => "--ssh", :boolean => true, @@ -110,10 +111,10 @@ def temp_clone_path "_tmp_chef_#{@cookbook_name}" end def tmpdir - ENV['TMPDIR'] + Dir.tmpdir end def clone_cookbook shell_out!("rm -rf #{temp_clone_path}", :cwd => tmpdir) if File.exists?(File.join(tmpdir, temp_clone_path)) shell_out!("git clone #{github_uri} #{temp_clone_path}", :cwd => tmpdir)