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

Reorder methods in Attacher

06e88cad274965728083b6b9420c692c1b0b9f39 authored over 8 years ago by Janko Marohnić <[email protected]>
Don't rely on #id writer in backgrounding plugin

With ROM it's usual to define models as immutable value objects which
don't have writer methods ...

dbfce52ac26c9a7034668a488d1a8e46cbd85303 authored over 8 years ago by Janko Marohnić <[email protected]>
Handle aborting on change in backgrounding

We already depend on the #find_record method in backgrounding plugin,
which we can use to check ...

45af55d31a730164e8d72ff204a5cf674967978e authored over 8 years ago by Janko Marohnić <[email protected]>
Code style improvements

3f0072f66fdf52b6316ca744c7ce5306153dde65 authored over 8 years ago by Janko Marohnić <[email protected]>
Correct CHANGELOG entry

51f21d83eff5fc43a9a6b2c73e951d0ca2f3bb0a authored over 8 years ago by Janko Marohnić <[email protected]>
Keep Attacher#promote public in ORM plugins

The base functionality makes this a public method, so we should keep it
that way in other plugin...

e7af631fc77f1d0a6f40de24569323801f5527a5 authored over 8 years ago by Janko Marohnić <[email protected]>
Update documentation about FileSystem permissions

edd9f59a6425d300a57ff4d7d45640e5830dfe53 authored over 8 years ago by Janko Marohnić <[email protected]>
Set default file/folder permissions to 0644/0755

Different systems can have different default permissions. Moreover,
upgrading the same system ca...

1304294d0537d88244d58f5ad260f8d7ce42ee5f authored over 8 years ago by Janko Marohnić <[email protected]>
Apply directory permissions to all subfolders

a370864c3e6768cd21c739578f65c1610754484d authored over 8 years ago by Janko Marohnić <[email protected]>
Add :directory_permissions to FileSystem

Directories generally shouldn't have set permissions, especially they
shouldn't default to :perm...

e99f36076201d2ce8a196f59db35da3e608a9776 authored over 8 years ago by Janko Marohnić <[email protected]>
Finish renaming "metadata" into "add_metadata"

032155838e7165c2b991c714bee62f5b12ac3ea0 authored over 8 years ago by Janko Marohnić <[email protected]>
Add note about the fixed restore_cached_data

f01f048ad21dcfd2acaf199ff1ebd5253843e8fa authored over 8 years ago by Janko Marohnić <[email protected]>
Prepare for 2.2.0

3a212677ba5f063187c6acb75a4657f17c9a9fc2 authored over 8 years ago by Janko Marohnić <[email protected]>
Note how to retrieve metadata from add_metadata

e352a0045f3e1633eef74533eee0baf8a1877c42 authored over 8 years ago by Janko Marohnić <[email protected]>
Automatically rewind the IO in add_metadata

Previously users needed to remember to rewind the IO themselves, but now
the add_metadata plugin...

0afb2050e0dee37ec324c7f2a02b14d0930ea0ba authored over 8 years ago by Janko Marohnić <[email protected]>
Allow add_metadata declarations to accept a symbol

Now that we are creating a method, it's much more naturally to define
new metadata values with s...

ef9227551b3b22d686f2a1446821907aeff9af0c authored over 8 years ago by Janko Marohnić <[email protected]>
Make add_metadata define method on UploadedFile

Since this plugin is used for adding new metadata, it's nice to also
create reader methods as sh...

e8152c8a09abd587d00b0df5aad7524504f28b87 authored over 8 years ago by Janko Marohnić <[email protected]>
README tweak

3f5911df108057bf4cbdce0934f36dbfa60b52d5 authored over 8 years ago by Janko Marohnić <[email protected]>
Rename "metadata" plugin to "add_metadata"

5a58b4d0fff4790847f87146d52b35984bd5d0a4 authored over 8 years ago by Janko Marohnić <[email protected]>
Soft deprecate :phase over :action in context

The :phase attribute was initially either named like that to mark the
notion of "attachment phas...

df2b569b6c4536d0c51840dfd3d8bb5af08bb858 authored over 8 years ago by Janko Marohnić <[email protected]>
Minor documentation and cosmetic improvements

