Sha256: af6a8298e4bd4f1a293218e19168aa98e6600fb4333d5224f03114d5ace117aa

Contents?: true

Size: 740 Bytes

Versions: 1

Compression:

Stored size: 740 Bytes

Contents

require 'roku-packager/key_gen'
require 'roku-packager/uploader'
require 'roku-packager/packager'

module RokuPackager
  class Client
    def initialize(development_roku_ip, logger = NullLogger)
      @host = development_roku_ip
      @logger = logger
    end

    attr_reader :password, :dev_id, :download_url

    def package(name, path_to_application_zip)
      @logger.info 'Generating keys...'
      @dev_id, @password = KeyGen.new(@host).create

      @logger.info 'Uploading application file...'
      Uploader.new(@host).upload(path_to_application_zip)

      @logger.info 'Building package...'
      uri = Packager.new(@host, name, @password).submit

      uri.to_s
    end
  end

  class NullLogger
    def info
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
roku-packager-0.0.1 lib/roku-packager/client.rb