Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Igor Alexandrov
    @igor-alexandrov
    Again, I am getting an error with JSON::Serializable in feature/attacher branch. I tried to revert to JSON.mapping and it works fine.
    Screenshot 2020-05-18 at 14.59.25.png
    Wout
    @wout
    Aah, that one looks familiar. I had a similar issue when I ported the mollie.rb gem to crystal and I had to serialize JSON in a subclass of Exception (because the API retuns a json error).
    So that's the only part where I still used JSON.mapping:
    Because I didn't want to rework the whole exception implementation, I solved it by creating a Exception::Mapper struct which takes care of json serialization:
    It's not pretty, but it does the trick (for now).
    Just to see if I could make it work, I tried including JSON::Serializable in the Exception base class, but that doesn't work either, because then Exception's parent class started complaing.
    Wout
    @wout
    Crystal 0.35.0 will show deprecation warnings for JSON.mapping, which may annoy users (including me :). So I think that should be avoided.
    Igor Alexandrov
    @igor-alexandrov
    Sure it should. I will try to fix it with your approach.
    Igor Alexandrov
    @igor-alexandrov
    I've managed to fix all specs in feature/attacher branch.
    Wout
    @wout
    :tada:
    Looks great!
    Wout
    @wout
    @igor-alexandrov I've just picked up the thread with Shrine.cr. Next week I'll continue the work and I hope to have a working Avram adapter by the end of the week.
    Are you planning on doing some work in the meantime? Or shall I just port everything I need to do the work? (e.g. Attachment, Plugins::Derivatives, ...)
    I don't mind doing it, just asking. :smile:
    Igor Alexandrov
    @igor-alexandrov
    I will merge to master everything about Attacher today. Here is a PR: jetrockets/shrine.cr#9. Then I guess, you can update your PR jetrockets/shrine.cr#7 if there will be any conflicts, and we can merge it too.
    I think, I can start working on Attachment after this. What do you think?
    Wout
    @wout
    Sounds perfect. Then I'll rebase the dimensions-plugin branch from master so that can be merged as well.
    Today I'll make a small to-do list of things needed for the Avram adapter.
    Igor Alexandrov
    @igor-alexandrov
    Ok
    Igor Alexandrov
    @igor-alexandrov
    Merged Attacher to master. Also please take a look at Column plugin: https://github.com/jetrockets/shrine.cr/tree/master/src/shrine/plugins
    Wout
    @wout
    Fab! I know what to do this weekend. :)
    Igor Alexandrov
    @igor-alexandrov
    Yo! I started to work on FastImage (https://github.com/sdsykes/fastimage) implementation for Crystal. I believe first release will be ready tomorrow.
    Wout
    @wout
    Cool! It's the first time I look at FastImage closer. Sounds like the perfect tool for the dimensions plugin.
    Igor Alexandrov
    @igor-alexandrov
    yes, this is why I want to implement it
    Igor Alexandrov
    @igor-alexandrov
    Here is the first iteration, we already can get type of image for both HTTP and File. Hope to implement dimensions later today.
    Igor Alexandrov
    @igor-alexandrov
    Ok, I just pushed an update, we can get dimensions for BPM, GIF, PNG
    Wout
    @wout
    Sounds all great! I hope to play with it later this week.
    Igor Alexandrov
    @igor-alexandrov
    Hey. I think we should remove pixie from a dependencies list (as well as awscr-s3) and move them to development dependencies. General idea is that plugin dependencies should not be required by default.
    Wout
    @wout
    Makes a lot of sense. If they want to use the plugin, they should include the shard themselves. 👍️
    Igor Alexandrov
    @igor-alexandrov
    Yes
    Igor Alexandrov
    @igor-alexandrov
    I hope that this evening I will have some time to integrate fastimage to StoreDimensions plugin. Also I am still working on migration of UploadedFile to IO.
    Wout
    @wout
    I'll pick up my work on Shrine next week. I have a deadline for this weekend so I haven't had the time to look at everything properly. But I'm really looking forward to it. :)
    Wout
    @wout
    Hey, from now on I'll have a bit more time to help on Shrine.cr.
    Let me know where you need help. Can I add more plugins, do some work on Lucky to ease implementation, ...
    Igor Alexandrov
    @igor-alexandrov
    Cool, I started working on Avram integration and also doing some refactoring
    I think that I will push everything I have tomorrow morning and we can discuss how it will be better to do with Avram
    Wout
    @wout
    Great. I'm really looking forward to having Shrine.cr available in Lucky.
    Igor Alexandrov
    @igor-alexandrov
    currently I create a small module that adds attachment macro
    module Shrine::Avram
      macro attachment(type_declaration)
        {% asset_name = type_declaration.var %}
    
        column {{ asset_name.id }}_data : JSON::Any
      end
    end
    and now I am somewhere in the middle of Operation integration
    Wout
    @wout
    Looks good. Do you think changes are required to Lucky for everything to work?
    Igor Alexandrov
    @igor-alexandrov
    To be honest – I don't know yet
    Wout
    @wout
    Ok :)
    Let's pick this up tomorrow once you pushed everything.
    Igor Alexandrov
    @igor-alexandrov
    Small question about forms: how to generate multipart: true form with form_for helper?
    I think, I've got it