Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinify/tinify-ruby
Ruby client for the Tinify API.
https://github.com/tinify/tinify-ruby
gem image-compression image-optimization rails ruby tinyjpg tinypng
Last synced: 9 days ago
JSON representation
Ruby client for the Tinify API.
- Host: GitHub
- URL: https://github.com/tinify/tinify-ruby
- Owner: tinify
- License: mit
- Created: 2015-05-15T13:45:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-09T13:00:29.000Z (about 1 year ago)
- Last Synced: 2025-01-16T19:22:13.695Z (16 days ago)
- Topics: gem, image-compression, image-optimization, rails, ruby, tinyjpg, tinypng
- Language: Ruby
- Homepage: https://tinypng.com/developers
- Size: 296 KB
- Stars: 41
- Watchers: 7
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
[![Gem](https://img.shields.io/gem/v/tinify)](https://rubygems.org/gems/tinify)
[![MIT License](http://img.shields.io/badge/license-MIT-green.svg) ](https://github.com/tinify/tinify-java/blob/main/LICENSE)
[![Ruby CI](https://github.com/tinify/tinify-ruby/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/tinify/tinify-ruby/actions/workflows/ci-cd.yaml)# Tinify API client for Ruby
Ruby client for the Tinify API, used for [TinyPNG](https://tinypng.com) and [TinyJPG](https://tinyjpg.com). Tinify compresses your images intelligently. Read more at [http://tinify.com](http://tinify.com).
## Documentation
[Go to the documentation for the Ruby client](https://tinypng.com/developers/reference/ruby).
## Installation
Install the API client:
```
gem install tinify
```Or add this line to your application's Gemfile:
```ruby
gem "tinify"
```## Usage
```ruby
require "tinify"
Tinify.key = "YOUR_API_KEY"Tinify.from_file("unoptimized.png").to_file("optimized.png")
```## Running tests
```
bundle install
rake
```### Integration tests
```
bundle install
TINIFY_KEY=$YOUR_API_KEY rake integration
```## License
This software is licensed under the MIT License. [View the license](LICENSE).