testrail_api 1.0.0 → 1.1.0

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: 52c66fb3d7da04169026a46c64ee81a9b3678eda
4
- data.tar.gz: e9d7db52100d0b6be5fa8935a3082e17555e3435
3
+ metadata.gz: 30ba3ef7351bb45192e4ae3bf616c6cc8e0a24b0
4
+ data.tar.gz: ab6a851ca24f1f55b2fd60adab144628047f0015
5
5
  SHA512:
6
- metadata.gz: 1a1669767ea5341ebb7c2079157d79ff89ce84a6fd127944e1b7eb4d54250606ed4c73e28fe0d058fbda57df0bf7b98c1851eab99b7986959d23eef8590e3df0
7
- data.tar.gz: afc8b886fbd51b9e642a12baa0e1df756ce0b3244647510db7eb847af0b9d44ef0ea20589300713731b4b8d9f53161efd646c29f8f0bca647994055e4bee7a18
6
+ metadata.gz: 821465abb473d0a870a98be2267ce141a957db475dfbfc713863c8b744bf648bc33c424e9a12a318e15457cca56b62a1b1636376d0930266751375202278cd41
7
+ data.tar.gz: c2f585661a6139ad9f21b6b3c1ded358d83da18ce3deaa76fa8773628bc8b7032f026fb86b848311f77e6df357552094041d2b70e769b11a940667371389f95d
@@ -64,7 +64,7 @@ module TestRail
64
64
  # @return [Hash] created case
65
65
  # TODO: finish custom fields
66
66
  # @see http://docs.gurock.com/testrail-api2/reference-cases#add_case
