Sha256: 72f1064567c87ac80764a6816748fa489237220782e11900fbcb7dbd099eadd0

Contents?: true

Size: 928 Bytes

Versions: 16

Compression:

Stored size: 928 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
        UI.error("You passed invalid parameters to '#{action.action_name}'.")
        UI.error("Check out the error below and available options by running `fastlane action #{action.action_name}`")
      end
      raise ex
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fastlane-1.89.0 lib/fastlane/configuration_helper.rb
fastlane-1.88.0 lib/fastlane/configuration_helper.rb
fastlane-1.87.1 lib/fastlane/configuration_helper.rb
fastlane-1.87.0 lib/fastlane/configuration_helper.rb
fastlane-1.86.1 lib/fastlane/configuration_helper.rb
fastlane-1.86.0 lib/fastlane/configuration_helper.rb
fastlane-1.85.0 lib/fastlane/configuration_helper.rb
fastlane-1.84.0 lib/fastlane/configuration_helper.rb
fastlane-1.83.0 lib/fastlane/configuration_helper.rb
fastlane-1.82.0 lib/fastlane/configuration_helper.rb
fastlane-1.81.0 lib/fastlane/configuration_helper.rb
fastlane-1.80.0 lib/fastlane/configuration_helper.rb
fastlane-1.70.0 lib/fastlane/configuration_helper.rb
fastlane-1.69.0 lib/fastlane/configuration_helper.rb
fastlane-1.68.0 lib/fastlane/configuration_helper.rb
fastlane-1.67.0 lib/fastlane/configuration_helper.rb