Albacore: Should We Continue To Support Ruby v1.8.6?

Ruby 1.8.6 seems to be an outdated version at this point… but I can’t find any official information on the life cycle and support plans for this version. I’d like to drop support for Ruby 1.8.6 from albacore, but I’m not sure if that’s a good idea. Here’s why I want to drop it:

I’m working on a new block configuration syntax that will make albacore much easier to deal with. It will let you set up a global and/or task level configuration in one place and have all instances of that configured task or everything that uses that global config option, behave the same way. There’s been a lot of conversation about this over on the google group, so if you want to know more, you should go read up at the group.

At this point, I’ve got some pretty nice syntax working that allows any task to add a new configuration method (better than originally shown in the above linked discussion). It let’s the calling code determine whether the config method will have a code block or not. Here’s the test that i have running and passing:

   1: describe "when providing a configuration method to the configuration api" do

   2:   before :all do

   3:     class Test

   4:       attr_accessor :test

   5:     end

   6:  

   7:     Albacore.configure do |config|

   8:       config.add_configuration :testfoo do |&block| 

   9:         block.call(Test.new) unless block.nil?

  10:       end

  11:     end

  12:  

  13:     Albacore.configure do |config|

  14:       config.testfoo do |testdata|

  15:         testdata.test = "this is config data"

  16:         @configdata = testdata

  17:       end

  18:     end

  19:   end

  20:  

  21:   it "should accept a parameter for configuration data" do

  22:     @configdata.test.should == "this is config data"

  23:   end

  24: end

I like this syntax and i like the functionality it provides… however, it doesn’t work in ruby 1.8.6. That version of ruby does not support the |&block| parameter syntax on line 8. So, I’m wondering… should albacore drop ruby 1.8.6 support in order to get this feature syntax in place? or should i try to find another way to make it work? … I’ve been unable to get "yield if block_given?" syntax to work in this scenario… for some reason, block_given? always returns false when placed on line 9, which is why I switched to the |&block| syntax in the first place.

This new syntax works fine in ruby 1.8.7 and ruby 1.9.1… just not 1.8.6

I don’t know if that’s a good reason to drop ruby 1.8.6 support or not… is there a good reason to drop it? is it really necessary to support that version? ??? thoughts? suggestions? feel free to respond in comments here, or join the google group and respond to the discussion there.


Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Derick Bailey

Derick Bailey is an entrepreneur, problem solver (and creator? :P ), software developer, screecaster, writer, blogger, speaker and technology leader in central Texas (north of Austin). He runs SignalLeaf.com - the amazingly awesome podcast audio hosting service that everyone should be using, and WatchMeCode.net where he throws down the JavaScript gauntlets to get you up to speed. He has been a professional software developer since the late 90's, and has been writing code since the late 80's. Find me on twitter: @derickbailey, @mutedsolutions, @backbonejsclass Find me on the web: SignalLeaf, WatchMeCode, Kendo UI blog, MarionetteJS, My Github profile, On Google+.
This entry was posted in Albacore, Ruby. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://blog.thomaslundstrom.com Thomas Lundström

    I’m actually not using Albacore in a project right now, but if I’m not incorrect, IronRuby 1.0 targets Ruby 1.8.6. I think that if you close the IronRuby door there are a number of companies only having the courage to dip their toes into Microsoft waters that will be locked out. But, of course, it’s your project and you should be able to do whatever you wish at this point in time.

  • Sean Stapleton

    I’d say drop it. Since you are just starting off, why limit yourself based on a 3-year old version.

    Re: Thomas’ comment, see http://www.rubyinside.com/ironruby-interview-q-a-2010-3156.html

    “IronRuby 1.x will drop 1.8.6 support and only target the latest version of 1.9. ”

  • Joe Strain

    1.8.6 while old is very stable as is in my opinion 1.9.1
    use both almost daily . love the syntax love the portablity across unix,mac,msft