Commit 13f4f375f4e7ff810367ef201f98c7b734099f29
1 parent
e391f4b1
Exists in
staging
and in
4 other branches
HOTSPOT: adding argv parameter
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
script/sent_proposal_report
| @@ -2,13 +2,14 @@ | @@ -2,13 +2,14 @@ | ||
| 2 | require File.dirname(__FILE__) + '/../config/environment' | 2 | require File.dirname(__FILE__) + '/../config/environment' |
| 3 | require 'net/smtp' | 3 | require 'net/smtp' |
| 4 | 4 | ||
| 5 | -emails = ['leandronunes@gmail.com', 'leandro.santos@serpro.gov.br'] | 5 | + |
| 6 | +emails = ['leandronunes@gmail.com', 'leandro.santos@serpro.gov.br'] + ARGV | ||
| 7 | +emails.uniq! | ||
| 6 | 8 | ||
| 7 | puts 'Iniciando script' | 9 | puts 'Iniciando script' |
| 8 | 10 | ||
| 9 | file = File.open('data.csv', 'w+') | 11 | file = File.open('data.csv', 'w+') |
| 10 | 12 | ||
| 11 | -#articles = ProposalsDiscussionPlugin::Proposal.all | ||
| 12 | tasks = ProposalsDiscussionPlugin::ProposalTask.all | 13 | tasks = ProposalsDiscussionPlugin::ProposalTask.all |
| 13 | count = 0 | 14 | count = 0 |
| 14 | header = "'Origem';'Status';'Criada em';'Moderado por';'Data de Moderado';'Validado por';'Data de Validado';'Autor';'Proposta'\n" | 15 | header = "'Origem';'Status';'Criada em';'Moderado por';'Data de Moderado';'Validado por';'Data de Validado';'Autor';'Proposta'\n" |