Sha256: 70aebd40b7d31f1ac76e23a62549e50a8b263b7184c8c3d09a3db2f82a75464d

Contents?: true

Size: 664 Bytes

Versions: 2

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true

require "logger"

require "lockbox"
require "sinatra"
require "sinatra/json"
require "thor"
require "zeitwerk"

loader = Zeitwerk::Loader.for_gem

loader.setup

module Cryptoform
  class Error < StandardError; end
  class ConfigValidationError < Cryptoform::Error; end
  class StateMissingError < Cryptoform::Error; end
  class UnknownStateError < Cryptoform::Error; end

  class << self
    def run!(cryptofile)
      config = load_cryptofile!(cryptofile)
      Cryptoform::Server.run!(config.config)
    end

    def load_cryptofile!(cryptofile)
      Cryptoform::Config::Builder.new(cryptofile).tap(&:validate!)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cryptoform-0.5.1 lib/cryptoform.rb
cryptoform-0.5.0 lib/cryptoform.rb