[gitorious] Create Project and Repository by script

2013-01-23 Thread chevdor
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:

> => # 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 gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com





Re: [gitorious] Create Project and Repository by script

2013-01-23 Thread Christian Johansen
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:
>
>> => #> 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 gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com





[gitorious] (script/poller)`gem_original_require': no such file to load -- daemons (LoadError)

2013-01-23 Thread samuk Henrique
The error above occurs when i try to run the poller start script (even with 
-f option), but I already executed the command `gem install daemons`.
Also when i run `bundle install` it returns:

Errno::EPERM: Operation not permitted - 
/var/www/gitorious/vendor/cache/rots-babb5559aae8/bin/rots
An error occurred while installing rots (0.2.1), and Bundler cannot 
continue.


But it was executed before already with sucess. idk what to do, any 
solutions?

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com





[gitorious] quotas

2013-01-23 Thread Ken Dreyer
Hi folks,

I just had a developer fill up my Gitorious partition with a very
large git repo. The problem was compounded by the fact that I
neglected to put /var/gitorious on its own partition... whoops. I
remedied that in hindsight :)

I'm trying to brainstorm the best way to prevent one repo or project
from filling up and blocking service for any other projects. I still
want the project and repo provisioning process to be as close to
self-service as possible - I'd rather not babysit something if I can
help it.

I was wondering if anyone had any information or tips in relation to
enforcing quotas?

- Ken

-- 
-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com