6a34f2386c987b1f58b1a5d94749aae6b7b1f610 authored over 8 years ago by Janko Marohnić <[email protected]>
Small direct_upload docs improvements

f3ba70a1a59c3b9d88d8b7bf3d02954637985352 authored over 8 years ago by Janko Marohnić <[email protected]>
Fix phrasing in the "Quick Start" section

2ec9eb664af37a1da82a6b49cd7793f30858c480 authored over 8 years ago by Janko Marohnić <[email protected]>
Mention on-the-fly processing in the README

89210acaa3afdea3e5bf7a72c4626c0175bd450f authored over 8 years ago by Janko Marohnić <[email protected]>
Add "Similar libraries" section

126d873489d59f17016debab674854126f20170e authored over 8 years ago by Janko Marohnić <[email protected]>
Add ability to disable callbacks and validations

If folks are using form objects and/or are separating operation objects,
they might not want cal...

2061caaacf16a1ab5ede34f47faa5f8030a449b1 authored over 8 years ago by Janko Marohnić <[email protected]>
Random documentation improvements

7d07aa5eddcdec7858469463a2b3c5781db039be authored over 8 years ago by Janko Marohnić <[email protected]>
Note that rack_file plugin is not needed in Rails

9893ed5ecb209524793176d86c313011791077e5 authored over 8 years ago by Janko Marohnić <[email protected]>
Remove :presign option and improve direct_upload docs

The :presign option was an unnecessary security concern, where we wanted
that the user can choos...

0603b5b1b6e5cda7099c4b80007bfaa699f9b028 authored over 8 years ago by Janko Marohnić <[email protected]>
Rephrase the moving plugin docs

e2d0c15fbe06817d156e5baddd72611b982611b9 authored over 8 years ago by Janko Marohnić <[email protected]>
Rename "process" plugin to "processing"

The "Process" Ruby constant already exists, which can cause name clashes
in existing plugins (e....

f1e2b328388edaf26dfb65d173355fdbe8597228 authored over 8 years ago by Janko Marohnić <[email protected]>
Don't let delete_raw and moving cause errors

If the delete_raw plugin is loaded after moving plugin, it can happen
that the moving plugin mov...

e2bde4fa349aea29d607d183c982b649a0a09d9c authored over 8 years ago by Janko Marohnić <[email protected]>
Implement UploadedFile#download in terms of #open

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]>
Add UploadedFile#open that mimics File.open

This methods temporarily opens the underlying IO and yields it to the
block, closing it after th...

5e02795d9eb2599d743c81c23b64bfcda1af7c4e authored over 8 years ago by Janko Marohnić <[email protected]>
Don't require #clear! in storage linter

The #clear! method is not used anywhere by Shrine, and is merely a
convenience method for deleti...

9fcb331009a775c61710876ece5749697265ec77 authored over 8 years ago by Janko Marohnić <[email protected]>
Don't require attachment module in backgrounding

Some users don't want to include Shrine's attachment module to their
modules in order to avoid p...

4adcb7176fffa651c6b950c66143df1bd6980f4c authored over 8 years ago by Janko Marohnić <[email protected]>
Rename "processing_handler" plugin to "process"

Even though this plugin technically only adds syntactic sugar for
defining processing, it is now...

d0cb165a88a6c9c1288a0804c54e4f6964bde198 authored over 8 years ago by Janko Marohnić <[email protected]>
Add metadata plugin

This plugin allows us to convert:

