kanoah_ruby 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/client.rb +10 -6
- data/lib/configuration.rb +17 -14
- data/lib/helpers/test_case.rb +11 -0
- data/lib/kanoah_ruby.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 111d9543e2f245eb921c5ea4c9bf7e59d21ae298
|
4
|
+
data.tar.gz: 118440477cd2b9006a56494684678dcfc4689bb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2257cc609062ad855249c1936f5a031825a601dc95a68f3d89bd5b7a6c3e12213d7f122f6c2c23a51c6b41d95374f1d6ce2e380baf9acd6a2a7b3829e8bdeab2
|
7
|
+
data.tar.gz: 194ad9700c3322e2db4d86d89745b29decf08eb9ed47afd87eb36fcbe505fa2b6939ac83897a8defdf20d6bf5df0dcdcc2f0c61b5afc1c4a40745a6f2fa36806
|
data/lib/client.rb
CHANGED
@@ -9,17 +9,21 @@ module Kanoah
|
|
9
9
|
include Kanoah::Services::TestResult
|
10
10
|
include Kanoah::Services::TestRun
|
11
11
|
|
12
|
+
include Kanoah::Helper::TestCase
|
13
|
+
|
12
14
|
default_options.update(verify: false)
|
13
15
|
format :json
|
14
|
-
attr_reader :
|
16
|
+
attr_reader :test_run_id, :project, :response
|
15
17
|
|
16
18
|
|
17
19
|
def initialize(options={})
|
18
|
-
self.class.base_uri options.fetch(:base_url)
|
19
|
-
@environment = options.fetch(:environment)
|
20
|
-
@test_run_id = options.fetch(:test_run_id)
|
21
|
-
@project_id
|
22
|
-
|
20
|
+
self.class.base_uri options.fetch(:base_url) { Kanoah.config.base_url }
|
21
|
+
@environment = options.fetch(:environment) { Kanoah.config.base_url }
|
22
|
+
@test_run_id = options.fetch(:test_run_id) { Kanoah.config.test_run_id }
|
23
|
+
@project_id = options.fetch(:project_id) { Kanoah.config.project_id }
|
24
|
+
username = options.fetch(:username) { Kanoah.config.username }
|
25
|
+
password = options.fetch(:password) { Kanoah.config.password }
|
26
|
+
token = Base64.encode64(username+':'+password)
|
23
27
|
set_access_token(token[0..-2])
|
24
28
|
end
|
25
29
|
|
data/lib/configuration.rb
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
module Kanoah
|
2
|
+
class << self
|
3
|
+
attr_accessor :config
|
4
|
+
end
|
2
5
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
def self.configure
|
8
|
-
self.config ||= Configuration.new
|
9
|
-
yield(config)
|
10
|
-
end
|
6
|
+
def self.configure
|
7
|
+
self.config ||= Configuration.new
|
8
|
+
yield(config)
|
9
|
+
end
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
class Configuration
|
12
|
+
attr_accessor :base_url, :test_run_id, :environment, :username, :password, :project_id
|
14
13
|
|
15
|
-
|
16
|
-
|
14
|
+
def initialize
|
15
|
+
@base_url = nil
|
16
|
+
@test_run_id = nil
|
17
|
+
@project_id = nil
|
18
|
+
@environment = nil
|
19
|
+
@username = nil
|
20
|
+
@password = nil
|
21
|
+
end
|
17
22
|
end
|
18
|
-
|
19
23
|
end
|
20
|
-
end
|
data/lib/kanoah_ruby.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kanoah_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Automation Wizards
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- README.md
|
36
36
|
- lib/client.rb
|
37
37
|
- lib/configuration.rb
|
38
|
+
- lib/helpers/test_case.rb
|
38
39
|
- lib/kanoah_ruby.rb
|
39
40
|
- lib/services/authentication.rb
|
40
41
|
- lib/services/issue_link.rb
|