if Rails.env.development?
  Rails.logger = Logger.new(STDOUT)
end


namespace :urls do

  task jam_tracks: :environment do |task, args|
    File.open('urls.csv', 'w') { |f|
      JamTrack.all.each do |jam_track|
        prefix = "jamtrack-"
        plan_code = jam_track.plan_code["jamtrack-".length..-1]
        f.puts('https://www.jamkazam.com/landing/jamtracks/' + plan_code)
        #f.puts('http://www.jamkazam.com/landing/jamtracks/bands/' + plan_code)
      end
    }
  end

end

