-
Notifications
You must be signed in to change notification settings - Fork 260
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
Rails 5.2 #505
Rails 5.2 #505
Conversation
… to remove DEPRECATION WARNING
@btyy77c, Thanks very much for this pull request! As per usual for Rails updates, we'll want to test this a bunch before merging, and give it a pretty thorough review. I'll start by just making sure I can run it in Docker without errors (which I expect will be no problem). In any case this looks great! 🎉 Happy Hacktoberfest to you! 🎃 💻 🍂 ✨ |
As an aside: I notice some of these commits are made with a different git "name" and email set than your official GitHub name/email combo. So not all of these commits would get attributed to your GitHub account properly when we merge.
If you want to go back and fix this (or have us fix it), it should be doable. Here's two methods: (Edit to add: If something were to go wrong with fixing name/email in these commits, I have a backup branch I intend to leave in the same state this PR started with, at least for the time being: https://github.com/DeeDeeG/RefugeRestrooms/tree/rails52-backup) Trying this pull request out in Docker as soon as I get Docker installed on my new Ubuntu install. |
I was able to test this branch in Docker. It mostly works as intended, but I noticed a few problems.
I may have missed some things, but anyways, that's enough things to start with. Thanks again, I do think this is a good place to start from. Should be fixable. 👍 |
When I visit production, the api is not working: (https://www.refugerestrooms.org/api or https://www.refugerestrooms.org/api.json) Is there a different route or something else I should be checking? Thanks! |
The API page can be visited at Edit: Trailing forward-slash is important! |
I think there is something off with our Docker setup, because none of the dummy entries from On Screenshot of the API page, showing just one result Edit: This is fixed with #508 |
So, I'm not sure how long you've worked on this application, but do you know the history of why the |
Sorry! I didn't mean to close the pull request. I normally use gitlab and I'm apparently terrible with GitHub. |
This was before I came in. But I guess it's sort of a hack/kludge that lets this page be viewable without doing a lot of route configuration and so on.
No, I think that is just how the contributor who added this ended up doing it. Ideally, in my opinion, we would go in and install this as a proper nodejs package via our Edit: Technical typos.
No worries! (It's nice to hear not everyone is on closed platforms, and totally open-source workflows are viable.) (P.S. I think GitHub is fine, for the record, but it is always good to have options than no options. And GitLab is pretty neat.) |
From #492 (comment):
|
Sorry to bother you @btyy77c. (These pull requests you have put in are really helpful!) To clarify about the commit author deatils: Does it bother you if these commits aren't linked to your GitHub account? If so: Please let us know what e-mail should be in these commits to properly link to your account. I'm prepared to rebase the pull requests with the correct author info if that works for you. You can check what e-mails are already linked to your GitHub account (or even add another email address to your account) here: https://github.com/settings/emails Edit: As a reminder, there is a totally anonymous email option that still links these commits to your GitHub account. That would be the If not, or if you'd actually prefer these commits not be linked to your account (better anonymity, etc), please let us know. That is no problem, but I'd hate to use someone's work without crediting them, or at least confirming how they do or don't want to be attributed. Thanks again! - DeeDeeG |
I don't have a preference either way. I use gitlab mostly and I don't want to change my email to anything like |
Edit: I think this comment is incorrect, actually. See next comment. Hi again, I did get to take another look at this. The primary issue left with this pull request is the API documentation page not working. I am pretty confident that has to do with our API being built against an older API spec, and the new We would need to update our actual API code to fix this; I made issue #516 to address it. For now I'd recommend rolling back I'm also taking a look at the way the new config files are merged, but everything generally works as expected when I boot this up in Docker, so the config files are not likely to need changes, or else they would just be small tweaks. Best, - DeeDeeG |
Well, the updated I will try to see if there is any way to get the new swagger setup working on Rails 5.2.1, and if so I will update here. Then we can probably merge this and #506 once we get them working together. |
For some reason, on this branch I get two requests for "/api/swagger_doc.json" every time I visit the API docs page: Started GET "/api/swagger_doc.json" for 10.0.2.2 at 2018-10-16 02:42:03 +0000
Started GET "/api/swagger_doc.json" for 10.0.2.2 at 2018-10-16 02:42:03 +0000 Edit: This happens in |
In the process of troubleshooting this pull request, I went and performed a Rails 5.2.1 upgrade over again from scratch in this branch: https://github.com/DeeDeeG/refugerestrooms/tree/rails-5.2.1 It's a bit more minimal in terms of changes, and it does work, including the API documentation page. I only updated the minimum amount of Gems required, didn't enable the I still can't figure out why this pull request broke the API page. After all of this, I might lean toward just merging that branch. But the proof that this was easy enough to do in an afternoon, and some impetus to actually get this done, is still owed to this pull request, regardless. So thanks again. Best regards, - DeeDeeG |
I (finally) figured out what was going on with the API page. This branch still has the old Upgrading the So that match-up is what breaks the docs page. (Evidently the API itself did not break, just the page explaining the API to end-users. That's why our tests all passed anyway. I think we should add some RSpec tests to the API docs page at some point, so we test that page, and not just the raw API calls.) In short: We can fix the API docs page for this pull request by using older |
This commit reverts to older grape and grape-swagger to fix the API docs page. (Our current swagger-ui version needs older versions of grape and grape-swagger. We can update these gems again when we update swagger-ui.)
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.
Now that the API docs page is working, I'm good to merge this.
Thanks!
(Aside: I did end up changing the author/committer email to one that GitHub would recognize.)
Update to Rails 5.2
Context
Summary of Changes
expect(response).to be_success
toassert_response :success
Checklist
Screenshots
Before
After