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.1.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.0 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.0.rc2 lib/scrivito_editors/engine.rb
scrivito_editors-1.5.0.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.2 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.1 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.1.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.0 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.0.rc2 lib/scrivito_editors/engine.rb
scrivito_editors-1.4.0.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.3.1 lib/scrivito_editors/engine.rb
scrivito_editors-1.3.1.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.3.0 lib/scrivito_editors/engine.rb
scrivito_editors-1.3.0.rc3 lib/scrivito_editors/engine.rb
scrivito_editors-1.3.0.rc2 lib/scrivito_editors/engine.rb
scrivito_editors-1.3.0.rc1 lib/scrivito_editors/engine.rb
scrivito_editors-1.2.0 lib/scrivito_editors/engine.rb
scrivito_editors-1.2.0.rc3 lib/scrivito_editors/engine.rb
scrivito_editors-1.2.0.rc2 lib/scrivito_editors/engine.rb
scrivito_editors-1.2.0.rc1 lib/scrivito_editors/engine.rb