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

Fix tests on older Ruby versions

59e8a801a901b3b901e23341ed8ea42355f6a684 authored over 7 years ago by Janko Marohnić <[email protected]>
Stop using Down.copy_to_tempfile in rack_file test

4b96ccce9b0b39a88a80b82197ff394c606f82c4 authored over 7 years ago by Janko Marohnić <[email protected]>
Always require "down" in remote_url plugin

With the new HTTP.rb backend and the upcoming wget backend, there isn't
really a reason to ever ...

b7755aaae3e436fdea4d682945ca641de3a806bb authored over 7 years ago by Janko Marohnić <[email protected]>
Replace last occurrence of Shrine::Storage::Memory

This was supposed to be part of the previous commit.

f004a2952c289779abac69db38cb001ad74ceea6 authored over 7 years ago by Janko Marohnić <[email protected]>
Update to latest version of shrine-memory

19d49925096a012484f69aabffdd3cde2b9794fc authored over 7 years ago by Janko Marohnić <[email protected]>
Require "time" library in logging plugin

If the "time" standard library wasn't loaded by another piece of code,
the logging plugin would ...

9fa961f06d5371113ee824f65ee65bd0273e8271 authored over 7 years ago by Janko Marohnić <[email protected]>
Simplify tests for the previous commit

90ea7693e6ac32c0bf361b041d9e9cdfaf8c24d0 authored over 7 years ago by Janko Marohnić <[email protected]>
Validations inheritance

818b3f4aa709b525e43c8da811dcea927444a3e1 authored over 7 years ago by Max Melentiev <[email protected]>
Test deprecated methods

6047895005624e5451951271461e8c4523ff8341 authored over 7 years ago by Janko Marohnić <[email protected]>
Fix tests on Ruby version 2.2 or lower

Tempfile.new requires the basename to be provided on Ruby 2.2 or lower.

478f7a6c0bb2359f395dbae6519c1e6106fc379f authored over 7 years ago by Janko Marohnić <[email protected]>
Fix a failing test on JRuby

96357ebae491363f2c5a38c495c22bdccec88058 authored over 7 years ago by Janko Marohnić <[email protected]>
Eliminate the class variable given to the model

We don't need to assign the attacher class to a class variable on the
model, we can find the las...

9f69a8b015318fd39d5cbd791615008cf4e38905 authored over 7 years ago by Janko Marohnić <[email protected]>
Raise ArgumentError when :bucket is nil

Some people accidentally pass the :bucket option as nil in
Shrine::Storage::S3#initialize, for e...

31e0f20b19101745e0f8a858c77c664d27cec194 authored over 7 years ago by Janko Marohnić <[email protected]>
Allow validation errors to be arguments for ActiveRecord

ActiveRecord users that wish to translate Shrine validation errors along
with all other validati...

d7820489ae4dae1b6688fa245a5c087c98a2fe8e authored over 7 years ago by Janko Marohnić <[email protected]>
Rewrite S3::Storage tests to use AWS SDK stubs

Closes #160

34428d96aa0e584c395bdf869001ef0db4cb7fbe authored over 7 years ago by Janko Marohnić <[email protected]>
Accept Attacher options via Attachment.new

248f8658322fffc51bc4702a7dfb878689735615 authored over 7 years ago by Yuya Tanaka <[email protected]>
Link shrine-webdav on the website

393c196241f8512730a0cf79a8ad68997923b958 authored over 7 years ago by Janko Marohnić <[email protected]>
Don't require Down in download_endpoint

The download_endpoint doesn't use Down anywhere, so we don't have to
require it.

10422ad0eef847c44697a461a70720f45d8ec3eb authored over 7 years ago by Janko Marohnić <[email protected]>
Link administrate-field-shrine on the website

f3cf3bbd58ea115999c0ec6006e758bc459e3ec0 authored over 7 years ago by Janko Marohnić <[email protected]>
Don't wrap base64-encoded content into 60 columns

Base64.encode64 by default wraps the base64 result into 60 columns,
adding newlines after each 6...

44ef3b393a4de50df377dd57a4c58645b5fd3d59 authored over 7 years ago by Janko Marohnić <[email protected]>
Stop explicitly requiring mime/types/columnar

In Mime::Types 3.0 the columnar storage became the default, so we can
stop requiring it explicit...

199c836dbb74622ab433281a647e9c94e4aa93fe authored over 7 years ago by Janko Marohnić <[email protected]>
Add :mini_mime to determine_mime_type plugin

The MiniMime gem is significantly lighter than the Mime::Types in terms
of require time, so this...

9be0a1d4bffaaa4e0837174eb95f5e729dce5867 authored over 7 years ago by Janko Marohnić <[email protected]>
Require cgi.rb instead of cgi/util.rb

See https://bugs.ruby-lang.org/issues/13539

1c5b68a83203613fb2ddebdd046482ef4dec596d authored over 7 years ago by Janko Marohnić <[email protected]>
Use aws-sdk in Storage::S3#open implementation

Down 3.0 allows #size to be set on Down::ChunkedIO after it has been
initialized, and since Down...

21d653848062cdf67165284058a7f1184ad629d4 authored over 7 years ago by Janko Marohnić <[email protected]>
Don't use Down in FileSystem storage

b352615e93523b7c6732b20482cfbadfe2fdc3cb authored over 7 years ago by Janko Marohnić <[email protected]>
Don't use deprecated Sequel.cache_anonymous_models

69a414e3b8550e043911fb806c344e6990177b90 authored over 7 years ago by Janko Marohnić <[email protected]>
Remove Webmock in favour of simple stubbing

96731b1f91dfcec8cea4e3ccf6461575b339e0f7 authored over 7 years ago by Janko Marohnić <[email protected]>
Un-deprecate Shrine.uploaded_file accepting JSON

This would be an unnecessary limitation, there is no reason why not to
give ability to instantia...

db2849c1b9464ec24c8524122e09077b7148a91c authored over 7 years ago by Janko Marohnić <[email protected]>
Fixed typo in keep_files documentation

8602f1f3b1e4b27db418dbf1b73cdcf557f03b4e authored over 7 years ago by Dan Sexton <[email protected]>
Use Base64.strict_encode64 in signature plugin

Unlike Base64.encode64, which adds a newline after each 60 characters
and a newline at the end o...

1da66f0fc6140aa9a67efc9d063c649319cec68f authored over 7 years ago by Janko Marohnić <[email protected]>
Fix FactoryGirl example in testing guide

If we declare the File object as a static attribute value, the same File
object will be used for...

dfb8196ac5c167f61dc0beb23c34fac6d8d31aad authored over 7 years ago by Janko Marohnić <[email protected]>
Remove newlines from base64-formatted signatures

It turns out that `Base64.encode64(Digest#digest)` doesn't generate the
same output as `Digest#b...

fe6b9a3693b3f4676c0bbfb280400faa22a18dee authored over 7 years ago by Janko Marohnić <[email protected]>
Correct year in CHANGELOG

10f2d1e543355c5b08c82b224ae224d3398b6b61 authored over 7 years ago by Janko Marohnić <[email protected]>
Fix typo in Plugins::MetadataAttributes docs

26315bfe049f7a4e4026fa0fa8af5b3a01860b6b authored over 7 years ago by Igor S. Morozov <[email protected]>
Bump to 2.6.1

ecb1aabbb48e713e2d35b1d86324270272edfcc2 authored over 7 years ago by Janko Marohnić <[email protected]>
Fix download_endpoint returning incorrect responses in some cases

Currently we are streaming the response body in chunks, and we're using
a buffer string so that,...

892eaa8d10bbe40534663d59d1a5535e64b6fad9 authored over 7 years ago by Janko Marohnić <[email protected]>
Fix ArgumentError messages for invalid tools

abcb42dea8c7c089c358c2d02c99ce9f9253c2c8 authored almost 8 years ago by Janko Marohnić <[email protected]>
Link shrine-tus on website

41f5f8ce83fe4f98f8047a9ecf8c58942e1a6a7c authored almost 8 years ago by Janko Marohnić <[email protected]>
Bump to 2.6.0

5da727675ee735bb0b3d2fe80ef1154f51f100b5 authored almost 8 years ago by Janko Marohnić <[email protected]>
Correct displaying Rack file hash

c3190d1e266aa3c334b73468f8858ee8a2d9a3e2 authored almost 8 years ago by Janko Marohnić <[email protected]>
Make Storage::FileSystem#path public

We do this for the same reason for which we made `Storage::S3#object`
public.

f259be4cb04a50f215da9b58b4445cbad9a6795d authored almost 8 years ago by Janko Marohnić <[email protected]>
Remove unnecessary #to_s chunk conversion

