Method: GoodData::Project#clone
- Defined in:
- lib/gooddata/models/project.rb
#clone(options = {}) ⇒ GoodData::Project
Clones project
880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
# File 'lib/gooddata/models/project.rb', line 880 def clone( = {}) a_title = [:title] || "Clone of #{title}" begin # Create the project first so we know that it is passing. # What most likely is wrong is the token and the export actaully takes majority of the time new_project = GoodData::Project.create(.merge(:title => a_title, :client => client, :driver => content[:driver])) export_token = export_clone() new_project.import_clone(export_token) rescue new_project.delete if new_project raise end end |