class SomervilleStarImporters
  def self.from_options(options)
    new(options).importer
  end

  IMPORTERS = [
    StarReadingImporter,
    StarReadingImporter::HistoricalImporter,
    StarMathImporter,
    StarMathImporter::HistoricalImporter
  ]

  def initialize(options = {})
    @school_scope = options["school"]
  end

  def options
    {
      school_scope: @school_scope,
      client: SftpClient.for_star,
      data_transformer: CsvTransformer.new,
      file_importers: IMPORTERS.map(&:new)
    }
  end

  def importer
    [Importer.new(options)]
  end

end

class SomervilleStarImporters
  def self.from_options(options)
    new(options).importer
  end

  def initialize(options = {})
    @school_scope = options["school"]
  end

  def options
    {
      school_scope: @school_scope,
      client: SftpClient.for_star,
      data_transformer: CsvTransformer.new,
      file_importers: [
        StarReadingImporter,
        StarReadingImporter::HistoricalImporter,
        StarMathImporter,
        StarMathImporter::HistoricalImporter
      ].map(&:new)
    }
  end

  def importer
    [Importer.new(options)]
  end

end

Move STAR importers lists out of constant
Move STAR importers lists out of constant

+ The thor task tries to load up SomervilleStarImporters, which then tries to load the constant
+ But that fails because the Thor task doesn't automatically include the Rails environment
