Sha256: 6cc83a3c4f8b220299f8ebfab8d8e05d1b56a1ac055062dc7e7ecf8ea87cc877

Contents?: true

Size: 734 Bytes

Versions: 8

Compression:

Stored size: 734 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 logged_in?
      false
    end

    def authorized?
      false
    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

8 entries across 8 versions & 1 rubygems

Version Path
shipit-engine-0.21.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.20.1 app/models/shipit/anonymous_user.rb
shipit-engine-0.20.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.19.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.18.1 app/models/shipit/anonymous_user.rb
shipit-engine-0.18.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.17.0 app/models/shipit/anonymous_user.rb
shipit-engine-0.16.0 app/models/shipit/anonymous_user.rb