Socket
Book a DemoInstallSign in
Socket

ey_resolver

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ey_resolver

0.2.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

EY::Resolver

Resolves a set of query options to an Array of AppEnvironment (AppDeployment) that best match the query. At least one query parameter must be 'app_name' or 'remotes' or it raises EY::Resolver::UnconstrainedError (ArgumentError).

It works by first doing a pass asking for any AppEnvironments that have the query arguments as substrings, keeping only those that match all query params.

Next, if remotes were passed, and 'app_name' was not, it constrains by remotes using Gitable::URI's equivalent matching algorithm to restrict to only those with the right remote URIs (public and private repo URIs should match).

Lastly, it tries to discover better matches by scoring each match based on the number of exact matches it has. An exact match means the query param is exactly the full string of the matching attribute.

The results are all AppEnvironments that have the same top exact match score. It's possible for there to be more than one result that matches equally.

Example

query = {
  'account_name'     => 'ey',
  'app_name'         => 'app',
  'environment_name' => 'resolver',
  'remotes' => ['git@github.com:engineyard/app-env-resolver.git']
}
results = EY::Resolver.awsm_resolver(query, current_user).app_environments
results   # An Array of AppEnvironment (AppDeployment) models that best match the query.

FAQs

Package last updated on 21 Oct 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.