Comments (6)
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.
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.
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.
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.
Hi Jeff - done - 0.9.2 is cut and pushed.
from rallyresttoolkitforruby.
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)
- Make rallyobject.[]= and rally_object.update cache fields that changed and pass them
- spike support for Lookback API
- Add easier convenience methods for working with attachments
- Convenience method for working with Portfolio Item states
- Add helper methods for dealing with custom fields - in wsapi 2 - custom fields are c_fieldname
- License missing from gemspec HOT 2
- Create User story query HOT 1
- Update TestResults for desired Test Case? HOT 2
- 507 Insufficient Storage error
- Unable to get attachment content HOT 6
- New warning message appearing HOT 1
- Query searches across projects when it shouldn't
- uninitialized constant RallyAPI::RallyJsonConnection::OpenSSL
- $wsapi_version variable problem
- Querying for an object's children HOT 4
- Object#timeout is deprecated, use Timeout.timeout instead. HOT 1
- When running the example from the README, I get not in gzip format
- URI encoding needed?
- Creating an object with Project.ObjectId instead of Project.Name?
- Unable to extract portfolioitem/minimumbusinessincrement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rallyresttoolkitforruby.