def extract_metadata(io, context)
super.update("exif" =...

ca356347269c1be75a650c572bc4cc4bb841c88a authored over 8 years ago by Janko Marohnić <[email protected]>
Raise when file command wasn't found or errored

Open3 raises Errno::ENOENT when a command is not found, so we rescue
this and present a better e...

6f2d3f84e0d5238101f650b3f24d4f1ce1ccfc88 authored over 8 years ago by Janko Marohnić <[email protected]>
Remove unneeded test

We are not passing filenames to the file command anymore, so this error
cannot occur.

152a498e009a2ce7c34a1cb916950d17606e8860 authored over 8 years ago by Janko Marohnić <[email protected]>
Add processing_handler plugin

Previously we needed to define processing in the following way:

def process(io, context)
...

9c379c3c354ce8a9227e9dd996f4e09bd191fb96 authored over 8 years ago by Janko Marohnić <[email protected]>
Remove horizontal rule from README

Now that we connected the "Quick start" section to the rest of the
README, we should remove the ...

a28755ac408e40f247c0f68813e1175693848c64 authored over 8 years ago by Janko Marohnić <[email protected]>
Remove Storage#read

This method is redundant, because it can be replaced by the following,
which has the same functi...

39638653ef4585f59d3ddf7ce283c6bbfb770fef authored over 8 years ago by Janko Marohnić <[email protected]>
Remove "Authenticating endpoint" in direct_upload

This section applies in general to any Rack endpoint, and it's not
something that this plugin he...

eb262c5e45158913eaaebb9086866a00cc4557b4 authored over 8 years ago by Janko Marohnić <[email protected]>
Refresh README

25341141ef1f0ac489e9bda0ed9f9f9c0ef98a15 authored over 8 years ago by Janko Marohnić <[email protected]>
Lock Rack to 1.6.x for Ruby 2.1

Rack 2.x requires Ruby 2.2.2+.

677b60b9d89537054478d229e2f44956305ae88c authored over 8 years ago by Janko Marohnić <[email protected]>
Use Rack::BodyProxy in download_endpoint

The behaviour should still be the same, but this way we can specify
teardown separately, which f...

24180d0157d6401ffc61d84183353e4dccda6cac authored over 8 years ago by Janko Marohnić <[email protected]>
Test that right UploadedFile subclass is returned

63971f30efb0c9f9df403fa5d9e572013e30f10d authored over 8 years ago by Janko Marohnić <[email protected]>
Small documentation fixes

6442b690de70070a11ff57816cf28237cc88f999 authored over 8 years ago by Janko Marohnić <[email protected]>
Mention clearing cache in "Direct S3 Upload" guide

06c09f3ecd772f4698617520e430bc00b8913926 authored over 8 years ago by Janko Marohnić <[email protected]>
In S3#download delegate downloading to aws-sdk

Aws-sdk will automatically retry failed downloads, and any other
Aws::S3::Client options will be...

f4fc1e3b317811b668684312b2ba0a213a098312 authored over 8 years ago by Janko Marohnić <[email protected]>
Fix typo in direct S3 documentation

befae8d0ca2c71922604a790b8398aa08aaddd27 authored over 8 years ago by Janko Marohnić <[email protected]>
Avoid a deprecation warning in Storage::S3#clear!

S3::ObjectVersions#delete is deprecated over #batch_delete!.

a4834dfa62ce9f32ae8350361a5e9f900ad9b75e authored over 8 years ago by Janko Marohnić <[email protected]>
Use optimized multipart S3 upload for larger files

Aws::S3::Object#put always uploads a given IO in one request, regardless
of its size. Aws::S3::O...

cecf677c583bca942f2769fc540c7d28ce4bee2e authored over 8 years ago by Janko Marohnić <[email protected]>
Add :multipart_threshold to S3 storage

When files are larger than :multipart_threshold, S3 storage will
automatically switch to paralle...

525facb6cee825e544b463de17f1f2a6ebf85e9f authored over 8 years ago by Janko Marohnić <[email protected]>
Allow overriding calculated multipart copy options

873bc66c292d846e1785409d7dda5bd29505e744 authored over 8 years ago by Janko Marohnić <[email protected]>
Pass :content_length on multipart S3 copy

When the S3 copy is multipart, and we don't provide :content_length, S3
makes an additional HEAD...

7ba1ce1769439720c400ac86ab3783c49a7b37ad authored over 8 years ago by Janko Marohnić <[email protected]>
Depend on Down >= 2.3.5

This version fixes `Down.open` not to read the whole content when
calling `#close`, which would ...

d04365e93a907c07bcfc3ef15f0fbaae86dfebae authored over 8 years ago by Janko Marohnić <[email protected]>
Lock aws-sdk back to 2.x (we don't support v1)

3568bfb3ee717328e83c85a9f26ea254b2a3f126 authored over 8 years ago by Janko Marohnić <[email protected]>
Bump to 2.1.1

08579ed23c656fb2e87e363705e0e79f88d45d9d authored over 8 years ago by Janko Marohnić <[email protected]>
Bump Down to 2.3.4

The Down gem didn't `require "net/http"`, so `Down.open` would raise an
error for undefined cons...

c1cea2aa28fb3b7de64c289ce7c9915f5b7017a2 authored over 8 years ago by Janko Marohnić <[email protected]>
Link some more storages and posts on the website

d14a729fac8b5ea9cebfc97ec346a12bba17d14f authored over 8 years ago by Janko Marohnić <[email protected]>
Link shrine-uploadcare on the website

9e64704c463a519dae59f3114673ea68d2b8f8e1 authored over 8 years ago by Janko Marohnić <[email protected]>
Fix tests on CI

f6bb353181a548c0c7a1c7f230697d56b43584bb authored over 8 years ago by Janko Marohnić <[email protected]>
Prepare for 2.1.0

6b0958d8b711d23cf18cca121a8d784a0b70c73c authored over 8 years ago by Janko Marohnić <[email protected]>
Separate plugins and storages on the website

1ef85eddd6edc7cac11cd94433a0161b72e0a503 authored over 8 years ago by Janko Marohnić <[email protected]>
Add a "Quick start" section

It's very useful for newcomers who at the moment aren't interested in
the "why" and "how", just ...

a93a504d02ef128795aadf942f890101fc5fe69e authored over 8 years ago by Janko Marohnić <[email protected]>
Check cached file outside of #assign_cached

If the check is inside, both restore_cached_data and versions plugin
need to also check if the f...

df45335efddf3f25a75bffce7a4332130edb097d authored over 8 years ago by Janko Marohnić <[email protected]>
Give tips about upload in "Creating a New Storage"

046966348aa4ad1d68f8ca1e52403e46c53f0dba authored over 8 years ago by Janko Marohnić <[email protected]>
Pass UploadedFile when reextracting metadata

We had to recently change the result of Storage#open, which means that
the argument to #extract_...

eb09d5e3cae901b8c2da4cb1b1fd849ea789d0a6 authored over 8 years ago by Janko Marohnić <[email protected]>
Don't require :names anymore in versions plugin

Initially the versions plugin didn't have the :names option, but then I
added it because I figur...

ff59eadd2ebe79137c634471cf3a8284ae1637f6 authored over 8 years ago by Janko Marohnić <[email protected]>
Ensure restore_cached_data keeps custom metadata

Sometimes in direct uploads we might want to save additional metadata
that we got from the servi...

621b39befda039c67f0ca031169c470137a44160 authored over 8 years ago by Janko Marohnić <[email protected]>
Switch to Down.open and deprecate Storage#stream

Using `Down.open` is now the preferred way to implement #open for remote
storages, and all stora...

759a9b5981b0d2c752250347ae533f71042ee75e authored over 8 years ago by Janko Marohnić <[email protected]>
Increase magic header and make it configurable

I blindly copy-pasted the length of 1KB from CarrierWave, but I never
really tried to find out h...

14800d6eb9b6adf7ddde984f1c62dbfafb4a54e3 authored over 8 years ago by Janko Marohnić <[email protected]>
Execute the file command always in the same way

Previously we were branching the way we execute the file command,
depending on whether the IO wa...

44b365686dac2386a36abb61b16d299ab2b8ac9b authored over 8 years ago by Janko Marohnić <[email protected]>
General code, tests and doc improvements

35d7e7ecdaf7231ef3ce682431390c33f8a989cd authored over 8 years ago by Janko Marohnić <[email protected]>
Give an actual plugin to `describe`

02364af843b0de410e5a3b38046330646e372c6b authored over 8 years ago by Janko Marohnić <[email protected]>
Simplify tests for logging plugin

713b5f51c807c2144cfefa1426df93a5e3ea329f authored over 8 years ago by Janko Marohnić <[email protected]>
Move parallelize's ThreadPool in correct namespace

Previously it was defined as

Shrine::Plugins::Parallelize::InstanceMehods::ThreadPool

but we...

d4e40c754f4eed47006a3d125686318084d7ddbf authored over 8 years ago by Janko Marohnić <[email protected]>
Make logging always work with parallelize

Before if parallelize plugin was loaded after logging plugin, the
parallelize's thread pool woul...

743c89329c1f6c9a6612abd52f428f074be125f3 authored over 8 years ago by Janko Marohnić <[email protected]>
Don't check for method arity in #_enforce_io

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]>
Emphasize that the order of fields matters

a6a472fd90454de647745c7e35f0f9d608ac349d authored over 8 years ago by Janko Marohnić <[email protected]>
Fix typo in Refile guide

c6d4f49a688213012d5cd1a5d7e8160a8dd8f3e3 authored over 8 years ago by Richard Venneman <[email protected]>
Return cached_attachment_data only if changed

This value is only here for setting the hidden field, whose sole purpose
is to retain the cached...

c3b7f1cf7ba5a0a75c1fdc82248dbf4d936ccb6d authored over 8 years ago by Janko Marohnić <[email protected]>
Deprecate setter from cached_attachment_data

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]>
Don't include trailing spaces in changelog links

