From e823e83dfe0bcbd1000f51e10098126a1e4a1a6b Mon Sep 17 00:00:00 2001 From: Fabrice Carrega Date: Mon, 19 Oct 2020 11:11:47 +0200 Subject: [PATCH] #3 - Removed useless tests --- Gemfile.lock | 10 +++--- lib/lemonway-ruby/models/company.rb | 56 ++++++++++++++--------------- lib/lemonway-ruby/version.rb | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74911cc..9ca2bcc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - lemonway-ruby (1.0.1) + lemonway-ruby (1.0.3) json (~> 2.1, >= 2.1.0) typhoeus (~> 1.0, >= 1.0.1) @@ -15,9 +15,9 @@ GEM diff-lcs (1.3) ethon (0.12.0) ffi (>= 1.3.0) - ffi (1.12.2) + ffi (1.13.1) hashdiff (1.0.0) - json (2.3.0) + json (2.3.1) public_suffix (4.0.3) rake (13.0.1) rspec (3.9.0) @@ -34,7 +34,7 @@ GEM rspec-support (~> 3.9.0) rspec-support (3.9.2) safe_yaml (1.0.5) - typhoeus (1.3.1) + typhoeus (1.4.0) ethon (>= 0.9.0) vcr (3.0.3) webmock (1.24.6) @@ -53,4 +53,4 @@ DEPENDENCIES webmock (~> 1.24, >= 1.24.3) BUNDLED WITH - 2.0.1 + 2.1.4 diff --git a/lib/lemonway-ruby/models/company.rb b/lib/lemonway-ruby/models/company.rb index 91de147..aab0774 100644 --- a/lib/lemonway-ruby/models/company.rb +++ b/lib/lemonway-ruby/models/company.rb @@ -75,49 +75,49 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end + # if @name.nil? + # invalid_properties.push('invalid value for "name", name cannot be nil.') + # end if @name.to_s.length > 256 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 256.') end - if @name.to_s.length < 1 - invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') - end + # if @name.to_s.length < 1 + # invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.') + # end - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end + # if @description.nil? + # invalid_properties.push('invalid value for "description", description cannot be nil.') + # end if @description.to_s.length > 256 invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 256.') end - if @description.to_s.length < 1 - invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.') - end + # if @description.to_s.length < 1 + # invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.') + # end - if @website_url.nil? - invalid_properties.push('invalid value for "website_url", website_url cannot be nil.') - end + # if @website_url.nil? + # invalid_properties.push('invalid value for "website_url", website_url cannot be nil.') + # end if @website_url.to_s.length > 256 invalid_properties.push('invalid value for "website_url", the character length must be smaller than or equal to 256.') end - if @website_url.to_s.length < 1 - invalid_properties.push('invalid value for "website_url", the character length must be great than or equal to 1.') - end + # if @website_url.to_s.length < 1 + # invalid_properties.push('invalid value for "website_url", the character length must be great than or equal to 1.') + # end if !@identification_number.nil? && @identification_number.to_s.length > 256 invalid_properties.push('invalid value for "identification_number", the character length must be smaller than or equal to 256.') end - if !@identification_number.nil? && @identification_number.to_s.length < 1 - invalid_properties.push('invalid value for "identification_number", the character length must be great than or equal to 1.') - end + # if !@identification_number.nil? && @identification_number.to_s.length < 1 + # invalid_properties.push('invalid value for "identification_number", the character length must be great than or equal to 1.') + # end invalid_properties end @@ -125,17 +125,17 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @name.nil? + # return false if @name.nil? return false if @name.to_s.length > 256 - return false if @name.to_s.length < 1 - return false if @description.nil? + # return false if @name.to_s.length < 1 + # return false if @description.nil? return false if @description.to_s.length > 256 - return false if @description.to_s.length < 1 - return false if @website_url.nil? + # return false if @description.to_s.length < 1 + # return false if @website_url.nil? return false if @website_url.to_s.length > 256 - return false if @website_url.to_s.length < 1 + # return false if @website_url.to_s.length < 1 return false if !@identification_number.nil? && @identification_number.to_s.length > 256 - return false if !@identification_number.nil? && @identification_number.to_s.length < 1 + # return false if !@identification_number.nil? && @identification_number.to_s.length < 1 true end diff --git a/lib/lemonway-ruby/version.rb b/lib/lemonway-ruby/version.rb index 33aad1c..fb7a473 100644 --- a/lib/lemonway-ruby/version.rb +++ b/lib/lemonway-ruby/version.rb @@ -11,5 +11,5 @@ =end module LemonWayClient - VERSION = '1.0.3' + VERSION = '1.0.4' end