client-api 0.1.9 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eebdc4ad8824071aab56f642ba4fe5131f461eeb3de119b63393395046ac2f1c
4
- data.tar.gz: e036d606575cfd73b6c7cb6db993a95d78ef8a681eec3d0deb3eb73de5756f0f
3
+ metadata.gz: 78a0f98ad38e54b48affccbc678e5d464e37f641c432010f97c9047b8dc93d1b
4
+ data.tar.gz: fddd90c9c56f78a1cf035c0217e7ee7f4220f9f253f7adfd156d0c0abf803095
5
5
  SHA512:
6
- metadata.gz: 9a75e87c8963ce9f2d1eaba9a13f436f9c7e275085b902ef350b6dc0ccca448987c18cc6348a07da7a7e9c13efaacfb7238001313a9c78ad1bf9ce3cfc28d2b8
7
- data.tar.gz: ab2c68003e8c1cec1a19e4c463b651ff85aeba7b3d3cd245083c156cba742dd6f4f6c593409dd0d392868bcf61c2bf2bf3aba5b5b313c6f18fbdd64f8edbb573
6
+ metadata.gz: 04570d6f2de70cc546399075405c4627b5b54d6a3e9592700ebbb78094053457d1e426a078a256d0d4a0b1b3239376c1d2b5d82d2cccf4a9c19f919ba93dcb63
7
+ data.tar.gz: c2967504a40cff42de718ed67dbfa9d3949156820234951818d07239f63095aa17e4dac2f25b61e63153b052dd455b2b2fced280498ddf321dfd1972b1161ff7
@@ -65,7 +65,8 @@ module ClientApi
65
65
 
66
66
  def header(options = {})
67
67
  mod_headers = options[:headers] || {}
68
- headers['Authorization'] = basic_encode(:username => basic_auth['Username'], :password => basic_auth['Password'])
68
+ authorization = basic_encode(:username => basic_auth['Username'], :password => basic_auth['Password'])
69
+ headers['Authorization'] = basic_encode(:username => basic_auth['Username'], :password => basic_auth['Password']) if authorization != "Basic Og=="
69
70
  headers.merge(mod_headers)
70
71
  end
71
72
 
@@ -25,8 +25,8 @@ module ClientApi
25
25
  expect(value).to eq(@resp), lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \n[value]: \"#{data[:value]}\"\n"} if value != nil
26
26
 
27
27
  # datatype validation
28
- if (type == "boolean" || type == "bool") && value.nil?
29
- expect(%w[TrueClass, FalseClass].any? {|bool| @resp.class.to_s.include? bool}).to eq(true), lambda {"[key]: \"#{data[:key]}\"".blue + "\n datatype shouldn't be \n[type]: \"#{data[:type]}\"\n"}
28
+ if (type == 'boolean') || (type == 'bool') && value.nil?
29
+ expect(%w[TrueClass, FalseClass].any? {|bool| bool.include? @resp.class.to_s}).to eq(true), lambda {"[key]: \"#{data[:key]}\"".blue + "\n datatype shouldn't be \n[type]: \"#{data[:type]}\"\n"}
30
30
  else
31
31
  expect(datatype(type, value)).to eq(@resp.class), lambda {"[key]: \"#{data[:key]}\"".blue + "\n datatype shouldn't be \n[type]: \"#{data[:type]}\"\n"}
32
32
  end
@@ -36,8 +36,8 @@ module ClientApi
36
36
  expect(value).not_to eq(@resp), lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \n[value]: \"#{data[:value]}\"\n"} if value != nil
37
37
 
38
38
  # datatype validation
39
- if (type == "boolean" || type == "bool") && value.nil?
40
- expect(%w[TrueClass, FalseClass].any? {|bool| @resp.class.to_s.include? bool}).not_to eq(true), lambda {"[key]: \"#{data[:key]}\"".blue + "\n datatype shouldn't be \n[type]: \"#{data[:type]}\"\n"}
39
+ if (type == 'boolean') || (type == 'bool') && value.nil?
40
+ expect(%w[TrueClass, FalseClass].any? {|bool| bool.include? @resp.class.to_s}).not_to eq(true), lambda {"[key]: \"#{data[:key]}\"".blue + "\n datatype shouldn't be \n[type]: \"#{data[:type]}\"\n"}
41
41
  else
42
42
  expect(datatype(type, value)).not_to eq(@resp.class), lambda {"[key]: \"#{data[:key]}\"".blue + "\n datatype shouldn't be \n[type]: \"#{data[:type]}\"\n"}
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module ClientApi
2
- VERSION = "0.1.9".freeze
2
+ VERSION = "0.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prashanth Sams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-14 00:00:00.000000000 Z
11
+ date: 2019-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler