rally-wsapi 0.4.0 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3df68a100086937f398ec7af562adef04e842f57
4
- data.tar.gz: 5d60da654dbc81820b7753cd8f3e6658512ab5c1
3
+ metadata.gz: 68c3d0c88c570ee316130c327a2aa80704220621
4
+ data.tar.gz: c3c1206ff48a00af8c7479798ce299e2086ff613
5
5
  SHA512:
6
- metadata.gz: 05cc5a253e6be6365d38e9ff5ab0719c10e2b0227ecb6043512226704a8cb1a9938ba8797c4bf452d157f076a98401375e859fe6277d752f47a3b4569d65cec5
7
- data.tar.gz: 3a0ae7c065e07da22f22a3772ef140a5b4672f34dcdda02badd9cb4851bf6a6801f059d2dd46847cc45d6a84d0155188a09584ce8229c87c0482fb3a81f751da
6
+ metadata.gz: ac06e351cf33a947f620440714804df4244b4a8a93d41ed6627cc4eb330306b417d8fc7333dd7bac70eb80cbe577f695a2d6f71f521b34455e1a003a74843c39
7
+ data.tar.gz: 9699f0e1aee4b5d8301aa394b323e2dc29a342616c79e247b490b654f0e8cef424e294d373c112cd09beb478f1ab64cab1ed1381bf44581682bb37810f71fa33
data/README.md CHANGED
@@ -60,9 +60,14 @@ If the query_string is present, applies it to the request. Otherwise returns all
60
60
  get_user_subscription
61
61
  ```
62
62
 
63
- #### Get a subscription
63
+ #### Get a subscription by object id
64
64
  ```
65
- get_project(subscription_id)
65
+ get_subscription(object_id)
66
+ ```
67
+
68
+ #### Get a subscription by subscription id
69
+ ```
70
+ get_subscription_by_subscription_id(subscription_id)
66
71
  ```
67
72
 
68
73
  #### Get a project
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -3,5 +3,9 @@ module Wsapi
3
3
  def subscription_id
4
4
  @raw_data["SubscriptionID"].to_s
5
5
  end
6
+
7
+ def obj_id
8
+ @raw_data["ObjectID"]
9
+ end
6
10
  end
7
11
  end
@@ -63,6 +63,11 @@ module Wsapi
63
63
  Mapper.get_object(response)
64
64
  end
65
65
 
66
+ def get_subscription_by_subscription_id(subscription_id)
67
+ response = wsapi_get(wsapi_resource_url("Subscription"), query: "(SubscriptionId = #{subscription_id})", pagesize: 1)
68
+ (Mapper.get_objects(response) ||[]).first
69
+ end
70
+
66
71
  def get_projects(opts = {})
67
72
  fetch_with_pages(opts) do |page_query|
68
73
  wsapi_get(wsapi_resource_url("Project"), opts.merge(page_query))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rally-wsapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antti Pitkänen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-11 00:00:00.000000000 Z
12
+ date: 2015-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake