forked from thoughtbot/paperclip
-
Notifications
You must be signed in to change notification settings - Fork 1
merge 1,600 commits into ajh:master from Arya128-ux:master #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Arya128-ux
wants to merge
1,605
commits into
ajh:master
Choose a base branch
from
Arya128-ux:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
something in aruba 0.10.x is breaking the cucumber specs
Resolve broken CI tests due to upstream gem changes
Inspected by https://github.com/dkhamsing/frankenstein [ci skip]
something in aruba 0.10.x is breaking the cucumber specs
…g_v4.3 Cache interpolator methods and reduce memory allocations - rebased on v4.3
Includes memory usage adjustments. Conflicts: lib/paperclip/storage/s3.rb
Fix merge problem with S3 storage
Update README with version requirement for aws-sdk
…f 'ActiveRecord' solo
v4.3.2 is a different tree than `master`, which is now targeting v5. Thank you both for this commit and merge, but I'll revert it: paperclip v4.3.2 doesn't include AWS v2 support. This reverts commit 9b33fc0. [ci skip]
Remove duplication by reusing existing method.
Fix condition to include Schema, using 'ActiveRecord::Base' instead o…
Extract another repository only concerned with locales: https://github.com/thoughtbot/paperclip-i18n A user of paperclip might choose to add `paperclip-i18n` as a dependency for their application, or copy over the related locale file into their project. This is a first step in splitting some parts of the codebase into other projects. Simple and relevant contributions like new translations might get lost in the shuffle of dozens of PRs awaiting for approval, that take time to review and merge. Locales are a simple enough problem to be handled in an external repository, where tests for consistency across translations run in less than a second, and PRs can almost trivially be merged in.
Remove locales from main repository
In preparation for Rails 5, which, when it is released, will make Rails 3.2 and 4.1 unsupported. See: * http://weblog.rubyonrails.org/2015/12/18/Rails-5-0-beta1/ * thoughtbot#2049
…ted-rails Removes Rails 3.2 and 4.1 support
TODO: Simpify lib/paperclip/storage/s3.rb See: * thoughtbot#2049
Remove AWS v1 support
…ethod These variables were introduced in: thoughtbot@6ea7c26512434a but their usage were canceled in: thoughtbot@c740fb171fe
File.exists? is deprecated and produces unecessary warning.
Replace File.exists? with File.exist? in paperclip.gemspec
Remove unused vars `column_(type|options)` from `remove_attachment` method
While using the Paperclip gem, we noticed during some ad-hoc testing that if you do not supply an extension when uploading a file, Paperclip effectively skipped it's spoofing check, which allowed potentially dangerous files to slip through into your application. This addresses that by moving the checks around a little bit and only testing against the extension when there is one.
As described in thoughtbot#2118, `OpenURI::Meta#content_type` will return `application/octet-stream` when no `content-type` header is set. Using the original `meta` fixes this issue.
In an effort to avoid filling $TMPDIR with stray files, let's close all Tempfiles after we are done with them. Additionally, add an around-filter to each test in the integration suite to catch cases where we don't do this. This exposes issues around re-processing a subset of our attached files: it leaves Tempfiles around. Mark that test as skipped (with a detailed explanation) because we cannot figure out how to make it work. Related to thoughtbot#1326.
The 4 byte limit is starting to wrap around; some complaints are being seen online, e.g. https://stackoverflow.com/questions/34477248/rails-paperclip-rangeerror/47999887#47999887 . Use `#sql_type` instead of `#type` in the tests. The `#type` is the category -- string, integer, datetime -- but the `#sql_type` is the storage specifics -- `TEXT`, `VARCHAR`, `BIGINT`, `DATE. Switch to the `#sql_type` so we can be sure it's being stored correctly.
As before: use `#sql_type` instead of `#type` in the tests. The `#type` is the category -- string, integer, datetime -- but the `#sql_type` is the storage specifics -- `TEXT`, `VARCHAR`, `BIGINT`, `DATE. Switch to the `#sql_type` so we can be sure it's being stored correctly.
Explain some lessons learned from successfully migrating an application from Paperclip to ActiveStorage. Replace links to `master` or `edgeguides.rubyonrails.org` with versions locked to `v5.2`.
This is a combination of [a comment from @sankage] and [a gist by @colinpetruno]. Many thanks to them for sharing their discoveries. [a comment from @sankage]: thoughtbot#2568 (comment) [a gist by @colinpetruno]: https://gist.github.com/colinpetruno/037de4fafa4cff695b1d7905cd6fd7c2
Meant to catch this in the prior commit: `key` is a SQL reserved word and therefore must have backticks around it.
The official [RSpec documentation](https://relishapp.com/rspec/rspec-expectations/v/2-4/docs/custom-matchers/define-matcher#define-a-matcher-with-default-messages) outlines that the main block when defining custom matchers should be called `match`. The documentation currently uses `matches` when giving an example of the custom `:have_attached_file` matcher, which leads to the error NoMethodError: undefined method `matches' for #<Class:#<RSpec::Matchers::DSL::Matcher:0x00007fc898c846d8>> Updating to `match`
I believe this is meant to be "does not", not "does".
At RailsConf 2019, Colleen Schnettler gave a fantastic talk on her real-world experience migrating from Paperclip to ActiveStorage, titled "How to migrate to Active Storage without losing your mind". In it she goes through the steps before and after a migration, and also talks through the details of the migration guide, along with some corrections. Link to the ConfFreaks video of this talk on YouTube so more video-minded folks can learn about the migration in a manner that is more comfortable.
We were contacted in early December by Surendra of Kreeti, who explained that they had forked Paperclip and were maintaining it. We let the December US holidays go by and then checked in; they're still maintaining it. We do not know any of the Kreeti devs and cannot vouch for them as a team. We did not know of a way to hand over the Rubygem ownership while expressing that people should remember to audit when upgrading. Therefore, we felt it best that they have a full fork: new Rubygem gem, separate repo. Therefore it makes sense for us to link to Kreeti's fork as an option for those who cannot move off of Paperclip. We've linked to `http://kreeti.com` instead of `https` because, as of this writing, they have left their site open to MITM attacks. Warn the reader of this so they don't follow a cleartext link without necessary preparation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.