client-api 0.1.7 → 0.1.8

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: c9d76436428c8aad960531bcab906a0f11c2d9ac6ac6499494b5b2917072b013
4
- data.tar.gz: f4445a5374a8f4e5cfad1396cba33f24e186ad62f7dabd5df923f0e3b6a3fd70
3
+ metadata.gz: 90f57d4bb7258b9379ce62e5ab5f3b1cc11e4358704bf39bb7ac90218c440e85
4
+ data.tar.gz: '084385181bfbc9801575f6737e9861ae8dc49ef8d04b38608954a10769d5bf39'
5
5
  SHA512:
6
- metadata.gz: a40ac974a88b7d8e7aa519b5eb874dbbf1cc36851587b2cae39e3fadd1932db9da670352e0d282eeae55f46fae56085a80ff9fef8ca3db5fe8c707eba3039390
7
- data.tar.gz: ae541e94d6fc22356bf5be72d5bf78d1fbe4e6bfdd186449b0a69f062f09604f49d6c00f772a3ccf675a39196e0db96c1dc7a95afc702706f10a27b86af2639a
6
+ metadata.gz: '09fee340a3b56630f10b56b8399e47d5e3ff466700ac960168f1dbd36f4852270a50fb84cf756049472f9237585f603f7af3b7c06e377131f34cbe167a80780d'
7
+ data.tar.gz: d97c961ba0ac05277df209faa700c946d519fdedca923de488672678135b9b51796e98f2292e34f59d7c6e35f1cf4429414d998bb2649f3f5ba7eb3ce7be4fbe
@@ -26,7 +26,7 @@ module ClientApi
26
26
 
27
27
  # datatype validation
28
28
  if (type == "boolean" || type == "bool") && value.nil?
29
- expect(%w[TrueClass, FalseClass].any? {|bool| @resp.class.to_s.include? bool}).to be true, lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \n[type]: \"#{data[:type]}\"\n"}
29
+ expect(%w[TrueClass, FalseClass].any? {|bool| @resp.class.to_s.include? bool}).to eq(true), lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \n[type]: \"#{data[:type]}\"\n"}
30
30
  else
31
31
  expect(datatype(type, value)).to eq(@resp.class), lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \n[type]: \"#{data[:type]}\"\n"}
32
32
  end
@@ -37,7 +37,7 @@ module ClientApi
37
37
 
38
38
  # datatype validation
39
39
  if (type == "boolean" || type == "bool") && value.nil?
40
- expect(%w[TrueClass, FalseClass].any? {|bool| @resp.class.to_s.include? bool}).not_to be true, lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \n[type]: \"#{data[:type]}\"\n"}
40
+ expect(%w[TrueClass, FalseClass].any? {|bool| @resp.class.to_s.include? bool}).not_to eq(true), lambda {"[key]: \"#{data[:key]}\"".blue + "\n didn't match \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 didn't match \n[type]: \"#{data[:type]}\"\n"}
43
43
  end
@@ -49,7 +49,7 @@ module ClientApi
49
49
 
50
50
  def validate_schema(param1, param2)
51
51
  expected_schema = JSON::Validator.validate(param1, param2)
52
- expect(expected_schema).to be true
52
+ expect(expected_schema).to eq(true)
53
53
  end
54
54
 
55
55
  def datatype(type, value)
@@ -65,6 +65,10 @@ module ClientApi
65
65
  Object
66
66
  elsif (type.downcase == 'boolean') || (type.downcase == 'bool')
67
67
  value === true ? TrueClass : FalseClass
68
+ elsif (type.downcase == 'falseclass') || (type.downcase == 'false')
69
+ FalseClass
70
+ elsif (type.downcase == 'trueclass') || (type.downcase == 'true')
71
+ TrueClass
68
72
  elsif type.downcase == 'float'
69
73
  Float
70
74
  elsif type.downcase == 'hash'
@@ -75,10 +79,6 @@ module ClientApi
75
79
  Rational
76
80
  elsif type.downcase == 'fixnum'
77
81
  Fixnum
78
- elsif type.downcase == 'falseclass'
79
- FalseClass
80
- elsif type.downcase == 'trueclass'
81
- TrueClass
82
82
  elsif type.downcase == 'bignum'
83
83
  Bignum
84
84
  else
@@ -1,3 +1,3 @@
1
1
  module ClientApi
2
- VERSION = "0.1.7".freeze
2
+ VERSION = "0.1.8".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.7
4
+ version: 0.1.8
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-13 00:00:00.000000000 Z
11
+ date: 2019-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -120,6 +120,6 @@ requirements: []
120
120
  rubygems_version: 3.0.4
121
121
  signing_key:
122
122
  specification_version: 4
123
- summary: HTTP Rest Api client for RSpec and an automation framework that binds within
123
+ summary: HTTP Rest Api client for RSpec test automation framework that binds within
124
124
  itself
125
125
  test_files: []