67
- def add_case(section_id, filters)
67
+ def add_case(section_id, filters = {})
68
68
  post("add_case/#{section_id}",
69
69
  body: {
70
70
  title: filters[:title],
@@ -87,10 +87,10 @@ module TestRail
87
87
 
88
88
  # Updates an existing test case (partial updates are supported, i.e. you can submit and update specific fields only).
89
89
  # This method supports the same POST fields as TestRail#Client#Case#add_case (except section_id)
90
- def update_case(case_id, body)
90
+ def update_case(case_id, body = {})
91
91
  body[:type_id] = body[:type_id].to_list if body[:type_id]
92
92
  body[:priority_id] = body[:priority_id].to_list if body[:type_id]
93
- post("update_case/#{case_id}", body: body)
93
+ post("update_case/#{case_id}", body: body.to_json)
94
94
  end
95
95
 
96
96
  # Deletes an existing test case.
@@ -64,8 +64,8 @@ module TestRail
64
64
  # @option data [Integer, String] :assignedto_id The ID of a user the test should be assigned to
65
65
  # @return the new test result using the same response format as get_results, but with a single result instead of a list of results.
66
66
  # @see http://docs.gurock.com/testrail-api2/reference-results#add_result
67
- def add_result(test_id, data)
68
- post("add_result/#{test_id}", data)
67
+ def add_result(test_id, data = {})
68
+ post("add_result/#{test_id}", body: data.to_json)
69
69
  end
70
70
 
71
71
  #
@@ -82,8 +82,8 @@ module TestRail
82
82
  # :run_id The ID of the test run
83
83
  # :case_id The ID of the test case
84
84
  #
85
- def add_result_for_case(run_id, case_id, data)
86
- post("add_result_for_case/#{run_id}/#{case_id}", data)
85
+ def add_result_for_case(run_id, case_id, data = {})
86
+ post("add_result_for_case/#{run_id}/#{case_id}", body: data.to_json)
87
87
  end
88
88
 
89
89
  #
@@ -92,8 +92,8 @@ module TestRail
92
92
  #
93
93
  # :run_id The ID of the test run
94
94
  #
95
- def add_results(run_id, data)
96
- post("add_results/#{run_id}", data)
95
+ def add_results(run_id, data = {})
96
+ post("add_results/#{run_id}", body: data.to_json)
97
97
  end
98
98
 
99
99
  #
@@ -102,8 +102,8 @@ module TestRail
102
102
  #
103
103
  # :run_id The ID of the test run the results should be added to
104
104
  #
105
- def add_results_for_cases(run_id, data)
106
- post("add_results_for_cases/#{run_id}", data)
105
+ def add_results_for_cases(run_id, data = {})
106
+ post("add_results_for_cases/#{run_id}", body: data.to_json)
107
107
  end
108
108
  end
109
109
  end
@@ -38,7 +38,7 @@ module TestRail
38
38
  # @option data [Array<Integer>] :case_ids An array of case IDs for the custom case selection
39
39
  # @return # TODO:
40
40
  # @see http://docs.gurock.com/testrail-api2/reference-runs#add_run
41
- def add_run(project_id, data)
41
+ def add_run(project_id, data = {})
42
42
  post("add_run/#{project_id}", body: data.to_json)
43
43
  end
44
44
 
@@ -48,7 +48,7 @@ module TestRail
48
48
  #
49
49
  # :run_id The ID of the test run
50
50
  #
51
- def update_run(run_id, data)
51
+ def update_run(run_id, data = {})
52
52
  post("update_run/#{run_id}", body: data.to_json)
53
53
  end
54
54
 
@@ -57,8 +57,8 @@ module TestRail
57
57
  #
58
58
  # :run_id The ID of the test run
59
59
  #
60
- def close_run(run_id, data)
61
- post("close_run/#{run_id}", data)
60
+ def close_run(run_id)
61
+ post("close_run/#{run_id}")
62
62
  end
63
63
 
64
64
  #
@@ -66,8 +66,8 @@ module TestRail
66
66
  #
67
67
  # :run_id The ID of the test run
68
68
  #
69
- def delete_run(run_id, data)
70
- post("delete_run/#{run_id}", data)
69
+ def delete_run(run_id)
70
+ post("delete_run/#{run_id}")
71
71
  end
72
72
  end
73
73
  end
@@ -34,8 +34,8 @@ module TestRail
34
34
  #
35
35
  # :project_id The ID of the project
36
36
  #
37
- def add_section(project_id, data)
38
- post("add_section/#{project_id}", data)
37
+ def add_section(project_id, data = {})
38
+ post("add_section/#{project_id}", body: data.to_json)
39
39
  end
40
40
 
41
41
  #
@@ -43,8 +43,8 @@ module TestRail
43
43
  #
44
44
  # :section_id The ID of the section
45
45
  #
46
- def update_section(section_id, data)
47
- post("update_section/#{section_id}", data)
46
+ def update_section(section_id, data = {})
47
+ post("update_section/#{section_id}", body: data.to_json)
48
48
  end
49
49
 
50
50
  #
@@ -37,8 +37,8 @@ module TestRail
37
37
  #
38
38
  # :project_id The ID of the project the test suite should be added to
39
39
  #
40
- def add_suite(project_id, data)
41
- post("add_suite/#{project_id}", data)
40
+ def add_suite(project_id, data = {})
41
+ post("add_suite/#{project_id}", body: data.to_json)
42
42
  end
43
43
  end
44
44
  end
@@ -1,3 +1,3 @@
1
1
  module TestRail
2
- VERSION ||= '1.0.0'.freeze
2
+ VERSION ||= '1.1.0'.freeze
3
3
  end
data/testrail_api.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency('bundler', '~> 1.10')
24
24
  spec.add_development_dependency('rake', '~> 10.0')
25
25
 
26
- spec.add_dependency('typhoeus', '~> 0.7.0')
26
+ spec.add_dependency('typhoeus', '~> 0.7', '>= 0.7')
27
27
 
28
28
  spec.required_ruby_version = '>= 1.9.2'
29
29
  spec.required_rubygems_version = '>= 1.3.5'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zhukov
@@ -44,14 +44,20 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.7.0
47
+ version: '0.7'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0.7'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
55
  - - "~>"
53
56
  - !ruby/object:Gem::Version
54
- version: 0.7.0
57
+ version: '0.7'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0.7'
55
61
  description: Ruby client for TestRail API v2
56
62
  email:
57
63
  executables: []