Sha256: 9c4de3f89842ebc0434475f8a7287b8caf96052d25c4eb2ac84825ff062c8791

Contents?: true

Size: 715 Bytes

Versions: 1

Compression:

Stored size: 715 Bytes

Contents

#!/usr/bin/env ruby

require 'fileutils'

# Load Rails environment
ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] || 'development'

begin

  require File.expand_path('config/environment')

  puts 'Copying files...'

  javascripts_dir = File.join(RAILS_ROOT, 'public', 'javascripts')
  stylesheets_dir = File.join(RAILS_ROOT, 'public', 'stylesheets')

  javascripts = Dir[File.join(File.dirname(__FILE__), '..', '/javascripts/', '*.js')]
  stylesheets = Dir[File.join(File.dirname(__FILE__), '..', '/stylesheets/', '*.css')]

  FileUtils.cp(javascripts, javascripts_dir)
  FileUtils.cp(stylesheets, stylesheets_dir)

  puts 'files copied successfully'

rescue LoadError
  puts 'Couldn\'t find Rails. Exiting'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elastic_rails-2.0.2 bin/elasticss