# File bin/js-get, line 144 def install # Install Javascript js_name = @arguments[1] puts "Installing Javascript - #{js_name}" jlib = Crack::JSON.parse(RestClient.get("#{HOST}/scripts/#{js_name}")) FileUtils.mkpath(JSDIR) File.open([JSDIR, "#{js_name}.js"].join('/'), 'w') do |f| f.write(RestClient.get(jlib["src_url"])) end puts "Successfully Installed - #{js_name}" rescue puts "Could not locate javascript library on #{HOST}" end