leantesting 1.0.2 → 1.1.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 +4 -4
- data/leantesting.gemspec +4 -4
- data/lib/Entity/Project/Project.rb +2 -0
- data/lib/Handler/Bug/BugsHandler.rb +1 -0
- data/lib/Handler/Project/ProjectBugPrioritySchemeHandler.rb +22 -0
- data/lib/Handler/Project/ProjectBugsHandler.rb +1 -0
- data/tests/EntitiesTest.rb +1 -0
- data/tests/HandlersRequestsTest.rb +13 -12
- data/tests/MockRequestsTest.rb +20 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f3b06fd6e37d9ab4dd1cbc21d9e5aee08970b7f
|
4
|
+
data.tar.gz: e7a05262881eb352dffc4fa1a8717264f889f333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d49ff66c4104cccba4a0fe77d8d75384dbaffb2edbfc0b5cb2cc5bbe17271506f4ceed2dc03ae055b2f80c3b21d79890d6308baa597a4b9d43ed0603e85584bf
|
7
|
+
data.tar.gz: 38ac729078a083f186ecc7eb517a9bdad858e606b8e85e105c272fbea9044caa5cd57a33f1a264132c75b066d99a3d84a6bc7722bb38599544256a1bf94dea2a
|
data/leantesting.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'leantesting'
|
3
|
-
s.version = '1.0
|
4
|
-
s.date = '
|
3
|
+
s.version = '1.1.0'
|
4
|
+
s.date = '2016-04-12'
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.summary = 'Lean Testing Ruby SDK'
|
7
7
|
s.description = 'Lean Testing Ruby SDK'
|
8
|
-
s.authors = ['
|
9
|
-
s.email = ['
|
8
|
+
s.authors = ['Crowdsourced Testing']
|
9
|
+
s.email = ['support@crowdsourcedtesting.com']
|
10
10
|
s.files = Dir['lib/**/*', 'tests/**/*'] + ['Gemfile', 'leantesting.gemspec', 'LICENSE', 'Rakefile', 'README.md']
|
11
11
|
s.homepage = 'https://leantesting.com/'
|
12
12
|
s.license = 'proprietary'
|
@@ -8,6 +8,7 @@ module LeanTesting
|
|
8
8
|
:bugStatusScheme,
|
9
9
|
:bugSeverityScheme,
|
10
10
|
:bugReproducibilityScheme,
|
11
|
+
:bugPriorityScheme,
|
11
12
|
:bugs
|
12
13
|
|
13
14
|
def initialize(origin, data)
|
@@ -21,6 +22,7 @@ module LeanTesting
|
|
21
22
|
@bugStatusScheme = ProjectBugStatusSchemeHandler.new(origin, data['id'])
|
22
23
|
@bugSeverityScheme = ProjectBugSeveritySchemeHandler.new(origin, data['id'])
|
23
24
|
@bugReproducibilityScheme = ProjectBugReproducibilitySchemeHandler.new(origin, data['id'])
|
25
|
+
@bugPriorityScheme = ProjectBugPrioritySchemeHandler.new(origin, data['id'])
|
24
26
|
|
25
27
|
@bugs = ProjectBugsHandler.new(origin, data['id'])
|
26
28
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module LeanTesting
|
2
|
+
class ProjectBugPrioritySchemeHandler < LeanTesting::EntityHandler
|
3
|
+
|
4
|
+
def initialize(origin, projectID)
|
5
|
+
super(origin)
|
6
|
+
|
7
|
+
@projectID = projectID
|
8
|
+
end
|
9
|
+
|
10
|
+
def all(filters = nil)
|
11
|
+
if !filters
|
12
|
+
filters = {}
|
13
|
+
end
|
14
|
+
|
15
|
+
super
|
16
|
+
|
17
|
+
request = APIRequest.new(@origin, '/v1/projects/' + @projectID.to_s() + '/bug-priority-scheme', 'GET')
|
18
|
+
EntityList.new(@origin, request, ProjectBugScheme, filters)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
data/tests/EntitiesTest.rb
CHANGED
@@ -34,6 +34,7 @@ class EntitiesTest < MiniTest::Test
|
|
34
34
|
'bugStatusScheme' => LeanTesting::ProjectBugStatusSchemeHandler,
|
35
35
|
'bugSeverityScheme' => LeanTesting::ProjectBugSeveritySchemeHandler,
|
36
36
|
'bugReproducibilityScheme' => LeanTesting::ProjectBugReproducibilitySchemeHandler,
|
37
|
+
'bugPriorityScheme' => LeanTesting::ProjectBugPrioritySchemeHandler,
|
37
38
|
|
38
39
|
'bugs' => LeanTesting::ProjectBugsHandler
|
39
40
|
}],
|
@@ -8,26 +8,27 @@ class HandlersTest < MiniTest::Test
|
|
8
8
|
def setup
|
9
9
|
@handlerCollection = [
|
10
10
|
[LeanTesting::AttachmentsHandler],
|
11
|
-
[LeanTesting::BugAttachmentsHandler,
|
12
|
-
[LeanTesting::BugCommentsHandler,
|
11
|
+
[LeanTesting::BugAttachmentsHandler, 'requiresIDInConstructor'],
|
12
|
+
[LeanTesting::BugCommentsHandler, 'requiresIDInConstructor'],
|
13
13
|
[LeanTesting::BugsHandler],
|
14
14
|
[LeanTesting::PlatformBrowsersHandler],
|
15
|
-
[LeanTesting::PlatformBrowserVersionsHandler,
|
15
|
+
[LeanTesting::PlatformBrowserVersionsHandler, 'requiresIDInConstructor'],
|
16
16
|
[LeanTesting::PlatformDevicesHandler],
|
17
17
|
[LeanTesting::PlatformHandler],
|
18
18
|
[LeanTesting::PlatformOSHandler],
|
19
|
-
[LeanTesting::PlatformOSVersionsHandler,
|
20
|
-
[LeanTesting::PlatformTypeDevicesHandler,
|
19
|
+
[LeanTesting::PlatformOSVersionsHandler, 'requiresIDInConstructor'],
|
20
|
+
[LeanTesting::PlatformTypeDevicesHandler, 'requiresIDInConstructor'],
|
21
21
|
[LeanTesting::PlatformTypesHandler],
|
22
22
|
[LeanTesting::ProjectBugReproducibilitySchemeHandler, 'requiresIDInConstructor'],
|
23
|
-
[LeanTesting::
|
24
|
-
[LeanTesting::
|
25
|
-
[LeanTesting::
|
26
|
-
[LeanTesting::
|
27
|
-
[LeanTesting::
|
23
|
+
[LeanTesting::ProjectBugPrioritySchemeHandler, 'requiresIDInConstructor'],
|
24
|
+
[LeanTesting::ProjectBugSeveritySchemeHandler, 'requiresIDInConstructor'],
|
25
|
+
[LeanTesting::ProjectBugsHandler, 'requiresIDInConstructor'],
|
26
|
+
[LeanTesting::ProjectBugStatusSchemeHandler, 'requiresIDInConstructor'],
|
27
|
+
[LeanTesting::ProjectBugTypeSchemeHandler, 'requiresIDInConstructor'],
|
28
|
+
[LeanTesting::ProjectSectionsHandler, 'requiresIDInConstructor'],
|
28
29
|
[LeanTesting::ProjectsHandler],
|
29
|
-
[LeanTesting::ProjectUsersHandler,
|
30
|
-
[LeanTesting::ProjectVersionsHandler,
|
30
|
+
[LeanTesting::ProjectUsersHandler, 'requiresIDInConstructor'],
|
31
|
+
[LeanTesting::ProjectVersionsHandler, 'requiresIDInConstructor'],
|
31
32
|
[LeanTesting::UserHandler],
|
32
33
|
[LeanTesting::UserOrganizationsHandler]
|
33
34
|
]
|
data/tests/MockRequestsTest.rb
CHANGED
@@ -263,6 +263,20 @@ class MockRequestsTest < MiniTest::Test
|
|
263
263
|
assert_equal resp['meta']['pagination']['total_pages'], col.totalPages
|
264
264
|
assert_equal resp['meta']['pagination']['count'], col.count
|
265
265
|
end
|
266
|
+
def test_ListProjectBugPriorityScheme
|
267
|
+
colName = 'scheme'
|
268
|
+
retClass = LeanTesting::ProjectBugScheme
|
269
|
+
resp = rcol(colName, ['_id', 'name'])
|
270
|
+
@client.debugReturn = {'data'=> JSON.generate(resp), 'status'=> 200}
|
271
|
+
|
272
|
+
col = LeanTesting::Project.new(@client, {'id'=> 0}).bugPriorityScheme.all
|
273
|
+
|
274
|
+
assert_equal resp[colName], col.toArray
|
275
|
+
assert_instance_of retClass, col.collection[0]
|
276
|
+
assert_equal resp['meta']['pagination']['total'], col.total
|
277
|
+
assert_equal resp['meta']['pagination']['total_pages'], col.totalPages
|
278
|
+
assert_equal resp['meta']['pagination']['count'], col.count
|
279
|
+
end
|
266
280
|
# END PROJECT
|
267
281
|
|
268
282
|
|
@@ -277,7 +291,7 @@ class MockRequestsTest < MiniTest::Test
|
|
277
291
|
colName = 'bugs'
|
278
292
|
retClass = LeanTesting::Bug
|
279
293
|
resp = rcol(colName, ['_id', 'title', '_status_id', '_severity_id', '_project_version_id',
|
280
|
-
'_project_section_id', '_type_id', '_reproducibility_id', '_assigned_user_id', 'description',
|
294
|
+
'_project_section_id', '_type_id', '_reproducibility_id', '_priority_id', '_assigned_user_id', 'description',
|
281
295
|
'expected_results'])
|
282
296
|
@client.debugReturn = {'data'=> JSON.generate(resp), 'status'=> 200}
|
283
297
|
|
@@ -292,13 +306,13 @@ class MockRequestsTest < MiniTest::Test
|
|
292
306
|
def test_CreateNewBug
|
293
307
|
retClass = LeanTesting::Bug
|
294
308
|
resp = robj(['_id', 'title', '_status_id', '_severity_id', '_project_version_id',
|
295
|
-
'_project_section_id', '_type_id', '_reproducibility_id', '_assigned_user_id', 'description',
|
309
|
+
'_project_section_id', '_type_id', '_reproducibility_id', '_priority_id', '_assigned_user_id', 'description',
|
296
310
|
'expected_results'])
|
297
311
|
@client.debugReturn = {'data'=> JSON.generate(resp), 'status'=> 200}
|
298
312
|
|
299
313
|
obj = LeanTesting::Project.new(@client, {'id'=> 0}).bugs.create({
|
300
314
|
'title'=> '', 'status_id'=> 0, 'severity_id'=> 0, 'project_version_id'=> 0, 'project_section_id'=> 0,
|
301
|
-
'type_id'=> 0, 'reproducibility_id'=> 0, 'assigned_user_id'=> 0, 'description'=> '',
|
315
|
+
'type_id'=> 0, 'reproducibility_id'=> 0, 'priority_id'=> 0, 'assigned_user_id'=> 0, 'description'=> '',
|
302
316
|
'expected_results'=> ''
|
303
317
|
})
|
304
318
|
|
@@ -308,7 +322,7 @@ class MockRequestsTest < MiniTest::Test
|
|
308
322
|
def test_RetrieveExistingBug
|
309
323
|
retClass = LeanTesting::Bug
|
310
324
|
resp = robj(['_id', 'title', '_status_id', '_severity_id', '_project_version_id',
|
311
|
-
'_project_section_id', '_type_id', '_reproducibility_id', '_assigned_user_id', 'description',
|
325
|
+
'_project_section_id', '_type_id', '_reproducibility_id', '_priority_id', '_assigned_user_id', 'description',
|
312
326
|
'expected_results'])
|
313
327
|
@client.debugReturn = {'data'=> JSON.generate(resp), 'status'=> 200}
|
314
328
|
|
@@ -320,12 +334,12 @@ class MockRequestsTest < MiniTest::Test
|
|
320
334
|
def test_UpdateBug
|
321
335
|
retClass = LeanTesting::Bug
|
322
336
|
resp = robj(['_id', 'title', '_status_id', '_severity_id', '_project_version_id',
|
323
|
-
'_project_section_id', '_type_id', '_reproducibility_id', '_assigned_user_id', 'description',
|
337
|
+
'_project_section_id', '_type_id', '_reproducibility_id', '_priority_id', '_assigned_user_id', 'description',
|
324
338
|
'expected_results'])
|
325
339
|
@client.debugReturn = {'data'=> JSON.generate(resp), 'status'=> 200}
|
326
340
|
|
327
341
|
obj = @client.bugs.update(0, {
|
328
|
-
'title'=> '', 'status_id'=> 0, 'severity_id'=> 0, 'project_version_id'=> 0, 'project_section_id'=> 0,
|
342
|
+
'title'=> '', 'status_id'=> 0, 'severity_id'=> 0, 'priority_id'=> 0, 'project_version_id'=> 0, 'project_section_id'=> 0,
|
329
343
|
'type_id'=> 0, 'assigned_user_id'=> 0, 'description'=> '', 'expected_results'=> ''
|
330
344
|
})
|
331
345
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leantesting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Crowdsourced Testing
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '1.1'
|
69
69
|
description: Lean Testing Ruby SDK
|
70
70
|
email:
|
71
|
-
-
|
71
|
+
- support@crowdsourcedtesting.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- lib/Handler/Platform/PlatformOSVersionsHandler.rb
|
120
120
|
- lib/Handler/Platform/PlatformTypeDevicesHandler.rb
|
121
121
|
- lib/Handler/Platform/PlatformTypesHandler.rb
|
122
|
+
- lib/Handler/Project/ProjectBugPrioritySchemeHandler.rb
|
122
123
|
- lib/Handler/Project/ProjectBugReproducibilitySchemeHandler.rb
|
123
124
|
- lib/Handler/Project/ProjectBugSeveritySchemeHandler.rb
|
124
125
|
- lib/Handler/Project/ProjectBugStatusSchemeHandler.rb
|
@@ -167,4 +168,3 @@ signing_key:
|
|
167
168
|
specification_version: 4
|
168
169
|
summary: Lean Testing Ruby SDK
|
169
170
|
test_files: []
|
170
|
-
has_rdoc:
|