Re: [Radiant] More 'Rails app to Radiant extension' questions

2010-01-12 Thread Asfand Yar Qazi
2010/1/11 banane ban...@gmail.com:
 Put the routes.rb stuff in [yourapplication]_extension.rb
 You can extend ActiveRecord, just like in Rails. Rails is embedded in
 Radiant, so it works pretty much the same.
 Put the testing stuff in /rspec, test as usual.

And what about selenium on rails tests?  That is another stickler.

Another question: My app currently uses several plugins it needs.  If
I make my app an extension, where do those plugins go?  If I simply
move them to the Radiant app, won't that make upgrading difficult?
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] More 'Rails app to Radiant extension' questions

2010-01-12 Thread john muhl
On Tue, Jan 12, 2010 at 9:22 AM, Asfand Yar Qazi ayq...@gmail.com wrote:
 2010/1/11 banane ban...@gmail.com:
 Put the routes.rb stuff in [yourapplication]_extension.rb
 You can extend ActiveRecord, just like in Rails. Rails is embedded in
 Radiant, so it works pretty much the same.
 Put the testing stuff in /rspec, test as usual.

 And what about selenium on rails tests?  That is another stickler.

 Another question: My app currently uses several plugins it needs.  If
 I make my app an extension, where do those plugins go?  If I simply
 move them to the Radiant app, won't that make upgrading difficult?

if your rails app has vendor/plugins/xyz then your extension would
have vendor/plugins/xyz. for example:

/rails_app/vendor/plugins/xyz
/radiant_app/vendor/extensions/your_extension/vendor/plugins/xyz
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: [Radiant] More 'Rails app to Radiant extension' questions

2010-01-12 Thread Sean Cribbs
It might be better to use gems where possible, as that's the direction 
both Rails and Radiant are going.  If you can't use your plugins as 
gems, John's method should work.

Sean

On 1/12/10 10:33 AM, john muhl wrote:
 On Tue, Jan 12, 2010 at 9:22 AM, Asfand Yar Qaziayq...@gmail.com  wrote:

 2010/1/11 bananeban...@gmail.com:
  
 Put the routes.rb stuff in [yourapplication]_extension.rb
 You can extend ActiveRecord, just like in Rails. Rails is embedded in
 Radiant, so it works pretty much the same.
 Put the testing stuff in /rspec, test as usual.

 And what about selenium on rails tests?  That is another stickler.

 Another question: My app currently uses several plugins it needs.  If
 I make my app an extension, where do those plugins go?  If I simply
 move them to the Radiant app, won't that make upgrading difficult?
  
 if your rails app has vendor/plugins/xyz then your extension would
 have vendor/plugins/xyz. for example:

 /rails_app/vendor/plugins/xyz
 /radiant_app/vendor/extensions/your_extension/vendor/plugins/xyz
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] More 'Rails app to Radiant extension' questions

2010-01-12 Thread Asfand Yar Qazi
2010/1/12 john muhl johnm...@gmail.com:

 if your rails app has vendor/plugins/xyz then your extension would
 have vendor/plugins/xyz. for example:

 /rails_app/vendor/plugins/xyz
 /radiant_app/vendor/extensions/your_extension/vendor/plugins/xyz

Oh, that's beautiful.  Thanks.

2010/1/12 Sean Cribbs seancri...@gmail.com:
 It might be better to use gems where possible, as that's the direction
 both Rails and Radiant are going.  If you can't use your plugins as
 gems, John's method should work.


My plugin is an in-house one that I use to share useful code between
my apps.  If I pack it up in a gem, I can freeze it in the extension,
I assume?

Thanks, regards,
 Asfand
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] More 'Rails app to Radiant extension' questions

2010-01-11 Thread Asfand Yar Qazi
Hi,

More questions to converting a Rails app to a Radiant extension.

Currently, in Rails 2.3.5, it is almost possible to mount a Rails app
as a plugin and have all the routes, helpers, etc. just work.

If I am going to convert my Rails app to a Radiant extension, I need
to have the following issues resolved.

- I have all my text used in view, flash messages and emails in the
I18n file 'en.yml', containing lots of ActiveRecord and other
translations as well.  How do I move these to the Radiant app?

- I have several routes in my current app (in config/routes.rb).  How
do I move these to the Radiant app?  If I simply move them into the
Radiant app, won't upgrading the Radiant app become more difficult?

- Will mailers just work?

- Things like RSpec specs and Selenium tests are currently run by
doing a 'rake spec' or 'rake test:acceptance' , but they rely on the
Rails app - if I dismantle the Rails app, how will I cause these to
still run?  Again, if I simply move them into the Radiant app, won't
upgrading the Radiant app become more difficult?

Any hints to help me speed up the transition would be appreciated, as
I believe I have already under-quoted the client because of guilt that
I should have developed the app in a Radiant extension from the
beginning since I knew they would eventually want a CMS anyway.

Thanks
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant