Rack middleware for serving gzip files
Want to use rack-zippy with a Rails v4.2 or greater app?
Its recommended you don't! Rails 4.2+ now supports serving gzipped files directly so there's no need for rack-zippy in Rails 4.2+ apps.
Want to use rack-zippy with a Rails v4.1 or less app?
You'll need to use v3.0 of rack-zippy, see the README here: https://github.com/eliotsykes/rack-zippy/tree/v3.0.1
rack-zippy v4+ is a Rack middleware for serving .gz files in Rack apps that are not Rails 4.2+ apps. (If you need to use rack-zippy in a Rails 'eliotsykes/rack-zippy', :branch => 'your-local-branch-name'
At the command line, inside your-app, configure bundler to set a local git repo to override the one we specified in the previous step for rack-zippy:
$> bundle config --local local.rack-zippy /path/to/your/local/rack-zippyNow when you run your-app with bundle exec, the rack-zippy gem dependency will resolve to /path/to/your/local/rack-zippy.
Cleanup time! When you’re finished testing, delete the local override and set your Gemfile dependency back to the original:
# At the command line:
$> bundle config --delete local.rack-zippy
# In your-app/Gemfile change rack-zippy dependency to this (or similar):
gem 'rack-zippy', '~> 9.8.7' # Replace 9.8.7 with the rack-zippy release version you want to use.# Single test file
ruby -Ilib:test test/assert_server_test.rb
# Single test method
ruby -Ilib:test test/assert_server_test.rb --name test_serves_static_file_as_directory
# Test methods matching a regex
ruby -Ilib:test test/assert_server_test.rb --name /serves_static/lib/rack-zippy/version.rb, e.g. 1.0.1.pre becomes 1.0.1CHANGELOG.md version and date. Update Contributors in README.md.rake test)rake build)rake release)lib/rack-zippy/version.rb, e.g. 1.0.1 becomes 1.0.2.pre.CHANGELOG for the next pre-releaselib/rack-zippy/version.rb and CHANGELOG files.No open issues yet, or sync has not completed.