Support ruby 2.5.0

This commit is contained in:
Jan Suchal
2018-01-09 16:03:17 +01:00
parent 6c1ebbb95c
commit bc56d86a63
3 changed files with 5 additions and 4 deletions

View File

@@ -29,7 +29,8 @@ module Jobs
end
def read_csv_file(csv_path)
CSV.foreach(csv_path, encoding: "bom|utf-8") do |csv_info|
file = File.open(csv_path, encoding: 'bom|utf-8')
CSV.new(file).each do |csv_info|
if csv_info[0]
if (EmailValidator.email_regex =~ csv_info[0])
# email is valid
@@ -45,6 +46,8 @@ module Jobs
rescue Exception => e
log "Bulk Invite Process Failed -- '#{e.message}'"
@failed += 1
ensure
file.close
end
def get_group_ids(group_names, csv_line_number)