rally-wsapi 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/VERSION +1 -1
  4. data/lib/wsapi/session.rb +9 -3
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5ce53a2efe584ea08f87c687cb53e1262c11b64
4
- data.tar.gz: 1ee68746295ff7558b5a411681e6928b11cd892e
3
+ metadata.gz: 3a273989e21a486fff6edbc02b95331380ca7246
4
+ data.tar.gz: d1293eb20e41a39ce327081ef8d532dd72d3934b
5
5
  SHA512:
6
- metadata.gz: d76be63543d5156c41896db4b30b6058428da8bf509e38e2fac8dbbad2a8a6261bbeaef71f9d14899d74322c0e9a6380c6df9bea5441807ac5f5df7c8cd4afa1
7
- data.tar.gz: eaf84111aa0d65afc4e5069a6ebb48d9a40b969d436ea4b421af3bd86ec5565866ca7c5a48fda5229e5af7bfbc2631652873c90be08ce2aa457faba99f86cef9
6
+ metadata.gz: 9fe7cf15bf3a74f4bf7f56219853ddc737b8790c53566062d21342a7769446d4027c0dc72692c1c41036e449e66092353ad44881a353bcd049732c3e664f2a9f
7
+ data.tar.gz: b6d00147c3f1e4f77f5c11afe845ca667597da0f428c3197341c9264d71eb459145b54a499818e029aa6eb1dfcb75b93cc916d3751211aa8caa91e345dda1992
data/README.md CHANGED
@@ -51,9 +51,9 @@ get_user_by_username(username)
51
51
 
52
52
  #### Get users by query
53
53
  ```
54
- get_users(query_string)
54
+ get_users(query_string = nil)
55
55
  ```
56
- See WSAPI documentation for details about query_string syntax
56
+ If the query_string is present, applies it to the request. Otherwise returns all users. See WSAPI documentation for details about query_string syntax.
57
57
 
58
58
  #### Get the subscription of the authenticated user
59
59
  ```
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/lib/wsapi/session.rb CHANGED
@@ -78,9 +78,15 @@ module Wsapi
78
78
  Mapper.get_object(response)
79
79
  end
80
80
 
81
- def get_users(query)
82
- response = wsapi_get(wsapi_resource_url("User"), query: "(#{query})")
83
- Mapper.get_objects(response)
81
+ def get_users(query = nil)
82
+ fetch_with_pages do |page_query|
83
+ if query
84
+ query_hash = { query: "(#{query})" }
85
+ wsapi_get(wsapi_resource_url("User"), query_hash.merge(page_query))
86
+ else
87
+ wsapi_get(wsapi_resource_url("Users"), page_query)
88
+ end
89
+ end
84
90
  end
85
91
 
86
92
  def get_user(id)
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.2.0
4
+ version: 0.3.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-01-26 00:00:00.000000000 Z
12
+ date: 2015-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake