-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add a basic ping endpoint #39
Conversation
@@ -5,6 +5,8 @@ | |||
root :to => "api#index", :as => :entrypoint | |||
match "/", :to => "api#options", :via => :options | |||
|
|||
get "/ping" => "ping#index" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ping or /api/ping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's under the api namespace, so it's /api/ping
I see it's based off ActionController::API and not BaseController, so the intent is to have it ignore authentication then ? Other than that, being /api/ping, we can not have a collection in the future called "ping", I think that's ok 😏 If so, I'm good with this. maybe a simple test for it expecting the pong. Thanks @bdunne |
|
ping @bdunne 😄 can you add a small test when you get a chance ? Thanks. |
4c2a205
to
2639102
Compare
spec/requests/ping_spec.rb
Outdated
@@ -0,0 +1,8 @@ | |||
describe "PingController" do | |||
it "get" do | |||
get("/api/ping") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor, could you update to use the rails helper for consistency with the other specs.
run_get api_ping_url
Thanks,
2639102
to
38b811a
Compare
Allows us to know whether the API server is ready to serve requests
38b811a
to
01c8265
Compare
Checked commit bdunne@01c8265 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Thanks @bdunne for updating the test. will merge when 🍏 |
Allows us to know whether the API server is ready to serve requests