Sha256: d15982c5d38ebb448475ebdf0f75b6a6658a38f544c762722506b79b6b915b85

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

require 'github_snap_builder/version'

module GithubSnapBuilder
	class Error < StandardError; end

	class MissingSnapcraftError < Error
		def initialize
			super("snapcraft must be installed and in the PATH")
		end
	end

	class MissingSnapFileError < Error
		def initialize(path)
			super("unable to find snap with path '#{path}'")
		end
	end

	class BuildFailedError < Error
		def initialize
			super("build failed")
		end
	end

	class TooManySnapsError < Error
		def initialize(paths)
			super("expected to find a single snap, found #{paths.length}: #{paths}")
		end
	end

	class SnapPushError < Error
		def initialize
			super("failed to push/release snap")
		end
	end

	class AuthenticationError < Error
		def initialize(message)
			super("failed to authenticate: #{message}")
		end
	end

	class MissingSnapcraftYaml < Error
		def initialize
			super("unable to find snapcraft.yaml")
		end
	end

	class DockerError < Error; end

	class DockerVersionError < DockerError
		def initialize
			super("docker is either not installed or is incompatible")
		end
	end

	class DockerRunError < DockerError
		def initialize(command)
			super("command in docker returned non-zero: #{command}")
		end
	end

	class ConfigurationError < Error; end

	class ConfigurationFieldError < ConfigurationError
		def initialize(field)
			super("configuration field is invalid: '#{field}'")
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
github_snap_builder-0.1.0 lib/github_snap_builder.rb