Sha256: 7e5f1151cbd1f76b30baa109efd75e55a1cfa4c10c5eabb409428c2a5365a77c

Contents?: true

Size: 1.23 KB

Versions: 8

Compression:

Stored size: 1.23 KB

Contents

kanoko
===

[![Build Status](https://travis-ci.org/spice-life/kanoko.svg?branch=master)](https://travis-ci.org/spice-life/kanoko)

![logo](https://raw.githubusercontent.com/spice-life/kanoko/master/logo.png)

**kanoko** is an active image generate application.

# Quick Start

```
require 'kanoko/application/convert'

class MyApp < Kanoko::Application::Convert
end

run MyApp
```

```
$ KANOKO_DIGEST_FUNC=sha1 KANOKO_SECRET_KEY=devkey unicorn --config-file config/unicorn/development.rb
```

# Arguments

**http://{{kanoko.host}}/:hash/:func/:args/:path**

- **hash:** params signature (see also **Signature**)
- **func:** a function name of image processing (e.g. fit)
- **args:** image processing arguments (e.g. "100x100")
- **path:** Target image path without scheme (e.g. "host/path/to/image?params\_a=value\_a")

# Signature

**hash** is changeable.

By default, see `Kanoko::Configure#initialize`.

On application, It must be set **hash** same way as this.

If hash not match, application should be return *400 Bad Request*.

This function behavior can change by Kanoko.configure.

```ruby
Kanoko.configure.hash_proc = ->{
  "some_hash_value_on_url"
}
```

# TODO

- To be able to change digest_func and secret_key on graceful restart
- More fast

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kanoko-0.3.3 README.md
kanoko-0.3.2 README.md
kanoko-0.3.1 README.md
kanoko-0.3.0 README.md
kanoko-0.2.0 README.md
kanoko-0.1.3 README.md
kanoko-0.1.2 README.md
kanoko-0.1.1 README.md