Sha256: 8e42fc80a11976b48ebcc2b4ca993d0dcf9f6bb445ee908cee989f5ebf916a01

Contents?: true

Size: 610 Bytes

Versions: 11

Compression:

Stored size: 610 Bytes

Contents

module Packagecloud
  class Credentials
    attr_reader :username
    attr_reader :token

    def initialize(username, token)
      @username = username
      @token = token
      if @username.include?("@")
        raise InvalidUsernameException.new("Sorry, looks like you may have " \
                                           "tried to use an email address " \
                                           "instead of your packagecloud.io " \
                                           "username. Please use your " \
                                           "username instead!")
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
travis-packagecloud-ruby-1.1.0 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.8 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.6 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.5 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.4 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.3 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.2 lib/packagecloud/credentials.rb
packagecloud-ruby-1.0.1 lib/packagecloud/credentials.rb
packagecloud-ruby-0.2.23 lib/packagecloud/credentials.rb
packagecloud-ruby-0.2.22 lib/packagecloud/credentials.rb
packagecloud-ruby-0.2.19 lib/packagecloud/credentials.rb