Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make pname => project_name

  • Loading branch information...
commit 283f4b87c0255cae83d08df49b296674f9300295 1 parent d26b030
@markrickert markrickert authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 examples/project_create_script.rb
View
7 examples/project_create_script.rb
@@ -45,7 +45,7 @@
puts "\nClient found: #{client.name}\n"
puts "Please enter the project name:"
-pname = gets.chomp
+project_name = gets.chomp
puts "\nIs this project billable? (y/n)"
billable = gets.chomp.downcase == "y"
@@ -68,8 +68,8 @@
tasks = harvest.tasks.all.select { |t| use_tasks.include?(t.name) }
# Create the project
-puts "Creating new project: \"#{pname}\" for client: #{client.name}\n"
-project = Harvest::Project.new(:name => pname, :client_id => client.id, :billable => billable, :notes => notes)
+puts "Creating new project: \"#{project_name}\" for client: #{client.name}\n"
+project = Harvest::Project.new(:name => project_name, :client_id => client.id, :billable => billable, :notes => notes)
project = harvest.projects.create(project)
# Add all the project tasks to the project
@@ -91,4 +91,3 @@
puts "\nProject successfully created."
puts "You can find the project here: http://#{subdomain}.harvestapp.com/projects/#{project.id}/edit\n\n"
-

0 comments on commit 283f4b8

Please sign in to comment.
Something went wrong with that request. Please try again.