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

Add Avram to the ORM adapter roadmap #1

Open
watzon opened this issue Dec 10, 2019 · 12 comments
Open

Add Avram to the ORM adapter roadmap #1

watzon opened this issue Dec 10, 2019 · 12 comments

Comments

@watzon
Copy link

@watzon watzon commented Dec 10, 2019

Avram is the Lucky Framework's ORM, and as Lucky is currently one of the best built (my opinion) and most popular web frameworks for Crystal it would make sense to make an adapter for it. I'd be happy to work on it as soon as another adapter has been written for me to go off of.

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Dec 10, 2019

Done. I am currently working on Attacher class, that will give an ability to start working on a ORM adapters (you can read more about it here: https://twin.github.io/upcoming-features-in-shrine-3-0).

As soon as Attacher will be done, I will notify you.

@watzon

This comment has been minimized.

Copy link
Author

@watzon watzon commented Dec 10, 2019

Perfect. I just need that and a working S3/Minio backend and I'll be golden. Thanks for this!

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Dec 10, 2019

@watzon what best (at least working) library for AWS S3 you can suggest?

@watzon

This comment has been minimized.

Copy link
Author

@watzon watzon commented Dec 10, 2019

There's only one existing library that I know of, and I don't know if it's been kept up to date. I'll look into it tomorrow for sure.

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Dec 10, 2019

I added new issue: #2, let's continue discussion about S3 in it.

@wout

This comment has been minimized.

Copy link

@wout wout commented Jan 13, 2020

I am in the same boat as @watzon. Having Attacher and AWS S3 support would be awesome.

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Jan 13, 2020

@wout I am currently working on Attacher. Will try to find somebody to implement S3 support.

@wout

This comment has been minimized.

Copy link

@wout wout commented Jan 13, 2020

@igor-alexandrov Great, thanks for letting me know. Just out of interest, are you porting shrine as-is? Or are you putting your twist on it?

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Jan 14, 2020

@wout I started this as a complete port of Ruby library, but actually it already differs a lot. So I am open to suggestions.

@smadeja

This comment has been minimized.

Copy link

@smadeja smadeja commented Jan 23, 2020

I'm happy to help with implementing S3 and Avram support.

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Jan 23, 2020

@smadeja the good news is that @Arina1004 is already working on S3 support and I believe we will release it pretty soon. So, let's focus on ORM adapters. I will prepare branch with Shrine::Attacher class tomorrow and we can start.

@igor-alexandrov

This comment has been minimized.

Copy link
Member

@igor-alexandrov igor-alexandrov commented Jan 24, 2020

@smadeja, @wout, @watzon I pushed feature/attacher branch.

Now we can start working on ORM adapters. Based on this article https://twin.github.io/upcoming-features-in-shrine-3-0/, it will work like this:

attacher = Shrine::Attacher.new
attacher.assign(file) # uploads file
attacher.file #=> #<Shrine::UploadedFile id="abc123.jpg" storage=:store ...>

# ...

attacher.data #=>
# {
#   "id" => "abc123.jpg",
#   "storage" => "store",
#   "metadata" => {
#     "size" => 9534842,
#     "filename" => "nature.jpg",
#     "mime_type" => "image/jpeg",
#   }
# }

Let's move S3 discussion to the #2, as I already said @Arina1004 is already working on it.

What I am looking for now is:

  • Implement Shrine::Attachment
  • Added first ORM adapter (e.g Avram).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.