guard-rails-assets/lib/guard/rails-assets/cli_runner.rb

12 lines
268 B
Ruby
Raw Normal View History

module Guard
class RailsAssets::CliRunner
def initialize(options={})
@rails_env = (options[:rails_env] || 'test').to_s
end
def compile_assets
system "RAILS_ENV=#{@rails_env} bundle exec rake assets:clean assets:precompile"
end
end
end