testrail_helper 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e26437ee45d6872052262d2860a5daec723c0bbb
4
- data.tar.gz: 685cfa9202738a7ca744cc6a2ab657a553f1c6de
3
+ metadata.gz: 3ddb90fa28658965c154e0f7c5c6c53c944abd5a
4
+ data.tar.gz: 6173e6822e209628bd89550e617cf7e5d556b058
5
5
  SHA512:
6
- metadata.gz: 0916903d1173dd552ac34b828692e1581fead9206d2d54194dc4b33f8c211abf079bbdb7651d0ee71131bb08d968f18a2293192f09a6e8c9d90cf89f5f2d09bb
7
- data.tar.gz: 9d18287e48e1db486439edd655e4ae596512b09cec475ed9e6b6830771ed65b67df1d35bc9527c88b3dcee662ad17c6ad46f8698f5ddf6ba8f7e0af2063f1217
6
+ metadata.gz: c4d27cbe9d64dc3ee7966328542c37fd72866f8b5b4dbbd724d04bc7b0eeb96dd1d14fd9925b9af54c3d24336eb8a55ae3a007a3ba0ceb01cfd0416c762fbd39
7
+ data.tar.gz: 2873e757a09a6ec088e32563eb7108fee568ddae36b6fb619e160b81cff03102f2226ff887784ceaa7c5efc86c53d8c25e741aa7d699e5f63c15298cba6b3164
data/README.md CHANGED
@@ -47,6 +47,18 @@ client.get_run_info(2610)
47
47
 
48
48
  # get all test caes in a run
49
49
  client.get_tests(2610)
50
+
51
+ # get all users
52
+ client get_all_users
53
+
54
+ # get all active users
55
+ client get_all_active_users
56
+
57
+ # get user by id
58
+ client.get_user(4)
59
+
60
+ # get user by email
61
+ client.get_user_by_email("guybrush@SCUMM.com)
50
62
  ```
51
63
 
52
64
  ## Development
@@ -1,3 +1,3 @@
1
1
  module TestrailHelper
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -77,6 +77,35 @@ module TestrailHelper
77
77
  puts @client.send_post(uri,params)
78
78
  end
79
79
 
80
+ def get_all_users
81
+ puts "getting all users"
82
+ uri = "get_users"
83
+ @client.send_get(uri)
84
+ end
85
+
86
+ def get_all_active_users
87
+ puts "getting all active_users"
88
+ uri = "get_users"
89
+ users = @client.send_get(uri)
90
+ active_users = []
91
+ users.each do |x|
92
+ active_users << x if x.fetch('is_active') == true
93
+ end
94
+ active_users
95
+ end
96
+
97
+ def get_user(user_id)
98
+ puts "getting title"
99
+ uri = "get_user/#{user_id}"
100
+ @client.send_get(uri)
101
+ end
102
+
103
+ def get_user_by_email(email)
104
+ puts "getting title"
105
+ uri = "get_user_by_email&email=#{email}"
106
+ @client.send_get(uri)
107
+ end
108
+
80
109
  def get_title(case_id)
81
110
  puts "getting title"
82
111
  uri = "get_case/#{case_id}"
data/test.rb CHANGED
@@ -6,4 +6,4 @@ client = TestrailHelper::Client.new(username:'mattfairbourn@gmail.com',password:
6
6
  # get a list of test cases by passing in the suite_id and section_id
7
7
  # cases = client.get_all_test_cases_in_section(suite_id: "729", section_id: "8")
8
8
 
9
- puts client.get_tests(2610)
9
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kinezu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-16 00:00:00.000000000 Z
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json