rally_api 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/rally_api/rally_json_connection.rb +7 -10
- data/lib/rally_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f088541d07551f9eeaaa0f67d0d041c051e9cb9d
|
4
|
+
data.tar.gz: 08086c868c3bd8a2c64a5676bdea99ec8aa9be8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82c225cf0621301ab0e218e639bc6f6cafb16f680b391adc089900991f5f2a51b076a944967c2de48fbcec43d90ca6b73d76ecd2bcc719d22f1b843c231462a0
|
7
|
+
data.tar.gz: d3da317367171bb40b9c42262dc91d118f4a483b9c8f594a2a87ea598a965a445ab605ec1b07e97116331a416a0a941f04a64156e8b094ca3d9b50a2ea0dca2f
|
data/README.md
CHANGED
@@ -46,6 +46,15 @@ Making a connection to Rally
|
|
46
46
|
|
47
47
|
@rally = RallyAPI::RallyRestJson.new(config)
|
48
48
|
|
49
|
+
#Using api keys? -- currently rally1 only
|
50
|
+
Go to https://rally1.rallydev.com/login
|
51
|
+
You can generate an api key on this site and use it *instead* of username and password
|
52
|
+
config = {:base_url => "https://rally1.rallydev.com/slm"}
|
53
|
+
config[:api_key] = "_your_api_key_from_https://rally1.rallydev.com/login"
|
54
|
+
config[:workspace] = "Workspace Name"
|
55
|
+
config[:project] = "Project Name"
|
56
|
+
config[:headers] = headers #from RallyAPI::CustomHttpHeader.new()
|
57
|
+
|
49
58
|
|
50
59
|
### Querying Rally
|
51
60
|
|
@@ -127,14 +127,11 @@ module RallyAPI
|
|
127
127
|
url_params[:key] = @security_token unless @security_token.nil?
|
128
128
|
req_args[:query] = url_params if url_params.keys.length > 0
|
129
129
|
|
130
|
-
|
130
|
+
req_args[:header] = setup_request_headers(args[:method])
|
131
131
|
if (args[:method] == :post) || (args[:method] == :put)
|
132
|
-
req_headers["Content-Type"] = "application/json"
|
133
|
-
req_headers["Accept"] = "application/json"
|
134
132
|
text_json = args[:payload].to_json
|
135
133
|
req_args[:body] = text_json
|
136
134
|
end
|
137
|
-
req_args[:header] = req_headers
|
138
135
|
|
139
136
|
begin
|
140
137
|
log_info("Rally API calling #{method} - #{url} with #{req_args}\n With cookies: #{@rally_http_client.cookie_manager.cookies}")
|
@@ -176,11 +173,12 @@ module RallyAPI
|
|
176
173
|
|
177
174
|
private
|
178
175
|
|
179
|
-
def setup_request_headers()
|
176
|
+
def setup_request_headers(http_method)
|
180
177
|
req_headers = @rally_headers.headers
|
181
|
-
|
182
|
-
if
|
183
|
-
req_headers[
|
178
|
+
req_headers[:ZSESSIONID] = @api_key unless @api_key.nil?
|
179
|
+
if (http_method == :post) || (http_method == :put)
|
180
|
+
req_headers["Content-Type"] = "application/json"
|
181
|
+
req_headers["Accept"] = "application/json"
|
184
182
|
end
|
185
183
|
req_headers
|
186
184
|
end
|
@@ -191,8 +189,7 @@ module RallyAPI
|
|
191
189
|
end
|
192
190
|
|
193
191
|
def set_api_key(auth_info)
|
194
|
-
@
|
195
|
-
@api_key = auth_info[:api_key]
|
192
|
+
@api_key = auth_info[:api_key]
|
196
193
|
end
|
197
194
|
|
198
195
|
def run_threads(query_array)
|
data/lib/rally_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rally_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|