зеркало из https://github.com/github/aws-s3.git
Fix aws-s3 for Rails 4.1
In Rails 4.1 `cattr_` methods were moved to the module (see `rails/rails@7dfbd91`). This means that the methods that create the writers and readers will fail when they get a "symbol" called `{:instance_writer => false}`. So when the AWS S3 gem is loaded you see this when trying to run tests: ``` /gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:223: `@@{' is not allowed as a class variable name ``` The change here was taken from an unmerged PR on the original fork `marcel/aws#94`. Longer term we should consider switching from this gem to either Shopify's fork or to the AWS supported S3 gem. For now this will get Rails 4.1 development moving along.
This commit is contained in:
Родитель
7221224c8b
Коммит
79c9083537
|
@ -240,7 +240,7 @@ class Class # :nodoc:
|
|||
cattr_reader(*syms)
|
||||
cattr_writer(*syms)
|
||||
end
|
||||
end if Class.instance_methods(false).grep(/^cattr_(?:reader|writer|accessor)$/).empty?
|
||||
end if Class.instance_methods.grep(/^cattr_(?:reader|writer|accessor)$/).empty?
|
||||
|
||||
module SelectiveAttributeProxy
|
||||
def self.included(klass)
|
||||
|
|
Загрузка…
Ссылка в новой задаче