08db6530ba57ffd1cd82e74dac8029e0b5d63df8 authored almost 8 years ago by Janko Marohnić <[email protected]>
Handle empty files in CRC32 signature

b7745f51106f09867a9126f9a24ae3d6d811cc87 authored almost 8 years ago by Janko Marohnić <[email protected]>
Show FileSystem setup when uploading files to "public" directory itself

Fixes #142

a2cf7dbac1f65f670a5785a11bd5c4dc708c801f authored almost 8 years ago by Janko Marohnić <[email protected]>
Minor fixes to the S3 storage tests

9f8d5a533e81a654a7e1ee8409f3c85cb745a333 authored almost 8 years ago by Janko Marohnić <[email protected]>
Add Shrine.rack_file to rack_file plugin

This way users can convert the Rack uploaded file hash into an IO object
directly, which is usef...

f703bde9b6b812ad298ae44c90bfad56ecfe8b08 authored almost 8 years ago by Janko Marohnić <[email protected]>
Deprecate passing Rack file hash to Shrine#upload

With the upcoming `Shrine.rack_file` method users will be able to
convert Rack uploaded file has...

ad14f7855a83e4d54d146abe429c785e43e41ef3 authored almost 8 years ago by Janko Marohnić <[email protected]>
Improve `Shrine.data_uri` documentation

c6fb870e8d1540cae435931c6734582615cee07c authored almost 8 years ago by Janko Marohnić <[email protected]>
Add #to_io method to DataUri::DataFile

It's good practice for IO objects to conform to this interface.

52185128a15a0c65c3a00b3dd844064eae50b8ce authored almost 8 years ago by Janko Marohnić <[email protected]>
Update some RDocs

418ecc937ee038a30b20a010f8fd6f7e640faee4 authored almost 8 years ago by Janko Marohnić <[email protected]>
Expose class-level methods for extracting dimensions

It's useful for a user building their file upload flow to be able to
reuse functionality of Shri...

62affd8c14c9b3478594cd1feda1eebb739b4a02 authored almost 8 years ago by Janko Marohnić <[email protected]>
Update tests to use Shrine::Attachment.new(:name)

506e7f7f976d57cd0836c4211abbbb26990e70a6 authored almost 8 years ago by Janko Marohnić <[email protected]>
Recommend using ImageUploader::Attachment.new(:image) over ImageUploader[:image]

It's both more explicit and more readable, because it has the word
"attachment" in the name. Peo...

39e57b38990235d152392ba3b50cfd4f3ae6cec5 authored almost 8 years ago by Janko Marohnić <[email protected]>
Add metadata_attributes plugin

26c058231bfaee27ea8f24a4359bca3be5fc66be authored almost 8 years ago by Janko Marohnić <[email protected]>
Fix typo in remote_url documentation

dfc9a63acf6004b67945bcef09bacc0ebfb75822 authored almost 8 years ago by Janko Marohnić <[email protected]>
Expose methods for determining MIME type

It's useful for developers building a file attachment flow to just be
able to just extract MIME ...

b509e42bc9d1d041166db9a354ce2b08a629e8db authored almost 8 years ago by Janko Marohnić <[email protected]>
Add signature plugin for calculating hash from a file

Generating hashes from files can be useful for doing checksums or
validating uniqueness of files.

5d0c393836003aa05529f818cc52a9003bbc4fef authored almost 8 years ago by Janko Marohnić <[email protected]>
Return the plugin module in `Shrine.plugin`

It makes sense to me to return the resolved plugin module, especially
when testing in the console.

0009b4b6dff06651beb38d0b29635f01a65e206c authored almost 8 years ago by Janko Marohnić <[email protected]>
Accept hash with symbol keys in add_metadata block

One user tried to return a hash of metadata with symbol keys in the
`add_metadata` block, and it...

99ce8553bac6b48b5503a9a633a3a2623ec36107 authored almost 8 years ago by Janko Marohnić <[email protected]>
Add refresh_metadata plugin for re-extracting metadata

fd3929118da666d503236e9f141cdf0d1bd46e56 authored almost 8 years ago by Janko Marohnić <[email protected]>
Document :magic_header determine_mime_type option

f491195ccef0a231117479be8007b93a20d108cd authored almost 8 years ago by Janko Marohnić <[email protected]>
Add "metadata tampering" section to "Securing Uploads" guide

