Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(QENG-2208) Move Sinatra Helpers to own file #94

Merged
merged 1 commit into from
Apr 15, 2015

Conversation

colinPL
Copy link
Contributor

@colinPL colinPL commented Apr 15, 2015

This moves the inline Helpers contained in V1.rb to their own file:
helpers.rb. In making this change, any API.settings call was removed
from the helper method itself and passed through from V1.

This also adds tests for hostname shortener and validate date string.

result[:capacity] = get_capacity_metrics()
result[:queue] = get_queue_metrics()
result[:capacity] = get_capacity_metrics(Vmpooler::API.settings.config[:pools], Vmpooler::API.settings.redis)
result[:queue] = get_queue_metrics(Vmpooler::API.settings.config[:pools], Vmpooler::API.settings.redis)
result[:clone] = get_task_metrics('clone', Date.today.to_s)
result[:boot] = get_task_metrics('boot', Date.today.to_s)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These get_task_metrics calls need to be passed a Redis object.

This moves the inline Helpers contained in V1.rb to their own file:
helpers.rb. In making this change, any API.settings call was removed
from the helper method itself and passed through from V1.

This also adds tests for hostname shortener and validate date string.
@sschneid
Copy link
Contributor

👍

sschneid added a commit that referenced this pull request Apr 15, 2015
(QENG-2208) Move Sinatra Helpers to own file
@sschneid sschneid merged commit 331ac33 into puppetlabs:master Apr 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants