Sha256: c600500a4ad6ec642298d58fff2cfd1940761f17868f64eb684f8d3ca8867c97

Contents?: true

Size: 1.03 KB

Versions: 58

Compression:

Stored size: 1.03 KB

Contents

require "rubygems"
require "bundler/setup"
$:.unshift(File.expand_path('../../lib', __FILE__))
require 'dragonfly'

ROOT = (File.expand_path('../..', __FILE__))
APP = Dragonfly[:images].configure_with(:imagemagick).configure do |c|
  c.url_format = '/images/:job'
  c.allow_fetch_file = true
end

def row(geometry)
  image = APP.fetch_file(ROOT + '/samples/beach.png').thumb('100x100#')
  %(<tr>
    <th>#{geometry}</th>
    <th><img src="#{image.url}" /></th>
    <th><img src="#{image.thumb(geometry).url}" /></th>
  </tr>)
end

use Dragonfly::Middleware, :images
run proc{[
  200,
  {'Content-Type' => 'text/html'},
  [%(
    <table>
      <tr>
        <th>Geometry</th>
        <th>Original(100x100)</th>
        <th>Thumb</th>
      </tr>
    #{[
      row('80x60'),
      row('80x60!'),
      row('80x'),
      row('x60'),
      row('80x60>'),
      row('80x60<'),
      row('50x50%'),
      row('80x60^'),
      row('2000@'),
      row('80x60#'),
      row('80x60#ne'),
      row('80x60se'),
      row('80x60+5+35')
    ].join}
    </table>
  )]
]}

Version data entries

58 entries across 58 versions & 2 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.7.4 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.7.3 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.7.2 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.7.1 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.7.0 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
dragonfly-0.9.15 spec/test_imagemagick.ru
dragonfly-0.9.14 spec/test_imagemagick.ru
dragonfly-0.9.13 spec/test_imagemagick.ru
classiccms-0.6.9 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.8 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.7 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.6 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.5 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.4 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.3 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.2 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.1 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.6.0 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru
classiccms-0.5.17 vendor/bundle/gems/dragonfly-0.9.12/spec/test_imagemagick.ru