Potential bug in radiant:update on github edge

Hi All,

Summary: freezing a current project to github edge then doing ‘rake
radiant:update’ generates a config/environment.rb that contains the
uninterpreted :secret code - apparently this would be a bug in
radiant:update. This also happens with freezing a fresh 0.6.7 to
github edge, but doesne$B!Ge(Bt with a instance generated from a github
clone (ie clone then bin/radiant -d sqlite3)

On Jul 23, 2008, at 2:49 PM, Alex W. wrote:

This has been added to Radiant edge. If you freeze your vendor/
radiant to edge you should have a new defaults.page.filter config
setting you can set to whatever you like.

I froze to Rev 881, but it lacks the changes of the
defaults.page.filter patch[1] from a month ago. Looks like svn is dead
huh. So ite$B!Ge(Bs off to github and a clone into radiant/vendor/
radiant. However doing

 rake radiant:update

gave me a config/environment.rb that has this on line 42:

config.action_controller.session = {
:session_key => ‘_radiant_session’,
:secret => <% require ‘digest/sha1’ -%>‘<%=
Digest::SHA1.hexdigest(“–#{app_name}–#{Time.now.to_s}–
#{rand(10000000)}–”) %>’
}

which is straight out of the generator[2]. Of course trying ‘rake
db:update’ after that fails.

My workaround was to copy my old :secret key from environment.bak and
delete the _radiant_session cookies in my browser (I got the
error e$B!He(BCGI::Session::CookieStore::TamperedWithCookiee$B!Ie(B).
‘rake db:update’ then worked as expected. You could also generate a
new key using irb[3]

Awaiting flames and being told to fix it my damn selfe$B!De(B :wink:

peace - oli

PS the download page is still not in the wiki, and could do with info
on getting edge from github. I also seem to need to do ‘rake
production db:migrate’ over the mentioned ‘rake db:migrate’, which
would also be worth noting.

[1]

[2]

[3] http://pastie.textmate.org/239873

Yeah, the generator is good about interpreting the ERb but I haven’t
added it to the update task yet. We’ll definitely fix that before 0.6.8
release.

Sean