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

Always return mimetype as string #380

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

mohangk
Copy link
Contributor

@mohangk mohangk commented Feb 26, 2019

Currently MultiMime.lookup returns either
::MIME::Type if it uses MIME::Types or ::Mime::Type
and returns a string containing the content type
if it uses ::Rack::Mime. This change makes the
return type consistently a string, which is AFAICT
supported by all fog-providers.

This change also allows us to remove the unnecessary
type checking of the content-type in storage.rb as
we can be assured its a string. Something similar will need to
be done to support the JSON storage API with fog-google
so this is prep work

Tests still pass and have always been testing for strings anyway

@TravisBuddy
Copy link

Hey @mohangk,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: c55c6e40-3965-11e9-8b5a-7f317ad24fc3

@coveralls
Copy link

coveralls commented Feb 26, 2019

Pull Request Test Coverage Report for Build 306

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 60.6%

Totals Coverage Status
Change from base Build 305: 0.04%
Covered Lines: 323
Relevant Lines: 533

💛 - Coveralls

@TravisBuddy
Copy link

Hey @mohangk,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 0f047ab0-3966-11e9-8b5a-7f317ad24fc3

@TravisBuddy
Copy link

Hey @mohangk,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: fadee5b0-3966-11e9-8b5a-7f317ad24fc3

@PikachuEXE PikachuEXE self-assigned this Feb 26, 2019
@PikachuEXE
Copy link
Member

Thanks for your PR
Can you rebase against master where the Travis build is fixed?

@mohangk
Copy link
Contributor Author

mohangk commented Feb 26, 2019

Sorry I just realised you have fixed the build. Will rebase now. Apologies.

Currently MultiMime.lookup returns either 
::MIME::Type if it uses MIME::Types or ::Mime::Type
and returns a string containing the content type
if it uses ::Rack::Mime. This change makes the 
return type consistently a string, which is 
supported by all fog-providers. This change also 
allows us to remove the unnecessary type checking 
in storage.rb as we can be assured its a string.
@PikachuEXE PikachuEXE merged commit fffa8e0 into AssetSync:master Feb 27, 2019
@PikachuEXE
Copy link
Member

Ya this bundler version thing is failing travis build for many rails related projects...

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.

4 participants