[Radiant] Standard Rake Install/Uninstall Tasks for Extensions
Sean Cribbs
seancribbs at gmail.com
Fri Jan 11 12:30:13 CST 2008
If you (anyone in this thread) want this, please implement it, test it
and submit a patch.
Sean
Andrea Franz wrote:
> Maybe we can use a standard way to organize files for each extension.Something
> like:
>
> public/images/extensions/newsletter/ (here all images added by the
> newsletter extension)
> public/stylesheets/extensions/newsletter/ (here all css added by the
> newsletter extension)
> public/javascripts/extensions/newsletter/ (here all js added by the
> newsletter extension)
>
> It could be easier to remove files. What do you think about it?
>
> On Jan 11, 2008 6:46 PM, Chris Parrish <
> chris.parrish-forummail at swankinnovations.com> wrote:
>
>
>> Sean Cribbs wrote:
>>
>>> I've kind of kept out of this discussion so far, but there does exist an
>>> 'update' task that is generated for new extensions since 0.6.3 (I
>>> believe). It copies files from the extension's public folder to the
>>> project/instance public folder. However, there is no reverse operation
>>> for it currently. I imagine the tasks might look something like this
>>> (cleanup would be the reverse of update):
>>>
>>> task :install => [:migrate, :update]
>>>
>>> task :uninstall => :cleanup do
>>> ENV['VERSION'] = 0
>>> migrate
>>> end
>>>
>> I've used the built-in rake 'update' task and was wondering how it was
>> different from the 'install' being proposed here. You're right Sean,
>> they're really asking for both:
>> rake production radiant:extensions:my_extension_name:update and,
>> rake production radiant:extensions:lmy_extension_name:migrate
>>
>> However, what is also being asked here but can get sticky is an
>> 'un-update' task which, at this point, doesn't exist. IMHO, it should
>> do the following:
>>
>> * Take an inventory of all the files in the extension's public
>> folders that would be copied by the 'update' task.
>> * Look for those files in the application's public folders and:
>> o If they exist and are an exact (binary) match, delete them
>> o If they are exist but are different (same name, different
>> file), leave them alone
>> o If they don't exist, do nothing.
>> * Spit out a report showing which files were deleted, which weren't
>> and why, and which were expected but missing.
>>
>> That way people could update a css file or change a jpeg that came with
>> their extension and not have to worry that uninstalling would erase
>> their work. But I'm not sure what ruby offers to aid in performing a
>> diff-check against two files, though. Ideas anyone?
>>
>> -Chris
>> _______________________________________________
>> Radiant mailing list
>> Post: Radiant at lists.radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>
>
>
>
>
More information about the Radiant
mailing list