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
06e88cad274965728083b6b9420c692c1b0b9f39 authored over 8 years ago by Janko Marohnić <[email protected]>
With ROM it's usual to define models as immutable value objects which
don't have writer methods ...
We already depend on the #find_record method in backgrounding plugin,
which we can use to check ...
3f0072f66fdf52b6316ca744c7ce5306153dde65 authored over 8 years ago by Janko Marohnić <[email protected]>
51f21d83eff5fc43a9a6b2c73e951d0ca2f3bb0a authored over 8 years ago by Janko Marohnić <[email protected]>
The base functionality makes this a public method, so we should keep it
that way in other plugin...
edd9f59a6425d300a57ff4d7d45640e5830dfe53 authored over 8 years ago by Janko Marohnić <[email protected]>
Different systems can have different default permissions. Moreover,
upgrading the same system ca...
a370864c3e6768cd21c739578f65c1610754484d authored over 8 years ago by Janko Marohnić <[email protected]>
Directories generally shouldn't have set permissions, especially they
shouldn't default to :perm...
032155838e7165c2b991c714bee62f5b12ac3ea0 authored over 8 years ago by Janko Marohnić <[email protected]>
f01f048ad21dcfd2acaf199ff1ebd5253843e8fa authored over 8 years ago by Janko Marohnić <[email protected]>
3a212677ba5f063187c6acb75a4657f17c9a9fc2 authored over 8 years ago by Janko Marohnić <[email protected]>
e352a0045f3e1633eef74533eee0baf8a1877c42 authored over 8 years ago by Janko Marohnić <[email protected]>
Previously users needed to remember to rewind the IO themselves, but now
the add_metadata plugin...
Now that we are creating a method, it's much more naturally to define
new metadata values with s...
Since this plugin is used for adding new metadata, it's nice to also
create reader methods as sh...
3f5911df108057bf4cbdce0934f36dbfa60b52d5 authored over 8 years ago by Janko Marohnić <[email protected]>
5a58b4d0fff4790847f87146d52b35984bd5d0a4 authored over 8 years ago by Janko Marohnić <[email protected]>
The :phase attribute was initially either named like that to mark the
notion of "attachment phas...
6a34f2386c987b1f58b1a5d94749aae6b7b1f610 authored over 8 years ago by Janko Marohnić <[email protected]>
f3ba70a1a59c3b9d88d8b7bf3d02954637985352 authored over 8 years ago by Janko Marohnić <[email protected]>
2ec9eb664af37a1da82a6b49cd7793f30858c480 authored over 8 years ago by Janko Marohnić <[email protected]>
89210acaa3afdea3e5bf7a72c4626c0175bd450f authored over 8 years ago by Janko Marohnić <[email protected]>
126d873489d59f17016debab674854126f20170e authored over 8 years ago by Janko Marohnić <[email protected]>
If folks are using form objects and/or are separating operation objects,
they might not want cal...
7d07aa5eddcdec7858469463a2b3c5781db039be authored over 8 years ago by Janko Marohnić <[email protected]>
9893ed5ecb209524793176d86c313011791077e5 authored over 8 years ago by Janko Marohnić <[email protected]>
The :presign option was an unnecessary security concern, where we wanted
that the user can choos...
e2d0c15fbe06817d156e5baddd72611b982611b9 authored over 8 years ago by Janko Marohnić <[email protected]>
The "Process" Ruby constant already exists, which can cause name clashes
in existing plugins (e....
If the delete_raw plugin is loaded after moving plugin, it can happen
that the moving plugin mov...
We don't need to require storages to implement #download, if we can
download just using #open.
...
92bf4eaae96a84aad9d2bad0481e5a0add41f284 authored over 8 years ago by Janko Marohnić <[email protected]>
This methods temporarily opens the underlying IO and yields it to the
block, closing it after th...
The #clear! method is not used anywhere by Shrine, and is merely a
convenience method for deleti...
Some users don't want to include Shrine's attachment module to their
modules in order to avoid p...
Even though this plugin technically only adds syntactic sugar for
defining processing, it is now...
This plugin allows us to convert:
def extract_metadata(io, context)
super.update("exif" =...
Open3 raises Errno::ENOENT when a command is not found, so we rescue
this and present a better e...
We are not passing filenames to the file command anymore, so this error
cannot occur.
Previously we needed to define processing in the following way:
def process(io, context)
...
Now that we connected the "Quick start" section to the rest of the
README, we should remove the ...
This method is redundant, because it can be replaced by the following,
which has the same functi...
This section applies in general to any Rack endpoint, and it's not
something that this plugin he...
25341141ef1f0ac489e9bda0ed9f9f9c0ef98a15 authored over 8 years ago by Janko Marohnić <[email protected]>
Rack 2.x requires Ruby 2.2.2+.
677b60b9d89537054478d229e2f44956305ae88c authored over 8 years ago by Janko Marohnić <[email protected]>
The behaviour should still be the same, but this way we can specify
teardown separately, which f...
63971f30efb0c9f9df403fa5d9e572013e30f10d authored over 8 years ago by Janko Marohnić <[email protected]>
6442b690de70070a11ff57816cf28237cc88f999 authored over 8 years ago by Janko Marohnić <[email protected]>
06c09f3ecd772f4698617520e430bc00b8913926 authored over 8 years ago by Janko Marohnić <[email protected]>
Aws-sdk will automatically retry failed downloads, and any other
Aws::S3::Client options will be...
befae8d0ca2c71922604a790b8398aa08aaddd27 authored over 8 years ago by Janko Marohnić <[email protected]>
S3::ObjectVersions#delete is deprecated over #batch_delete!.
a4834dfa62ce9f32ae8350361a5e9f900ad9b75e authored over 8 years ago by Janko Marohnić <[email protected]>
Aws::S3::Object#put always uploads a given IO in one request, regardless
of its size. Aws::S3::O...
When files are larger than :multipart_threshold, S3 storage will
automatically switch to paralle...
873bc66c292d846e1785409d7dda5bd29505e744 authored over 8 years ago by Janko Marohnić <[email protected]>
When the S3 copy is multipart, and we don't provide :content_length, S3
makes an additional HEAD...
This version fixes `Down.open` not to read the whole content when
calling `#close`, which would ...
3568bfb3ee717328e83c85a9f26ea254b2a3f126 authored over 8 years ago by Janko Marohnić <[email protected]>
08579ed23c656fb2e87e363705e0e79f88d45d9d authored over 8 years ago by Janko Marohnić <[email protected]>
The Down gem didn't `require "net/http"`, so `Down.open` would raise an
error for undefined cons...
d14a729fac8b5ea9cebfc97ec346a12bba17d14f authored over 8 years ago by Janko Marohnić <[email protected]>
9e64704c463a519dae59f3114673ea68d2b8f8e1 authored over 8 years ago by Janko Marohnić <[email protected]>
f6bb353181a548c0c7a1c7f230697d56b43584bb authored over 8 years ago by Janko Marohnić <[email protected]>
6b0958d8b711d23cf18cca121a8d784a0b70c73c authored over 8 years ago by Janko Marohnić <[email protected]>
1ef85eddd6edc7cac11cd94433a0161b72e0a503 authored over 8 years ago by Janko Marohnić <[email protected]>
It's very useful for newcomers who at the moment aren't interested in
the "why" and "how", just ...
If the check is inside, both restore_cached_data and versions plugin
need to also check if the f...
046966348aa4ad1d68f8ca1e52403e46c53f0dba authored over 8 years ago by Janko Marohnić <[email protected]>
We had to recently change the result of Storage#open, which means that
the argument to #extract_...
Initially the versions plugin didn't have the :names option, but then I
added it because I figur...
Sometimes in direct uploads we might want to save additional metadata
that we got from the servi...
Using `Down.open` is now the preferred way to implement #open for remote
storages, and all stora...
I blindly copy-pasted the length of 1KB from CarrierWave, but I never
really tried to find out h...
Previously we were branching the way we execute the file command,
depending on whether the IO wa...
35d7e7ecdaf7231ef3ce682431390c33f8a989cd authored over 8 years ago by Janko Marohnić <[email protected]>
02364af843b0de410e5a3b38046330646e372c6b authored over 8 years ago by Janko Marohnić <[email protected]>
713b5f51c807c2144cfefa1426df93a5e3ea329f authored over 8 years ago by Janko Marohnić <[email protected]>
Previously it was defined as
Shrine::Plugins::Parallelize::InstanceMehods::ThreadPool
but we...
d4e40c754f4eed47006a3d125686318084d7ddbf authored over 8 years ago by Janko Marohnić <[email protected]>
Before if parallelize plugin was loaded after logging plugin, the
parallelize's thread pool woul...
Rack::Test::UploadedFile is defined with the following:
def method_missing(method_name, *args...
a5e575730f60cfca4a44577b5054d0aac6887af7 authored over 8 years ago by Janko Marohnić <[email protected]>a6a472fd90454de647745c7e35f0f9d608ac349d authored over 8 years ago by Janko Marohnić <[email protected]>
c6d4f49a688213012d5cd1a5d7e8160a8dd8f3e3 authored over 8 years ago by Richard Venneman <[email protected]>
This value is only here for setting the hidden field, whose sole purpose
is to retain the cached...
I previously encouraged folks to use the cached_attachment_data plugin
like this:
<%= form_fo...
0cf395b65d23c0cb89dea5368b86ce14f024f650 authored over 8 years ago by Janko Marohnić <[email protected]>b931a76e3bd75190d6614e3c9849e88793a7f595 authored over 8 years ago by Janko Marohnić <[email protected]>
9c7ff26556fabaa133d821bf00d54449001af053 authored over 8 years ago by Janko Marohnić <[email protected]>
At the moment if you load the default_url plugin before versions plugin,
the versions plugin wou...
The .configure methods of upload_options and default_url_options
essentially do the same thing (...
Since we have to reference Shrine's core classes via `self::` (due to
Ruby's constant resolution...
790fe8effb0430316794e1b0f3239909c802cf32 authored over 8 years ago by Janko Marohnić <[email protected]>
86e268b8b893db8ec68e7c2720b34cf948cc148d authored over 8 years ago by Janko Marohnić <[email protected]>
a3fc4d9be1c1c6169197cb96df4c4aaa0f2ca8da authored over 8 years ago by Janko Marohnić <[email protected]>
9be6c51c9185136449450e70e743aae82c2da754 authored over 8 years ago by Janko Marohnić <[email protected]>
e98fc5e7ad121263c2df11f9e173e3108d0e9428 authored over 8 years ago by Janko Marohnić <[email protected]>
9b0e262985b6fbdb6a7779927703d529c3092fb4 authored over 8 years ago by Janko Marohnić <[email protected]>
In the commit where we made plugin options persist on reapplying, we
accidentally stopped requir...
When and S3 object is private, it isn't accessible via a public URL
(without the additional quer...
7ff7ffe9d708c00101cd598ea63c5f48cd1d5f1b authored over 8 years ago by Janko Marohnić <[email protected]>
d83548ef0f78c76569b8498b1cee83159b595622 authored over 8 years ago by Janko Marohnić <[email protected]>