jetrockets / shrine.cr

File Attachment toolkit for Crystal applications. Heavily inspired by Shrine for Ruby.
https://jetrockets.github.io/shrine.cr/
MIT License
74 stars 16 forks source link

Remove JSON.mapping in favor of JSON::Serializable. #6

Closed wout closed 4 years ago

wout commented 4 years ago

It was already in there, commented out, so I simpley re-enabled it. JSON.mapping will be deprecated in Crystal 0.35.0.

https://github.com/crystal-lang/crystal/pull/9272

Also corrected the Crystal version in shard.yml because 0.34 (instead of 0.34.0) raised an error for me.

wout commented 4 years ago

For some reason, specs ran green locally, but not in Travis. Changing all stubbed requests to https fixed that, but now they run red locally. 😂️

I suspect that's something in awscr-s3, I'm looking at it now.

igor-alexandrov commented 4 years ago

I tried to migrate to JSON::Serializable a couple of months ago. Something went wrong (don't remember exactly) and I reverted it.

wout commented 4 years ago

Ok, I figured out why those specs failed locally and not on Travis. There seems to be a version issue with the awscr-s3 shard. Something strange is happening. Locally, v0.7.0 of the shard is used, while Travis CI uses the master branch. The shard is configured to pull the master branch, so I am not sure why this is happening:

dependencies:
  awscr-s3:
    github: taylorfinnell/awscr-s3
    branch: master

I asked Taylor Finnell to tag a new version: https://github.com/taylorfinnell/awscr-s3/issues/78

The changes form this PR can be merged safely because they do reflect the latest changes in the master branch of awscr-s3.

igor-alexandrov commented 4 years ago

Thank you!