-
Notifications
You must be signed in to change notification settings - Fork 74
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
Use baked_file_system shard instead of custom implementation #29
Conversation
|
||
module Sidekiq | ||
# This could be extracted and genericized as a virtual filesystem macro. | ||
# This work is left as an exercise to the reader. | ||
module Filesystem | ||
class Filesystem |
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.
Why does it need to be a class now?
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.
Good point. Works absolutly same way :)
d2c0d06
to
4732757
Compare
I noticed original version of assets had compression and that is reason why tests for assets fail. It can be done as separate functionality require "baked_file_system"
require "baked_file_system/compress"
module Files
BakedFileSystem.load("...")
end
file = Files.get("something")
compressed_file = file.compress
compressed_file.read
compressed_file.mime_type
# etc...
edit: nvm. It is compressed inside binary and you decompress it. Good idea. But for saving space, there should be limit for compression. Some small files are bigger when compressed. |
Something is wrong with the Travis CI Crystal setup so the build always fails. I don't know who to contact or how to fix.
|
Sorry, first of all: thank you for this work. It's great to see my off-hand comment picked up and developed by someone else thousands of miles away. OSS is so cool! |
As for implementing compression, it looks like
|
4732757
to
6b297bf
Compare
6b297bf
to
5038e2e
Compare
Fixed by 0d9765e |
@mperham Got inspired by your idea (because it is awesome to have assets inside binary) and parallely made standalone shard, where I learn some Crystal https://github.com/schovi/baked_file_system
I would be honored if you can give me feedack or even accept this PR .)