Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Jun 7, 2024
1 parent f13f9d5 commit fd8be7d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.2.0
## Fixed
- Support environments with string literals frozen by default. (thanks @danielmorrison)

## 2.0.0
## Added
- Response body compression is now streamed.
## Changed
- Minimum supported version of Rack is 3.0.

## 1.2.0
## Fixed
- Support environments with string literals frozen by default. (thanks @danielmorrison)

## 1.1.0
## Changed
- Removed dependency on `git-version-bump` gem for versioning. `rack-brotli` now only depends on `rack` and `brotli`.
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rack::Brotli [![Gem Version](https://badge.fury.io/rb/rack-brotli.svg)](https://badge.fury.io/rb/rack-brotli) [![Build Status](https://travis-ci.org/marcotc/rack-brotli.svg?branch=master)](https://travis-ci.org/marcotc/rack-brotli)
# Rack::Brotli [![Gem Version](https://badge.fury.io/rb/rack-brotli.svg)](https://badge.fury.io/rb/rack-brotli) [![Build Status](https://github.com/marcotc/rack-brotli/actions/workflows/test.yml/badge.svg)](https://github.com/marcotc/rack-brotli/actions/workflows/test.yml)

`Rack::Brotli` compresses `Rack` responses using [Google's Brotli](https://github.com/google/brotli) compression algorithm.

Expand All @@ -17,7 +17,10 @@ Requiring `'rack/brotli'` will autoload `Rack::Brotli` module. The following exa
require 'rack'
require 'rack/brotli'

use Rack::Brotli
use Rack::Brotli # Default compression quality is 5

# You can also provide native Brotli compression options:
# use Rack::Brotli, quality: 11

run theapp
```
Expand All @@ -26,10 +29,10 @@ run theapp

To run the entire test suite, run

rake test
bundle exec rake test

### Links

* rack-brotli on GitHub:: <http://github.com/marcotc/rack-brotli>
* Rack:: <http://rack.rubyforge.org/>
* Rack On GitHub:: <http://github.com/rack/rack>
* rack-brotli: <http://github.com/marcotc/rack-brotli>
* Brotli for Ruby: <https://github.com/miyucy/brotli>
* Rack: <http://github.com/rack/rack>
2 changes: 1 addition & 1 deletion rack-brotli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = %w[README.md COPYING]

s.add_runtime_dependency 'rack', '>= 3'
s.add_runtime_dependency 'brotli', '>= 0.3'
s.add_runtime_dependency 'brotli', '>= 0.3' # First version with support for streaming compression through Brotli::Writer

s.homepage = "http://github.com/marcotc/rack-brotli/"
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "rack-brotli", "--main", "README"]
Expand Down

0 comments on commit fd8be7d

Please sign in to comment.