Class: Gitlab::Ci::Status::Core

Inherits:
Object
  • Object
show all
Includes:
Allowable, Routing
Defined in:
lib/gitlab/ci/status/core.rb

Overview

Base abstract class for core status

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Allowable

#can?, #can_all?, #can_any?

Methods included from Routing

includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

#initialize(subject, user) ⇒ Core

Returns a new instance of Core.



16
17
18
19
# File 'lib/gitlab/ci/status/core.rb', line 16

def initialize(subject, user)
  @subject = subject
  @user = user
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



12
13
14
# File 'lib/gitlab/ci/status/core.rb', line 12

def subject
  @subject
end

#userObject (readonly)

Returns the value of attribute user.



12
13
14
# File 'lib/gitlab/ci/status/core.rb', line 12

def user
  @user
end

Instance Method Details

#action_button_titleObject

Raises:

  • (NotImplementedError)


77
78
79
# File 'lib/gitlab/ci/status/core.rb', line 77

def action_button_title
  raise NotImplementedError
end

#action_iconObject

Raises:

  • (NotImplementedError)


61
62
63
# File 'lib/gitlab/ci/status/core.rb', line 61

def action_icon
  raise NotImplementedError
end

#action_methodObject

Raises:

  • (NotImplementedError)


69
70
71
# File 'lib/gitlab/ci/status/core.rb', line 69

def action_method
  raise NotImplementedError
end

#action_pathObject

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/gitlab/ci/status/core.rb', line 65

def action_path
  raise NotImplementedError
end

#action_titleObject

Raises:

  • (NotImplementedError)


73
74
75
# File 'lib/gitlab/ci/status/core.rb', line 73

def action_title
  raise NotImplementedError
end

#badge_tooltipObject

Hint that appears on the build badges



87
88
89
# File 'lib/gitlab/ci/status/core.rb', line 87

def badge_tooltip
  subject.status
end

#confirmation_messageObject



91
92
93
# File 'lib/gitlab/ci/status/core.rb', line 91

def confirmation_message
  nil
end

#details_pathObject

Raises:

  • (NotImplementedError)


53
54
55
# File 'lib/gitlab/ci/status/core.rb', line 53

def details_path
  raise NotImplementedError
end

#faviconObject

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/gitlab/ci/status/core.rb', line 29

def favicon
  raise NotImplementedError
end

#groupObject



45
46
47
# File 'lib/gitlab/ci/status/core.rb', line 45

def group
  self.class.name.demodulize.underscore
end

#has_action?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/gitlab/ci/status/core.rb', line 57

def has_action?
  false
end

#has_details?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/gitlab/ci/status/core.rb', line 49

def has_details?
  false
end

#iconObject

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/gitlab/ci/status/core.rb', line 25

def icon
  raise NotImplementedError
end

#idObject



21
22
23
# File 'lib/gitlab/ci/status/core.rb', line 21

def id
  "#{group}-#{subject.id}"
end

#illustrationObject

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/gitlab/ci/status/core.rb', line 33

def illustration
  raise NotImplementedError
end

#labelObject

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/gitlab/ci/status/core.rb', line 37

def label
  raise NotImplementedError
end

#nameObject



41
42
43
# File 'lib/gitlab/ci/status/core.rb', line 41

def name
  self.class.name.demodulize.underscore.upcase
end

#status_tooltipObject

Hint that appears on all the pipeline graph tooltips and builds on the right sidebar in Job detail view



82
83
84
# File 'lib/gitlab/ci/status/core.rb', line 82

def status_tooltip
  label
end