Sha256: ab1a59d87db6a24d692c953bd1f53c25a376122b08702ae8532e0c2789e45bd0

Contents?: true

Size: 622 Bytes

Versions: 4

Compression:

Stored size: 622 Bytes

Contents

# -*- encoding : utf-8 -*-
module AbAdmin
  module Generators
    class CkeditorAssetsGenerator < Rails::Generators::Base
      desc 'Copy ckeditor assets to public (prevent it\'s long and buggy precompile)'

      DOWNLOAD_LINK = 'https://dl.dropboxusercontent.com/s/kwzb06hoi9heaoa/ckeditor_assets.tar'

      def copy_assets
        archive = 'ckeditor_assets.tar'
        path = 'public/javascripts'
        dest = File.join(@destination_stack.last, path)
        empty_directory path
        get DOWNLOAD_LINK, File.join(path, archive)
        run "tar -xf #{dest}/#{archive} -C #{dest}"
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ab_admin-0.6.1 lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb
ab_admin-0.6.0 lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb
ab_admin-0.5.0 lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb
ab_admin-0.4.0 lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb