Sha256: 812b15855eec89b9b1a944a85d3188907fc22c7c480ea067d9821a2c0b7daa33

Contents?: true

Size: 1.14 KB

Versions: 300

Compression:

Stored size: 1.14 KB

Contents

require "fastlane_core"
require "pilot/tester_util"

module Pilot
  class TesterExporter < Manager
    def export_testers(options)
      UI.user_error!("Export file path is required") unless options[:testers_file_path]

      start(options)
      require 'csv'

      app_filter = (config[:apple_id] || config[:app_identifier])
      if app_filter
        app = Spaceship::Application.find(app_filter)
        testers = Spaceship::Tunes::Tester::External.all_by_app(app.apple_id)
      else
        testers = Spaceship::Tunes::Tester::External.all
      end

      file = config[:testers_file_path]

      CSV.open(file, "w") do |csv|
        csv << ['First', 'Last', 'Email', 'Groups', 'Devices', 'Installed Version', 'Install Date']

        testers.each do |tester|
          group_names = tester.groups_list(';') || ""
          install_version = tester.full_version || ""
          pretty_date = tester.pretty_install_date || ""

          csv << [tester.first_name, tester.last_name, tester.email, group_names, tester.devices.count, install_version, pretty_date]
        end

        UI.success("Successfully exported CSV to #{file}")
      end
    end
  end
end

Version data entries

300 entries across 300 versions & 2 rubygems

Version Path
fastlane-2.50.0.beta.20170730010002 pilot/lib/pilot/tester_exporter.rb
fastlane-2.50.0.beta.20170729010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.50.0.beta.20170728010002 pilot/lib/pilot/tester_exporter.rb
fastlane-2.50.0.beta.20170727010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.49.0 pilot/lib/pilot/tester_exporter.rb
fastlane-2.49.0.beta.20170726010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.49.0.beta.20170725010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170724010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170723010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170722010002 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170721010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170720010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170719010002 pilot/lib/pilot/tester_exporter.rb
fastlane-2.48.0.beta.20170718010002 pilot/lib/pilot/tester_exporter.rb
fastlane-2.47.0 pilot/lib/pilot/tester_exporter.rb
fastlane-2.47.0.beta.20170717010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.47.0.beta.20170716010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.47.0.beta.20170715010003 pilot/lib/pilot/tester_exporter.rb
fastlane-2.47.0.beta.20170714010002 pilot/lib/pilot/tester_exporter.rb