Sha256: e404c3acbb7a84f32baedadbef27eae25a0baa3b061c0a7cfc6b33f2dd28d281

Contents?: true

Size: 1.01 KB

Versions: 36

Compression:

Stored size: 1.01 KB

Contents

module Fastlane
  class ConfigurationHelper
    def self.parse(action, params)
      begin
        first_element = (action.available_options.first rescue nil) # might also be nil
        
        if first_element and first_element.kind_of?FastlaneCore::ConfigItem
          # default use case
          return FastlaneCore::Configuration.create(action.available_options, params)

        elsif first_element
          puts "Old configuration format for action '#{action}'".red if Helper.is_test?
          return params
        else

          # No parameters... we still need the configuration object array
          FastlaneCore::Configuration.create(action.available_options, {})

        end
      rescue => ex
        if action.respond_to?:action_name
          Helper.log.fatal "You passed invalid parameters to '#{action.action_name}'.".red
          Helper.log.fatal "Check out the error below and available options by running `fastlane action #{action.action_name}`".red
        end
        raise ex
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fastlane-1.20.0 lib/fastlane/configuration_helper.rb
fastlane-1.19.0 lib/fastlane/configuration_helper.rb
fastlane-1.18.0 lib/fastlane/configuration_helper.rb
fastlane-1.17.1 lib/fastlane/configuration_helper.rb
fastlane-1.17.0 lib/fastlane/configuration_helper.rb
fastlane-1.16.0 lib/fastlane/configuration_helper.rb
fastlane-1.15.0 lib/fastlane/configuration_helper.rb
fastlane-1.14.1 lib/fastlane/configuration_helper.rb
fastlane-1.14.0 lib/fastlane/configuration_helper.rb
fastlane-1.13.1 lib/fastlane/configuration_helper.rb
fastlane-1.13.0 lib/fastlane/configuration_helper.rb
fastlane-1.12.0 lib/fastlane/configuration_helper.rb
fastlane-1.11.0 lib/fastlane/configuration_helper.rb
fastlane-1.10.0 lib/fastlane/configuration_helper.rb
fastlane-1.9.0 lib/fastlane/configuration_helper.rb
fastlane-1.8.0 lib/fastlane/configuration_helper.rb
fastlane-1.7.3 lib/fastlane/configuration_helper.rb
fastlane-1.7.2 lib/fastlane/configuration_helper.rb
fastlane-1.7.1 lib/fastlane/configuration_helper.rb
fastlane-1.7.0 lib/fastlane/configuration_helper.rb