metamaps--metamaps/lib/tasks/heroku.rake

18 lines
445 B
Ruby
Raw Permalink Normal View History

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