Sha256: 102e907c7779bec361f24a3c283dabee1499a6802e9deae1f52dec53df4d3e00

Contents?: true

Size: 950 Bytes

Versions: 69

Compression:

Stored size: 950 Bytes

Contents

module Fastlane
  class ConfigurationHelper
    def self.parse(action, params)
      first_element = (action.available_options || []).first

      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

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
fastlane-1.66.0 lib/fastlane/configuration_helper.rb
fastlane-1.65.0 lib/fastlane/configuration_helper.rb
fastlane-1.64.0 lib/fastlane/configuration_helper.rb
fastlane-1.63.1 lib/fastlane/configuration_helper.rb
fastlane-1.63.0 lib/fastlane/configuration_helper.rb
fastlane-1.62.0 lib/fastlane/configuration_helper.rb
fastlane-1.61.0 lib/fastlane/configuration_helper.rb
fastlane-1.60.0 lib/fastlane/configuration_helper.rb
fastlane-1.59.0 lib/fastlane/configuration_helper.rb
fastlane-1.58.0 lib/fastlane/configuration_helper.rb
fastlane-1.57.0 lib/fastlane/configuration_helper.rb
fastlane-1.56.0 lib/fastlane/configuration_helper.rb
fastlane-1.55.0 lib/fastlane/configuration_helper.rb
fastlane-1.54.0 lib/fastlane/configuration_helper.rb
fastlane-1.53.0 lib/fastlane/configuration_helper.rb
fastlane-1.52.0 lib/fastlane/configuration_helper.rb
fastlane-1.51.0 lib/fastlane/configuration_helper.rb
fastlane-1.50.0 lib/fastlane/configuration_helper.rb
fastlane-1.49.0 lib/fastlane/configuration_helper.rb
fastlane-1.48.0 lib/fastlane/configuration_helper.rb