Sha256: 7944cee92be805772feeec9de753639f2b8f937f0e73331d7d1dc4a068c343e7

Contents?: true

Size: 506 Bytes

Versions: 14

Compression:

Stored size: 506 Bytes

Contents

require 'net/http'
require 'uri'

class FetchEmails
  def initialize; end

  def fetch_emails
    uri = URI.parse('https://docs.google.com/spreadsheets/d/1rJFJQCgpz6GajMlGf0anKwVl5AY6TrYjMnJ4W-_0MK4/pub?gid=703649940&single=true&output=csv')
    response = Net::HTTP.get_response(uri)
    response.body.gsub(/\r\n/, "\n").split("\n").reject { |add| add == 'n/a' }
  end

  def run(_args)
    say '# Here is a complete lit of Renuo email addresses'.colorize :green
    say fetch_emails.join("\n")
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
renuo-cli-1.7.2 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.7.1 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.7.0 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.6.0 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.5.0 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.4.4 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.4.3 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.4.2 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.4.1 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.4.0 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.3.1 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.3.0 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.2.1 lib/renuo/cli/app/fetch_emails.rb
renuo-cli-1.2.0 lib/renuo/cli/app/fetch_emails.rb