def right_script_revision_from_lineage(lineage, revision="latest")
      right_script = nil
      if revision == "latest"
        latest_script = lineage.max_by{|rs| rs.revision}
        right_script = latest_script
      else
        desired_script = lineage.select{|rs| rs.revision == revision}
        if desired_script.length == 0
          raise Exception::RightScriptNotFound.new("RightScript revision (#{revision}) was not found. Available revisions are (#{lineage.map{|rs| rs.revision}})")
        end
        right_script = desired_script.first
      end
      right_script
    end
def right_script_revision_from_lineage(lineage, revision="latest")
      right_script = nil
      if revision == "latest"
        latest_script = lineage.max_by{|rs| rs.revision}
        right_script = latest_script
      else
        desired_script = lineage.select{|rs| rs.revision == revision}
        if desired_script.length == 0
          raise Exception::RightScriptNotFound.new("RightScript revision (#{revision}) was not found. Available revisions are (#{lineage.map{|rs| rs.revision}})")
        end
        right_script = desired_script.first
      end
      right_script
    end
Gets the specified revision of a RightScript from it's lineage

 @param [Array<RightApi::Resource>] An array of RightApi::Resource objects
   of media type RightScript[http://reference.rightscale.com/api1.5/media_types/MediaTypeRightScript.html]
 @param [String] An optional parameter for the desired lineage.  When set
   to "latest" it will get the highest number committed revision. Specify
   0 for the head revision.
 @raise [RightScriptNotFound] If the specified revision is not in the lineage