Giter Site home page Giter Site logo

rallyresttoolkitforruby's People

Contributors

elsloo avatar enthooz avatar jmartin-rally avatar klehman-rally avatar kshaikh-rally avatar mnovinger avatar rylee-rally avatar unicornzero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rallyresttoolkitforruby's Issues

Updating drop down menu fields

Hi

I'm trying to update drop down menus in different artifacts as Defects or Test Cases.
I'm trying as stated below being @Rally a test_case object in this case:

fields = {}
field_updates = {"Priority" => "Critical"}
field_updates = {"Description" => "Changed Description Priority Critical"}
@rally.update(field_updates)

I've manged to update for instance: "Package: Build: Jenkins" being Package field a drop down menu as well, but others as Priority are not updated, no errors returned either.

I wonder which is the proper way to get the menu vales and state one.

Please any tip?

Thanks a lot in advance
Alfonso.

When running the example from the README, I get not in gzip format

Relevant code:

config = {
  base_url: "https://rally1.rallydev.com/slm",
  username: "[email protected]",
  password: "xxxxxxxxxxxxxxx"
}

@rally = RallyAPI::RallyRestJson.new(config)

I'd expect that to success but I get an not in gzip format exception

EDIT: A possible fix is just to disable the transparent_gzip_compresion flag passed to the HttpClient config

Error when sending request

Using Rally API 0.96 to do user creation & maintenance. Getting an error when I send a query for workspace info. Error recurs no matter what the call to the API.

Code:
require 'rubygems'
require 'rally_api'
require 'pp'

$my_base_url = "https://rally1.rallydev.com/slm"
$my_username = "XXXX";
$my_password = "XXXX";

$headers = RallyAPI::CustomHttpHeader.new()
$headers.name = "Ruby User Management Tool 2"
$headers.vendor = "Rally Labs"
$headers.version = "0.10"

API Version

$wsapi_version = "1.40"

config = {:base_url => $my_base_url}
config[:username] = $my_username
config[:password] = $my_password
config[:headers] = $my_headers #from RallyAPI::CustomHttpHeader.new()
config[:version] = $wsapi_version

@Rally = RallyAPI::RallyRestJson.new(config)

subscription_query = RallyAPI::RallyQuery.new()
subscription_query.type = :subscription
subscription_query.fetch = "Name,SubscriptionID,Workspaces,Name,State,ObjectID"
subscription_query.page_size = 200 #optional - default is 200
subscription_query.limit = 50000 #optional - default is 99999
subscription_query.order = "Name Asc"

results = @Rally.find(subscription_query)

p results


Error:
/usr/local/lib/ruby/gems/1.8/gems/rally_api-0.9.6/lib/rally_api/rally_json_connection.rb:111:in send_request': RallyAPI: - rescued exception - undefined methodssl_version=' for #OpenSSL::SSL::SSLContext:0x40232734 on request to https://rally1.rallydev.com/slm/webservice/1.40/subscription.js with params projectScopeDownfalsepagesize200start1orderName AscfetchName,SubscriptionID,Workspaces,Name,State,ObjectIDqueryprojectScopeUpfalse (StandardError)
from /usr/local/lib/ruby/gems/1.8/gems/rally_api-0.9.6/lib/rally_api/rally_json_connection.rb:67:in get_all_json_results' from /usr/local/lib/ruby/gems/1.8/gems/rally_api-0.9.6/lib/rally_api/rally_rest_json.rb:237:infind'
from a.rb:33

Also got these warnings:
/usr/local/lib/ruby/gems/1.8/gems/rally_api-0.9.6/lib/rally_api/rally_object.rb:168: warning: parenthesize argument(s) for future version

/usr/local/lib/ruby/gems/1.8/gems/rally_api-0.9.6/lib/rally_api/rally_rest_json.rb:429: warning: don't put space before argument parentheses

Enforcing valid SSL certs

Hi David,

While doing some tests for RAM on a test cluster I ran into an issue where the changes you made to 0.7.0 where the httpclient won't connect to a Rally instance that has an invalid SSL certificate. I have a patch where I set the verify_mode to VERIFY_NONE, but I don't think that we should just turn off ssl verification be default.

I added the following line to line 29 in rally_json_connection.rb:
@rally_http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE

Maybe this should be a config parameter or an environment variable. Not sure which and wanted your thoughts.

Cheers,
Colin

Making a connection to Rally with Ruby Toolkit for Rally REST API (rally_api)

I'm trying to connect using the ruby API toolkit. I followed the instructions in: https://developer.help.rallydev.com/ruby-toolkit-rally-rest-api-json The script is exactly the same as the chapter "Making a connection to Rally" with my own values. I receive the following error:

ruby test /var/lib/gems/1.8/gems/rally_api-0.9.14/lib/rally_api/rally_rest_json.rb:437: warning: don't put space before argument parentheses /var/lib/gems/1.8/gems/rally_api-0.9.14/lib/rally_api/rally_collection.rb:30:in each': undefined method parameters' for # (NoMethodError) from /var/lib/gems/1.8/gems/rally_api-0.9.14/lib/rally_api/rally_rest_json.rb:104:in find_workspace' from /var/lib/gems/1.8/gems/rally_api-0.9.14/lib/rally_api/rally_rest_json.rb:79:ininitialize' from test:19:in `new' from test:19

Any tips?

Thanks a lot.

URI encoding needed?

When attempting to query for PortfolioItems/Aplicación (note o-grave character), return is:
RallyAPI: - rescued exception - bad URI(is not URI?):
https://us1.rallydev.com/slm/webservice/v2.0/PortfolioItem/Aplicación

This seemed to fix it:
$ diff /usr/local/share/ruby/gems/2.0/gems/rally_api-1.2.1/lib/rally_api/rally_json_connection.rb{,.orig}
138,142d137
< eurl = URI.encode(url)
< if url != eurl
< log_info("Using encoded URL: orig=#{url} encode=#{eurl}")
< url = eurl
< end

507 Insufficient Storage error

I am getting this error when I query the type "projectpermission". Unable to access rally webservice (1.37 or 2.0)". Has anyone here experienced this kind of error?

Create User story query

Hi, Can you also tell me how to add ParentID to the array that goes into the create query?

for example
I have values in story_array["Name"], story_array["Description"], story_array["ParentID"]
the value in story_array["ParentID"] is the FormattedID of a pre-existing user story in rally.
rally.create("hierarchicalrequirement", story_array)

Please share any information you have about this. Thanks!

New warning message appearing

I have been using rally_api for about a month now, and I started getting the following message repeatedly. While it doesn't seem to break anything, it is spamming the console output and logging files. Is there a way to suppress this message or fix what it is saying?

Cookie#domain returns dot-less domain name now. Use Cookie#dot_domain if you need "." at the beginning.

Object cache defaults to a user's default workspace

Hi David,

I noticed that the cache_object method doesn't specify a workspace, so it defaults to the user's default workspace (if they have one set). The issue comes in with DynaTypes since each workspace could have a different set of types.

I have a potential fix that you can browse at:

Echo3ToEcho7@6f5fba2

I can submit a pull request, but I am not sure if the fix is as easy as what I wrote.

Cheers,
Colin

Tag should be a queryable type

I don't want to create a tag if it already exists, but I can't seem to query for tag by name. I get this:

Errors making Rally Query: ["Object Type Tag is not query-able: inspect RallyRestJson.rally_objects for allowed types"]

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Unable to get attachment content

It seems that the body of the attachment is inside Attachment.Content.content but this is an Unicode string which is encoded.

It seems that there is no documentation regarding how to save the body of the attachment in a binary file.

Query searches across projects when it shouldn't

Setup info:

I have a workspace named "ETS Kanban." Inside the workspace, I have two projects "ETS Workflow" and "Test Project." I have created a custom field for the workspace called "FacetsID" (simple text field). In the project "ETS Workflow," I have a user story (US1125) with FacetsID set to "201601072400." In the "Test Project," I don't have any stories with that facets id.

Issue:

I'm writing a ruby script that will read a csv file. For each row, there is a column with the FacetsID. I search the "Test Project" for the FacetsID equal to the value from csv row. It searches across both projects when I expect it to only search "Test Project."

In this case, searching for FacetsID "201501072400" in the "Test Project" returns a record found with formattedID "US1125." The challenge is that this record is from the "ETS Workflow" project. So I can't add it to the "Test Project" and if I update it, it updates in the other project. See the attached file for my code.

generic_import_sample.rb.txt

$wsapi_version variable problem

The $wsapi_version variable is set to both 1.43 and v2.0 in my_vars.rb.

We need to ensure that it is set to '1.43', and not 'v2.0' (or comment out its definition in my_vars.rb). If we not do this, this we get error while running user_permissions_summary.rb.
Same may be the case for the other scripts too.

