Sha256: c0be893073f98596c369f97e283e907083ef7f54fd5d44bc15a821ea96ed901f

Contents?: true

Size: 836 Bytes

Versions: 40

Compression:

Stored size: 836 Bytes

Contents

require 'jquery-ui-rails'
require 'scrivito_content_browser'

module ScrivitoEditors
  class Engine < ::Rails::Engine
    isolate_namespace ScrivitoEditors

    initializer "scrivito_editors.scrivito_tag_helper" do
      ActionView::Base.send :include, ScrivitoTagHelper
    end

    class << self
      def imgly_assets
        imgly_assets_paths.inject({}) do |asset_map, file|
          asset_map[file] = yield(file)
          asset_map
        end
      end

      private

      def imgly_assets_paths
        images_path = ScrivitoEditors::Engine.root + 'vendor/assets/images/'
        absolute_paths = Dir[images_path + 'imgly_sdk/**/*'].select { |f| File.file?(f) }

        absolute_paths.map do |absolute_path|
          Pathname.new(absolute_path).relative_path_from(images_path).to_s
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
scrivito_editors-1.5.5 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.1 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.1.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.5.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.3 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.4 lib/scrivito_editors/engine.rb
scrivito_editors-1.7.0.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.0 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.0.rc5 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.4.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.0.rc4 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.0.rc3 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.3 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.0.rc2 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.3.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.6.0.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.2 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.2.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.1 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.1.rc2 lib/scrivito_editors/engine.rb