v2.2 #248
Conversation
The generator is used to created very simple files. They're adding complexity to the gem without providing much value. More details should be added to the README instead.
Give more details about initializer in the Readme to compensate for the removal of generator.
hey @nsarno, please take a look at this one: #240 And here's how people suggest to fix it to work nicely with Zeitwerk: rails/rails#36381 (comment) |
@FunkyloverOne I've made some changes to address the issue. Here is what I get when running the zeitwerk check in a Rails 6.0.1 app with Knock install from this branch.
|
- Implement `respond_to_missing?` - Fix some minor styling and convention issues
`Knock::Tokenizable` can be included in the entity model (e.g. User) to provide token serialization and deserialization. Works out of the box with the same sensible default payload format and fetching method using `#find`. Or the methods can be overriden as usual. This brings some convenience to implement a custom token creation endpoint without relying on Knock's AuthTokenController which I'm trying to move away from. This allows for the possibility to make Knock even simpler by packaging it as a simple gem instead of Rails engine. Less magic, more simplicity and ease of customization. Just as easy to get started with clear documentation.
Hello @nsarno Here are some issues I think would be welcome on 2.2:
I think that's it... What do you think? |
Hi, I'm here to asking when will this update version been published? Now my rails 6.0 project is having some mentioned issues that would be fixed by this PR. |
For now, we can simply update the doc. Ultimately, I would like to move away from relying on I'll try to address the other issues in this version. @Lax I'm aiming at releasing it this month. |
* fixing default code style * allowing gem's user to change token lifetime * changing the default to user * wip applying changes * wip apply suggestions from code review * wip apply suggestions from code review (README.md) * apply suggestions from code review (README.md) * test added and entity class access changed * pry added to the project * tests for default user and superuser * removing pry and fixing documentation * rewriting test message
@nsarno When will this be released? Thanks! |
@maxrosecollins This looks ready actually. I was hoping to fix some other issues as part of this version but I didn't get to it so I'll just merge it as is for now. |
@maxrosecollins master is green again, good times. Thanks for the gentle ping. If you (or anyone else here) test their project with the new master and can confirm everything is working well, that would be greatly appreciated and would give me some extra confidence to release the new version to RubyGems. Cheers! |
@nsarno still don't see this on rubygems... |
@swrobel are you confirming that you've tested the new master, think it's working great and validating I can ship this to RubyGems? Or is this just your polite way to point out I'm not doing this unpaid job fast enough for you. |
Would you mind tagging v2.2 at least? I'd be happy to test in that case, but I'm not going to just add master to my Gemfile willy-nilly. |
@nsarno It seems to run smoothly locally but when I put it into my production environment, I'm getting the following error. I'm not sure if that just something I've done wrong...
This line is And I get the same error if I call
|
@nsarno Okay, my mistake, I had |
@swrobel I don't think you have to add gem "knock", github: "nsarno/knock", branch: "master",
ref: "9214cd027422df8dc31eb67c60032fbbf8fc100b" |
@nsarno Great work, I'm successfully using knock at commit For anyone trying to get things working in their own app, I wrote a blog post explaining how I did things: https://davidgay.org/programming/jwt-auth-rails-6-knock/ |
@nsarno It's working smoothly for me in prod too |
Working nice for me as well. Thank you @dtgay for the guide! |
Draft Pull Request for v2.2
Feel free to comment with links to issues or changes you believe should be added to this version.
Changes