Retrospectivaをbluehostにインストールしてみた Svn連携編

やりゃーできるもんだなぁ・・・


ということで覚え書き。
まず、Subversionのインストールでconfigureのパラメタを多少変更せにゃならんので、
前にSubversionをbluehostにインストールする記事を読んでインストールした人は再度makeなどせにゃなりません。


基本的にはここにしたがってやる。
ここに書いてあるのは結構前の情報なので、Subversionのこのバージョンとかもうダウンロードできないかも。
とりあえず、変更点。

APR-utilのインストール時
./configure --prefix=$HOME/local --with-apr=$HOME/local --with-expat=/usr/local --with-iconv=/usr/local --disable-static

./configure --prefix=$HOME/local --with-apr=$HOME/local --with-expat=builtin --with-iconv=/usr/local --disable-static


Subversionのインストール時
./configure --prefix=$HOME/local --with-neon=$HOME/local --without-berkeley-db --enable-swig-bindings=perl --with-swig=$HOME/local/bin/swig --with-apr=$HOME/local/bin/apr-1-config --with-apr-util=$HOME/local/bin/apu-1-config --disable-static

./configure --prefix=$HOME/local --with-neon=$HOME/local --without-berkeley-db --enable-swig-bindings=ruby --with-swig=$HOME/local/bin/swig --with-apr=$HOME/local/bin/apr-1-config --with-apr-util=$HOME/local/bin/apu-1-config --disable-static

でOK。
その後、swig-rbをmakeする。※make install-swig-rbはこけるのでやりません。
make swig-rb
↑でエラーがでなければひとまず完了。


make install-swig-rbはやれないので、
環境を無理やり構築する。

cd subversion/bindings/swig/ruby/svn
mkdir ext
cd ..
cp -r .libs/* svn/ext

OK。


次に、retrospectivasvn関連がrequireできるようにパスを通す。
config/environment.rb
を編集。

+ $:.unshift('/home/ドメイン/local/src/subversion-[バージョン]/subversion/bindings/swig/ruby')
  unless Object.const_defined?(:ENABLE_SUBVERSION) &&
  Object.const_get(:ENABLE_SUBVERSION) == false
  begin
  require 'svn/core'
  require 'svn/fs.rb'
  require 'svn/delta'

うまくいってれば、これでばっちり使えるようになります。


追記:
Retrospectivaはせっかく複数プロジェクト扱えるのに、
飛んでくるチケットメールが
[サイト名]なんとかかんとか
となってて、どれがどのプロジェクトのチケットか分からん。
ということで、ちょっと修正。
models/notifications.rb

ticket_creation_note
ticket_update_note

@subject=の行を変更。

#ticket_creation_note
ー @subject = options[:subject] || "[#{site_name}] #{ticket.previewable.title}"
+ @subject = options[:subject] || "[#{ticket.project.name}] #{ticket.previewable.title}"


#ticket_update_note
ー @subject = options[:subject] || "[#{site_name}] #{ticket_change.previewable.title}"
+ @subject = options[:subject] || "[#{ticket_change.ticket.project.name}] #{ticket_change.previewable.title}"