Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/shrinerb/shrine
File Attachment toolkit for Ruby applications
https://github.com/shrinerb/shrine
If someone is splatting the arguments of the given lambda, the arity
will be negative, so we con...
We can instead just check the arity of the given block, and pass the
appropriate amount of argum...
Passing upload options via {"s3" => {...}} was always awkward. I did it
to preserve backwards co...
This change makes the following work:
Shrine.plugin :download_endpoint,
storages: [:store...
It isn't necessary that clearing the storage needs to be confirmed;
deleting all records in the ...
The previous JRuby version started hanging randomly, making Travis error
due to timeout. Perhaps...
d492c7a5ad84ab9ceec0763160ddbb53c7c4dc55 authored over 8 years ago by Janko Marohnić <[email protected]>
31c280a43280ff1046b8b89162f615eed1fa9363 authored over 8 years ago by Janko Marohnić <[email protected]>
Prior to this change you couldn't combine other analyzers, because the
lambda specified as a cus...
This is even recommended, as some storages like S3 or Cloudinary will
avoid downloading/uploadin...
This is not necessary, as the code will error anyway if the cached file
doesn't exist (in the ca...
The idea of this plugin was very fuzzy in the first place. It was just a
collection of helper me...
This change adds the same method signature to #_promote that #promote
has. Also, now the `:phase...
This makes restore_cached_data not trigger when form is submitted again
with the cached attachme...
965d5a27560b1811c38d040f346f2a5c4b15c5b3 authored over 8 years ago by Janko Marohnić <[email protected]>
Now that Attacher#delete! was made public, users should be able to use
it synchronously even if ...
It makes more sense that the attacher can dump itself, and it makes the
implementation shorter b...
This is handy when you want to customize the upload process, and you
want to cache/store/delete ...
I thought that the block will always be deterministic, that the storage
will always be determine...
Roda's streaming plugin was designed for when you have custom streaming
logic. However, all we h...
What we do in download_endpoint is turn #stream method on the storage
into an Enumerator. We the...
The "mime_type" metadata field is by default set from "Content-Type"
request header. However, th...
7f3dd8742c5f0d0a844a5aad88dcd7ea28053f27 authored over 8 years ago by Janko Marohnić <[email protected]>
ea09e97f3e1aa61b14d3ea453a108bdf85f6753b authored over 8 years ago by Janko Marohnić <[email protected]>
Mongoid records return a BSON::ObjectId when you ask them for an ID,
which isn't serializable to...
We may want to use Shrine in an application where some models are Sequel
models, and others are ...
This removes any visual ambiguity when reading the code. This is because
Attachment#name already...
99b7091b9cdbb2a94e10f9cd4dc825eb7055d4d5 authored over 8 years ago by Janko Marohnić <[email protected]>
They are aliases, but since an instance of Shrine::Attachment is a
module, it's more intention r...
Before we were calling it through ActiveRecord::Migration, which added
additional migration outp...
5817f12e9cff4500ba66bf51be020be3b55c0678 authored over 8 years ago by Janko Marohnić <[email protected]>
It's useful for contributors or people who are interested to learn about
how Shrine is designed.
The json_parser Roda plugin parses JSON request body and merges the hash
into `request.params`. ...
We change this in the README, to hint that Shrine does not only have
functionality for uploading...
We've had a journey through trying to eliminate an actually harmless
race condition, through whi...
Since the :"#{name}_data" symbol will already be declared even without
Shrine, using it won't al...
b893b3701d4be2dbc170b035d2bb74229672de40 authored over 8 years ago by Janko Marohnić <[email protected]>
1d978ae5d4878428447b68bfb9d845a92d558dc5 authored over 8 years ago by Janko Marohnić <[email protected]>
The `file` utility's option parser is greedy and interprets every
argument that begins with a hy...
This is a backwards-incompatible change which we didn't (couldn't)
deprecate before, and it's no...
It's really useful to be able to use the memory storage when developing
external plugins, so ins...
60dab37ef80b9e5185deaafbf409f445ed11d784 authored over 8 years ago by Janko Marohnić <[email protected]>
This is preparation for the upcoming shrine-reform gem, so that the
following is possible:
Sh...
68ddd6097efebdc6fbfde19c763676a68bec778a authored over 8 years ago by Janko Marohnić <[email protected]>
We remove "users" and "avatars", because these are old terms. People
should never have a "User"...
26190c0a6eb32e91076b18c9cf745c2ac1275c31 authored over 8 years ago by Janko Marohnić <[email protected]>
1d5a99be0e443e9f8ab4b841a7f04e230f13a932 authored over 8 years ago by Janko Marohnić <[email protected]>
This was accidentally left over when we were removing
`Shrine#default_url`.
We just use the default length of `SecureRandom.hex`, which is 32, where
before it was 60. This ...
The default behaviour should be non-pollution, so we make the pollution
opt-in rather than opt-out.
The moving plugin was previously playing a double role: if the storage
supports moving, the file...
The deprecation warning adds clutter to test output.
63d3c43e691f23bbf1bfe9d4265c3ebf003a4f9d authored over 8 years ago by Janko Marohnić <[email protected]>32e11d281f5b545962e7b240abfda25289a948e8 authored over 8 years ago by Janko Marohnić <[email protected]>
Rubinius has mutable versions, meaning new code can be republished on
the same version, which me...
replaced => replace
destroyed => destroy
stored => abort
invalid => validate
We did this ...
d4969e676da6069d1158d7aa70cbeac5d225f9f9 authored over 8 years ago by Janko Marohnić <[email protected]>Developers should use the default_url plugin instead.
448167ca4b3775d8b7991d5dd41fc5018c230915 authored over 8 years ago by Janko Marohnić <[email protected]>6e651aae57242848c2f41f9aafcf254551947df4 authored over 8 years ago by Janko Marohnić <[email protected]>
This will instantiate a new Shrine::UploadedFile instance which isn't
used anywhere in Shrine, s...
The attacher instance contains more information than the record, and it
makes more sense since w...
The "name" key is more accurate than "attachment", because that's what
it is. The "attachment" k...
aeec297fae2038173be3269a006a20af3ece6c7f authored over 8 years ago by Janko Marohnić <[email protected]>
f4ec3fd2dffdb0e8b09e4d4280d9885ef15b8486 authored over 8 years ago by Janko Marohnić <[email protected]>
be32968e420c6c05c71dbc001f3a66c06800cdfc authored over 8 years ago by Janko Marohnić <[email protected]>
This is consistent with other metadata-extracting Shrine's methods.
62954446554f38a853a1f3d68747364609ae741e authored over 8 years ago by Janko Marohnić <[email protected]>
Shrine's #extract_mime_type method is private, but the
determine_mime_type plugin accidentally m...
This was left over from the implementation in version 1.4.1 where we
used Sequel's instance_filt...
ef2789324a6b84cf0f025fe7b2d1a971bfb1eebc authored over 8 years ago by Janko Marohnić <[email protected]>
3edc0029a8841f7f46ad0360b639eafbc1214005 authored over 8 years ago by Janko Marohnić <[email protected]>
The filename of a Tempfile doesn't contain any useful information, it's
just an randomly generat...
63fdbfb9cce2ff8a70b2a08547fba14f8a7a6b5f authored over 8 years ago by Janko Marohnić <[email protected]>
This was the behaviour when Shrine#extract_metadata was receiving
Shrine::UploadedFiles. The det...
UploadedFiles aren't passed to Shrine#extract_metadata anymore, so we
can safely remove this check.
8cc2ef72816cad8db9d4a7b6e2765d384ce69731 authored over 8 years ago by Janko Marohnić <[email protected]>
This commit reverts the behaviour of promoting as it was in 1.4.0.
Version 1.4.1 introduced some...
378b6c57fb054ac4efb85d60c6d6055d5fda6ab6 authored over 8 years ago by Janko Marohnić <[email protected]>
6ee8d07c369d67b1c2c90b0d38e7377e56cf4256 authored over 8 years ago by Janko Marohnić <[email protected]>
In 1.4.0 we switched promoting to updating through datasets/relations,
to eliminate a tiny possi...
10151db5d0bb2a4a329950d1cdb6b9d6fc55045e authored over 8 years ago by Janko Marohnić <[email protected]>
919f3fe4e55a7e9aeab1537f9a1ac5e1a21979eb authored over 8 years ago by Janko Marohnić <[email protected]>
c86e35ea5002a1bb62ddd76bd67dd6bab6aab9a6 authored over 8 years ago by Janko Marohnić <[email protected]>
d438d608e30a46750d517d859f14b444cad67fb5 authored over 8 years ago by Janko Marohnić <[email protected]>
8522fd84418aeffe7002f5bf7e65b86115a17d80 authored over 8 years ago by Janko Marohnić <[email protected]>
59ab22e6f0253a7269b44fcafe269998d4c05909 authored over 8 years ago by Janko Marohnić <[email protected]>
4fa0fe875ada1bd11c3820b9ebf10161e75a6622 authored over 8 years ago by Janko Marohnić <[email protected]>
This way we don't have to repeat rewinding for every analyzer, and the
user doesn't have to reme...
We also document the delete_promoted plugin here, since we forgot to do
so before.
Current behaviour was that before_* and after_* hooks happen inside the
around_* hook, which mea...
The "restore_cached" name indicates that somehow the cached file itself
is somehow restored. The...
This content length is used by the download_endpoint plugin to assign to
the Content-Length resp...
There are a lot of subtle things we're taking care of in the linter (in
order to work for differ...
710b477cf4336527026a899d25666ca94290b8fe authored over 8 years ago by Janko Marohnić <[email protected]>
If a user uploads something that isn't an image which you cannot extract
dimensions from, dimens...
e8b1bf2e755a61b1b0d84f2a5c53a38f4e43a72f authored over 8 years ago by Janko Marohnić <[email protected]>
77964dd518f62efd8181cdc78c3d9210ca60c232 authored over 8 years ago by Janko Marohnić <[email protected]>
Returning the Content-Length is really useful e.g. for downloading
files, where the browser can ...
Requiring a dependency just for a simple functionality of thread pools
is an overkill. So we swa...
4a9c0dffc778a330696b16821aedcfd901309e2b authored over 8 years ago by Janko Marohnić <[email protected]>
Generating a filename for an IO assigned through a data URI is useful
when we want the file to b...
Currently if hooks plugin was loaded before logging, anything
user-defined inside those hooks wo...
It's useful to be able to generate the key yourself for presigned
uploads. A common use case is ...
Instead of making the :presign option play a double role of choosing
presigns and setting presig...