Sha256: d9f290b5365e75ca09fa733c396d9d6b247aa8f1283db9d8ad4b825371480e05

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

require 'rubygems'
require 'bundler/setup'

Bundler.require(:default, :test)
<% if @options['vlad'] %>
begin
  require 'vlad'
  # Set :app to :passenger if you're using Phusion Passenger.
  Vlad.load(:scm => :git, :app => nil, :web => nil)
rescue LoadError
end<% end %>
<% if @options['heroku'] %>
require 'nesta/config'
require 'nesta/models'

namespace :heroku do
  desc "Set Heroku config vars from config.yml"
  task :config do
    Nesta::App.environment = ENV['RACK_ENV'] || 'production'
    settings = {}
    Nesta::Config.settings.map do |variable|
      value = Nesta::Config.send(variable)
      value && settings["NESTA_#{variable.upcase}"] = value
    end
    if Nesta::Config.author
      Nesta::Config.author_settings.map do |author_var|
        value = Nesta::Config.author[author_var]
        if value
        value && settings["NESTA_AUTHOR__#{author_var.upcase}"] = value
      end
    end
    params = settings.map { |k, v| %Q{#{k}="#{v}"} }.join(" ")
    system("heroku config:add #{params}")
  end
end<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nesta-0.9.2 templates/Rakefile
nesta-0.9.1 templates/Rakefile
nesta-0.9.0 templates/Rakefile