Does the core team (or anybody in the community) have any plans to
implement a way for plugins to specify compatible Rails versions? What
does everybody think about this? It seems important, especially with
new releases and deprecation. I am willing to write a patch, but I
wanted to check with the community first.
I searched through the mailing lists and Trac but could not find any
discussion on it.
Luke Redpath and I had some plans to incorporate this into the plugin
repository, but as I recall, some members of core weren't so keen.
Basically it involved sharing plugin test results automatically with
the central repository, so an organic picture of the compatibility of
a particular plugin release with a specific Rails (Ruby, Platform)
version could be built up and used by others when installing the
plugin.
Speaking of the plugin repository + core, could one of you guys get in
touch with Luke and I so we can catch up on plans?
I am thinking more along the lines of including a simple yaml file with
plugins, like how Firefox extensions specify versions in XML:
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>2.0.0.*</em:maxVersion>
</Description>
</em:targetApplication>
At a minimum, Rails could issue a warning that "plugin xyz may not be
compatible with the version of Rails you're using." It may not be
critical at this stage, but a few more 1.x releases, and definitely
after deprecated code is _removed_ in 2.0, I think it would be valuable.
At a minimum, Rails could issue a warning that "plugin xyz may not be
compatible with the version of Rails you're using." It may not be
critical at this stage, but a few more 1.x releases, and definitely
after deprecated code is _removed_ in 2.0, I think it would be valuable.
If plugins only work with a specific version of rails, you can simply check
Rails::VERSION::STRING or MAJOR,MINOR,TINY. Whatever you need to do.
I really don't think we need to implement something as complicated and
cumbersome as the firefox RDF extension mechanism.
I say let people add this to the plugin if you know your plugin is messing with internals. A lot of plugins don't mess with internals and are A OK for 1.0+ apps.
A standard method to check the version of Rails on plugin init and produce a (silence-able) warning (like the deprecation warnings) might be handy though. It'll at least encourage hacky plugins to be up front about forward-compatibility.
I'm not sure if Geoffrey and Rick still support an about.yml, but it is
what I was looking for when I brought this up - a standard place to
specify compatible Rails versions other than randomly in the readme.