Class: AbAdmin::Generators::CkeditorAssetsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb

Constant Summary collapse

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

Instance Method Summary collapse

Instance Method Details

#copy_assetsObject


8
9
10
11
12
13
14
15
# File 'lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb', line 8

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