b5554b99244d6ee27b9aff926ff1f2982c21c87c authored almost 8 years ago by Janko Marohnić <[email protected]>
Suggest limiting Content-Length in "Securing Uploads" guide

This is in my opinion as secure as limiting on Nginx level, but it's
easier to maintain and more...

c008c6e8709137916db6f32c2eb4909862ce4d74 authored almost 8 years ago by Janko Marohnić <[email protected]>
Correct remaining examples of extension/MIME type validations which pass regexes

Passing regexes to extension/MIME type validations has been deprecated.

1064e76008319d2b58b9b517262b0b3098751d60 authored almost 8 years ago by Janko Marohnić <[email protected]>
Use a single file descriptor in S3#download

No need to pass the Tempfile path and have aws-sdk open its own file
descriptor, we can pass in ...

842bd5249e2cb060c984c92efadcf19a787de80d authored almost 8 years ago by Janko Marohnić <[email protected]>
Enable multipart upload for FileSystem objects

When FileSystem storage is used as the temporary storage, since its
Shrine::UploadedFile won't r...

591edf47d97dc6ec13563550daddda09a81675bc authored almost 8 years ago by Janko Marohnić <[email protected]>
Allow specifying multipart upload and copy options separately on S3 storage

By default aws-sdk will use chunk size of 5MB for multipart upload, and
50MB for multipart copy....

0a0a15126f6c997ce3e6481c1191ebbb9d324dca authored almost 8 years ago by Janko Marohnić <[email protected]>
Document enhancement of `Shrine.uploaded_file` in versions plugin

f3f9af497c285cb155d4dfdb68388e17d258d0b3 authored almost 8 years ago by Janko Marohnić <[email protected]>
Show a real example of a custom MIME type analyzer

8c3020586c2398afea9f700937829109af154b7d authored almost 8 years ago by Janko Marohnić <[email protected]>
Fix code examples for Shrine::Storage::S3

c07600596471b1a60f927512804bae8df1ab5d6b authored almost 8 years ago by Janko Marohnić <[email protected]>
Give performance tips for download_endpoint

Also remove the Heroku note, as Heroku now seems to allow uploading to
any directory, not just t...

9c27d4141ed86941e0157a2240ff4e9fc7d56831 authored almost 8 years ago by Janko Marohnić <[email protected]>
Mention shrine-url as an alternative to remote_url plugin

3f273d9a1ef08aad978a5c036f232bb69024cc11 authored almost 8 years ago by Janko Marohnić <[email protected]>
Some fixes and additions to the migration guides

789a55d3c29c3ffd7318f0fc6c6a7dce144a7097 authored almost 8 years ago by Janko Marohnić <[email protected]>
Simplify detecting duplicate versions

If instead of comparing by regular equality we switch to comparing by
hash equality, we can simp...

7423bb3358b4f8756e87f35b0173c40018476423 authored almost 8 years ago by Janko Marohnić <[email protected]>
Note in migration docs that using FastImage is optional

When migrating a large number of attachments, it might not be feasible
to make an HTTP request f...

734b701591521a48add09e1b9c293f307ef45c81 authored almost 8 years ago by Janko Marohnić <[email protected]>
Document that Down requires URL to be URI-encoded

Fixes #132

5b8cb4c3e7d1de34c5a67704c0e212c823f9d505 authored almost 8 years ago by Janko Marohnić <[email protected]>
Link Madrid.rb presentation on the website

77617abe983f306ffe9e99e6901783c29e49aafe authored almost 8 years ago by Janko Marohnić <[email protected]>
Correct Heroku considerations in Direct S3 Uploads

021b0082309cb0bba0a52d29c76ae1b8dc4c66f8 authored almost 8 years ago by Janko Marohnić <[email protected]>
Mention Attacher#cached? and #stored? in backgrounding plugin documentation

c8f2b734d6eac3000dd53948c8b49a47eb112b57 authored almost 8 years ago by Janko Marohnić <[email protected]>
Simply per-uploader backgrounding example

There is no need to load the `backgrounding` plugin only for a specific
uploader, and it complic...

09d7cd213bae83adb210860d9179c0f924441b87 authored almost 8 years ago by Janko Marohnić <[email protected]>
Improve RDocs for Shrine::Storage::S3

91f2094ae7bcf58b2a626c64893ed3a977077317 authored almost 8 years ago by Janko Marohnić <[email protected]>
Require "mime/types" in MIME::Types examples

aca9c549ca74c23e03a332483f184093deb48f30 authored almost 8 years ago by Janko Marohnić <[email protected]>
Document setting content type in presign options

When doing direct S3 uploads, correct content types should be set on
initial direct upload, beca...

2e161e1ca28a5159b8e918d432f3a5375e028266 authored almost 8 years ago by Janko Marohnić <[email protected]>
Link shrine-storage-you_tube on the website

fe64feadae8e487a09cb39ac8b821ce4d59b0a13 authored almost 8 years ago by Janko Marohnić <[email protected]>
Minor documentation enhancements

6438f3afbf1e5635a0dfe7696bab953c34ddf937 authored almost 8 years ago by Janko Marohnić <[email protected]>
Recommend auto-orienting rotated images

Most image viewing desktop software automatically orient rotated images
(a photo can be rotated ...

09a81d49ee25f80ac0bc0e09e939478a7224e85d authored almost 8 years ago by Janko Marohnić <[email protected]>
Don't lock Rack dev dependency to 1.6.4

c725d2e2a66742d157d53b129071b3b0b71b5822 authored almost 8 years ago by Janko Marohnić <[email protected]>
Merge pull request #148 from danielpowell4/patch-2

Updates documentation wording

109e33cfdce9f8e4aa961d4edc584de09c81af9a authored almost 8 years ago by Janko Marohnić <[email protected]>
Fix wrong implementation of FileSystem#clear!

FileSystem#clear! with an :older_than parameter was entirely skipping
directories which were mod...

eb877f8ec2288eeab1cb967e737364430bd52471 authored almost 8 years ago by Janko Marohnić <[email protected]>
Update CHANGELOG with recent data URI improvements

71a0c3986769bf8aba8692cacf7a41d0263e4edc authored almost 8 years ago by Janko Marohnić <[email protected]>
Switch back to using a StringIO for data URI

Using a Tempfile makes creating a DataFile significantly slower, because
2/3 of that time is spe...

bd1e02d6c54f3fa45a6fc7460c902163b6f9cfff authored almost 8 years ago by Janko Marohnić <[email protected]>
Accept additional media type params in data URI

RFC 2397 specifies that media type in a data URI can have additional
parameters, e.g.

data:te...

30c0a0a0abd3ab7bb1b88d9c1dc1dfbf16b0655f authored almost 8 years ago by Janko Marohnić <[email protected]>
Save DataUri::DataFile to disk instead of memory

There is no reason to keep the parsed data URI in memory, so we save the
content to disk and dea...

f3d7f44017c32d1b648493d14301bf36fab15133 authored almost 8 years ago by Janko Marohnić <[email protected]>
URI-decode non-base64 data URIs

This is allowed (or probably even required) by the RFC 2397 data URI
specification.

49a12d2e740e48ab0e75e75551ba83fbf911eaee authored almost 8 years ago by Janko Marohnić <[email protected]>
Improve data URI parsing performance by switching to StringScanner

Performing a regex match on the whole data URI can be fairly slow, and
it is unnecessary conside...

412dfe8a4e2cec69643476883562f0a77a85a97e authored almost 8 years ago by Janko Marohnić <[email protected]>
Extract converting data URI into IO into Shrine.data_uri

So far we were both converting a data URI into an IO object and
assigning it to the model inside...

770dc49e417b2dd641e1814f6d71857fd0bfa01e authored almost 8 years ago by Janko Marohnić <[email protected]>
Deallocate binary string in UploadedFile#base64

After we convert binary content to base64 format, we can deallocate the
binary string with Strin...

d9662e634606e314de4b965d516077e2ec1e3613 authored almost 8 years ago by Janko Marohnić <[email protected]>
Make #tempfile a reader in RackFile::UploadedFile

78c872527e13959b0ae2cf116d62ac05b43b22ae authored almost 8 years ago by Janko Marohnić <[email protected]>
Use Enumerable#each_slice in Storage::S3#clear!

018f81f4bad2c8703195c1578ac6592810dac384 authored almost 8 years ago by Janko Marohnić <[email protected]>
Accept HashWithIndifferentAccess-like objects in rack_file plugin

Grape converts all request parameters into a Hashie::Mash (which is a
Hash subclass), including ...

8b541d3a1df89c0b55618509176ceaa7997641a4 authored almost 8 years ago by Janko Marohnić <[email protected]>