etag
Version, currently 0.1.01 version
- 0.1.0latestNov 17, 2016
github.com/SuperPaintman/etag
Library to generate HTTP ETags (*RFC 7232*).
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
etag:
github: SuperPaintman/etag
version: ~> 0.1.0Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- SuperPaintman
Dependencies
This version declares no dependencies.
README
Etag
Library to generate HTTP ETags (RFC 7232).
Installation
Add this to your application's shard.yml:
dependencies:
etag:
github: SuperPaintman/etag
Usage
require "etag"
# === Based on file stat ===
Etag.etag File.lstat("./README.md")
# => "\"a19-582e0568"\"
# or weak
Etag.etag File.lstat("./README.md", weak: true)
# => "W/\"a19-582e0568"\"
# === Based on file entity ===
Etag.etag File.read("./README.md")
# => "\"a19-UDMQYeZ+VMk+2Fv11x6Mu/JkktE\""
# or weak
Etag.etag File.read("./README.md")
# => "W/\"a19-UDMQYeZ+VMk+2Fv11x6Mu/JkktE\""
or with including:
require "etag"
include Etag
etag File.read("./README.md")
# => "W/\"a19-UDMQYeZ+VMk+2Fv11x6Mu/JkktE\""
# ...
Test
crystal spec
Contributing
- Fork it (https://github.com/SuperPaintman/etag/fork)
- Create your feature branch (
git checkout -b feature/<feature_name>) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin feature/<feature_name>) - Create a new Pull Request
Contributors
- SuperPaintman SuperPaintman - creator, maintainer
API
Changelog
License
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Nov 17, 2016
- Commit
d13593aba52d- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/SuperPaintman/etag
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 14, 2026
- Versions
- 1