ericpaulbishop / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
186 stars 37 forks source link

Plugin fails with post 1.3.0 Redmine: Code included to fix (backward compatible) #136

Open kubitron opened 12 years ago

kubitron commented 12 years ago

There are three problems that have arisen with running redmine_git_hosting on the 1.3-stable branch of Redmine (DO NOT PULL THE TRUNK -- IT IS HAS A PARTIALLY IMPLEMENTED FEATURE THAT WILL REALLY BREAK THIS PLUGIN AS IT CURRENTLY EXISTS):

1) The developers have removed the TabularFormBuilder, thus breaking several views 2) The developers have deprecated (for removal in 1.5) labelled_tabular_form_builder, which will break several views. 3) The developers have removed the generic :controller/:action/:id route at the bottom of routes.rb, thereby breaking the edit/delete functions for gitolite keys.

This pull request fixes these problems (and cleans up the gitolite-key editing functionality in the process). Note that it is referenced off my master branch, which provides a bunch of other benefits in stability (includes the Resilience patches discussed in #124). If there is sufficient interest to somehow factor it back to the current redmine_git_hosting master, I will consider requests... Incidentally, I believe that this fix should be backward compatible with earlier versions of Redmine (that is my intention!). Let me know if it is not true (at least works with 1.2.2, and should work with at minimum 1.0, but...)

--EDIT 1/12/2012 -- With latest commit (00aa93d), now export user keys to administrator off the user/edit page, also fixed slight security flaw.

-- Edit 1/16/2012 -- One additional commit (0740c23) will resync the hooks parameters on a fetch_changesets, making sure that the update keys don't get out of sync. This is really a part of the resilience branch (which underlies this set of commits).

It is very important to execute a db:migrate_plugins after installing this, since the other commits on which it depends have introduced new plugin options. Thus, make sure to do:

rake db:migrate_plugins RAILS_ENV=production

Please get back to me with any bugs.

kubitron commented 12 years ago

Sorry, all. I accidentally pushed a bug into the second-to-last commit. Fixed through history editing (bad idea, I know, trying to keep packaging simple, should these commits ever be merged into the main branch.

Just kill of last two commits and repull.

Would love comments from others on this latest commit. This commit will be the last in this resilience branch (promise), assuming that it works for people.

Any of the old lurkers still out there? bakerjonas? simonsd? Willing to try this new commit?

simonsd commented 12 years ago

Sorry, running this in beta for my company's internal infra right now. Don't really feel like breaking it atm.

I am however planning on setting up a new vm tomorrow for testing purposes, might test the patch there. For now I'll stick to running 1.2.1, might try out migration to 1.3.x later on. I'll keep you informed :)

kubitron commented 12 years ago

Actually, this fix is only compatible with 1.3x -- doesn't need to use it. Should work find with 1.2.1!

(And have other benefits!). I'm more interested in the previous commits anyway... They continue the fixes that you liked on my resilience pull request (#124).