metamaps--metamaps/lib/tasks/heroku.rake
Devin Howard 7d4da81272 Update code style automatically using rubocop gem (#563)
* install rubocop

* 1961 automatic rubocop fixes

* update rubocop.yml to ignore half of the remaining cops

* rubocop lint warnings

* random other warnings fixed
2016-07-26 08:14:23 +08:00

17 lines
445 B
Ruby

require 'dotenv/tasks'
namespace :heroku do
desc 'Generate the Heroku gems manifest from gem dependencies'
task gems: :dotenv do
RAILS_ENV = 'production'.freeze
Rake::Task[:environment].invoke
list = Rails.configuration.gems.collect do |g|
_command, *options = g.send(:install_command)
options.join(' ') + "\n"
end
File.open(File.join(RAILS_ROOT, '.gems'), 'w') do |f|
f.write(list)
end
end
end