Giter Site home page Giter Site logo

Comments (6)

dawsmith8 avatar dawsmith8 commented on August 14, 2024

Agreed that it is similar - this is actually some work I'm incorporating from Rally's team. We run some automated tests using ruby and the rally_rest_api gem. We are working to include some changes related to getting tests working with this gem and replacing rally_rest_api. There are some convenience methods in RallyCollection that they use heavily - hence the new addition. I ran some benchmarks against some test data just to check and the effect on performance should be pretty small.

What are you specifically updating in your code that might be expensive? The RallyCollection should still allow append() or <<, if not I can define them to properly work with the internal array.

from rallyresttoolkitforruby.

jparrish avatar jparrish commented on August 14, 2024

Hi David - I'm curious what "convenience" methods you are referring to that aren't already provided by Array or Hash? As far as I can see, the methods of RallyCollection are simply accessors. e.g. size/length, [], include?, and empty?

I'm creating a local cache of users, projects, workspaces to avoid the overhead of multiple, individual API calls when doing things like creating new users. However, I need to update the cache to account for the new users, and their permissions, and AFAIK the RallyCollection in its current form doesn't support that. So, I'd have to effectively duplicate the RallyCollection in a collection to which I could add new members.

from rallyresttoolkitforruby.

dawsmith8 avatar dawsmith8 commented on August 14, 2024

The each and [] methods have some extra code that allow passing a block used by our tests getting something by name respectively.

If I add << and push to the RallyCollection class - this should then allow you to keep your cache up to date, would that work okay? You should then still be able to keep your code as it is. I can cut an 0.9.2 with that change if that sounds good.

from rallyresttoolkitforruby.

jparrish avatar jparrish commented on August 14, 2024

Hi David,

Thanks for the quick response!

Yes, I believe any form of add, e.g. push, append, <<, etc. would be all I need.

Thanks!

~jeff

On Feb 21, 2013, at 12:08, David [email protected] wrote:

The each and [] methods have some extra code that allow passing a block used by our tests getting something by name respectively.

If I add << and push to the RallyCollection class - this should then allow you to keep your cache up to date, would that work okay? You should then still be able to keep your code as it is. I can cut an 0.9.2 with that change if that sounds good.


Reply to this email directly or view it on GitHub.

from rallyresttoolkitforruby.

dawsmith8 avatar dawsmith8 commented on August 14, 2024

Hi Jeff - done - 0.9.2 is cut and pushed.

from rallyresttoolkitforruby.

jparrish avatar jparrish commented on August 14, 2024

David, you so Rock!

Thanks.

~jeff

On Feb 22, 2013, at 8:25, David [email protected] wrote:

Hi Jeff - done - 0.9.2 is cut and pushed.


Reply to this email directly or view it on GitHub.

from rallyresttoolkitforruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.