Skip to content
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

failing spec for TypeError: can't convert File into String #782

Conversation

jnimety
Copy link
Contributor

@jnimety jnimety commented Jul 10, 2012

for issue #482

@jnimety
Copy link
Contributor Author

jnimety commented Jul 10, 2012

I'm not sure if I put the spec in the right place, but it does reproduce the issue.

@travisbot
Copy link

This pull request fails (merged ed230ab into 72f9d09).

@jnimety
Copy link
Contributor Author

jnimety commented Aug 1, 2012

could I get some feedback on this pull request and issue #482? please let me know if I put the spec in the appropriate place.

@abscondment
Copy link

I'd like to see a fix for this, too :)

@makaroni4
Copy link

@abscondment +1

I need it to be fixed either

@iterion
Copy link

iterion commented Aug 28, 2012

+1 on this as well - what is needed to get this merged?

@trevorturk
Copy link
Contributor

We need help with maintenance: #823

@bensie
Copy link
Member

bensie commented Aug 28, 2012

@jnimety I tried combining your failing spec with the proposed fix from @erichhorde in #814, but I'm still seeing the failures below. I'm happy to merge a fix once there is one.

› bundle exec rspec
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................F.........................F.........................F.........................F.........................F.........................F.........................F.........................F.........................F.........................F.........................F.........................F.........................................................................................................................................................................................................................................................

Failures:

  1) CarrierWave::Storage::Fog with a valid Hash it should behave like AWS storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "AWS storage" called from ./spec/storage/fog_helper.rb:252
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  2) CarrierWave::Storage::Fog with a valid Tempfile it should behave like AWS storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "AWS storage" called from ./spec/storage/fog_helper.rb:260
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  3) CarrierWave::Storage::Fog with a valid StringIO it should behave like AWS storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "AWS storage" called from ./spec/storage/fog_helper.rb:268
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  4) CarrierWave::Storage::Fog with a valid File object it should behave like AWS storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "AWS storage" called from ./spec/storage/fog_helper.rb:277
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  5) CarrierWave::Storage::Fog with a valid path it should behave like AWS storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "AWS storage" called from ./spec/storage/fog_helper.rb:286
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  6) CarrierWave::Storage::Fog with a valid Pathname it should behave like AWS storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "AWS storage" called from ./spec/storage/fog_helper.rb:295
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  7) CarrierWave::Storage::Fog with a valid Hash it should behave like Google storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "Google storage" called from ./spec/storage/fog_helper.rb:252
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  8) CarrierWave::Storage::Fog with a valid Tempfile it should behave like Google storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "Google storage" called from ./spec/storage/fog_helper.rb:260
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  9) CarrierWave::Storage::Fog with a valid StringIO it should behave like Google storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "Google storage" called from ./spec/storage/fog_helper.rb:268
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  10) CarrierWave::Storage::Fog with a valid File object it should behave like Google storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "Google storage" called from ./spec/storage/fog_helper.rb:277
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  11) CarrierWave::Storage::Fog with a valid path it should behave like Google storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "Google storage" called from ./spec/storage/fog_helper.rb:286
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

  12) CarrierWave::Storage::Fog with a valid Pathname it should behave like Google storage#cache_stored_file! should cache_stored_file! after store!
     Failure/Error: uploader.cache_stored_file!.should_not raise_error
       expected no Exception, got #<NoMethodError: undefined method `call' for [:process!, :assign_parent_cache_id, :cache_versions!]:Array>
     Shared Example Group: "Google storage" called from ./spec/storage/fog_helper.rb:295
     # ./spec/storage/fog_helper.rb:37:in `block (5 levels) in fog_tests'

Finished in 10.18 seconds
992 examples, 12 failures

Signed-off-by: Joel Nimety <jnimety@continuity.net>
@jnimety
Copy link
Contributor Author

jnimety commented Aug 28, 2012

try that, I was testing for lack of exception incorrectly. I've included the patch from #814 as well.

@travisbot
Copy link

This pull request fails (merged b3af3cf into 72f9d09).

@bensie
Copy link
Member

bensie commented Aug 29, 2012

Looks good, thanks!

bensie added a commit that referenced this pull request Aug 29, 2012
…verted-to-string-in-cache-rb

Fix for TypeError: can't convert File into String when caching
@bensie bensie merged commit ea432ee into carrierwaveuploader:master Aug 29, 2012
@Irio
Copy link

Irio commented Aug 30, 2012

Can you release a new version with this commits?

@trevorturk
Copy link
Contributor

Please use the latest from github if you need this fix immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants