gitosis_easy_conf¶ ↑
Work in Progress¶ ↑
This is still work in progress and the author makes no guarantee that it will ever be completed.
Description¶ ↑
Because we’re using Redmine and Gitosis and are aiming to have a workflow similar to github, i.e. fork, commit, push, pull-request, we need a repo for each developer for every project. I.e. 2 rails apps, 3 developers would mean that we have 8 repos. Having 8 repos, each with their own permissions and naming gets confusing using a gitosis config, hence this gem.
Scenario:
Four developers and 3 rails applications. Two developers (dev1 & dev2) are owners can can push commits to the master repositories, the other two developers can’t deploy and commit to the master repositories. There are also two servers to which all the applications can be deployed to.
The following config.rb is an example:
Gitosis.config do fork_naming_convention do |repo, forker| "#{forker}_#{repo}" end filename "gitosis.readme.conf" end Gitosis.forkers do developer1 'dev.one' developer2 'dev.two' developer3 'dev.three' developer4 'dev.four' end Gitosis.groups do admins Forker[:developer1], Forker[:developer2] developers Forker[:developer3], Forker[:developer4] deployers 'app1.deploy', 'app2.deploy' all_developers :admins, :developers end Gitosis.repositories do with_base_configuration( :writable => :admins, :readable => [:all_developers, :deployers], :forks => :all ) do rails_app_one rails_app_two rails_app_three end end
The result of this configuration can be found in the examples directory.
Contributing to gitosis_easy_conf¶ ↑
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
-
Fork the project
-
Start a feature/bugfix branch
-
Commit and push until you are happy with your contribution
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright¶ ↑
Copyright © 2011 Gerrit Riessen. See LICENSE.txt for further details.