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

Add ability to generate fake presigns for testing

This change makes it possible for direct_upload endpoint to generate
"fake" presigns for storage...

a653e1a94118f9e47d95cd3d20b1f8ab910201f4 authored over 8 years ago by Janko Marohnić <[email protected]>
Refactor direct_upload logic into methods

This allows overriding parts of direct_upload logic by overriding a
method in the endpoint, inst...

8d20353ee4e991e8b615123d3ac7a9e1ba3f79d8 authored over 8 years ago by Janko Marohnić <[email protected]>
Change direct_upload endpoint to /:storage/upload

Having this route as /:storage/:name was a wrong call. I thought that
it's useful to have as muc...

28fd95426881c260a0fedfde470b3930d0a10973 authored over 8 years ago by Janko Marohnić <[email protected]>
Fix logger not being inherited in logging plugin

We need to simply assign it to the options that are inherited, like we
do with any other option....

a648e8e7fcea7ee6fb373541007e942f0e10b997 authored over 8 years ago by Janko Marohnić <[email protected]>
Fix some typos

6fd65400bd046c5fc698b16fb6da01b1c503caa6 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add delete_promoted plugin

This plugin deletes promoted files after the record has been updated
with the stored file. The p...

ef55285927d6a96408a8ee37c6f54d88109cd351 authored almost 9 years ago by Janko Marohnić <[email protected]>
Generalize Attacher#promote by allowing phase

I initially thought that promoting will only ever be used for cached
files. However, Attacher#pr...

ff5a5d70adc9ffaf348e7feab223e31fc3cd2bf4 authored almost 9 years ago by Janko Marohnić <[email protected]>
Close after extracting metadata in restore_cached

For extracting metadata we call `UploadedFile#to_io` and pass in a real
IO object. After we're d...

701e3d44b3ece7026294742a2420584950bdaef8 authored almost 9 years ago by Janko Marohnić <[email protected]>
Rename delete_uploaded plugin to "delete_raw"

The name "delete_uploaded" indicates that all uploaded files will be
deleted, including cached U...

efb3f274ca3d153ba52f3b92c0130a033b9bfbee authored almost 9 years ago by Janko Marohnić <[email protected]>
Deprecate moving an IO which isn't movable

If we setup moving plugin and IO comes along for which the storage
doesn't support moving, the c...

51457d99459b0a9001cfba34d376f33e95abb76d authored almost 9 years ago by Janko Marohnić <[email protected]>
Move early aborting to Attacher#promote

94c5b7707e8f1768285464d1457854525b3fd953 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add ability to do custom backgrounding

We add `Attacher.dump` and `Attacher.load` for implementing custom
background jobs with custom f...

9ada62e7959ba866aa19987e292258e4f86e1ae7 authored almost 9 years ago by Janko Marohnić <[email protected]>
Disable warnings in tests in Ruby 2.3.0

In Ruby 2.3.0 Rake is by default passing the "-w" flag to Ruby, which
enables warnings. A lot of...

060a08a7c5a8b53637b83413e2fe0b5e53e6c19b authored almost 9 years ago by Janko Marohnić <[email protected]>
Link rails_admin_shrine on the website

d0f0a9ebb3163869ba9d3ab4347835ecca07f678 authored almost 9 years ago by Janko Marohnić <[email protected]>
Documentation and cosmetic improvements

fd17b20f3d719aea9a236740bc96294fed881150 authored almost 9 years ago by Janko Marohnić <[email protected]>
Use the SSL certificate when calling S3#download

Sometimes aws-sdk users will want to set

Aws.config[:ssl_ca_bundle] = '/path/to/self-signed-cer...

154624be4eaf93b1445d5ac09a41329513e0178d authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix path-style URLs not working with :host

Sometimes the S3 URL can be generated like

http://s3.amazonaws.com/bucket-name/file.jpg

instea...

d1a350a3093a5ea8b60226980c2bcc8a27aba03b authored almost 9 years ago by Janko Marohnić <[email protected]>
Add tests for promoting when record is invalid

Sometimes users will want to save the record with skipping validations.
Before this didn't work ...

