Sha256: a8e84708369063c6d476bb7b99ba05884626b1dbf0752f7ba68b1d21d96f04f3

Contents?: true

Size: 955 Bytes

Versions: 7

Compression:

Stored size: 955 Bytes

Contents

module Pantograph
  module Actions
    module SharedValues
      DEFAULT_PLATFORM = :DEFAULT_PLATFORM
    end

    class DefaultPlatformAction < Action
      def self.run(params)
        if params.first.nil?
          UI.user_error!('You forgot to pass the default platform')
        end

        platform = params.first.to_sym

        SupportedPlatforms.verify!(platform)

        Actions.lane_context[SharedValues::DEFAULT_PLATFORM] = platform
      end

      def self.description
        'Defines a default platform to not have to specify the platform'
      end

      def self.output
        [
          ['DEFAULT_PLATFORM', 'The default platform']
        ]
      end

      def self.example_code
        [
          'default_platform(:gradle)'
        ]
      end

      def self.category
        :misc
      end

      def self.author
        'KrauseFx'
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pantograph-0.1.22 pantograph/lib/pantograph/actions/default_platform.rb
pantograph-0.1.21 pantograph/lib/pantograph/actions/default_platform.rb
pantograph-0.1.20 pantograph/lib/pantograph/actions/default_platform.rb
pantograph-0.1.19 pantograph/lib/pantograph/actions/default_platform.rb
pantograph-0.1.17 pantograph/lib/pantograph/actions/default_platform.rb
pantograph-0.1.16 pantograph/lib/pantograph/actions/default_platform.rb
pantograph-0.1.15 pantograph/lib/pantograph/actions/default_platform.rb