Sha256: 4c9651c0f1da343215481e535fadf1b5e1a43a0ca4a20441e1cf6baa4526808c

Contents?: true

Size: 929 Bytes

Versions: 33

Compression:

Stored size: 929 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
        UI.error("Old configuration format for action '#{action}'") 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

33 entries across 33 versions & 1 rubygems

Version Path
fastlane-1.111.0 lib/fastlane/configuration_helper.rb
fastlane-1.110.0 lib/fastlane/configuration_helper.rb
fastlane-1.109.0 lib/fastlane/configuration_helper.rb
fastlane-1.108.0 lib/fastlane/configuration_helper.rb
fastlane-1.107.0 lib/fastlane/configuration_helper.rb
fastlane-1.106.2 lib/fastlane/configuration_helper.rb
fastlane-1.106.1 lib/fastlane/configuration_helper.rb
fastlane-1.106.0 lib/fastlane/configuration_helper.rb
fastlane-1.105.3 lib/fastlane/configuration_helper.rb
fastlane-1.105.2 lib/fastlane/configuration_helper.rb
fastlane-1.105.1 lib/fastlane/configuration_helper.rb
fastlane-1.105.0 lib/fastlane/configuration_helper.rb
fastlane-1.104.0 lib/fastlane/configuration_helper.rb
fastlane-1.103.0 lib/fastlane/configuration_helper.rb
fastlane-1.102.0 lib/fastlane/configuration_helper.rb
fastlane-1.101.0 lib/fastlane/configuration_helper.rb
fastlane-1.100.0 lib/fastlane/configuration_helper.rb
fastlane-1.99.0 lib/fastlane/configuration_helper.rb
fastlane-1.98.0 lib/fastlane/configuration_helper.rb
fastlane-1.97.2 lib/fastlane/configuration_helper.rb