At the least, this needs to be documented in the Readme instructions.

RallyCollection is essentially RO

Not sure I understand the motivation for changing from returning an array of RallyObjects. Creating a RO collection makes creating a local cache potentially expensive to update. I use to be able to just append a new RallyObject. Now, I'll have to convert the RallyCollection to an array of RallyObjects in the cache - or is there a gotcha I'm not seeing....

uninitialized constant RallyAPI::RallyJsonConnection::OpenSSL

I am trying integrate rally with SVN using RallyConnectorForSvn-3.7.rar source on Open Suse Operating system.

I installed Ruby and the rally required gems and even then it gives me the error when i run the config_test.rb file i.e uninitialized constant RallyAPI::RallyJsonConnection::OpenSSL

Here is the output

Ruby version check PASSED
Ruby rally_api gem check PASSED
Current directory world searchability check PASSED
Wrapper script world executability check WARNING -- wrapper script RallyWrapper.sh not world executable
2rally.rb driver world readability check PASSED
Log file write check PASSED
Rally Url check PASSED
Rally Connection check FAILED -- uninitialized constant RallyAPI::RallyJsonConnection::OpenSSL
Rally Workspace check FAILED -- undefined method `find_workspace' for nil:NilClass
Rally Build and Changeset flag enabled check FAILED -- Specified Workspace invalid or non-existent
Email validation check PASSED
Please help me out.

My Setup is as below
bundle -v
Bundler version 1.12.0.rc
ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [i686-linux]
gem -v
2.4.5.1
openssl version
OpenSSL 1.0.2g 1 Mar 2016

Is this due to the open ssl did not installed properly i am new to this platform please help.

You can't query for PortfolioItems

Hi David,

While I know that as of 1.37 PortfolioItems are no longer a create-able type, it is still a query-able type. I get an error:

rally_api-0.7.1/lib/rally_api/rally_rest_json.rb:226:in `find': Errors making Rally Query: "Object Type portfolio_item is not query-able: inspect RallyRestJson.rally_objects for allowed types"

For now, I am manually adding {:portfolio_item => "PortfolioItem"} to the RallyRestJson.rally_objects, but should it be there by default? For me, it should act like Artifact.

Cheers,
Colin

Unable to extract portfolioitem/minimumbusinessincrement

Getting the following error when trying to extract portfolioitem/minimumbusinessincrement

/usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_json_connection.rb:154:in send_request': (StandardError) > 5% Error on request - https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/minimumbusinessincrement/144112261104 - {:errors=>["Requested type name \"portfolioitem/minimumbusinessincrement\" is unknown."], :warnings=>[]} from /usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_rest_json.rb:107:in send_request'
from /usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_rest_json.rb:217:in reread' from /usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_object.rb:53:in read'
from ./extract-artifacts.rb:69:in block in <main>' from /usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:22:in block in each'
from /usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:21:in each' from /usr/lib64/ruby/gems/2.4.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:21:in each'

Convenience method for working with Portfolio Item states

To set a State this syntax is required:

"State" => "/state/"
It would be convenient if a name can be used instead.

It is possible to query State, create a hash, and populate the hash with the query results, where State Name is the key and State _ref is the value:

state_results.each do |s|
s.read
state_hash[s["Name"]] = s["_ref"]
end
Then we can update a State:

features.each do |f|
field_updates={"State" => state_hash["Developing"]}
f.update(field_updates)
end

A convenience method to make this transparent for the users would be nice.

Object#timeout is deprecated, use Timeout.timeout instead.

This warning is thrown by dependency httpclient 2.6.0.1 when using rally_api 1.2.1 along with windows ruby version 2.3.1p112.

This issue seems to be fixed in the latest release version 2.8.2.4 here. can we use the latest release as dependency if it is alright?
However i donot see any issue with ruby version 2.1.7

Warnings from console:
Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:747:in connect': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead.
Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead.
Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead. Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in query': Object#timeout is deprecated, use Timeout.timeout instead.
Ruby23-x64/lib/ruby/gems/2.3.0/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:617:in `query': Object#timeout is deprecated, use Timeout.timeout instead.

Querying for an object's children

Hello - I don't see in the official Rally API docs or the readme for this gem (or even in the code, for that matter) a way to pull the children of an object from Rally.

Example: I want to pull the children PortfolioItem/Initiatives from the PortfolioItem/Drivers after I pull the Drivers from the API.

Is there a way to do this using this gem?

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.