Skip to content

Commit

Permalink
Merge pull request #41 from barkibu/feature/improve_pet_parent_model
Browse files Browse the repository at this point in the history
Improve PetParent model adding KB properties
  • Loading branch information
abelardogilm authored Jul 12, 2021
2 parents 26b23e8 + f5c06ce commit a35e2bd
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.6]
- PetParent - Add more KB fields

## [0.4.5]
- Breeds - Add server endpoint for tests on fake gem

Expand Down
42 changes: 25 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
kb (0.4.3)
kb (0.4.6)
activemodel (>= 4.0.2)
activerecord
activesupport (>= 3.0.0)
Expand All @@ -10,31 +10,31 @@ PATH
faraday-http
faraday_middleware
i18n
kb-fake (0.4.3)
kb-fake (0.4.6)
activesupport (>= 3.0.0)
kb (= 0.4.3)
kb (= 0.4.6)
sinatra
webmock

GEM
remote: https://rubygems.org/
specs:
activemodel (6.1.3.1)
activesupport (= 6.1.3.1)
activerecord (6.1.3.1)
activemodel (= 6.1.3.1)
activesupport (= 6.1.3.1)
activesupport (6.1.3.1)
activemodel (6.1.4)
activesupport (= 6.1.4)
activerecord (6.1.4)
activemodel (= 6.1.4)
activesupport (= 6.1.4)
activesupport (6.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.1)
byebug (11.1.3)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
crack (0.4.5)
rexml
diff-lcs (1.4.4)
Expand All @@ -44,23 +44,31 @@ GEM
dry-configurable (0.12.1)
concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5.0)
dry-core (0.5.0)
dry-core (0.7.1)
concurrent-ruby (~> 1.0)
faraday (1.4.1)
faraday (1.5.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-http (1.0.1)
faraday (~> 1.0)
http (~> 4.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
ffi (1.15.0)
ffi (1.15.3)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
Expand All @@ -70,7 +78,7 @@ GEM
http-cookie (~> 1.0)
http-form_data (~> 2.2)
http-parser (~> 1.2.0)
http-cookie (1.0.3)
http-cookie (1.0.4)
domain_name (~> 0.5)
http-form_data (2.3.0)
http-parser (1.2.3)
Expand Down Expand Up @@ -139,7 +147,7 @@ GEM
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (2.0.0)
webmock (3.12.2)
webmock (3.13.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down
5 changes: 3 additions & 2 deletions lib/kb/models/pet_parent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def self.attributes_from_response(response)

private_class_method :attributes_from_response

STRING_FIELDS = %i[key partner_key first_name last_name prefix_phone_number phone_number email].freeze
DATE_FIELDS = %i[deleted_at].freeze
STRING_FIELDS = %i[ key partner_name first_name last_name prefix_phone_number
phone_number email country address zip_code nif].freeze
DATE_FIELDS = %i[birth_date deleted_at].freeze
FIELDS = [*STRING_FIELDS, *DATE_FIELDS].freeze

define_attribute_methods(*FIELDS)
Expand Down
2 changes: 1 addition & 1 deletion lib/kb/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module KB
VERSION = '0.4.5'.freeze
VERSION = '0.4.6'.freeze
end

0 comments on commit a35e2bd

Please sign in to comment.