Module: PhotoCook
- Extended by:
- Assemble, Callbacks, Command, Dimensions, Logging, PixelRatio, Resizing
- Defined in:
- lib/photo-cook/middleware.rb,
lib/photo-cook.rb,
lib/photo-cook/paths.rb,
lib/photo-cook/engine.rb,
lib/photo-cook/command.rb,
lib/photo-cook/logging.rb,
lib/photo-cook/resizer.rb,
lib/photo-cook/version.rb,
lib/photo-cook/assemble.rb,
lib/photo-cook/resizing.rb,
lib/photo-cook/callbacks.rb,
lib/photo-cook/dimensions.rb,
lib/photo-cook/carrierwave.rb,
lib/photo-cook/pixel-ratio.rb,
lib/photo-cook/magick-photo.rb,
lib/photo-cook/pixel-ratio-spy.rb
Overview
To use this middleware you should configure application:
application.config.middleware.insert_before(Rack::Sendfile, PhotoCook::Middleware, Rails.root)
Defined Under Namespace
Modules: Assemble, Callbacks, CarrierWave, Command, Dimensions, Logging, PixelRatio, PixelRatioSpy, Resizing Classes: Engine, HeightOutOfBoundsError, MagickPhoto, Middleware, NoConcreteDimensionsError, PixelRatioInvalidOrInfiniteError, PixelRatioOutOfBoundsError, Resizer, WidthOutOfBoundsError
Constant Summary collapse
- VERSION =
'1.1.0'
Class Attribute Summary collapse
-
.cache_dir ⇒ Object
Returns the value of attribute cache_dir.
-
.client_pixel_ratio ⇒ Object
Returns the value of attribute client_pixel_ratio.
-
.public_dir ⇒ Object
Returns the value of attribute public_dir.
-
.root ⇒ Object
Returns the value of attribute root.
Class Method Summary collapse
Methods included from Command
assemble_command, bool_to_crop, command_regex, crop_to_bool
Methods included from Logging
Methods included from Assemble
assemble_store_path, assemble_uri
Methods included from Resizing
build_resize_uri, hresize, resize_photo, vresize
Methods included from Callbacks
Methods included from Dimensions
check_dimensions!, parse_and_check_dimensions
Methods included from PixelRatio
parse_and_check_pixel_ratio, valid_pixel_ratio?
Class Attribute Details
.cache_dir ⇒ Object
Returns the value of attribute cache_dir.
3 4 5 |
# File 'lib/photo-cook/paths.rb', line 3 def cache_dir @cache_dir end |
.client_pixel_ratio ⇒ Object
Returns the value of attribute client_pixel_ratio.
17 18 19 |
# File 'lib/photo-cook/pixel-ratio-spy.rb', line 17 def client_pixel_ratio @client_pixel_ratio end |
.public_dir ⇒ Object
Returns the value of attribute public_dir.
3 4 5 |
# File 'lib/photo-cook/paths.rb', line 3 def public_dir @public_dir end |
.root ⇒ Object
Returns the value of attribute root.
3 4 5 |
# File 'lib/photo-cook/paths.rb', line 3 def root @root end |
Class Method Details
.rails_env? ⇒ Boolean
6 7 8 |
# File 'lib/photo-cook.rb', line 6 def self.rails_env? defined?(Rails) end |
.resize_uri_indicator ⇒ Object
5 6 7 |
# File 'lib/photo-cook/paths.rb', line 5 def resize_uri_indicator '/' + cache_dir end |