Sha256: 5106827d4ba2496494a7b47aa0b5a6d179e2f7fc1138c4675dbb9d7dea4cb7c1

Contents?: true

Size: 787 Bytes

Versions: 10

Compression:

Stored size: 787 Bytes

Contents

module Shipit
  class AnonymousUser
    def present?
      false
    end

    def email
      'anonymous@example.com'
    end

    def login
      'anonymous'
    end

    def name
      'Anonymous'
    end

    def avatar_url
      'https://github.com/images/error/octocat_happy.gif'
    end

    def id
    end

    def github_id
    end

    def logged_in?
      false
    end

    def authorized?
      Shipit.authentication_disabled?
    end

    def stacks_contributed_to
      []
    end

    def avatar_uri
      User::DEFAULT_AVATAR.dup
    end

    def created_at
      Time.at(0).utc
    end
    alias_method :updated_at, :created_at

    def read_attribute_for_serialization(attr)
      public_send(attr)
    end

    def github_api
      Shipit.github.api
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.30.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.29.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.28.1 app/models/shipit/anonymous_user.rb
shipit-engine-0.28.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.27.1 app/models/shipit/anonymous_user.rb
shipit-engine-0.27.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.26.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.25.1 app/models/shipit/anonymous_user.rb
shipit-engine-0.25.0 app/models/shipit/anonymous_user.rb