Sha256: a734923ef2b1d7868e1e81b12c3d7f02bf99f2f20ca9f3e934680fbd9a74e24c

Contents?: true

Size: 600 Bytes

Versions: 3

Compression:

Stored size: 600 Bytes

Contents

module Abrizer
  # It is usually better for a human to select a poster image, but we try to
  # select a temporary one.
  # Creating sprites leaves some images around so that is a prerequisite for
  # this step.
  # TODO: selection of a temporary poster image could be improved
  class TemporaryPoster

    include FilepathHelpers

    def initialize(output_dir)
      @output_directory = output_dir
    end

    def copy
      FileUtils.cp first_image_filepath, poster_image_filepath
      `jpegoptim #{poster_image_filepath}`
      FileUtils.chmod "ugo+r", poster_image_filepath
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
abrizer-0.6.0 lib/abrizer/temporary_poster.rb
abrizer-0.5.0 lib/abrizer/temporary_poster.rb
abrizer-0.4.0 lib/abrizer/temporary_poster.rb