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
7: Albacore.configure do |config|
8: config.add_configuration :testfoo do |&block|
9: block.call(Test.new) unless block.nil?
13: Albacore.configure do |config|
14: config.testfoo do |testdata|
15: testdata.test = "this is config data"
16: @configdata = testdata
21: it "should accept a parameter for configuration data" do
22: @configdata.test.should == "this is config data"
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.