6fcfcc7c5e1ce98720f659398b4cd2fcbba20d08 authored almost 9 years ago by Janko Marohnić <[email protected]>
Deprecate missing :delegate in migration_helpers

In Shrine 2 we want to default the :delegate option to false, because we
want that the default b...

961cbffdd5345def29de379bedf6d52aa2045331 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix S3 URL not being URL-encoded with :host option

If an object key contains spaces or other URL-unsafe characters, and
:host option is being used,...

5285f482233a717001e8c326bea9489496db50fb authored almost 9 years ago by Janko Marohnić <[email protected]>
Random documentation improvements

3d00cc499ec64feeaef643b443a57d968d9f030a authored almost 9 years ago by Janko Marohnić <[email protected]>
Add Attacher.version_fallbacks to versions plugin

Like with Attacher.version_names, I think it's useful to have a reader
method for the ":fallback...

25cfbdc849f163a4dea2aa50a3945adaffb50172 authored almost 9 years ago by Janko Marohnić <[email protected]>
Make swap impenetrable by concurrency

So, currently, these is still a teeny-tiny chance that on subsequent
attachment updates an older...

5d7cab67b65807ecbb56e5552871ffed5da34726 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add option for non-pollution in migration_helpers

By default migration_helpers will add a lot of methods to the model,
which delegate to the under...

f7c068ff5e0782c753099acafb19e9c678a60503 authored almost 9 years ago by Janko Marohnić <[email protected]>
Log number of input and output files on processing

The reason why we can't have only number of *output* files is because
the message "3 files proce...

a3644c2755d9f661cfbd24d75d88013b0daff837 authored almost 9 years ago by Janko Marohnić <[email protected]>
Achieve 100% test coverage

d86b527ed8c83c4ec7d4161e7f053014f329c3ed authored almost 9 years ago by Janko Marohnić <[email protected]>
Make deleting backup work with backgrounding

When using the backup plugin with backgrounding, two scenarios could
happen when deleting a file...

e0d7536125ac98e2032f309a57539792773cf3ff authored almost 9 years ago by Janko Marohnić <[email protected]>
Store backup only after promoting

Currently the backup was done immediately after storing, and only
afterwards promoting was done....

6b7211619d14527e8eea603a366953b2a97df127 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add :fallbacks to versions for fallback URLs

When using the recache plugin to generate some versions in the
foreground and some in the backgr...

4a7c5eab42bf9bf957b4fa7d3144fb30af62db7a authored almost 9 years ago by Janko Marohnić <[email protected]>
Inline Attacher.versions and Attacher.versions!

It doesn't make sense that these methods are part of public interface,
since they're really mean...

6d542a601fee9b5fc9af7a0c97831e4208cd0c68 authored almost 9 years ago by Janko Marohnić <[email protected]>
Make keep_files work better with backgrounding

Since keep_files was overriding `Shrine`, when combined with
backgrounding plugin, the delete ba...

62756bff7e2522b347d5dbb39928b4d9e406f390 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix unordered list in Rdoc generation

