Hi, It might please you that Gitorious will soon-ish have an HTTP Api for this.
Until then, here are some clues to find your way around the console: * Use save! (with the exclamation mark) to get an exception that tells you what went wrong * You can see if a project is valid by doing p.valid?. If it's not valid, see what p.errors.inspect gives you Chrisitian chevdor writes: > Hello, > > I am trying to find a solution to create new Projects and Respositories by > script. > > So, from the console, I have tried: > >> u = User.find(3) >> p=Project.create(:title => 'junk', :slug => 'junk', :description => >> 'junk', :owner => u) > > > This returns: > >> => #<Project id: nil, title: "junk", description: "junk", user_id: nil, >> created_at: nil, updated_at: nil, slug: "junk", license: nil, home_url: >> nil, mailinglist_url: nil, bugtracker_url: nil, owner_id: 3, owner_type: >> "User", wiki_enabled: true, site_id: nil, merge_requests_need_signoff: >> false, oauth_signoff_key: nil, oauth_signoff_secret: nil, >> oauth_signoff_site: nil, oauth_path_prefix: nil, >> merge_request_custom_states: nil, suspended_at: nil> > > > and p.save returns false. > How is the 'id' generated? > > Is the method above the right one to create a new project? > > -- -- -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
