testrail-ruby 0.1.01 → 0.1.02

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: 3c42e4af387515e94b82360326dbafde088d09bc
4
- data.tar.gz: fe2e2bf41e5bdd0b760add1090a0e8cc6d12fd3a
3
+ metadata.gz: 91689469cbfd26e31523f445b334168243e45b96
4
+ data.tar.gz: 7690d7f75d071b64d71687e8758033fd61d0a0fa
5
5
  SHA512:
6
- metadata.gz: 17c54a2f5e5d77b66959c80c355b7e529c435d2f1ea431f8ad32aa37aa456999a6410a5cba1c2607fd734ad6962be4ff1443ffbfcadd3a60044f2bf86d84a103
7
- data.tar.gz: 45065c57e2f57f667b6f632032fa10d2e614aab8f18418335b2b86131ac5f0992a1a1b3ce81e74359a869d4e5d157a587d203d2b80c8e3d86b4aef5d0c085b52
6
+ metadata.gz: 6983c9eac327ce7770cb7c9ee178b5d6e9ca2f7f2e7c487b6717c508c71deb6a1163fa1e8131c5fa147a1ab91f34aa74d540ee555970af49e80f794c8247a107
7
+ data.tar.gz: 28701485d55eebc98ea5112050374512482d154941a9a336497f702c1bd6f03b193785374260bd6ca38bd92339481c2459e58f213b6f55d996f18585a4ec3bb4
@@ -21,6 +21,7 @@ module TestRail
21
21
  attr_accessor :user
22
22
  attr_accessor :password
23
23
 
24
+ # :nocov:
24
25
  def initialize(base_url)
25
26
  if !base_url.match(/\/$/)
26
27
  base_url += '/'
@@ -28,26 +29,17 @@ module TestRail
28
29
  @url = base_url + 'index.php?/api/v2/'
29
30
  end
30
31
 
32
+ # :nocov:
31
33
  def send_get(uri)
32
34
  _send_request('GET', uri)
33
35
  end
36
+ # :nocov:
34
37
 
35
- #
36
- # Send POST
37
- #
38
- # Issues a POST request (write) against the API and returns the result
39
- # (as Ruby hash).
40
- #
41
- # Arguments:
42
- #
43
- # uri The API method to call including parameters
44
- # (e.g. add_case/1)
45
- # data The data to submit as part of the request (as
46
- # Ruby hash, strings must be UTF-8 encoded)
47
- #
38
+ # :nocov:
48
39
  def send_post(uri, data)
49
40
  _send_request('POST', uri, data)
50
41
  end
42
+ # :nocov:
51
43
 
52
44
  private
53
45
 
@@ -62,7 +54,6 @@ module TestRail
62
54
  end
63
55
  request.basic_auth(@user, @password)
64
56
  request.add_field('Content-Type', 'application/json')
65
-
66
57
  conn = Net::HTTP.new(url.host, url.port)
67
58
  if url.scheme == 'https'
68
59
  conn.use_ssl = true
@@ -75,7 +66,6 @@ module TestRail
75
66
  else
76
67
  result = {}
77
68
  end
78
-
79
69
  if response.code != '200'
80
70
  if result && result.key?('error')
81
71
  error = '"' + result['error'] + '"'
@@ -85,7 +75,6 @@ module TestRail
85
75
  raise APIError.new('TestRail API returned HTTP %s (%s)' %
86
76
  [response.code, error])
87
77
  end
88
-
89
78
  result
90
79
  end
91
80
  end
@@ -1,3 +1,3 @@
1
1
  module Testrail
2
- VERSION = '0.1.01'.freeze
2
+ VERSION = '0.1.02'.freeze
3
3
  end
@@ -1,5 +1,7 @@
1
1
  require 'simplecov'
2
- SimpleCov.start # Do not move. Must load before code under test.
2
+ SimpleCov.start do # Do not move. Must load before code under test.
3
+
4
+ end
3
5
  require 'rspec'
4
6
  require 'webmock/rspec'
5
7
  require 'bundler/setup'
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require_relative '../../lib/testrail-ruby'
3
3
 
4
-
5
4
  # Must set these to run tests
6
5
  # gitlab varables, .bashrc, etc
7
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.01
4
+ version: 0.1.02
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frances Morales