Rspec Screenshot

Rspec Screenshot
Copyright © 2014, 2015 LHA. All rights reserved.

Friday, January 23, 2015

Injector Versioning

In this release, we have introduced the definition of Injector Versioning.   We have included a separate Rspec file with examples on it, and have expanded the documentation to include a new section describing what it is and how it works. We hope you find it useful.


    # injector declaration
    injector :My_injector

    # first version
    #__________________
    My_injector() do                
      def bar
        :a_bar                                  # version bar.1
      end
      def foo
        # ...
      end
    end

    object1 = Object.new
    object1.enrich My_injector()                # apply --first snapshot
    object1.bar.should == :a_bar                # pass the test

    # second version
    #__________________
    My_injector() do                    
      def bar
        :some_larger_bar                        # version bar.2 --re-defines bar
      end
      def some_other_function
        # ...
      end
    end

    object2 = Object.new
    object2.enrich My_injector()                # apply --second snapshot
    object2.bar.should == :some_larger_bar      # pass the test

                                                ############################
    object1.bar.should == :a_bar                # object1 still using bar.1
                                                ############################
      

We have also started to set design limits to some of the other features for things which fall outside the domain of influence, and eliminated the binaries. Finally, we have improved the ReadMe file to be hopefully, more didactically oriented and easier to follow.

Once again we would like to thank the people who have contacted us for their input on how to better explain what Injectors are, and how to improve the documentation, and please continue to send your comments and  inquiries to the email address on the github page: https://github.com/LouHenryAlvarez/jackbox.

To use the product: gem install jackbox


Thanks again,

lha

No comments:

Post a Comment