For some reason, this specific unordered list the RDoc generator inlines
all in a single line (t...

a1109ee42aa627d269efc03b201828badff5eafc authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix a YAML syntax error

2ca0c5dd4a32d9b84d72968d86d9a91bd5a7a980 authored almost 9 years ago by Janko Marohnić <[email protected]>
Prepare for version 1.3.0

cffeb7f378ae39b6e86788b86b1a0f7b6fadacc1 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add image_(cached|stored)? to migration_helpers

These come really handy when you want to implement a "promote" hook in
your model:

class Post...

7dde9fc66e56873026275b7c578091c56f186803 authored almost 9 years ago by Janko Marohnić <[email protected]>
Shrine#delete already returns the deleted file(s)

8c6f513427fff7d37528fd793b1a6f20bbd92c78 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix Attacher#backup_file not to modify given file

fe2a51897a245237035119d8b8845b6849f7fb44 authored almost 9 years ago by Janko Marohnić <[email protected]>
Don't cache data keys in UploadedFile#initialize

Caching into instance variables in this case can create surprising
behaviour. For example, when ...

88803ec8a7e3d36497993eee047c6e2b3c0f1714 authored almost 9 years ago by Janko Marohnić <[email protected]>
Don't mutate the context inside the uploader

We should generally never mutate input arguments, unless there is a good
reason for it. Here we ...

2d003a17fa1360b3f4d0032ec457b394145fbbae authored almost 9 years ago by Janko Marohnić <[email protected]>
Deprecate the keep_location plugin

9eeca1c87688cab9e0ec30e523e8a8c051f1b977 authored almost 9 years ago by Janko Marohnić <[email protected]>
Bump copyright year

581442db42c2fa66996300a9720b485ec89c6975 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix tests after previous commit

b568ca610b0fec74eff4936c1fe1a7f0ae9744ae authored almost 9 years ago by Janko Marohnić <[email protected]>
Make metadata accessible when generating location

Sometimes we may want generate location differently depending on the
extracted metadata of the u...

899306d35b24ce41f313c571103bcb430f501558 authored almost 9 years ago by Janko Marohnić <[email protected]>
Don't require "metadata" in UploadedFile

In a scenario where the uploaded file data hash is POSTed, and there is
no metadata, URL-encodin...

f0d28c62bb840e519fd880e9b3886dcd19ef8cd6 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix tests on JRuby

Apparently the JDBC ActiveRecord adapter doesn't like to have queries
executed inside a Fiber wh...

7a7850e26a0d1903bbf87cb928a9c48105a4ff5c authored almost 9 years ago by Janko Marohnić <[email protected]>
Add :include_error option to remote_url

Sometimes we want to generate remote_url messages more accurately, in
which case we need to have...

dd11caf1e6193848a0af71fb48ef36e4e6867ba0 authored almost 9 years ago by Janko Marohnić <[email protected]>
Give better error messages in remote_url

Currently remote_url by default returns the validation error: "file not
found or is to large". T...

c623127bdc79f87d7299ef5f7386f9e22fc81d91 authored almost 9 years ago by Janko Marohnić <[email protected]>
We cannot test Ruby < 2.2.2 with ActiveRecord 5

1bd092b5f2156c79937daca18b76ad4ade07c42e authored almost 9 years ago by Janko Marohnić <[email protected]>
Improve plugin tests

c854b6da239244fd07df41371bbb3ab13d7cf761 authored almost 9 years ago by Janko Marohnić <[email protected]>
Rewind IO after extracting MIME with MimeMagic

2820e88f705240de3883ca6510c830f73dfbf98b authored almost 9 years ago by Janko Marohnić <[email protected]>
Merge branch 'fastimage-rewind'

defd313a22336f28a3293a0135740a7cc3b65424 authored almost 9 years ago by Janko Marohnić <[email protected]>
Slight modifications of the previous commit

* We don't need to tell FastImage to raise an error, we can just always
rewind the IO, because...

c1a6b2dd4cbd79615a0f6f279a8fd740e9270a6f authored almost 9 years ago by Janko Marohnić <[email protected]>
Look for extension in UploadedFile#id for location

At the moment, when generating location, we're inferring the extension
solely based on the origi...

d6dbaad3487fb8a34901b0b236e0234a62e315c4 authored almost 9 years ago by Janko Marohnić <[email protected]>
Improve tests for core functionality

I don't think the strict 4-phase separation in tests always works that
well. It's more useful to...

2a2fd5aa57947ba293bca23b73240d3c838dda63 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix accumulating errors in data_uri and remote_url

When and error occurs on assigning a data URI or a remote URL, we should
clear any existing erro...

23e39429faab173d849b94f07c49dd2df84aa2cd authored almost 9 years ago by Janko Marohnić <[email protected]>
Correct arguments in docs

0f940f0acc6db57ae7d660fad37395f307eb3a29 authored almost 9 years ago by Janko Marohnić <[email protected]>
Rewind IO cursor after failed image dimension extraction by FastImage

FastImage gem does not rewind IO cursor if the dimension extraction fails. Non rewinded IO cause...

c5968874bfcd23b479bae9c46efe93a9d337865a authored almost 9 years ago by Petteri Kääpä <[email protected]>
Bump Down to version 2.0.0

This version fixes a URL-encoding bug where the "[]" characters wouldn't
get encoded back after ...

002d340c78a3a918a0e6128d5fcb6151b818a0ca authored almost 9 years ago by Janko Marohnić <[email protected]>
Add :namespace option to pretty_location

Most often models when models are namespaced, the namespace doesn't hold
a semantical value (e.g...

91e63fa68860ab6d56363f5d85bf3679d4766249 authored almost 9 years ago by Janko Marohnić <[email protected]>
Don't include class namespace in pretty_location

Previously if the class with an attachment was inside a namespace, the
class part of the locatio...

323a682a6f1417b4ee346c761bfb1135db0459c3 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add missing CHANGELOG entry

2463775bd7a8e49dfb0bd0945466640853ec1e6a authored almost 9 years ago by Janko Marohnić <[email protected]>
Fix deprecation warning with S3 CredentialProvider

When S3 credentials are provided then `@s3.client.config.credentials`
will be set to an instance...

c6b6347c1b9c38f2825a96f6b28f1470763a5120 authored almost 9 years ago by Reid Beels <[email protected]>
Don't require that metadata values are present

Currently calling `#original_filename`, `#size` or `#mime_type` will
error if the corresponding ...

1545ad08d34e7e91a5f16b3b79d48610daa21976 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add the new #update method convention for storages

Some storages have a concept of updating data of already uploaded files:

* Flickr - can update ...

0310fb8b829612c28e02991791018a52088ea594 authored almost 9 years ago by Janko Marohnić <[email protected]>
Explain how to migrate from other libraries

To make it maximally easy for users to migrate from other libraries, we
provide step-to-step ins...

77efe897f97822524730054c1a637e4f5b519586 authored almost 9 years ago by Janko Marohnić <[email protected]>
Note in README that MRI 2.3.0 is supported

c32ccc342c1935e80a9d8e33060e481e7e18c458 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add CHANGELOG entry to closing only if open

d5c462b49a106dcc4c35dc4975f8c01d78b6475f authored almost 9 years ago by Janko Marohnić <[email protected]>
Link "Uploading files with Shrine in Hanami" post

a0fa0aef96e6e6a7835525b22adf61ff4387d616 authored almost 9 years ago by Janko Marohnić <[email protected]>
Merge pull request #41 from reidab/close-without-opening

Avoid opening an UploadedFile just in order to close it

e23df06e56af8da587a3c3ab340c1cbed9c2ce3e authored almost 9 years ago by Janko Marohnić <[email protected]>
Avoid opening an UploadedFile just in order to close it

88b792437357b7338199760ba1ee4a48416b8372 authored almost 9 years ago by Reid Beels <[email protected]>
Documentation improvements

0c2aeb6a873903be4e316f51f673311697218cf0 authored almost 9 years ago by Janko Marohnić <[email protected]>
Link blog post about asynchronicity

9308fb9d520b227e3026668bd70df915ef6abd5c authored almost 9 years ago by Janko Marohnić <[email protected]>
Add CHANGELOG for previous entry

2e16a1ccc5ccab11af3c37e35ba1034ce3b1d9f3 authored almost 9 years ago by Janko Marohnić <[email protected]>
Reference correct ORM constants

Currently for the sequel plugin Ruby attempts to reference an "Error"
constant inside the "Seque...

01f20b64ef4a97a35080a977312e05ae7812e2db authored almost 9 years ago by Janko Marohnić <[email protected]>
Update links with the Lotus => Hanami rename

7c281fc1fb35ab8325705101a258fa506397d5ef authored almost 9 years ago by Janko Marohnić <[email protected]>
Prepare for version 1.2.0

ad9797d6ba25b9c913dc14c7901c6aaf12ff7e1b authored almost 9 years ago by Janko Marohnić <[email protected]>
Update Ruby versions on Travis and add 2.3.0

8ecf393f7f078122722d5caf470c1c42caf80ab9 authored almost 9 years ago by Janko Marohnić <[email protected]>
Return the record in backgrounding methods

It's useful if the user wants to do something with the record, that they
can reuse the already i...

6bd094b8ee4b363c144524e568993114a1e5795d authored almost 9 years ago by Janko Marohnić <[email protected]>
Lots of documentation and cosmetic improvements

e8453db90e7631dcdbd6da175c1a206bc1caadf2 authored almost 9 years ago by Janko Marohnić <[email protected]>
Close the IO even if upload fails

316536c2f67179ed447fbd93c09c53d98655f205 authored almost 9 years ago by Janko Marohnić <[email protected]>
Add missing CHANGELOG entries

99b9f4a1f48d0bbac4dc526acc8aba2f79578bef authored almost 9 years ago by Janko Marohnić <[email protected]>
Don't error in backgrounding on missing record

It can happen that a record gets deleted before updating (processing and
storing can take a whil...

02ba5332372fb82d20df150f6c6f7a2a1f3766fc authored almost 9 years ago by Janko Marohnić <[email protected]>
Improve aborting update when attachment changed

Previously Shrine checked if attachment has changed outside of a
transaction. However, that mean...

5a7712e505cebe57ef713547c52818ca5bcc55e6 authored almost 9 years ago by Janko Marohnić <[email protected]>
Don't promote if attachment changed in background

It can happen that the queue gets clogged up making the job starts
later, or the job is retrying...

8bb31d3708b50545cd96a67dce2eec14260c3d22 authored almost 9 years ago by Janko Marohnić <[email protected]>
Use better name for array of old versions

aac4d155fcc3f2a59792b39598106798606627b2 authored almost 9 years ago by Janko Marohnić <[email protected]>
Advise Sequel::Model.use_transactions for tests

8bd98f37823c942b31311b27a290dae69ddffc2f authored almost 9 years ago by Janko Marohnić <[email protected]>
Merge pull request #33 from martinsefcik/typo-fix

Fixed typo in code example

c5fde5edaa74b0048febf55a3c9c8b3c6c9f51b3 authored almost 9 years ago by Janko Marohnić <[email protected]>
Fixed typo in code

1d4ce9c562e9642c986f207acbf8111123195825 authored almost 9 years ago by Martin Sefcik <[email protected]>
Merge pull request #32 from xzo/patch-2

Fix ValidationHelpers docs: bad examples

4887cc8619821ff7a648e873e4e9cad18c8a277d authored almost 9 years ago by Janko Marohnić <[email protected]>
Add tests and changelog entry to previous commit

12a7fb2288986c93fc9c43cfbca28ea088dea233 authored almost 9 years ago by Janko Marohnić <[email protected]>
Update validation_helpers.rb

9567983c9b397cd1a42575ba28d1d877ab6490b1 authored almost 9 years ago by xzo <[email protected]>
Fix ValidationHelpers docs: bad examples

7bd3b1e01c8116208e71718ee840d2f8334fc16e authored almost 9 years ago by xzo <[email protected]>
Security fix: Plugins::ValidationHelpers#regex. ^$ are dangerous.

c5769598e928c7a6598bb46a41e3193b234ffa2b authored almost 9 years ago by xzo <[email protected]>
Inherit custom metadata from cached files

Previously if custom metadata was assigned to a cached file, it wasn't
forwarded onto the stored...

b77b067da41772a941ba9a120717fec3b9ee8912 authored almost 9 years ago by Janko Marohnić <[email protected]>
Minor README tweaks

The only notable thing was that we removed the "attr_accessor"
declaration. This is because it a...

9ab2beb5be9517d033310561a3f3f30cf3ace8dd authored almost 9 years ago by Janko Marohnić <[email protected]>
Improve docs a bit around Shrine::UploadedFile

3b366c39d63ad357af90f2708e596f644c95a9cb authored about 9 years ago by Janko Marohnić <[email protected]>
Correct background_helpers references

1be904d59933a08dcac593970b2ad7a91a575a71 authored about 9 years ago by Janko Marohnić <[email protected]>
Fix a documentation error

b78e45a53a932e751f2fbcd6a0f7d402d5bae9b3 authored about 9 years ago by Janko Marohnić <[email protected]>
Update CHANGELOG with the release date

112a64a420242f3c650d5ca3133b25ec36a06b4d authored about 9 years ago by Janko Marohnić <[email protected]>
Disable uploading tests for Rubinius

Rubinius breaks in rack-test_app when using multipart, so we'll
temporary skip those tests until...

4936896b6f5333e44d45077887d1d3b9b230a481 authored about 9 years ago by Janko Marohnić <[email protected]>