百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rack-zippy

> 编程语言
开源

用于服务 gzip 文件的机架中间件

158 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用于服务 gzip 文件的机架中间件

Hey fellow Rails developers, please read!

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

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-zippy

Now 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.

How to Run a Single Test

bash
# 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/

Contributors

  • Eliot Sykes https://eliotsykes.com
  • Kieran Topping https://github.com/ktopping
  • Luke Wendling https://github.com/lukewendling
  • Anton Petrunich https://github.com/solenko
  • ssemakov https://github.com/ssemakov
  • Kai Schlichting https://github.com/lacco

Releasing a new gem

  1. Update pre-release version to the release version in lib/rack-zippy/version.rb, e.g. 1.0.1.pre becomes 1.0.1
  2. Update CHANGELOG.md version and date. Update Contributors in README.md.
  3. Tests pass? (rake test)
  4. Commit and push changes to origin.
  5. Build the gem (rake build)
  6. Release on rubygems.org (rake release)
  7. Update version to the next pre-release version in lib/rack-zippy/version.rb, e.g. 1.0.1 becomes 1.0.2.pre.
  8. Add new heading to CHANGELOG for the next pre-release
  9. Commit and push the updated lib/rack-zippy/version.rb and CHANGELOG files.

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言