Sha256: 9aa8f5b5f94ec1d0149a951540f1f4b94466848be6d71df8fab3d74f9742c726

Contents?: true

Size: 877 Bytes

Versions: 4

Compression:

Stored size: 877 Bytes

Contents

# Extensions

Extensions are rubygems that could combine other gems with midori through meta-programming.
There's a set of officially supported midori extensions called `midori-contrib`.
This contains gems commonly used like Database ORM, Redis Driver, Redis ORM, HTTP Driver, etc.

To include it inside your project, be sure to get the original gem installed without require it.
Then include specific parts of `midori-contrib` to make it work.

For example:

`Gemfile`

```ruby
source 'https://rubygems.org'

gem 'bundler', '~> 1.0'
gem 'rake', '~> 12.0'

gem 'hiredis', '~> 0.6.0', require: false
gem 'ohm', '~> 3.0'
gem 'sequel', '~> 5.0', require: false
gem 'mysql2', '~> 0.4', require: false

gem 'em-midori', '~> 0.4.3', require: 'midori'
gem 'midori-contrib', '~> 0.1.0', require: %w(
    midori-contrib
    midori-contrib/sequel/mysql2
    midori-contrib/redic
  )
```

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
midori.rb-0.5.0 tutorial/essentials/extensions.md
midori.rb-0.4.4.1 tutorial/essentials/extensions.md
midori.rb-0.4.4 tutorial/essentials/extensions.md
midori.rb-0.4.3 tutorial/essentials/extensions.md