GSA/scopeid-script

View on GitHub
app/controllers/fetch_scopeids_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

class FetchScopeidsController < ApplicationController
    http_basic_authenticate_with name: ENV["SCOPEID_CSV_USERNAME"], password: ENV["SCOPEID_CSV_PASSWORD"] if Rails.env.production?
  
  def index
    converter = build_scopeid_converter
    file = converter.build_csv_file
    send_file(file)
  end

  def build_scopeid_converter
      ScopeidConverter.new
  end

end