
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
entrata
Advanced tools
Ruby client for Entrata API
curl to avoid errors on large responsesAdd this line to your application's Gemfile:
gem 'entrata'
And then execute:
$ bundle
Or install it yourself as:
$ gem install entrata
No gem configuration, but getting an access token (via Entrata::Client.get_access_token) requires client_id and client_secret in addition to auth_code provided by Entrata on property activation.
All API access is performed via the Entrata::Client class.
There are two usage patterns:
Class methods are available for convenience of this one-time call sequence per PMC
auth_code = 'received from activation endpoint'
client_id = ENV['ENTRATA_CLIENT_ID'] # Apartmentlist assigned client_id
client_secret = ENV['ENTRATA_CLIENT_SECRET'] # Apartmentlist current client_secret
token_hash = Entrata::Client.get_access_token(auth_code: auth_code,
client_id: client_id,
client_secret: client_secret)
client_info = Entrata::Client.get_client_subdomain(token_hash['token'])
subdomain = client_info['subdomain']
# create or update Entrata credential with token and subdomain
An instance of the Entrata::Client may be created per PMC to request authenticated resources available under its subdomain.
credential = #find by PMC or iterate all entrata credentials
token = credential.fields['access_token']
subdomain = credential.fields['subdomain']
client = Entrata::Client.new(subdomain: subdomain, token: token)
remote_property_id = #get from activation
client.process_property_activation(remote_property_id) #defaults to 'approve'-ing the activation
property_hash = client.get_property_info(remote_property_id)
multiple_property_hash = client.get_ils_properties_data([remote_property_id])
A test client is available for integration testing in your consuming application.
Entrata::TestClient behaves like Entrata::Client, but returns static responses or raises errors just like the real client would. It never makes any real HTTP requests.
Entrata::TestClient defaults to providing successful (static) responses collected from the real API.
You may force failure by providing specific ("fail") input values. See below for specific trigger parameters:
# Providing "fail" to specific parameters will raise `Entrata::Request::Error` just like the real client would.
Entrata::TestClient.get_access_token(auth_code: 'fail', client_id: 'anything', client_secret: 'anything') #BOOM!
Entrata::TestClient.get_client_info('fail') #BOOM!
test_client = Entrata::TestClient.new(subdomain: 'anything', token: 'anything')
test_client.get_property_info('fail') #BOOM!
test_client.process_property_activation('fail') #BOOM!
test_client.get_ils_properties_data(['at', 'least', 'one', 'fail']) #BOOM!
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
FAQs
Unknown package
We found that entrata demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.