b931a76e3bd75190d6614e3c9849e88793a7f595 authored over 8 years ago by Janko Marohnić <[email protected]>
Prepare for 2.0.1

9c7ff26556fabaa133d821bf00d54449001af053 authored over 8 years ago by Janko Marohnić <[email protected]>
Don't override default_url in versions plugin

At the moment if you load the default_url plugin before versions plugin,
the versions plugin wou...

758e544c985b9035baace4edfc1206e7ed827709 authored over 8 years ago by Janko Marohnić <[email protected]>
upload_options = default_url_options in .configure

The .configure methods of upload_options and default_url_options
essentially do the same thing (...

cb6339817264ef59888124a441c65d921645fe71 authored over 8 years ago by Janko Marohnić <[email protected]>
Make plugin module inclusion visually consistent

Since we have to reference Shrine's core classes via `self::` (due to
Ruby's constant resolution...

201648241a4c4dcfcb3fc8531d22bc5746bf808c authored over 8 years ago by Janko Marohnić <[email protected]>
Fix another typo in release notes

790fe8effb0430316794e1b0f3239909c802cf32 authored over 8 years ago by Janko Marohnić <[email protected]>
Fix a typo in release notes

86e268b8b893db8ec68e7c2720b34cf948cc148d authored over 8 years ago by Janko Marohnić <[email protected]>
Use shrine-memory 0.2.0

a3fc4d9be1c1c6169197cb96df4c4aaa0f2ca8da authored over 8 years ago by Janko Marohnić <[email protected]>
Prepare for version 2.0.0

9be6c51c9185136449450e70e743aae82c2da754 authored over 8 years ago by Janko Marohnić <[email protected]>
Improve documentation of included plugin

e98fc5e7ad121263c2df11f9e173e3108d0e9428 authored over 8 years ago by Janko Marohnić <[email protected]>
Add a note about direct_upload's standalone upload

9b0e262985b6fbdb6a7779927703d529c3092fb4 authored over 8 years ago by Janko Marohnić <[email protected]>
Require again :max_size in remote_url, bump Down

In the commit where we made plugin options persist on reapplying, we
accidentally stopped requir...

15b79cc21f4248a32e07f3cceb27f38596531747 authored over 8 years ago by Janko Marohnić <[email protected]>
Use presigned_url or public_url in CDN-ed URLs

When and S3 object is private, it isn't accessible via a public URL
(without the additional quer...

ed8c861570a5b65cb1781c2f541f33707b86c86a authored over 8 years ago by Janko Marohnić <[email protected]>
Note how to detect caching/promoting in callbacks

7ff7ffe9d708c00101cd598ea63c5f48cd1d5f1b authored over 8 years ago by Janko Marohnić <[email protected]>
Fix test coverage holes

d83548ef0f78c76569b8498b1cee83159b595622 authored over 8 years ago by Janko Marohnić <[email protected]>