Change Log
All notable changes to this project will be documented in this file.
[0.10.4] - 2024-10-xx
Added
Changed
Fixed
[0.10.3] - 2024-10-01
Changed
- refactored Client
- initialized with
deep_logging
named argumnet - previously
response_logging
- initialized with
[0.10.2] - 2024-09-27
Added
Ecoportal::API::Common::TimeOut
to calculate adaptive time outs.
Changed
Ecoportal::API::V1::Person#job
- added adaptative await
- evaluate
true
tocomplete?
ifprogress
is that of total count.
[0.10.1] - 2024-08-01
Added
Ecoportal::API::V1::Person#brand_id
Ecoportal::API::V1::Person#archived
Changed
- require
ruby 3
[0.9.8] - 2024-05-15
Added
rubocop
Changed
Ecoportal::API::Common::Client#with_retry
- Make resilient (re-try) to recent silent server errors where the body doesn't parse as JSON.
Fixed
[0.9.7] - 2024-02-03
Changed
Ecoportal::API::V1::Person
- removed property
subordinates
- removed property
[0.9.6] - 2024-02-03
Changed
- upgraded some gems
Fixed
- Compatibility with
ruby 3
- replaced
Proc.new
(with no block) byblock
in methods
- replaced
[0.9.5] - 2023-09-05
Fixed
Ecoportal::API::V1::Person#as_update
missing parameter onsuper
call.
[0.9.4] - 2023-04-17
Changed
- Softened max version of gem dependencies
- Upgraded required ruby version
Fixed
Ecoportal::API::Common::BaseModel
should make a copy ofdoc
oninitialize
- This was affecting
reset!
asdoc
was being changed
- This was affecting
[0.9.3] - 2023-03-16
Added
Ecoportal::API::V1::SchemaFieldValue#clear
helper to clear the value
[0.9.1] - 2023-03-09
Added
Ecoportal::API::V1::Person#contractor_organization_id
support for contractor managementEcoportal::API::Common::BaseModel
addeddoc
helper methods:replace_doc!
and#replace_original_doc!
Ecoportal::API::Internal::Person
added methods- breaking change, they default to compare with
original_doc
, while they did it withinitial_doc
) #new?
=> to know if this person is being created now (it doesn't exist on server side).#account_added?
=> to know if this person is getting the account added.#account_removed?
=> to know if this person is getting their account removed.
- breaking change, they default to compare with
Ecoportal::API::Common::Client#host
exposeEcoportal::API::Internal::Permissions
added abilitiescontractor_management
Fixed
Ecoportal::API::V1::PersonDetails.key?
should index first.
Changed
Ecoportal::API::V1::Person::VALID_TAG_REGEX
allow dot.
in tags.
[0.8.5] - 2022-02-28
Added
Ecoportal::API::V1::PersonDetails#[]
to raise a specific error type to allow handlingEcoportal::API::V1::PersonDetails.key?
to allow to check if a field existsEcoportal::API::Internal::Account#force_send_invites
support for back-end new method
Fixed
Ecoportal::API::V1::People#get
fixed typoEcoportal::API::Common::BaseModel
#original_doc
and#initial_doc
maybe empty for the parent object
Changed
Ecoportal::API::V1::People#each
limited theGET
retries to5
Ecoportal::API::Internal::Account#default_tag=
- Controls input type to be
String
ornil
- Inherent
upcase
- Controls input type to be
[0.8.4] - 2021-11-05
Added
Ecoportal::API::Internal::Permissions
added abilitiesvisitor_management
,cross_register_reporting
andbroadcast_notifications
- Some yardocs too
- Some callbacks are done in a non-obvious way and the returned object type was not documented
- For this reason, some yardocs have been added to some of the parts that have been worked on.
Fixed
Ecoportal::API::V1::People#create_job
- Removed call to
BatchOperation#process_response
- The method was is already called by
job_result
- As a consequence there was a double up of
callbacks
- Fixed line in wrong position
- Removed call to
Ecoportal::API::V1::People#batch
Ecoportal::API::Common::ElasticApmIntegration#unexpected_server_error?
- No code or code lesser than 100 is a server error as well
Changed
Ecoportal::API::Common::Client
: changed- Logging the response of batches or batch jobs can be handy when debugging the back-end
- removed method
#without_response_logging
- This change entailed to remove dependencies in
Ecoportal::API::V1::People
- Specifically in methods
#batch
,#job_result
and#create_job
- Specifically in methods
@response_logging_enabled
to be set in initialization stage (added parameter for.new
)
[0.8.3] - 2021-05-24
Added
Ecoportal::API::Errors
namespaceEcoportal::API::Errors::Base
base error class.Ecoportal::API::Errors::TimeOut
error when an api request fails with time out.- This serves the purpose to allow a client script to re-start the process where it stopped by capturing this specific Error
Ecoportal::API::Common::BaseModel::UnlinkedModel
added more description to track down the source of the error.Ecoportal::API::Common::BaseModel#reset!
added parameterkey
, which should try to recoverdoc[key]
fromoriginal_doc[key]
- Thanks to this, you are supposed to be able to do things like:
person.account = nil && person.reset!("account")
person.name = nil && person.reset!("name")
Ecoportal::API::V1::People#job
methods to provide more information on failure.- Specific changes due to eP release
1.5.9.70
(Policy Group Abilities)Ecoportal::API::Internal::Account#permissions_merged
Ecoportal::API::Internal::Permissions#person_abilities
(new ability)Ecoportal::API::Internal::Account#user_id
Fixed
Ecoportal::API::Internal::Account
: consistency in setting arrays (uniq!
&compact
)#policy_group_ids=
,#login_provider_ids=
,#starred_ids=
Ecoportal::API::Common::HashDiff.diff
was including empty{}
objects- This change sacrifices the case
account: {}
(which will be also removed fromas_update
), but it should be fine.
- This change sacrifices the case
Changed
Ecoportal::API::V1::People#job
to raise specific error on time outAPI::Errors::TimeOut
- Specific changes due to eP release
1.5.9.70
(Policy Group Abilities)Ecoportal::API::Internal::Account
removed methods:#permissions_preset
,#preset
and#preset=
Ecoportal::API::Internal::Person#account=
added support foruser_id
which should remain unchanged when existing
- remove from
as_update
read-only dataEcoportal::API::Common::HashDiff.diff
added parameter:ignore
(Array
)Ecoportal::API::Common::BaseModel#as_update
added parameter:ignore
Ecoportal::API::V1::Person#as_update
added method, which ignoressubordinates
Ecoportal::API::Internal::Person#as_update
added method, which ignoresuser_id
,permissions_merged
andprefilter
Ecoportal::API::Internal::Account#as_update
added method, which ignoresuser_id
,permissions_merged
andprefilter
Ecoportal::API::Common::Client
native support forelastic-apm
- Via new module
Ecoportal::API::Common::ElasticApmIntegration
with methodlog_unexpected_server_error
, which will only log anUnexpectedServerError
to ElasticAPM if- There's a correct configuration: environmental variables
ELASTIC_APM_KEY
andELASTIC_APM_ACCOUNT_ID
are defined - The
Response
from the server gavecode
in the range5xx
(which are those under server responsibility)
- There's a correct configuration: environmental variables
Ecoportal::API::Common::Client
added retry logics whenresponse.status == 5xx
[0.8.2] - 2021-02-24
Fixed
Ecoportal::API::V1::Person#filter_tags=
should ignorenil
values
Changed
- removed all the namespace under
Ecoportal::API::V2
as that is managed byecoportal-api-oozes
gem Ecoportal::API::V1::People.get
should return aPerson
object- observe that it was returning the
WrappedResponse
(anEnumerable
helper that works better when getting multiple people).
- observe that it was returning the
[0.7.5] - 2021-02-12
Fixed
pretty_print
method was colliding withpp
module:- renamed to
Ecoportal::API::Common::BaseModel#print_pretty
- renamed to
Ecoportal::API::Common::BatchReponse#print_pretty
- renamed to
Ecoportal::API::Common::Reponse#print_pretty
- renamed to
Ecoportal::API::Common::WrappedResponse#print_pretty
- renamed to
Changed
- forgot to change
Ecoportal::API::VERSION
during last release
[0.7.4] - 2021-01-2
Fixed
- changed
compact
tocompact!
:Ecoportal::API::V1::Person#filter_tags=
Ecoportal::API::Internal::Account#policy_group_ids=
Ecoportal::API::Internal::Account#login_provider_ids=
Ecoportal::API::Internal::Account#starred_ids=
Changed
Added
Fixed
Ecoportal::API::V1::Person#email=
: was not showing the incorrect value in the error message- added
compact
to removenull
values on:Ecoportal::API::V1::Person#filter_tags=
Ecoportal::API::Internal::Account#policy_group_ids=
Ecoportal::API::Internal::Account#login_provider_ids=
Ecoportal::API::Internal::Account#starred_ids=
[0.7.2] - 2020-10-19
Added
Ecoportal::API::V1::Person#email=
:- do a minimum validation (no blanks in the email)
- set in lower case (as this is how it's in the server)
Fixed
Ecoportal::API::V1::People#each
: whensilent
it shouldn't print a blank line- fixed so they return empty array
[]
whennil
:Ecoportal::API::V1::Person#filter_tags
Ecoportal::API::Internal::Account#policy_group_ids
Ecoportal::API::Internal::Account#login_provider_ids
Ecoportal::API::Internal::Account#starred_ids
Changed
- made it so some methods the
Array
withuniq
values:Ecoportal::API::V1::Person#filter_tags=
Ecoportal::API::Internal::Account#policy_group_ids=
- made it so it only updates the keys defined in the
Hash
passed to the setter:Ecoportal::API::Internal::Account#permissions_custom=
Ecoportal::API::Internal::Account#preferences=
[0.7.1] - 2020-09-30
Added
Ecoportal::API::Internal::Permissions
: update for new abilitytasks
of ecoPortal release1.5.3
Ecoportal::API::V1::People#each
: added keyword argumentsilent:
to display download progress
Fixed
Ecoportal::API::V1::People#each
: when no block provided, it was creating anEnumarator
without preserving the parameters (i.e.:q
orper_page
were lost)
[0.7.0] - 2020-09-11
Added
- added hook, private method
body_data
for child classes to define behaviour onresponse.body
toEcoportal::API::V1::People
Ecoportal::API::Common::BatchOperation
Changed
Ecoportal::API::Internal::Permissions
: update for new abilities of ecoPortal release1.5.2
- decoupled abilities:
person_core
intoperson_core_create
,person_core_edit
- decoupled abilities:
[0.6.0] - 2020-07-14
Added
Ecoportal::API::Common::BaseModel#initial_doc
:#consolidate!
modifiesoriginal_doc
- this helper allows to know what was the initial document the object was created with
Ecoportal::API::Common::BaseModel#as_update
: added parameter (default::last
=> compare withoriginal_doc
)- calling it with
:total
will compare the currentdoc
with theinitial_doc
- calling it with
Changed
Ecoportal::API::Internal::Permissions
: update for new abilities of ecoPortal release1.5.0
- added abilities:
person_core
,person_account
,person_details
- removed ability:
people
- added abilities:
- renamed
print
topretty_print
to avoid overriding$stdout.print
, on:Ecoportal::API::Common::BaseModel
Ecoportal::API::Common::BatchReponse
Ecoportal::API::Common::Response
Ecoportal::API::Common::WrappedResponse
Fixed
Ecoportal::API::Internal::Preferences
: kiosk settings should default tofalse
(nil
)
[0.5.8] - 2020-06-23
Fixed
Ecoportal::API::V1::Person#filter_tags=
:original_doc["filter_tags"]
isnil
when creating a personEcoportal::API::Internal::Account#policy_group_ids=
:original_doc["account"]
isnil
when creating a person
[0.5.7] - 2020-06-22
Added
Ecoportal::API::V1::PersonSchema
: addedenable_tags
&tags
propertiesEcoportal::API::Internal::Preferences
: added missing fields for kiosk
Changed
Ecoportal::API::V1::People::JOB_TIMEOUT
: from 1 minute to 3 minutesEcoportal::API::V1::Person#filter_tags=
: will preserve the original order of the matching tags- this change is to prevent
as_update
to generate false update positives
- this change is to prevent
Ecoportal::API::Internal::Account#policy_group_ids=
: will preserve the original order of the matching ids- this change is to prevent
as_update
to generate false update positives
- this change is to prevent
Fixed
Ecoportal::API::Internal::Preferences
: accessdoc
using string keys (not withsymbol
keys)
[0.5.6] - 2020-06-08
Added
- this
CHANGELOG.md
file - person model:
freemium
core property