sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::Mime#read_file
Public: Read file on disk with MIME type specific encoding. filename - String path content_type - String MIME type Returns String file contents transcoded to UTF-8 or in its external encoding.
Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/mime.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--Mime-read_file-for-pr
# Commit to gitgit add lib/sprockets/mime.rbgit commit -m "better docs for Sprockets::Mime#read_file"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--Mime-read_file-for-pr
hub pull-request
# Celebrate!