14 lines
336 B
Ruby
14 lines
336 B
Ruby
|
class GithubUsernamesPopulate
|
||
|
def self.usernames_from_pocs
|
||
|
GithubPoc.pluck(:owner).map {|h| h['login']}.sort.uniq
|
||
|
end
|
||
|
|
||
|
def self.update_file
|
||
|
fp = '/data_importer/data/github_usernames.txt'
|
||
|
File.open(fp, "w+") do |f|
|
||
|
puts "Updating username file found at #{fp}"
|
||
|
f.puts(usernames_from_pocs)
|
||
|
end
|
||
|
end
|
||
|
end
|